]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/mobile/wxedit/wxedit.h
updated bakefiles to take advantage of Bakefile 0.2.3 (now required)
[wxWidgets.git] / samples / mobile / wxedit / wxedit.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wxedit.h
3// Author: Robert Roebling
4// RCS-ID: $Id$
5// Created: 04/07/02
6/////////////////////////////////////////////////////////////////////////////
7
8#ifndef __wxedit_H__
9#define __wxedit_H__
10
11// Include wxWidgets' headers
12
13#ifndef WX_PRECOMP
14 #include "wx/wx.h"
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
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
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 );
50
51private:
52 void CreateMyMenuBar();
53
54private:
55 wxTextCtrl *m_text;
56 wxString m_filename;
57 wxArrayString m_history;
58
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 );
66
67 void OnCopy( wxCommandEvent &event );
68 void OnCut( wxCommandEvent &event );
69 void OnPaste( wxCommandEvent &event );
70 void OnDelete( wxCommandEvent &event );
71
72 void OnLastFiles( wxCommandEvent &event );
73
74 void MakeHistory();
75 void AddToHistory( const wxString &fname );
76
77 bool Save();
78 bool Discard();
79
80 void OnUpdateUI( wxUpdateUIEvent &event );
81 void OnCloseWindow( wxCloseEvent &event );
82
83private:
84 DECLARE_EVENT_TABLE()
85};
86
87//----------------------------------------------------------------------------
88// MyApp
89//----------------------------------------------------------------------------
90
91class MyApp: public wxApp
92{
93public:
94 MyApp(){};
95
96 virtual bool OnInit();
97 virtual int OnExit();
98};
99
100#endif