objrefdlg.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //-----------------------------------------------------------------------------
  2. // Name: objref.h
  3. // Purpose: XML resources sample: Object references and ID ranges dialog
  4. // Author: David Hart, Vaclav Slavik
  5. // Copyright: (c) Vaclav Slavik
  6. // Licence: wxWindows licence
  7. //-----------------------------------------------------------------------------
  8. //-----------------------------------------------------------------------------
  9. // Begin single inclusion of this .h file condition
  10. //-----------------------------------------------------------------------------
  11. #ifndef _OBJREFDLG_H_
  12. #define _OBJREFDLG_H_
  13. //-----------------------------------------------------------------------------
  14. // Headers
  15. //-----------------------------------------------------------------------------
  16. #include "wx/dialog.h"
  17. #include "wx/notebook.h"
  18. //-----------------------------------------------------------------------------
  19. // Class definition: ObjrefDialog
  20. //-----------------------------------------------------------------------------
  21. class ObjrefDialog : public wxDialog
  22. {
  23. public:
  24. // Constructor.
  25. ObjrefDialog( wxWindow* parent );
  26. // Destructor.
  27. ~ObjrefDialog();
  28. private:
  29. enum PageNumbers
  30. {
  31. first_page,
  32. copy_page,
  33. icons_page,
  34. calc_page
  35. };
  36. enum CalcOperator
  37. {
  38. operator_plus,
  39. operator_minus,
  40. operator_multiply,
  41. operator_divide,
  42. operator_equals
  43. };
  44. void OnNotebookPageChanged( wxNotebookEvent &event );
  45. void OnUpdateUIFirst(wxUpdateUIEvent& event);
  46. void OnUpdateUISecond(wxUpdateUIEvent& event);
  47. void OnUpdateUIThird(wxUpdateUIEvent& event);
  48. void OnNumeralClick(wxCommandEvent& event);
  49. void OnOperatorClick(wxCommandEvent& event);
  50. void Calculate();
  51. void ClearCalculator();
  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. #endif //_OBJREFDLG_H_