]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/univ/menu.h
Added support for delayed deactivation of windows (for MDI)
[wxWidgets.git] / include / wx / univ / menu.h
index c8f14231eb37c7fd2cc766f6185de09e230ba83e..4f1c1c888e62b29dc2403b59c1b4c1bc6ac09568 100644 (file)
 class WXDLLEXPORT wxMenuInfo;
 WX_DECLARE_OBJARRAY(wxMenuInfo, wxMenuInfoArray);
 
-class wxPopupMenuWindow;
-
+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
 // ----------------------------------------------------------------------------
@@ -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,12 +130,11 @@ private:
     wxAcceleratorTable m_accelTable;
 #endif // wxUSE_ACCEL
 
+    // the position of the first item in the current radio group or -1
+    int m_startRadioGroup;
+
     // it calls out OnDismiss()
-#ifdef __WXMAC__
     friend class wxPopupMenuWindow;
-#else
-    friend wxPopupMenuWindow;
-#endif
     DECLARE_DYNAMIC_CLASS(wxMenu)
 };
 
@@ -278,11 +266,7 @@ private:
     bool m_shouldShowMenu;
 
     // it calls out ProcessMouseEvent()
-#ifdef __WXMAC__
     friend class wxPopupMenuWindow;
-#else
-    friend wxPopupMenuWindow;
-#endif
 
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxMenuBar)