Add wxRendererNative::DrawItemText() for list-like controls
Add a new method that should be used for drawing the elements of list-like controls (i.e. wx{List,Tree,DataView}Ctrl and similar). Implement it for wxMSW natively and provide a straightforward generic fallback for the other ports. See #16414.
This commit is contained in:
committed by
Vadim Zeitlin
parent
ba4bfc5414
commit
b7a89f8746
@@ -329,6 +329,14 @@ public:
|
||||
int max,
|
||||
int flags = 0) = 0;
|
||||
|
||||
// Draw text using the appropriate color for normal and selected states.
|
||||
virtual void DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int flags = 0) = 0;
|
||||
|
||||
// geometry functions
|
||||
// ------------------
|
||||
|
||||
@@ -515,6 +523,14 @@ public:
|
||||
int flags = 0)
|
||||
{ m_rendererNative.DrawGauge(win, dc, rect, value, max, flags); }
|
||||
|
||||
virtual void DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int flags = 0)
|
||||
{ m_rendererNative.DrawItemText(win, dc, text, rect, align, flags); }
|
||||
|
||||
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win)
|
||||
{ return m_rendererNative.GetSplitterParams(win); }
|
||||
|
||||
|
Reference in New Issue
Block a user