From 453091c26978d6da004ab46c78c719d7f9444ae3 Mon Sep 17 00:00:00 2001
From: Robert Roebling <robert@roebling.de>
Date: Thu, 13 Sep 2007 13:29:19 +0000
Subject: [PATCH] Add wxDataViewCtrl::GetColumnPosition() stubs

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

diff --git a/docs/latex/wx/dataviewctrl.tex b/docs/latex/wx/dataviewctrl.tex
index 21401d5d59..09db49c0fc 100644
--- a/docs/latex/wx/dataviewctrl.tex
+++ b/docs/latex/wx/dataviewctrl.tex
@@ -210,19 +210,18 @@ Returns pointer to the column. {\it pos} refers to the
 position in the control which may change after reordering
 columns by the user.
 
-\membersection{wxDataViewCtrl::GetModel}\label{wxdataviewctrlgetmodel}
-
-\constfunc{virtual wxDataViewModel*}{GetModel}{\void}
-
-Returns pointer to the data model associated with the
-control (if any).
-
 \membersection{wxDataViewCtrl::GetColumnCount}\label{wxdataviewctrlgetcolumncount}
 
 \constfunc{virtual unsigned int}{GetColumnCount}{\void}
 
 Returns the number of columns.
 
+\membersection{wxDataViewCtrl::GetColumnPosition}\label{wxdataviewctrlgetcolumnposition}
+
+\constfunc{virtual int}{GetColumnPosition}{\param{const wxDataViewColumn* }{column}}
+
+Returns the position of the column or -1 if not found in the control.
+
 \membersection{wxDataViewCtrl::EnsureVisible}\label{wxdataviewctrlensurevisible}
 
 \func{void}{EnsureVisible}{\param{const wxDataViewItem \& }{item}, \param{const wxDataViewColumn* }{column = NULL}}
@@ -247,6 +246,13 @@ Returns indentation.
 
 Returns item rect.
 
+\membersection{wxDataViewCtrl::GetModel}\label{wxdataviewctrlgetmodel}
+
+\constfunc{virtual wxDataViewModel*}{GetModel}{\void}
+
+Returns pointer to the data model associated with the
+control (if any).
+
 \membersection{wxDataViewCtrl::GetSelection}\label{wxdataviewctrlgetselection}
 
 \constfunc{wxDataViewItem}{GetSelection}{\void}
diff --git a/include/wx/dataview.h b/include/wx/dataview.h
index 50e8f6fd0f..d00876f06c 100644
--- a/include/wx/dataview.h
+++ b/include/wx/dataview.h
@@ -497,6 +497,7 @@ public:
 
     virtual unsigned int GetColumnCount() const = 0;
     virtual wxDataViewColumn* GetColumn( unsigned int pos ) const = 0;
+    virtual int GetColumnPosition( const wxDataViewColumn *column ) const = 0;
     
     virtual bool DeleteColumn( wxDataViewColumn *column ) = 0;
     virtual bool ClearColumns() = 0;
diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h
index d6ba452ae1..55f0bce58b 100644
--- a/include/wx/generic/dataview.h
+++ b/include/wx/generic/dataview.h
@@ -391,6 +391,7 @@ public:
     virtual wxDataViewColumn* GetColumn( unsigned int pos ) const;
     virtual bool DeleteColumn( wxDataViewColumn *column );
     virtual bool ClearColumns();
+    virtual int GetColumnPosition( const wxDataViewColumn *column ) const;
 
     virtual wxDataViewColumn *GetSortingColumn() const;
     
diff --git a/include/wx/gtk/dataview.h b/include/wx/gtk/dataview.h
index ba30e51767..1d7f7bbac1 100644
--- a/include/wx/gtk/dataview.h
+++ b/include/wx/gtk/dataview.h
@@ -342,6 +342,7 @@ public:
     virtual wxDataViewColumn* GetColumn( unsigned int pos ) const;
     virtual bool DeleteColumn( wxDataViewColumn *column );
     virtual bool ClearColumns();
+    virtual int GetColumnPosition( const wxDataViewColumn *column ) const;
 
     virtual wxDataViewColumn *GetSortingColumn() const;
 
diff --git a/include/wx/mac/carbon/dataview.h b/include/wx/mac/carbon/dataview.h
index 554bf47d6c..2de8f843a9 100644
--- a/include/wx/mac/carbon/dataview.h
+++ b/include/wx/mac/carbon/dataview.h
@@ -530,7 +530,7 @@ public:
   virtual bool DeleteColumn(wxDataViewColumn* columnPtr);
   virtual wxDataViewColumn* GetColumn(unsigned int pos) const;
   virtual unsigned int GetColumnCount(void) const;
-
+    virtual int GetColumnPosition( const wxDataViewColumn *column ) const;
     virtual wxDataViewColumn *GetSortingColumn() const;
 
   virtual void Collapse(wxDataViewItem const& item);
diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp
index bc17b2cb7f..9f4c496bde 100644
--- a/src/generic/datavgen.cpp
+++ b/src/generic/datavgen.cpp
@@ -3794,6 +3794,11 @@ bool wxDataViewCtrl::ClearColumns()
     return true;
 }
 
+int wxDataViewCtrl::GetColumnPosition( const wxDataViewColumn *column ) const
+{
+    return -1;
+}
+
 wxDataViewColumn *wxDataViewCtrl::GetSortingColumn() const
 {
     return NULL;
diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp
index e51d3e0538..1b908ea9f2 100644
--- a/src/gtk/dataview.cpp
+++ b/src/gtk/dataview.cpp
@@ -3112,6 +3112,11 @@ bool wxDataViewCtrl::ClearColumns()
     return true;
 }
 
+int wxDataViewCtrl::GetColumnPosition( const wxDataViewColumn *column ) const
+{
+    return -1;
+}
+
 wxDataViewColumn *wxDataViewCtrl::GetSortingColumn() const
 {
     return NULL;
diff --git a/src/mac/carbon/dataview.cpp b/src/mac/carbon/dataview.cpp
index cbcb97d5db..9e475ea665 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 */
 
+int wxDataViewCtrl::GetColumnPosition( const wxDataViewColumn *column ) const
+{
+    return -1;
+}
+
 wxDataViewColumn *wxDataViewCtrl::GetSortingColumn() const
 {
     return NULL;
-- 
2.50.0

