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