Implement wxDV_ROW_LINES for generic wxDataViewCtrl.

Provide wxDataViewCtrl::SetAlternateRowColour() to specify the colour to use
for odd rows explicitly but determine it automatically from the background
colour if no explicit colour was specified.

Closes #12834.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-02-12 22:19:04 +00:00
parent 8b6af8eedd
commit 4bdc891f54
3 changed files with 45 additions and 0 deletions

View File

@@ -191,6 +191,11 @@ public:
virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column);
// These methods are specific to generic wxDataViewCtrl implementation and
// should not be used in portable code.
wxColour GetAlternateRowColour() const { return m_alternateRowColour; }
void SetAlternateRowColour(const wxColour& colour);
protected:
virtual void EnsureVisible( int row, int column );
@@ -245,6 +250,9 @@ private:
wxDataViewMainWindow *m_clientArea;
wxDataViewHeaderWindow *m_headerArea;
// user defined color to draw row lines, may be invalid
wxColour m_alternateRowColour;
// the index of the column currently used for sorting or -1
int m_sortingColumnIdx;