From 21f47fb900438b3e517184eace6b82ab74c2c474 Mon Sep 17 00:00:00 2001
From: Robert Roebling <robert@roebling.de>
Date: Thu, 13 Sep 2007 12:57:40 +0000
Subject: [PATCH] Add wxDataViewCtrl::GetSortingColumn() stubs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/dataviewctrl.tex   | 7 +++++++
 include/wx/dataview.h            | 2 ++
 include/wx/generic/dataview.h    | 2 ++
 include/wx/gtk/dataview.h        | 2 ++
 include/wx/mac/carbon/dataview.h | 2 ++
 src/generic/datavgen.cpp         | 5 +++++
 src/gtk/dataview.cpp             | 6 ++++++
 src/mac/carbon/dataview.cpp      | 5 +++++
 8 files changed, 31 insertions(+)

diff --git a/docs/latex/wx/dataviewctrl.tex b/docs/latex/wx/dataviewctrl.tex
index 2aa0d92ec7..21401d5d59 100644
--- a/docs/latex/wx/dataviewctrl.tex
+++ b/docs/latex/wx/dataviewctrl.tex
@@ -260,6 +260,13 @@ Returns first selected item or an invalid item if none is selected.
 Fills {\it sel} with currently selected items and returns
 their number.
 
+\membersection{wxDataViewCtrl::GetSortingColumn}\label{wxdataviewctrlgetsortingcolumn}
+
+\constfunc{virtual wxDataViewColumn*}{GetSortingColumn}{\void}
+
+Returns the wxDataViewColumn currently responsible for sorting
+or NULL if none has been selected.
+
 \membersection{wxDataViewCtrl::HitTest}\label{wxdataviewctrlhittest}
 
 \constfunc{void}{HitTest}{\param{const wxPoint\& }{point}, \param{wxDataViewItem\& }{item}, \param{wxDataViewColumn *\&}{col}}
diff --git a/include/wx/dataview.h b/include/wx/dataview.h
index d024d5e794..50e8f6fd0f 100644
--- a/include/wx/dataview.h
+++ b/include/wx/dataview.h
@@ -505,6 +505,8 @@ public:
         { m_expander_column = col ; DoSetExpanderColumn(); }
     wxDataViewColumn *GetExpanderColumn() const 
         { return m_expander_column; }
+        
+    virtual wxDataViewColumn *GetSortingColumn() const = 0;
 
     void SetIndent( int indent )
         { m_indent = indent ; DoSetIndent(); }
diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h
index b1789509d5..d6ba452ae1 100644
--- a/include/wx/generic/dataview.h
+++ b/include/wx/generic/dataview.h
@@ -392,6 +392,8 @@ public:
     virtual bool DeleteColumn( wxDataViewColumn *column );
     virtual bool ClearColumns();
 
+    virtual wxDataViewColumn *GetSortingColumn() const;
+    
     virtual wxDataViewItem GetSelection() const;
     virtual int GetSelections( wxDataViewItemArray & sel ) const;
     virtual void SetSelections( const wxDataViewItemArray & sel );
diff --git a/include/wx/gtk/dataview.h b/include/wx/gtk/dataview.h
index b6d9233839..ba30e51767 100644
--- a/include/wx/gtk/dataview.h
+++ b/include/wx/gtk/dataview.h
@@ -343,6 +343,8 @@ public:
     virtual bool DeleteColumn( wxDataViewColumn *column );
     virtual bool ClearColumns();
 
+    virtual wxDataViewColumn *GetSortingColumn() const;
+
     virtual wxDataViewItem GetSelection() const;
     virtual int GetSelections( wxDataViewItemArray & sel ) const;
     virtual void SetSelections( const wxDataViewItemArray & sel );
diff --git a/include/wx/mac/carbon/dataview.h b/include/wx/mac/carbon/dataview.h
index 16f0dd1572..554bf47d6c 100644
--- a/include/wx/mac/carbon/dataview.h
+++ b/include/wx/mac/carbon/dataview.h
@@ -531,6 +531,8 @@ public:
   virtual wxDataViewColumn* GetColumn(unsigned int pos) const;
   virtual unsigned int GetColumnCount(void) const;
 
+    virtual wxDataViewColumn *GetSortingColumn() const;
+
   virtual void Collapse(wxDataViewItem const& item);
   virtual void EnsureVisible(wxDataViewItem const& item, wxDataViewColumn const* columnPtr=NULL);
   virtual void Expand(wxDataViewItem const& item);
diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp
index fb5dd4b30a..bc17b2cb7f 100644
--- a/src/generic/datavgen.cpp
+++ b/src/generic/datavgen.cpp
@@ -3794,6 +3794,11 @@ bool wxDataViewCtrl::ClearColumns()
     return true;
 }
 
+wxDataViewColumn *wxDataViewCtrl::GetSortingColumn() const
+{
+    return NULL;
+}
+
 //Selection code with wxDataViewItem as parameters
 wxDataViewItem wxDataViewCtrl::GetSelection() const
 {
diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp
index 9b7df0db61..e51d3e0538 100644
--- a/src/gtk/dataview.cpp
+++ b/src/gtk/dataview.cpp
@@ -1256,6 +1256,7 @@ void wxDataViewRenderer::SetMode( wxDataViewCellMode mode )
         break;
     }
 
+    // This value is most often ignored in GtkTreeView    
     GValue gvalue = { 0, };
     g_value_init( &gvalue, gtk_cell_renderer_mode_get_type() );
     g_value_set_enum( &gvalue, gtkMode );
@@ -3111,6 +3112,11 @@ bool wxDataViewCtrl::ClearColumns()
     return true;
 }
 
+wxDataViewColumn *wxDataViewCtrl::GetSortingColumn() const
+{
+    return NULL;
+}
+
 void wxDataViewCtrl::Expand( const wxDataViewItem & item )
 {
     GtkTreeIter iter;
diff --git a/src/mac/carbon/dataview.cpp b/src/mac/carbon/dataview.cpp
index 3088806ef0..cbcb97d5db 100644
--- a/src/mac/carbon/dataview.cpp
+++ b/src/mac/carbon/dataview.cpp
@@ -890,6 +890,11 @@ unsigned int wxDataViewCtrl::GetColumnCount(void) const
   return this->m_ColumnPointers.size();
 } /* wxDataViewCtrl::GetColumnCount(void) const */
 
+wxDataViewColumn *wxDataViewCtrl::GetSortingColumn() const
+{
+    return NULL;
+}
+
 void wxDataViewCtrl::Collapse(wxDataViewItem const& item)
 {
   wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
-- 
2.50.0

