]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/dataview.h
added wxUTF8StringBuffer for writing UTF8 data into wxString efficiently, similarly...
[wxWidgets.git] / include / wx / generic / dataview.h
index 10ddc2071ce66a444870dd5daa2c0b03fb9ff079..083d4b1cfb1478ccea9c3a45c563a798e21b1ec7 100644 (file)
@@ -2,6 +2,7 @@
 // Name:        wx/generic/dataview.h
 // Purpose:     wxDataViewCtrl generic implementation header
 // Author:      Robert Roebling
+// Modified By: Bo Yang
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
@@ -52,26 +53,26 @@ public:
 
     virtual bool Activate( wxRect WXUNUSED(cell),
                            wxDataViewModel *WXUNUSED(model),
-                           const wxDataViewItem & item
+                           const wxDataViewItem & WXUNUSED(item)
                            unsigned int WXUNUSED(col) )
                            { return false; }
 
     virtual bool LeftClick( wxPoint WXUNUSED(cursor),
                             wxRect WXUNUSED(cell),
                             wxDataViewModel *WXUNUSED(model),
-                            const wxDataViewItem & item
+                            const wxDataViewItem & WXUNUSED(item)
                             unsigned int WXUNUSED(col) )
                             { return false; }
     virtual bool RightClick( wxPoint WXUNUSED(cursor),
                              wxRect WXUNUSED(cell),
                              wxDataViewModel *WXUNUSED(model),
-                             const wxDataViewItem & item
+                             const wxDataViewItem & WXUNUSED(item)
                              unsigned int WXUNUSED(col) )
                              { return false; }
     virtual bool StartDrag( wxPoint WXUNUSED(cursor),
                             wxRect WXUNUSED(cell),
                             wxDataViewModel *WXUNUSED(model),
-                            const wxDataViewItem & item
+                            const wxDataViewItem & WXUNUSED(item)
                             unsigned int WXUNUSED(col) )
                             { return false; }
 
@@ -352,16 +353,29 @@ public:
     virtual void DoSetExpanderColumn();
     virtual void DoSetIndent();
 
-/********************selection code*********************
-    virtual void SetSelection( int row ); // -1 for unselect
-    virtual void SetSelectionRange( unsigned int from, unsigned int to );
-    virtual void SetSelections( const wxArrayInt& aSelections);
-    virtual void Unselect( unsigned int row );
-    
-    virtual bool IsSelected( unsigned int row ) const;
-    virtual int GetSelection() const;
-    virtual int GetSelections(wxArrayInt& aSelections) const;
-*****************************************************/
+    virtual int GetSelections( wxDataViewItemArray & sel ) const;
+    virtual void SetSelections( const wxDataViewItemArray & sel );
+    virtual void Select( const wxDataViewItem & item );
+    virtual void Unselect( const wxDataViewItem & item );
+    virtual bool IsSelected( const wxDataViewItem & item ) const;
+
+    virtual int GetSelections( wxArrayInt & sel ) const; 
+    virtual void SetSelections( const wxArrayInt & sel );
+    virtual void Select( int row );
+    virtual void Unselect( int row );
+    virtual bool IsSelected( int row ) const;
+    virtual void SelectRange( int from, int to );
+    virtual void UnselectRange( int from, int to );
+
+    virtual void SelectAll();
+    virtual void UnselectAll();
+
+    virtual void EnsureVisible( int row );
+    virtual void EnsureVisible( const wxDataViewItem & item, wxDataViewColumn *column = NULL );
+
+    virtual wxDataViewItem GetItemByRow( unsigned int row ) const;
+    virtual int GetRowByItem( const wxDataViewItem & item ) const;
+
 
 public:     // utility functions not part of the API