Merge branch 'listctrl-extend-rules-and-zebra'
Allow extending rules and zebra background in wxListCtrl to the whole window. See https://github.com/wxWidgets/wxWidgets/pull/2112
This commit is contained in:
@@ -189,6 +189,8 @@ public:
|
||||
virtual bool SetFont( const wxFont &font ) wxOVERRIDE;
|
||||
virtual bool SetCursor( const wxCursor &cursor ) wxOVERRIDE;
|
||||
|
||||
virtual void ExtendRulesAndAlternateColour(bool extend = true) wxOVERRIDE;
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget ) wxOVERRIDE;
|
||||
virtual wxDropTarget *GetDropTarget() const wxOVERRIDE;
|
||||
|
@@ -740,6 +740,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void ExtendRulesAndAlternateColour(bool extend)
|
||||
{
|
||||
m_extendRulesAndAlternateColour = extend;
|
||||
}
|
||||
|
||||
|
||||
// these are for wxListLineData usage only
|
||||
|
||||
// get the backpointer to the list ctrl
|
||||
@@ -775,6 +781,10 @@ public:
|
||||
selected ? ++m_selCount : --m_selCount;
|
||||
}
|
||||
|
||||
void DrawInReportModeOnBlank ( wxDC *dc,
|
||||
const wxRect& rect,
|
||||
int lineNumber );
|
||||
|
||||
protected:
|
||||
// the array of all line objects for a non virtual list control (for the
|
||||
// virtual list control we only ever use m_lines[0])
|
||||
@@ -936,6 +946,9 @@ private:
|
||||
// NULL if no item is being edited
|
||||
wxListTextCtrlWrapper *m_textctrlWrapper;
|
||||
|
||||
// tells whether or not to paint empty rows with alternate colour and draw
|
||||
// rulers on empty rows
|
||||
bool m_extendRulesAndAlternateColour;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
|
||||
|
@@ -417,6 +417,8 @@ public:
|
||||
void SetAlternateRowColour(const wxColour& colour);
|
||||
wxColour GetAlternateRowColour() const { return m_alternateRowColour.GetBackgroundColour(); }
|
||||
|
||||
virtual void ExtendRulesAndAlternateColour(bool WXUNUSED(extend) = true) { }
|
||||
|
||||
// Header attributes support: only implemented in wxMSW currently.
|
||||
virtual bool SetHeaderAttr(const wxItemAttr& WXUNUSED(attr)) { return false; }
|
||||
|
||||
|
Reference in New Issue
Block a user