]> git.saurik.com Git - wxWidgets.git/blame - samples/mobile/wxedit/wxedit.h
reSWIGged
[wxWidgets.git] / samples / mobile / wxedit / wxedit.h
CommitLineData
0106a226
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: wxedit.h
3// Author: Robert Roebling
4// Created: 04/07/02
5/////////////////////////////////////////////////////////////////////////////
6
7#ifndef __wxedit_H__
8#define __wxedit_H__
9
a1f9e3ec 10#if defined(__GNUG__) && !defined(__APPLE__)
0106a226
RR
11 #pragma interface "wxedit.cpp"
12#endif
13
14// Include wxWindows' headers
15
16#ifndef WX_PRECOMP
17 #include <wx/wx.h>
18#endif
19
20//----------------------------------------------------------------------------
21// constants
22//----------------------------------------------------------------------------
23
24#define ID_ABOUT 100
25
26#define ID_NEW 200
27#define ID_OPEN 201
28#define ID_SAVE 202
29#define ID_SAVEAS 203
30#define ID_QUIT 204
31
a0760bd3
RR
32#define ID_COPY 300
33#define ID_CUT 301
34#define ID_PASTE 302
35#define ID_DELETE 303
36
37#define ID_LAST_1 401
38#define ID_LAST_2 402
39#define ID_LAST_3 403
40
0106a226
RR
41//----------------------------------------------------------------------------
42// MyFrame
43//----------------------------------------------------------------------------
44
45class MyFrame: public wxFrame
46{
47public:
48 // constructors and destructors
49 MyFrame( wxWindow *parent, wxWindowID id, const wxString &title,
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& size = wxDefaultSize,
52 long style = wxDEFAULT_FRAME_STYLE );
53
54private:
55 void CreateMyMenuBar();
56
57private:
6a4e5f03
RR
58 wxTextCtrl *m_text;
59 wxString m_filename;
60 wxArrayString m_history;
0106a226
RR
61
62private:
63 void OnAbout( wxCommandEvent &event );
64 void OnNew( wxCommandEvent &event );
65 void OnOpen( wxCommandEvent &event );
66 void OnSave( wxCommandEvent &event );
67 void OnSaveAs( wxCommandEvent &event );
68 void OnQuit( wxCommandEvent &event );
a0760bd3
RR
69
70 void OnCopy( wxCommandEvent &event );
71 void OnCut( wxCommandEvent &event );
72 void OnPaste( wxCommandEvent &event );
73 void OnDelete( wxCommandEvent &event );
74
6a4e5f03
RR
75 void OnLastFiles( wxCommandEvent &event );
76
77 void MakeHistory();
78 void AddToHistory( const wxString &fname );
a0760bd3
RR
79
80 bool Save();
81 bool Discard();
82
6a4e5f03 83 void OnUpdateUI( wxUpdateUIEvent &event );
0106a226
RR
84 void OnCloseWindow( wxCloseEvent &event );
85
86private:
87 DECLARE_EVENT_TABLE()
88};
89
90//----------------------------------------------------------------------------
91// MyApp
92//----------------------------------------------------------------------------
93
94class MyApp: public wxApp
95{
96public:
97 MyApp();
98
99 virtual bool OnInit();
100 virtual int OnExit();
101};
102
103#endif