X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9add93670bb4a38e4007b8422b34b29b6194eecb..624697a4482633ad6ab28ae98f7796bd75381e24:/include/wx/univ/menu.h diff --git a/include/wx/univ/menu.h b/include/wx/univ/menu.h index 874f5bd896..6515c41b36 100644 --- a/include/wx/univ/menu.h +++ b/include/wx/univ/menu.h @@ -12,10 +12,6 @@ #ifndef _WX_UNIV_MENU_H_ #define _WX_UNIV_MENU_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "univmenu.h" -#endif - #if wxUSE_ACCEL #include "wx/accel.h" #endif // wxUSE_ACCEL @@ -23,12 +19,12 @@ #include "wx/dynarray.h" // fwd declarations -class WXDLLEXPORT wxMenuInfo; +class WXDLLIMPEXP_FWD_CORE wxMenuInfo; WX_DECLARE_EXPORTED_OBJARRAY(wxMenuInfo, wxMenuInfoArray); -class WXDLLEXPORT wxMenuGeometryInfo; -class WXDLLEXPORT wxPopupMenuWindow; -class WXDLLEXPORT wxRenderer; +class WXDLLIMPEXP_FWD_CORE wxMenuGeometryInfo; +class WXDLLIMPEXP_FWD_CORE wxPopupMenuWindow; +class WXDLLIMPEXP_FWD_CORE wxRenderer; // ---------------------------------------------------------------------------- // wxMenu @@ -54,7 +50,7 @@ public: // show this menu at the given position (in screen coords) and optionally // select its first item void Popup(const wxPoint& pos, const wxSize& size, - bool selectFirst = TRUE); + bool selectFirst = true); // dismiss the menu void Dismiss(); @@ -65,11 +61,11 @@ public: // implementation only from here - // do as if this item were clicked, return TRUE if the resulting event was - // processed, FALSE otherwise + // do as if this item were clicked, return true if the resulting event was + // processed, false otherwise bool ClickItem(wxMenuItem *item); - // process the key event, return TRUE if done + // process the key event, return true if done bool ProcessKeyDown(int key); #if wxUSE_ACCEL @@ -147,6 +143,7 @@ class WXDLLEXPORT wxMenuBar : public wxMenuBarBase public: // ctors and dtor wxMenuBar(long WXUNUSED(style) = 0) { Init(); } + wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); virtual ~wxMenuBar(); // implement base class virtuals @@ -158,8 +155,8 @@ public: virtual void EnableTop(size_t pos, bool enable); virtual bool IsEnabledTop(size_t pos) const; - virtual void SetLabelTop(size_t pos, const wxString& label); - virtual wxString GetLabelTop(size_t pos) const; + virtual void SetMenuLabel(size_t pos, const wxString& label); + virtual wxString GetMenuLabel(size_t pos) const; virtual void Attach(wxFrame *frame); virtual void Detach(); @@ -167,8 +164,8 @@ public: // get the next item for the givan accel letter (used by wxFrame), return // -1 if none // - // if unique is not NULL, filled with TRUE if there is only one item with - // this accel, FALSE if two or more + // if unique is not NULL, filled with true if there is only one item with + // this accel, false if two or more int FindNextItemForAccel(int idxStart, int keycode, bool *unique = NULL) const; @@ -183,7 +180,7 @@ public: #endif // wxUSE_ACCEL // called by wxMenu when it is dismissed - void OnDismissMenu(bool dismissMenuBar = FALSE); + void OnDismissMenu(bool dismissMenuBar = false); protected: // common part of all ctors @@ -195,7 +192,7 @@ protected: void OnKeyDown(wxKeyEvent& event); void OnKillFocus(wxFocusEvent& event); - // process the mouse move event, return TRUE if we did, FALSE to continue + // process the mouse move event, return true if we did, false to continue // processing as usual // // the coordinates are client coordinates of menubar, convert if necessary @@ -236,7 +233,7 @@ protected: void DoSelectMenu(size_t pos); // popup the currently selected menu - void PopupCurrentMenu(bool selectFirst = TRUE); + void PopupCurrentMenu(bool selectFirst = true); // hide the currently selected menu void DismissMenu(); @@ -247,6 +244,9 @@ protected: // we don't want to have focus except while selecting from menu void GiveAwayFocus(); + // Release the mouse capture if we have it + bool ReleaseMouseCapture(); + // the array containing extra menu info we need wxMenuInfoArray m_menuInfos;