]> git.saurik.com Git - wxWidgets.git/blob - samples/newgrid/griddemo.h
M_PI is not ANSI
[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
34 void ToggleRowLabels( wxCommandEvent& );
35 void ToggleColLabels( wxCommandEvent& );
36 void ToggleEditing( 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
45 void InsertRow( wxCommandEvent& );
46 void InsertCol( wxCommandEvent& );
47 void DeleteSelectedRows( wxCommandEvent& );
48 void DeleteSelectedCols( wxCommandEvent& );
49 void ClearGrid( wxCommandEvent& );
50
51 void OnLabelLeftClick( wxGridEvent& );
52 void OnCellLeftClick( wxGridEvent& );
53 void OnRowSize( wxGridSizeEvent& );
54 void OnColSize( wxGridSizeEvent& );
55 void OnSelectCell( wxGridEvent& );
56 void OnRangeSelected( wxGridRangeSelectEvent& );
57 void OnCellValueChanged( wxGridEvent& );
58
59 public:
60 GridFrame();
61 ~GridFrame();
62
63 void OnQuit( wxCommandEvent& );
64 void About( wxCommandEvent& );
65
66 enum { ID_TOGGLEROWLABELS = 100,
67 ID_TOGGLECOLLABELS,
68 ID_TOGGLEEDIT,
69 ID_SETLABELCOLOUR,
70 ID_SETLABELTEXTCOLOUR,
71 ID_ROWLABELALIGN,
72 ID_ROWLABELHORIZALIGN,
73 ID_ROWLABELVERTALIGN,
74 ID_COLLABELALIGN,
75 ID_COLLABELHORIZALIGN,
76 ID_COLLABELVERTALIGN,
77 ID_GRIDLINECOLOUR,
78 ID_INSERTROW,
79 ID_INSERTCOL,
80 ID_DELETEROW,
81 ID_DELETECOL,
82 ID_CLEARGRID,
83 ID_ABOUT,
84
85 ID_TESTFUNC };
86
87 DECLARE_EVENT_TABLE()
88 };
89
90
91 #endif
92