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
@@ -276,6 +276,18 @@ private:
|
||||
wxRect(x2, y, widthGauge, heightGauge), 25, 100, m_flags);
|
||||
|
||||
y += lineHeight + heightGauge;
|
||||
|
||||
const wxCoord heightListItem = 48;
|
||||
const wxCoord widthListItem = 260;
|
||||
|
||||
dc.DrawText("DrawItemSelectionRect()", x1, y);
|
||||
wxRendererNative::GetDefault().DrawItemSelectionRect(this, dc,
|
||||
wxRect(x2, y, widthListItem, heightListItem), m_flags | wxCONTROL_SELECTED);
|
||||
|
||||
wxRendererNative::GetDefault().DrawItemText(this, dc, "DrawItemText()",
|
||||
wxRect(x2, y, widthListItem, heightListItem).Inflate(-2, -2), m_align, m_flags | wxCONTROL_SELECTED);
|
||||
|
||||
y += lineHeight + heightListItem;
|
||||
}
|
||||
|
||||
int m_flags;
|
||||
|
Reference in New Issue
Block a user