X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e58dab20ce995856303154a367bcca904066525c..eaefbb887c448d837b97857a097426e591bbc1d0:/include/wx/os2/menu.h diff --git a/include/wx/os2/menu.h b/include/wx/os2/menu.h index 4a0baba04b..b088026c21 100644 --- a/include/wx/os2/menu.h +++ b/include/wx/os2/menu.h @@ -14,6 +14,7 @@ #if wxUSE_ACCEL #include "wx/accel.h" + #include "wx/list.h" // for "template" list classes #include "wx/dynarray.h" WX_DEFINE_EXPORTED_ARRAY(wxAcceleratorEntry *, wxAcceleratorArray); @@ -54,29 +55,20 @@ public: // // Implement base class virtuals // - virtual bool DoAppend(wxMenuItem* pItem); - virtual bool DoInsert( size_t nPos + virtual wxMenuItem* DoAppend(wxMenuItem* pItem); + virtual wxMenuItem* DoInsert( size_t nPos ,wxMenuItem* pItem ); virtual wxMenuItem* DoRemove(wxMenuItem* pItem); virtual void Break(void); virtual void SetTitle(const wxString& rTitle); -#if wxUSE_MENU_CALLBACK - wxMenu( const wxString& rTitle - ,const wxFunction fnFunc - ) - : wxMenuBase(rTitle) - { - Init(); - Callback(fnFunc); - } -#endif // wxUSE_MENU_CALLBACK - // // Implementation only from now on // ------------------------------- // + virtual void Attach(wxMenuBarBase* pMenubar); + bool OS2Command( WXUINT uParam ,WXWORD wId ); @@ -99,7 +91,7 @@ public: // // Called by wxMenuBar to build its accel table from the accels of all menus // - bool HasAccels(void) const { return !m_vAccels.IsEmpty(); } + bool HasAccels(void) const { return m_vAccels.IsEmpty(); } size_t GetAccelCount(void) const { return m_vAccels.GetCount(); } size_t CopyAccels(wxAcceleratorEntry* pAccels) const; @@ -141,6 +133,11 @@ private: ,size_t nPos = (size_t)-1 ); + // + // Terminate the current radio group, if any + // + void EndRadioGroup(void); + // // If TRUE, insert a breal before appending the next item // @@ -154,7 +151,12 @@ private: // // The helper variable for creating unique IDs. // - static USHORT m_nextMenuId; + static USHORT m_nextMenuId; + + // + // The position of the first item in the current radio group or -1 + // + int m_nStartRadioGroup; #if wxUSE_ACCEL // @@ -228,16 +230,6 @@ public: ); virtual wxString GetLabelTop(size_t nPos) const; - // - // Compatibility: these functions are deprecated - // -#if WXWIN_COMPATIBILITY - void SetEventHandler(wxEvtHandler* pHandler) { m_pEventHandler = pHandler; } - wxEvtHandler* GetEventHandler(void) { return m_pEventHandler; } - bool Enabled(int nId) const { return IsEnabled(nId); } - bool Checked(int nId) const { return IsChecked(nId); } -#endif // WXWIN_COMPATIBILITY - // // Implementation from now on // @@ -273,10 +265,6 @@ protected: // void Init(void); -#if WXWIN_COMPATIBILITY - wxEvtHandler* m_pEventHandler; -#endif // WXWIN_COMPATIBILITY - wxArrayString m_titles; WXHMENU m_hMenu;