forked from githubofhuo/KARNAUGH-MAP-MINIMIZER
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TRUTHTABLE.H
48 lines (37 loc) · 1.12 KB
/
TRUTHTABLE.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef _TRUTHTABLE_H_
#define _TRUTHTABLE_H_
#include <wx/wx.h>
#include <wx/grid.h>
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_VALUE_CHANGE, -1)
END_DECLARE_EVENT_TYPES()
class TruthTable : public wxGrid
{
public:
TruthTable(wxWindow* parent, wxWindowID id, unsigned int vars, wxLocale& locale, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, const wxString& name = wxPanelNameStr);
void DisplayPopup(wxGridEvent& event);
void OnCellChange(wxGridEvent& event);
void OnMenuSet1( wxCommandEvent& event );
void OnMenuSet0( wxCommandEvent& event );
void OnMenuSetDC( wxCommandEvent& event );
void OnMenuSetRand(wxCommandEvent& event);
void SetVars(unsigned int vars);
void SetShowZeros(bool s);
bool GetShowZeros();
private:
wxMenu* stateMenu;
unsigned int numberOfVariables;
unsigned int menuCol, menuRow;
bool showZeros;
wxPoint popup;
wxLocale& m_locale;
DECLARE_EVENT_TABLE()
};
enum
{
MENU_SET1=100,
MENU_SET0,
MENU_SETDC,
MENU_SETRAND
};
#endif // _TRUTHTABLE_H_