]>
git.saurik.com Git - wxWidgets.git/blob - contrib/samples/ogl/ogledit/ogledit.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #ifndef _OGLSAMPLE_OGLEDIT_H_
17 #define _OGLSAMPLE_OGLEDIT_H_
19 #include <wx/docview.h>
21 // Define a new application
23 class EditorToolPalette
;
24 class MyApp
: public wxApp
28 wxDocManager
* myDocManager
;
35 EditorToolPalette
*CreatePalette(wxFrame
*parent
);
42 class MyFrame
: public wxDocParentFrame
44 DECLARE_CLASS(MyFrame
)
49 EditorToolPalette
*palette
;
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
);
56 MyCanvas
*CreateCanvas(wxView
*view
, wxFrame
*parent
);
57 void OnSize(wxSizeEvent
& event
);
58 void OnCloseWindow(wxCloseEvent
& event
);
59 void OnAbout(wxCommandEvent
& event
);
64 extern MyFrame
*GetMainFrame(void);
66 // Menu/undo/redo commands
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
74 #define OGLEDIT_ABOUT 100
77 // _OGLSAMPLE_OGLEDIT_H_