Simplify API for extending wxListCtrl background display
Replace SetListRulesAlternateColourOnBlank() taking 2 arguments, with the second of them being used only when the first one is true, with a simpler but still sufficient ExtendRulesAndAlternateColour(bool). Make the new method virtual and define it as doing nothing in wxListCtrlBase class, so that it's still available, even if currently not implemented, in wxMSW. Also simplify the implementation, fix style problems and other minor improvements.
This commit is contained in:
@@ -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