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