Implement support for ellipsization mode in wxGrid

Add another wxGrid::DrawTextRectangle() overload, taking wxGridCellAttr
and ellipsizing the string if necessary, i.e. if the fitting mode of
this attribute indicates that we should do it.

Switch the code of all renderers for which it makes sense to use
ellipsization to use the new overload.
This commit is contained in:
Vadim Zeitlin
2020-01-11 19:15:15 +01:00
parent 41dcd9ecdb
commit 46042843e8
3 changed files with 47 additions and 28 deletions

View File

@@ -1160,6 +1160,13 @@ public:
int verticalAlignment = wxALIGN_TOP,
int textOrientation = wxHORIZONTAL ) const;
void DrawTextRectangle(wxDC& dc,
const wxString& text,
const wxRect& rect,
const wxGridCellAttr& attr,
int defaultHAlign = wxALIGN_INVALID,
int defaultVAlign = wxALIGN_INVALID);
// ------ grid render function for printing
//
void Render( wxDC& dc,