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