- //virtual void OnDraw(wxDC &dc);
- void OnPaint(wxPaintEvent &WXUNUSED(event));
- virtual void OnMouse(wxMouseEvent& event);
- virtual void OnChar(wxKeyEvent& event);
+ // callbacks
+ // NB: these functions are used as event handlers and must not be virtual
+ void OnPaint(wxPaintEvent &event);
+
+ void OnLeftMouseClick(wxMouseEvent& event)
+ { OnMouse(WXMENU_LAYOUT_LCLICK, event); }
+ void OnRightMouseClick(wxMouseEvent& event)
+ { OnMouse(WXMENU_LAYOUT_RCLICK, event); }
+ void OnMouseDblClick(wxMouseEvent& event)
+ { OnMouse(WXMENU_LAYOUT_DBLCLICK, event); }
+
+ void OnChar(wxKeyEvent& event);
+
+ /// gets called by either Update() or OnPaint()
+ void DoPaint(wxDC &dc);
+
+#ifdef __WXMSW__
+ virtual long MSWGetDlgCode();
+#endif //MSW
+