]> git.saurik.com Git - wxWidgets.git/blob - contrib/samples/ogl/ogledit/ogledit.h
Removed every usage of obsolete wxTLW flags. 2.6 compatibility markup for them.
[wxWidgets.git] / contrib / samples / ogl / ogledit / ogledit.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: contrib/samples/ogl/ogledit/ogledit.h
3 // Purpose: OGL sample
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 12/07/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _OGLSAMPLE_OGLEDIT_H_
13 #define _OGLSAMPLE_OGLEDIT_H_
14
15 #include "wx/docview.h"
16 #include "wx/ogl/ogl.h" // base header of OGL, includes and adjusts wx/deprecated/setup.h
17
18 // Define a new application
19 class MyFrame;
20 class EditorToolPalette;
21 class MyApp: public wxApp
22 {
23 public:
24 MyFrame *frame;
25 wxDocManager* myDocManager;
26
27 MyApp(void);
28 bool OnInit(void);
29 int OnExit(void);
30
31 // Palette stuff
32 EditorToolPalette *CreatePalette(wxFrame *parent);
33 };
34
35 DECLARE_APP(MyApp)
36
37 // Define a new frame
38 class MyCanvas;
39 class MyFrame: public wxDocParentFrame
40 {
41 DECLARE_CLASS(MyFrame)
42 public:
43 wxMenu *editMenu;
44
45 MyCanvas *canvas;
46 EditorToolPalette *palette;
47
48 MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxDEFAULT_FRAME_STYLE);
52
53 MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
54 void OnSize(wxSizeEvent& event);
55 void OnCloseWindow(wxCloseEvent& event);
56 void OnAbout(wxCommandEvent& event);
57
58 DECLARE_EVENT_TABLE()
59 };
60
61 extern MyFrame *GetMainFrame(void);
62
63 // Menu/undo/redo commands
64
65 enum
66 {
67 OGLEDIT_ADD_SHAPE = wxID_HIGHEST,
68 OGLEDIT_ADD_LINE,
69 OGLEDIT_EDIT_LABEL,
70 OGLEDIT_CHANGE_BACKGROUND_COLOUR,
71 OGLEDIT_ABOUT = wxID_ABOUT
72 };
73
74 #endif
75 // _OGLSAMPLE_OGLEDIT_H_