X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ba06d5a8ccf8c224fcfbd52fa01a55abf7befbd..0567fdfceb09e9e7a44e8ba01a04e2f9c58dee05:/contrib/samples/ogl/ogledit/ogledit.h diff --git a/contrib/samples/ogl/ogledit/ogledit.h b/contrib/samples/ogl/ogledit/ogledit.h index 54847c4701..4b6a447389 100644 --- a/contrib/samples/ogl/ogledit/ogledit.h +++ b/contrib/samples/ogl/ogledit/ogledit.h @@ -9,31 +9,27 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(__APPLE__) -// #pragma interface -#endif - #ifndef _OGLSAMPLE_OGLEDIT_H_ #define _OGLSAMPLE_OGLEDIT_H_ #include -#include +#include // base header of OGL, includes and adjusts wx/deprecated/setup.h // Define a new application class MyFrame; class EditorToolPalette; class MyApp: public wxApp { - public: - MyFrame *frame; - wxDocManager* myDocManager; + public: + MyFrame *frame; + wxDocManager* myDocManager; - MyApp(void); - bool OnInit(void); - int OnExit(void); + MyApp(void); + bool OnInit(void); + int OnExit(void); - // Palette stuff - EditorToolPalette *CreatePalette(wxFrame *parent); + // Palette stuff + EditorToolPalette *CreatePalette(wxFrame *parent); }; DECLARE_APP(MyApp) @@ -42,22 +38,22 @@ DECLARE_APP(MyApp) class MyCanvas; class MyFrame: public wxDocParentFrame { - DECLARE_CLASS(MyFrame) - public: - wxMenu *editMenu; - - MyCanvas *canvas; - EditorToolPalette *palette; - - MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE); + DECLARE_CLASS(MyFrame) +public: + wxMenu *editMenu; + + MyCanvas *canvas; + EditorToolPalette *palette; + + MyFrame(wxDocManager *manager, wxFrame *parent, const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE); - MyCanvas *CreateCanvas(wxView *view, wxFrame *parent); - void OnSize(wxSizeEvent& event); - void OnCloseWindow(wxCloseEvent& event); - void OnAbout(wxCommandEvent& event); + MyCanvas *CreateCanvas(wxView *view, wxFrame *parent); + void OnSize(wxSizeEvent& event); + void OnCloseWindow(wxCloseEvent& event); + void OnAbout(wxCommandEvent& event); DECLARE_EVENT_TABLE() }; @@ -66,13 +62,14 @@ extern MyFrame *GetMainFrame(void); // Menu/undo/redo commands -#define OGLEDIT_CUT 1 -#define OGLEDIT_ADD_SHAPE 2 -#define OGLEDIT_ADD_LINE 3 -#define OGLEDIT_EDIT_LABEL 4 -#define OGLEDIT_CHANGE_BACKGROUND_COLOUR 5 - -#define OGLEDIT_ABOUT 100 +enum +{ + OGLEDIT_ADD_SHAPE = wxID_HIGHEST, + OGLEDIT_ADD_LINE, + OGLEDIT_EDIT_LABEL, + OGLEDIT_CHANGE_BACKGROUND_COLOUR, + OGLEDIT_ABOUT = wxID_ABOUT +}; #endif // _OGLSAMPLE_OGLEDIT_H_