X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83df96d63a52ebb08b9e32549dc255354b4a18d0..f6840be66eb772c08f0cbb43de677509d5d132bb:/include/wx/motif/menu.h diff --git a/include/wx/motif/menu.h b/include/wx/motif/menu.h index 50af6f3781..b4f94426d1 100644 --- a/include/wx/motif/menu.h +++ b/include/wx/motif/menu.h @@ -12,12 +12,13 @@ #ifndef _WX_MOTIF_MENU_H_ #define _WX_MOTIF_MENU_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "menu.h" #endif #include "wx/colour.h" #include "wx/font.h" +#include "wx/arrstr.h" class wxFrame; @@ -37,9 +38,9 @@ public: virtual ~wxMenu(); // implement base class virtuals - virtual bool DoAppend(wxMenuItem *item); - virtual bool DoInsert(size_t pos, wxMenuItem *item); - virtual wxMenuItem *DoRemove(wxMenuItem *item); + virtual wxMenuItem* DoAppend(wxMenuItem *item); + virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); + virtual wxMenuItem* DoRemove(wxMenuItem *item); virtual void Break(); @@ -47,14 +48,6 @@ public: bool ProcessCommand(wxCommandEvent& event); - wxMenu(const wxString& title, const wxFunction func) - : wxMenuBase(title) - { - Init(); - - Callback(func); - } - //// Motif-specific WXWidget GetButtonWidget() const { return m_buttonWidget; } void SetButtonWidget(WXWidget buttonWidget) { m_buttonWidget = buttonWidget; } @@ -74,7 +67,7 @@ public: WXWidget CreateMenu(wxMenuBar *menuBar, WXWidget parent, wxMenu *topMenu, const wxString& title = wxEmptyString, - bool isPulldown = FALSE); + bool isPulldown = false); // For popups, need to destroy, then recreate menu for a different (or // possibly same) window, since the parent may change. @@ -88,12 +81,13 @@ public: void SetBackgroundColour(const wxColour& colour); void SetForegroundColour(const wxColour& colour); void SetFont(const wxFont& colour); - void ChangeFont(bool keepOriginalSize = FALSE); + void ChangeFont(bool keepOriginalSize = false); WXWidget GetHandle() const { return m_menuWidget; } bool IsTearOff() const { return (m_style & wxMENU_TEAROFF) != 0; } - + + void DestroyWidgetAndDetach(); public: // Motif-specific data int m_numColumns; @@ -123,7 +117,8 @@ class wxMenuBar : public wxMenuBarBase public: wxMenuBar() { Init(); } wxMenuBar(long WXUNUSED(style)) { Init(); } - wxMenuBar(int n, wxMenu *menus[], const wxString titles[]); + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + wxMenuBar(size_t n, wxMenu *menus[], const wxArrayString& titles, long style = 0); virtual ~wxMenuBar(); // implement base class (pure) virtuals @@ -163,7 +158,7 @@ public: virtual bool SetBackgroundColour(const wxColour& colour); virtual bool SetForegroundColour(const wxColour& colour); virtual bool SetFont(const wxFont& colour); - void ChangeFont(bool keepOriginalSize = FALSE); + void ChangeFont(bool keepOriginalSize = false); public: // common part of all ctors