]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dataview.h
fix the tests to pass with both gcc and msvc (2nd part of patch 1462778)
[wxWidgets.git] / include / wx / dataview.h
index 8da38efc0ae6c0ccebcbdebb0dca578539d9ee1f..f9ef2529fd892a83d7b944f75082c3bc1a734b9b 100644 (file)
 // wxDataViewCtrl globals
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxDataViewModel;
-class WXDLLIMPEXP_CORE wxDataViewListModel;
-class WXDLLIMPEXP_CORE wxDataViewCtrl;
-class WXDLLIMPEXP_CORE wxDataViewColumn;
-class WXDLLIMPEXP_CORE wxDataViewCell;
+class WXDLLIMPEXP_ADV wxDataViewModel;
+class WXDLLIMPEXP_ADV wxDataViewListModel;
+class WXDLLIMPEXP_ADV wxDataViewCtrl;
+class WXDLLIMPEXP_ADV wxDataViewColumn;
+class WXDLLIMPEXP_ADV wxDataViewCell;
 
-extern WXDLLEXPORT_DATA(const wxChar) wxDataViewCtrlNameStr[];
+extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxDataViewCtrlNameStr[];
 
 // ---------------------------------------------------------
 // wxDataViewModel
 // ---------------------------------------------------------
 
-class wxDataViewModel: public wxObject
+class WXDLLIMPEXP_ADV wxDataViewModel: public wxObject
 {
 public:
     wxDataViewModel() { }
@@ -66,7 +66,7 @@ protected:
 // ---------------------------------------------------------
 
 
-class wxDataViewListModelNotifier: public wxObject
+class WXDLLIMPEXP_ADV wxDataViewListModelNotifier: public wxObject
 {
 public:
     wxDataViewListModelNotifier() { }
@@ -92,7 +92,7 @@ private:
 // wxDataViewListModel
 // ---------------------------------------------------------
 
-class wxDataViewViewingColumn: public wxObject
+class WXDLLIMPEXP_ADV wxDataViewViewingColumn: public wxObject
 {
 public:
     wxDataViewViewingColumn( wxDataViewColumn *view_column, size_t model_column )
@@ -105,7 +105,7 @@ public:
     size_t              m_modelColumn;
 };
 
-class wxDataViewListModel: public wxDataViewModel
+class WXDLLIMPEXP_ADV wxDataViewListModel: public wxDataViewModel
 {
 public:
     wxDataViewListModel();
@@ -151,9 +151,9 @@ protected:
 typedef int (wxCALLBACK *wxDataViewListModelCompare)
     (size_t row1, size_t row2, size_t col, wxDataViewListModel* model );
 
-WX_DEFINE_SORTED_EXPORTED_ARRAY_SIZE_T(size_t, wxDataViewSortedIndexArray );
+WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(size_t, wxDataViewSortedIndexArray, WXDLLIMPEXP_ADV);
 
-class wxDataViewSortedListModel: public wxDataViewListModel
+class WXDLLIMPEXP_ADV wxDataViewSortedListModel: public wxDataViewListModel
 {
 public:
     wxDataViewSortedListModel( wxDataViewListModel *child );
@@ -210,7 +210,7 @@ enum wxDataViewCellRenderState
     wxDATAVIEW_CELL_FOCUSED     = 8
 };
 
-class wxDataViewCellBase: public wxObject
+class WXDLLIMPEXP_ADV wxDataViewCellBase: public wxObject
 {
 public:
     wxDataViewCellBase( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
@@ -245,10 +245,18 @@ enum wxDataViewColumnFlags
     wxDATAVIEW_COL_HIDDEN     = 4
 };
 
-class wxDataViewColumnBase: public wxObject
+enum wxDataViewColumnSizing
+{
+    wxDATAVIEW_COL_WIDTH_FIXED,
+    wxDATAVIEW_COL_WIDTH_AUTO,
+    wxDATAVIEW_COL_WIDTH_GROW
+};
+
+class WXDLLIMPEXP_ADV wxDataViewColumnBase: public wxObject
 {
 public:
-    wxDataViewColumnBase( const wxString &title, wxDataViewCell *cell, size_t model_column, int flags = 0 );
+    wxDataViewColumnBase( const wxString &title, wxDataViewCell *cell, size_t model_column,
+        int fixed_width = 80, wxDataViewColumnSizing sizing = wxDATAVIEW_COL_WIDTH_FIXED, int flags = 0 );
     ~wxDataViewColumnBase();
 
     virtual void SetTitle( const wxString &title );
@@ -261,6 +269,11 @@ public:
     void SetOwner( wxDataViewCtrl *owner )  { m_owner = owner; }
     wxDataViewCtrl *GetOwner()              { return m_owner; }
 
+    virtual int GetWidth() = 0;
+
+    virtual void SetFixedWidth( int width ) = 0;
+    virtual int GetFixedWidth() = 0;
+
 private:
     wxDataViewCtrl          *m_ctrl;
     wxDataViewCell          *m_cell;
@@ -277,7 +290,10 @@ protected:
 // wxDataViewCtrlBase
 // ---------------------------------------------------------
 
-class wxDataViewCtrlBase: public wxControl
+#define wxDV_SINGLE                  0x0000     // for convenience
+#define wxDV_MULTIPLE                0x0020     // can select multiple items
+
+class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
 {
 public:
     wxDataViewCtrlBase();
@@ -309,7 +325,8 @@ protected:
 #elif defined(__WXGTK20__)
     #include "wx/gtk/dataview.h"
 #elif defined(__WXMAC__)
-    #include "wx/mac/dataview.h"
+    // TODO
+    // #include "wx/mac/dataview.h"
 #else
     #include "wx/generic/dataview.h"
 #endif