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