X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70d26c3f4ffb24d50457d405c9595fd23f9e5b7c..bc37bb431f2eb2f3aef8ca01888e3f4a1429d9f4:/demos/poem/wxpoem.h?ds=sidebyside diff --git a/demos/poem/wxpoem.h b/demos/poem/wxpoem.h index 2f65c220ed..6809d1d97e 100644 --- a/demos/poem/wxpoem.h +++ b/demos/poem/wxpoem.h @@ -14,7 +14,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "wxpoem.h" #endif @@ -33,12 +33,15 @@ class MyCanvas: public wxWindow { public: MyCanvas(wxFrame *frame, wxWindowID id, const wxPoint& pos, const wxSize& size); + ~MyCanvas(); void OnPaint(wxPaintEvent& event); void OnMouseEvent(wxMouseEvent& event); void OnChar(wxKeyEvent& event); DECLARE_EVENT_TABLE() + private: + wxMenu *popupMenu; }; // Define a new frame @@ -47,7 +50,6 @@ class MainWindow: public wxFrame public: MyCanvas *canvas; MainWindow(wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style); - ~MainWindow(); void OnCloseWindow(wxCloseEvent& event); void OnChar(wxKeyEvent& event); @@ -72,21 +74,21 @@ class MainWindow: public wxFrame void GetIndexLoadPoem(void); void Resize(void); -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() }; // Menu items -#define POEM_NEXT 100 -#define POEM_PREVIOUS 101 -#define POEM_COPY 102 -#define POEM_SEARCH 103 -#define POEM_NEXT_MATCH 104 -#define POEM_ABOUT 105 -#define POEM_EXIT 106 -#define POEM_COMPILE 107 -#define POEM_HELP_CONTENTS 108 -#define POEM_BIGGER_TEXT 109 -#define POEM_SMALLER_TEXT 110 -#define POEM_MINIMIZE 111 - - +enum +{ + POEM_NEXT = wxID_HIGHEST, + POEM_PREVIOUS, + POEM_COPY, + POEM_SEARCH, + POEM_NEXT_MATCH, + POEM_ABOUT, + POEM_EXIT, + POEM_COMPILE, + POEM_BIGGER_TEXT, + POEM_SMALLER_TEXT, + POEM_MINIMIZE +};