Make wxControlBase::DoEllipsizeSingleLine() private function
This function doesn't need to be a method of wxControl, so don't make it one. No real changes, just improve the encapsulation.
This commit is contained in:
parent
8fcedbed7b
commit
05627cf54c
@ -178,11 +178,6 @@ protected:
|
||||
// initialize the common fields of wxCommandEvent
|
||||
void InitCommandEvent(wxCommandEvent& event) const;
|
||||
|
||||
// Ellipsize() helper:
|
||||
static wxString DoEllipsizeSingleLine(const wxString& label, const wxDC& dc,
|
||||
wxEllipsizeMode mode, int maxWidth,
|
||||
int replacementWidth);
|
||||
|
||||
#if wxUSE_MARKUP
|
||||
// Remove markup from the given string, returns empty string on error i.e.
|
||||
// if markup was syntactically invalid.
|
||||
|
@ -403,12 +403,9 @@ struct EllipsizeCalculator
|
||||
bool m_isOk;
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
/* static and protected */
|
||||
wxString wxControlBase::DoEllipsizeSingleLine(const wxString& curLine, const wxDC& dc,
|
||||
wxEllipsizeMode mode, int maxFinalWidthPx,
|
||||
int replacementWidthPx)
|
||||
wxString DoEllipsizeSingleLine(const wxString& curLine, const wxDC& dc,
|
||||
wxEllipsizeMode mode, int maxFinalWidthPx,
|
||||
int replacementWidthPx)
|
||||
{
|
||||
wxASSERT_MSG(replacementWidthPx > 0, "Invalid parameters");
|
||||
wxASSERT_LEVEL_2_MSG(!curLine.Contains('\n'),
|
||||
@ -523,6 +520,9 @@ wxString wxControlBase::DoEllipsizeSingleLine(const wxString& curLine, const wxD
|
||||
return calc.GetEllipsizedText();
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
/* static */
|
||||
wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
|
||||
wxEllipsizeMode mode, int maxFinalWidth,
|
||||
|
Loading…
Reference in New Issue
Block a user