reorder GetLabel(), GetLabelText(), SetLabel() and SetLabelText() function declarations, implementations and relative documentations.

Add wxStaticTextBase::GetLabelWithoutMarkup() and use it in the wxMSW implementation of wxStaticText::SetLabel() to close bug #11446; the function RemoveMarkup() which was previously used in fact could not check for presence/absence of wxST_MARKUP style since it's a static function.

Add wxStaticTextBase::SetLabelText() functions for symmetry with wxControlBase::SetLabelText()

Add test unit for both wxControl::*Label* and wxStaticText::*Label* functions.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2010-03-21 21:39:15 +00:00
parent 90497db95b
commit 32ee98eb76
18 changed files with 522 additions and 381 deletions

View File

@@ -88,13 +88,6 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
return true;
}
/* static */
wxString wxControlBase::GetLabelText(const wxString& label)
{
// we don't want strip the TABs here, just the mnemonics
return wxStripMenuCodes(label, wxStrip_Mnemonics);
}
void wxControlBase::Command(wxCommandEvent& event)
{
(void)GetEventHandler()->ProcessEvent(event);
@@ -154,9 +147,17 @@ void wxControlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
#endif // wxUSE_RADIOBTN
}
/* static */
wxString wxControlBase::GetLabelText(const wxString& label)
{
// we don't want strip the TABs here, just the mnemonics
return wxStripMenuCodes(label, wxStrip_Mnemonics);
}
/* static */
wxString wxControlBase::RemoveMnemonics(const wxString& str)
{
// we don't want strip the TABs here, just the mnemonics
return wxStripMenuCodes(str, wxStrip_Mnemonics);
}