]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dataview.h
dont use wxChar* arguments in wxHTML API
[wxWidgets.git] / include / wx / dataview.h
index 88c8fc11d6f996cd979547b1c7b533ce80e08385..012a2d6774840db5f829c56dafed7a28d238fd71 100644 (file)
 #include "wx/textctrl.h"
 #include "wx/bitmap.h"
 #include "wx/variant.h"
-
+#include "wx/listctrl.h"
 
 #if defined(__WXGTK20__)
     // for testing
     // #define wxUSE_GENERICDATAVIEWCTRL 1
 #elif defined(__WXMAC__)
-    #define wxUSE_GENERICDATAVIEWCTRL 1
 #else
     #define wxUSE_GENERICDATAVIEWCTRL 1
 #endif
@@ -122,6 +121,13 @@ public:
     // set value, call ValueChanged() afterwards!
     virtual bool SetValue( const wxVariant &variant, unsigned int col, unsigned int row ) = 0;
 
+    // override to set cell attributes
+    virtual void GetAttr( wxListItemAttr& WXUNUSED(attr),
+                          unsigned int WXUNUSED(col),
+                          unsigned int WXUNUSED(row) )
+    {
+    }
+
     // delegated notifiers
     virtual bool RowAppended();
     virtual bool RowPrepended();
@@ -541,6 +547,7 @@ BEGIN_DECLARE_EVENT_TYPES()
     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ROW_ACTIVATED, -1)
     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, -1)
     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, -1)
+    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, -1)
     // notifications from the model to the control
     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_APPENDED, -1)
     DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_PREPENDED, -1)
@@ -564,6 +571,7 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
 #define EVT_DATAVIEW_ROW_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_ACTIVATED, id, fn)
 #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
 #define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
+#define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
 
 #define EVT_DATAVIEW_MODEL_ROW_APPENDED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_APPENDED, id, fn)
 #define EVT_DATAVIEW_MODEL_ROW_PREPENDED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_PREPENDED, id, fn)
@@ -580,8 +588,7 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
 #elif defined(__WXGTK20__)
     #include "wx/gtk/dataview.h"
 #elif defined(__WXMAC__)
-    // TODO
-    // #include "wx/mac/dataview.h"
+    #include "wx/mac/dataview.h"
 #else
     #include "wx/generic/dataview.h"
 #endif