]> git.saurik.com Git - wxWidgets.git/blob - contrib/samples/ogl/ogledit/ogledit.h
unused var warning in Mac build
[wxWidgets.git] / contrib / samples / ogl / ogledit / ogledit.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: 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 #if defined(__GNUG__) && !defined(__APPLE__)
13 // #pragma interface
14 #endif
15
16 #ifndef _OGLSAMPLE_OGLEDIT_H_
17 #define _OGLSAMPLE_OGLEDIT_H_
18
19 #include <wx/docview.h>
20 #include <wx/ogl/ogl.h> // base header of OGL, includes and adjusts wx/deprecated/setup.h
21
22 // Define a new application
23 class MyFrame;
24 class EditorToolPalette;
25 class MyApp: public wxApp
26 {
27 public:
28 MyFrame *frame;
29 wxDocManager* myDocManager;
30
31 MyApp(void);
32 bool OnInit(void);
33 int OnExit(void);
34
35 // Palette stuff
36 EditorToolPalette *CreatePalette(wxFrame *parent);
37 };
38
39 DECLARE_APP(MyApp)
40
41 // Define a new frame
42 class MyCanvas;
43 class MyFrame: public wxDocParentFrame
44 {
45 DECLARE_CLASS(MyFrame)
46 public:
47 wxMenu *editMenu;
48
49 MyCanvas *canvas;
50 EditorToolPalette *palette;
51
52 MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title,
53 const wxPoint& pos = wxDefaultPosition,
54 const wxSize& size = wxDefaultSize,
55 long style = wxDEFAULT_FRAME_STYLE);
56
57 MyCanvas *CreateCanvas(wxView *view, wxFrame *parent);
58 void OnSize(wxSizeEvent& event);
59 void OnCloseWindow(wxCloseEvent& event);
60 void OnAbout(wxCommandEvent& event);
61
62 DECLARE_EVENT_TABLE()
63 };
64
65 extern MyFrame *GetMainFrame(void);
66
67 // Menu/undo/redo commands
68
69 enum
70 {
71 OGLEDIT_ADD_SHAPE = wxID_HIGHEST,
72 OGLEDIT_ADD_LINE,
73 OGLEDIT_EDIT_LABEL,
74 OGLEDIT_CHANGE_BACKGROUND_COLOUR,
75 OGLEDIT_ABOUT = wxID_ABOUT
76 };
77
78 #endif
79 // _OGLSAMPLE_OGLEDIT_H_