]> git.saurik.com Git - wxWidgets.git/blob - samples/xrc/objrefdlg.h
Exclude wxMSW-only code from wxUniversal build under Windows.
[wxWidgets.git] / samples / xrc / objrefdlg.h
1 //-----------------------------------------------------------------------------
2 // Name: objref.h
3 // Purpose: XML resources sample: Object references and ID ranges dialog
4 // Author: David Hart, Vaclav Slavik
5 // RCS-ID: $Id$
6 // Copyright: (c) Vaclav Slavik
7 // Licence: wxWindows licence
8 //-----------------------------------------------------------------------------
9
10 //-----------------------------------------------------------------------------
11 // Begin single inclusion of this .h file condition
12 //-----------------------------------------------------------------------------
13
14 #ifndef _OBJREFDLG_H_
15 #define _OBJREFDLG_H_
16
17 //-----------------------------------------------------------------------------
18 // Headers
19 //-----------------------------------------------------------------------------
20
21 #include "wx/dialog.h"
22 #include "wx/notebook.h"
23
24 //-----------------------------------------------------------------------------
25 // Class definition: ObjrefDialog
26 //-----------------------------------------------------------------------------
27
28 class ObjrefDialog : public wxDialog
29 {
30
31 public:
32
33 // Constructor.
34 ObjrefDialog( wxWindow* parent );
35
36 // Destructor.
37 ~ObjrefDialog();
38
39 private:
40 enum PageNumbers
41 {
42 first_page,
43 copy_page,
44 icons_page,
45 calc_page
46 };
47
48 enum CalcOperator
49 {
50 operator_plus,
51 operator_minus,
52 operator_multiply,
53 operator_divide,
54 operator_equals
55 };
56
57 void OnNotebookPageChanged( wxNotebookEvent &event );
58 void OnUpdateUIFirst(wxUpdateUIEvent& event);
59 void OnUpdateUISecond(wxUpdateUIEvent& event);
60 void OnUpdateUIThird(wxUpdateUIEvent& event);
61 void OnNumeralClick(wxCommandEvent& event);
62 void OnOperatorClick(wxCommandEvent& event);
63 void Calculate();
64 void ClearCalculator();
65
66 wxNotebook *nb;
67 wxTextCtrl *text;
68 wxTextCtrl *result_txt;
69 int current;
70 int previous;
71 bool operator_expected;
72 CalcOperator curr_operator;
73
74 };
75
76 #endif //_OBJREFDLG_H_