]> git.saurik.com Git - wxWidgets.git/blob - samples/newgrid/griddemo.h
651d40112fdd616a07c56db7b21d30f05ccf0383
[wxWidgets.git] / samples / newgrid / griddemo.h
1 // griddemo.h
2 //
3 // grid test program
4 //
5
6
7 #ifndef griddemo_h
8 #define griddemo_h
9
10
11 class wxGrid;
12
13 class GridApp : public wxApp
14 {
15 public:
16 bool OnInit();
17 };
18
19
20 class GridFrame : public wxFrame
21 {
22 wxGrid *grid;
23 wxTextCtrl *logWin;
24 wxLogTextCtrl *logger;
25 wxString logBuf;
26
27 void SetDefaults();
28 void ToggleRowLabels( wxCommandEvent& );
29 void ToggleColLabels( wxCommandEvent& );
30 void ToggleControlPanel( wxCommandEvent& );
31 void ToggleCellEdit( wxCommandEvent& );
32 void SetLabelColour( wxCommandEvent& );
33 void SetLabelTextColour( wxCommandEvent& );
34 void SetRowLabelHorizAlignment( wxCommandEvent& );
35 void SetRowLabelVertAlignment( wxCommandEvent& );
36 void SetColLabelHorizAlignment( wxCommandEvent& );
37 void SetColLabelVertAlignment( wxCommandEvent& );
38 void SetGridLineColour( wxCommandEvent& );
39 void ClearGrid( wxCommandEvent& );
40
41 void About( wxCommandEvent& );
42
43 void OnLabelLeftClick( wxGridEvent& );
44 void OnCellLeftClick( wxGridEvent& );
45 void OnRowSize( wxGridSizeEvent& );
46 void OnColSize( wxGridSizeEvent& );
47 void OnRangeSelected( wxGridRangeSelectEvent& );
48 void OnCellValueChanged( wxGridEvent& );
49
50 public:
51 GridFrame();
52 ~GridFrame();
53
54 void OnSize( wxSizeEvent& );
55 void OnQuit( wxCommandEvent& );
56
57 enum { ID_TOGGLEROWLABELS = 100,
58 ID_TOGGLECOLLABELS,
59 ID_TOGGLECONTROLPANEL,
60 ID_TOGGLECELLEDIT,
61 ID_SETLABELCOLOUR,
62 ID_SETLABELTEXTCOLOUR,
63 ID_ROWLABELALIGN,
64 ID_ROWLABELHORIZALIGN,
65 ID_ROWLABELVERTALIGN,
66 ID_COLLABELALIGN,
67 ID_COLLABELHORIZALIGN,
68 ID_COLLABELVERTALIGN,
69 ID_GRIDLINECOLOUR,
70 ID_CLEARGRID,
71 ID_ABOUT,
72
73 ID_TESTFUNC };
74
75 DECLARE_EVENT_TABLE()
76 };
77
78
79 #endif
80