X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3bf7524f394af039efe196a186f7969cbabcc19..2654f7e423bb773ca52c8b465c6ec9abfa398e45:/include/wx/tbarbase.h?ds=sidebyside diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index 076620e447..299a018e23 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -79,6 +79,8 @@ public: { m_tbar = tbar; m_id = toolid; + if (m_id == wxID_ANY) + m_id = wxNewId(); m_clientData = clientData; m_bmpNormal = bmpNormal; @@ -235,7 +237,7 @@ protected: wxString m_shortHelpString; wxString m_longHelpString; - DECLARE_NO_COPY_CLASS(wxToolBarToolBase) + DECLARE_DYNAMIC_CLASS_NO_COPY(wxToolBarToolBase) }; // a list of toolbar tools @@ -427,6 +429,9 @@ public: virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const = 0; + // find the tool by id + wxToolBarToolBase *FindById(int toolid) const; + // return TRUE if this is a vertical toolbar, otherwise FALSE bool IsVertical() const { return HasFlag(wxTB_VERTICAL); } @@ -572,8 +577,8 @@ protected: // helper functions // ---------------- - // find the tool by id - wxToolBarToolBase *FindById(int toolid) const; + // un-toggle all buttons in the same radio group + void UnToggleRadioGroup(wxToolBarToolBase *tool); // the list of all our tools wxToolBarToolsList m_tools;