X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f7387de542b93fbad052e0b03d3f80c574cc3a88..9018abe3ef28d237b0421c8d96987907adbe5532:/include/wx/msw/menu.h diff --git a/include/wx/msw/menu.h b/include/wx/msw/menu.h index f5d0a6a1a6..33c6701ca6 100644 --- a/include/wx/msw/menu.h +++ b/include/wx/msw/menu.h @@ -54,6 +54,10 @@ public: // delete an item void Delete(int id); /* If it's a submenu, menu is not destroyed. VZ: why? */ + // Client data + inline void SetClientData(void* clientData) { m_clientData = clientData; } + inline void* GetClientData() const { return m_clientData; } + // menu item control void Enable(int id, bool Flag); bool Enabled(int id) const; @@ -74,11 +78,17 @@ public: virtual wxString GetHelpString(int id) const ; // find item - // Finds the item id matching the given string, NOT_FOUND if not found. + // Finds the item id matching the given string, wxNOT_FOUND if not found. virtual int FindItem(const wxString& itemString) const ; // Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL. wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const; + // Updates the UI for a menu and all submenus recursively. + // source is the object that has the update event handlers + // defined for it. If NULL, the menu or associated window + // will be used. + void UpdateUI(wxEvtHandler* source = (wxEvtHandler*) NULL); + void ProcessCommand(wxCommandEvent& event); inline void Callback(const wxFunction func) { m_callback = func; } @@ -120,6 +130,7 @@ public: wxEvtHandler * m_parent; wxEvtHandler * m_eventHandler; wxWindow *m_pInvokingWindow; + void* m_clientData; }; // ---------------------------------------------------------------------------- @@ -132,6 +143,7 @@ class WXDLLEXPORT wxMenuBar: public wxEvtHandler public: wxMenuBar(); + wxMenuBar( long style ); wxMenuBar(int n, wxMenu *menus[], const wxString titles[]); ~wxMenuBar();