X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef0e92205a01c7d0ca6f381cc690cb5d4fa595c9..67badd5753e70eb50de5ae43ff454e7c1f311e50:/include/wx/control.h diff --git a/include/wx/control.h b/include/wx/control.h index ecc897525c..2bf0c472ad 100644 --- a/include/wx/control.h +++ b/include/wx/control.h @@ -24,6 +24,13 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxControlNameStr[]; +enum wxEllipsizeMode +{ + wxELLIPSIZE_START, + wxELLIPSIZE_MIDDLE, + wxELLIPSIZE_END +}; + // ---------------------------------------------------------------------------- // wxControl is the base class for all controls // ---------------------------------------------------------------------------- @@ -67,12 +74,21 @@ public: // static utilities: + // replaces parts of the string with ellipsis if needed + static wxString Ellipsize(const wxString& label, const wxDC& dc, + wxEllipsizeMode mode, int maxWidth); + // get the string without mnemonic characters ('&') static wxString GetLabelText(const wxString& label); // removes the mnemonics characters static wxString RemoveMnemonics(const wxString& str); + // return the accel index in the string or -1 if none and puts the modified + // string into second parameter if non NULL + static int FindAccelIndex(const wxString& label, + wxString *labelOnly = NULL); + // controls by default inherit the colours of their parents, if a // particular control class doesn't want to do it, it can override