Rename wxEllipsizeFlags elements to avoid confusion with wxEllipsizeMode.
We shouldn't use the same "wxELLIPSIZE_" prefix for two different enums, so use wxELLIPSIZE_FLAGS one for wxEllipsizeFlags (they should be used less often than wxEllipsizeMode so it's better to keep the short prefix for the latter). Also add wxELLIPSIZE_FLAGS_NONE flag. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -412,7 +412,7 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
|
||||
}
|
||||
}
|
||||
// we need to remove mnemonics from the label for correct calculations
|
||||
else if ( *pc == wxS('&') && (flags & wxELLIPSIZE_PROCESS_MNEMONICS) != 0 )
|
||||
else if ( *pc == wxS('&') && (flags & wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS) )
|
||||
{
|
||||
// pc+1 is safe: at worst we'll be at end()
|
||||
wxString::const_iterator next = pc + 1;
|
||||
@@ -421,7 +421,7 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
|
||||
//else: remove this ampersand
|
||||
}
|
||||
// we need also to expand tabs to properly calc their size
|
||||
else if ( *pc == wxS('\t') && (flags & wxELLIPSIZE_EXPAND_TAB) != 0 )
|
||||
else if ( *pc == wxS('\t') && (flags & wxELLIPSIZE_FLAGS_EXPAND_TABS) )
|
||||
{
|
||||
// Windows natively expands the TABs to 6 spaces. Do the same:
|
||||
curLine += wxS(" ");
|
||||
|
||||
@@ -248,7 +248,7 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int
|
||||
text = wxControl::Ellipsize(text, dc,
|
||||
ellmode,
|
||||
maxWidth,
|
||||
wxELLIPSIZE_EXPAND_TAB);
|
||||
wxELLIPSIZE_FLAGS_EXPAND_TABS);
|
||||
// Ellipsize() will do something only if necessary
|
||||
|
||||
// update the ellipsization status for this pane; this is used later to
|
||||
|
||||
@@ -316,7 +316,7 @@ void wxStatusBar::DoUpdateStatusText(int nField)
|
||||
*m_pDC,
|
||||
ellmode,
|
||||
maxWidth,
|
||||
wxELLIPSIZE_EXPAND_TAB);
|
||||
wxELLIPSIZE_FLAGS_EXPAND_TABS);
|
||||
|
||||
// update the ellipsization status for this pane; this is used later to
|
||||
// decide whether a tooltip should be shown or not for this pane
|
||||
|
||||
Reference in New Issue
Block a user