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