Use Connect() of Bind() in the new part of xrc sample.
[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 { first_page, copy_page, icons_page, calc_page };
41 enum CalcOperator { operator_plus, operator_minus, operator_multiply, operator_divide, operator_equals };
42
43 void OnNotebookPageChanged( wxNotebookEvent &event );
44 void OnUpdateUIFirst(wxUpdateUIEvent& event);
45 void OnUpdateUISecond(wxUpdateUIEvent& event);
46 void OnUpdateUIThird(wxUpdateUIEvent& event);
47 void OnNumeralClick(wxCommandEvent& event);
48 void OnOperatorClick(wxCommandEvent& event);
49 void Calculate();
50 void ClearCalculator();
51
52 wxNotebook *nb;
53 wxTextCtrl *text;
54 wxTextCtrl *result_txt;
55 int current;
56 int previous;
57 bool operator_expected;
58 CalcOperator curr_operator;
59
60 };
61
62 #endif //_OBJREFDLG_H_