Add ellipsization support to wxDataViewCtrl.

Implemented ellipsization in the generic, GTK and both OS X Carbon and Cocoa
versions but it currently doesn't work well in GTK as it changes the item
alignment unconditionally, this will need to be fixed later.

The behaviour for the columns is currently inconsistent between ports too:
under MSW they (natively) use wxELLIPSIZE_END, under GTK -- wxELLIPSIZE_NONE
and under OS X the same ellipsization mode as the column contents, i.e.
wxELLIPSIZE_MIDDLE by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-16 21:35:26 +00:00
parent 355ce7adea
commit c937bcac0f
15 changed files with 292 additions and 32 deletions

View File

@@ -245,6 +245,8 @@ wxString wxControlBase::DoEllipsizeSingleLine(const wxString& curLine, const wxD
wxASSERT_MSG(!curLine.Contains('\n'),
"Use Ellipsize() instead!");
wxASSERT_MSG( mode != wxELLIPSIZE_NONE, "shouldn't be called at all then" );
// NOTE: this function assumes that any mnemonic/tab character has already
// been handled if it was necessary to handle them (see Ellipsize())
@@ -348,6 +350,7 @@ wxString wxControlBase::DoEllipsizeSingleLine(const wxString& curLine, const wxD
}
break;
case wxELLIPSIZE_NONE:
default:
wxFAIL_MSG("invalid ellipsize mode");
return curLine;