X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..95561ddfc3c0c84c71316d40cb539135fa68b440:/include/wx/univ/menu.h diff --git a/include/wx/univ/menu.h b/include/wx/univ/menu.h index 6df7c27f6b..874f5bd896 100644 --- a/include/wx/univ/menu.h +++ b/include/wx/univ/menu.h @@ -5,14 +5,14 @@ // Modified by: // Created: 05.05.01 // RCS-ID: $Id$ -// Copyright: (c) 2001 Vadim Zeitlin +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_UNIV_MENU_H_ #define _WX_UNIV_MENU_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "univmenu.h" #endif @@ -24,26 +24,12 @@ // fwd declarations class WXDLLEXPORT wxMenuInfo; -WX_DECLARE_OBJARRAY(wxMenuInfo, wxMenuInfoArray); - -class wxPopupMenuWindow; +WX_DECLARE_EXPORTED_OBJARRAY(wxMenuInfo, wxMenuInfoArray); +class WXDLLEXPORT wxMenuGeometryInfo; +class WXDLLEXPORT wxPopupMenuWindow; class WXDLLEXPORT wxRenderer; -// ---------------------------------------------------------------------------- -// wxMenu helper classes, used in implementation only -// ---------------------------------------------------------------------------- - -// used by wxRenderer -class WXDLLEXPORT wxMenuGeometryInfo -{ -public: - // get the total size of the menu - virtual wxSize GetSize() const = 0; - - virtual ~wxMenuGeometryInfo(); -}; - // ---------------------------------------------------------------------------- // wxMenu // ---------------------------------------------------------------------------- @@ -93,9 +79,9 @@ public: protected: // 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); // common part of DoAppend and DoInsert void OnItemAdded(wxMenuItem *item); @@ -129,6 +115,9 @@ private: // common part of all ctors void Init(); + // terminate the current radio group, if any + void EndRadioGroup(); + // the exact menu geometry is defined by a struct derived from this one // which is opaque and defined by the renderer wxMenuGeometryInfo *m_geometry; @@ -141,9 +130,11 @@ private: wxAcceleratorTable m_accelTable; #endif // wxUSE_ACCEL - // it calls out OnDismiss() - friend wxPopupMenuWindow; + // the position of the first item in the current radio group or -1 + int m_startRadioGroup; + // it calls out OnDismiss() + friend class wxPopupMenuWindow; DECLARE_DYNAMIC_CLASS(wxMenu) }; @@ -275,7 +266,7 @@ private: bool m_shouldShowMenu; // it calls out ProcessMouseEvent() - friend wxPopupMenuWindow; + friend class wxPopupMenuWindow; DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxMenuBar)