X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8b48f4de94e72daa0d5ddf9d2641db82d294280..54429bb380a74d200ec735ac360599914b016266:/include/wx/univ/control.h?ds=sidebyside diff --git a/include/wx/univ/control.h b/include/wx/univ/control.h index 3a0217dfed..2c88bbe682 100644 --- a/include/wx/univ/control.h +++ b/include/wx/univ/control.h @@ -64,13 +64,15 @@ public: // this function will filter out '&' characters and will put the // accelerator char (the one immediately after '&') into m_chAccel - virtual void SetLabel(const wxString &label); - virtual wxString GetLabel() const; + virtual void SetLabel(const wxString& label); + + // return the current label + virtual wxString GetLabel() const { return m_label; } // wxUniversal-specific methods // return the accel index in the string or -1 if none and puts the modified - // string intosecond parameter if non NULL + // string into second parameter if non NULL static int FindAccelIndex(const wxString& label, wxString *labelOnly = NULL); @@ -89,6 +91,11 @@ protected: // common part of all ctors void Init(); + // set m_label and m_indexAccel and refresh the control to show the new + // label (but, unlike SetLabel(), don't call the base class SetLabel() thus + // avoiding to change wxControlBase::m_labelOrig) + void UnivDoSetLabel(const wxString& label); + private: // label and accel info wxString m_label;