Add ellipsizeMode parameter to wxRenderNative::DrawItemText()

Instead of the default end ellipsize mode used in the native and generic
implementation, allow specifying the mode with an additional parameter.

Closes https://github.com/wxWidgets/wxWidgets/pull/97
This commit is contained in:
Tobias Taschner
2015-09-20 16:59:37 +02:00
committed by Vadim Zeitlin
parent 60a3d76045
commit 44bcc3a723
5 changed files with 48 additions and 28 deletions

View File

@@ -346,7 +346,8 @@ public:
const wxString& text,
const wxRect& rect,
int align = wxALIGN_LEFT | wxALIGN_TOP,
int flags = 0) = 0;
int flags = 0,
wxEllipsizeMode ellipsizeMode = wxELLIPSIZE_END) = 0;
// geometry functions
// ------------------
@@ -548,8 +549,9 @@ public:
const wxString& text,
const wxRect& rect,
int align = wxALIGN_LEFT | wxALIGN_TOP,
int flags = 0)
{ m_rendererNative.DrawItemText(win, dc, text, rect, align, flags); }
int flags = 0,
wxEllipsizeMode ellipsizeMode = wxELLIPSIZE_END)
{ m_rendererNative.DrawItemText(win, dc, text, rect, align, flags, ellipsizeMode); }
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win)
{ return m_rendererNative.GetSplitterParams(win); }