1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDataViewCtrl base classes
4 // Author: Robert Roebling
8 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DATAVIEW_H_BASE_
13 #define _WX_DATAVIEW_H_BASE_
17 #if wxUSE_DATAVIEWCTRL
19 #include "wx/control.h"
20 #include "wx/textctrl.h"
21 #include "wx/bitmap.h"
22 #include "wx/variant.h"
23 #include "wx/listctrl.h"
25 #if defined(__WXGTK20__)
27 // #define wxUSE_GENERICDATAVIEWCTRL 1
28 #elif defined(__WXMAC__)
30 #define wxUSE_GENERICDATAVIEWCTRL 1
33 // ----------------------------------------------------------------------------
34 // wxDataViewCtrl flags
35 // ----------------------------------------------------------------------------
37 // ----------------------------------------------------------------------------
38 // wxDataViewCtrl globals
39 // ----------------------------------------------------------------------------
41 class WXDLLIMPEXP_FWD_ADV wxDataViewItem
;
42 class WXDLLIMPEXP_FWD_ADV wxDataViewModel
;
43 class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl
;
44 class WXDLLIMPEXP_FWD_ADV wxDataViewColumn
;
45 class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer
;
46 class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier
;
47 class wxDataViewEventModelNotifier
;
49 extern WXDLLIMPEXP_DATA_ADV(const wxChar
) wxDataViewCtrlNameStr
[];
51 // the default width of new (text) columns:
52 #define wxDVC_DEFAULT_WIDTH 80
54 // the default width of new toggle columns:
55 #define wxDVC_TOGGLE_DEFAULT_WIDTH 30
57 // the default minimal width of the columns:
58 #define wxDVC_DEFAULT_MINWIDTH 30
60 // the default alignment of wxDataViewRenderers:
61 #define wxDVR_DEFAULT_ALIGNMENT (wxALIGN_LEFT|wxALIGN_TOP)
64 // ---------------------------------------------------------
66 // ---------------------------------------------------------
68 class WXDLLIMPEXP_ADV wxDataViewItem
71 wxDataViewItem( void* id
= NULL
)
73 wxDataViewItem( const wxDataViewItem
&item
)
75 bool IsOk() const { return m_id
!= NULL
; }
76 void* GetID() const { return m_id
; }
82 bool operator == (const wxDataViewItem
&left
, const wxDataViewItem
&right
);
84 // ---------------------------------------------------------
86 // ---------------------------------------------------------
88 class WXDLLIMPEXP_ADV wxDataViewModel
: public wxObjectRefData
93 virtual unsigned int GetColumnCount() const = 0;
95 // return type as reported by wxVariant
96 virtual wxString
GetColumnType( unsigned int col
) const = 0;
98 // get value into a wxVariant
99 virtual void GetValue( wxVariant
&variant
,
100 const wxDataViewItem
&item
, unsigned int col
) const = 0;
102 // set value, call ValueChanged() afterwards!
103 virtual bool SetValue( const wxVariant
&variant
,
104 const wxDataViewItem
&item
, unsigned int col
) = 0;
107 virtual wxDataViewItem
GetParent( const wxDataViewItem
&item
) const = 0;
108 virtual bool IsContainer( const wxDataViewItem
&item
) const = 0;
109 virtual wxDataViewItem
GetFirstChild( const wxDataViewItem
&parent
) const = 0;
110 virtual wxDataViewItem
GetNextSibling( const wxDataViewItem
&item
) const = 0;
112 // delegated notifiers
113 virtual bool ItemAdded( const wxDataViewItem
&parent
, const wxDataViewItem
&item
);
114 virtual bool ItemDeleted( const wxDataViewItem
&item
);
115 virtual bool ItemChanged( const wxDataViewItem
&item
);
116 virtual bool ValueChanged( const wxDataViewItem
&item
, unsigned int col
);
117 virtual bool Cleared();
120 virtual void Resort();
122 void AddNotifier( wxDataViewModelNotifier
*notifier
);
123 void RemoveNotifier( wxDataViewModelNotifier
*notifier
);
125 // default compare function
126 virtual int Compare( const wxDataViewItem
&item1
, const wxDataViewItem
&item2
);
128 void SetSortingColumn( unsigned int col
) { m_sortingColumn
= col
; }
129 unsigned int GetSortingColumn() { return m_sortingColumn
; }
130 void SetSortOrderAscending( bool ascending
) { m_ascending
= ascending
; }
131 bool GetSortOrderAscending() { return m_ascending
; }
135 // the user should not delete this class directly: he should use DecRef() instead!
136 virtual ~wxDataViewModel() { }
139 unsigned int m_sortingColumn
;
143 // ---------------------------------------------------------
144 // wxDataViewIndexListModel
145 // ---------------------------------------------------------
147 // use hash map later
148 WX_DEFINE_ARRAY_PTR( void*, wxDataViewItemHash
);
150 class wxDataViewIndexListModel
: public wxDataViewModel
153 wxDataViewIndexListModel( unsigned int initial_size
= 0 );
154 ~wxDataViewIndexListModel();
156 virtual unsigned int GetRowCount() = 0;
158 virtual void GetValue( wxVariant
&variant
,
159 unsigned int row
, unsigned int col
) const = 0;
161 virtual bool SetValue( const wxVariant
&variant
,
162 unsigned int row
, unsigned int col
) = 0;
165 void RowInserted( unsigned int before
);
167 void RowDeleted( unsigned int row
);
168 void RowChanged( unsigned int row
);
169 void RowValueChanged( unsigned int row
, unsigned int col
);
171 // convert to/from row/wxDataViewItem
173 unsigned int GetRow( const wxDataViewItem
&item
) const;
174 wxDataViewItem
GetItem( unsigned int row
) const;
176 // compare based on index
178 virtual int Compare( const wxDataViewItem
&item1
, const wxDataViewItem
&item2
);
180 // implement base methods
182 virtual void GetValue( wxVariant
&variant
,
183 const wxDataViewItem
&item
, unsigned int col
) const;
184 virtual bool SetValue( const wxVariant
&variant
,
185 const wxDataViewItem
&item
, unsigned int col
);
186 virtual wxDataViewItem
GetParent( const wxDataViewItem
&item
) const;
187 virtual bool IsContainer( const wxDataViewItem
&item
) const;
188 virtual wxDataViewItem
GetFirstChild( const wxDataViewItem
&parent
) const;
189 virtual wxDataViewItem
GetNextSibling( const wxDataViewItem
&item
) const;
192 wxDataViewItemHash m_hash
;
193 unsigned int m_lastIndex
;
196 // ---------------------------------------------------------
197 // wxDataViewModelNotifier
198 // ---------------------------------------------------------
200 class WXDLLIMPEXP_ADV wxDataViewModelNotifier
: public wxObject
203 wxDataViewModelNotifier() { }
204 virtual ~wxDataViewModelNotifier() { m_owner
= NULL
; }
206 virtual bool ItemAdded( const wxDataViewItem
&parent
, const wxDataViewItem
&item
) = 0;
207 virtual bool ItemDeleted( const wxDataViewItem
&item
) = 0;
208 virtual bool ItemChanged( const wxDataViewItem
&item
) = 0;
209 virtual bool ValueChanged( const wxDataViewItem
&item
, unsigned int col
) = 0;
210 virtual bool Cleared() = 0;
212 virtual void Resort() { };
214 void SetOwner( wxDataViewModel
*owner
) { m_owner
= owner
; }
215 wxDataViewModel
*GetOwner() { return m_owner
; }
218 wxDataViewModel
*m_owner
;
222 //-----------------------------------------------------------------------------
223 // wxDataViewEditorCtrlEvtHandler
224 //-----------------------------------------------------------------------------
226 class wxDataViewEditorCtrlEvtHandler
: public wxEvtHandler
229 wxDataViewEditorCtrlEvtHandler( wxControl
*editor
, wxDataViewRenderer
*owner
);
231 void AcceptChangesAndFinish();
232 void SetFocusOnIdle( bool focus
= true ) { m_focusOnIdle
= focus
; }
235 void OnChar( wxKeyEvent
&event
);
236 void OnKillFocus( wxFocusEvent
&event
);
237 void OnIdle( wxIdleEvent
&event
);
240 wxDataViewRenderer
*m_owner
;
241 wxControl
*m_editorCtrl
;
246 DECLARE_EVENT_TABLE()
249 // ---------------------------------------------------------
250 // wxDataViewRendererBase
251 // ---------------------------------------------------------
253 enum wxDataViewCellMode
255 wxDATAVIEW_CELL_INERT
,
256 wxDATAVIEW_CELL_ACTIVATABLE
,
257 wxDATAVIEW_CELL_EDITABLE
260 enum wxDataViewCellRenderState
262 wxDATAVIEW_CELL_SELECTED
= 1,
263 wxDATAVIEW_CELL_PRELIT
= 2,
264 wxDATAVIEW_CELL_INSENSITIVE
= 4,
265 wxDATAVIEW_CELL_FOCUSED
= 8
268 class WXDLLIMPEXP_ADV wxDataViewRendererBase
: public wxObject
271 wxDataViewRendererBase( const wxString
&varianttype
,
272 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
,
273 int alignment
= wxDVR_DEFAULT_ALIGNMENT
);
275 virtual bool Validate( wxVariant
& WXUNUSED(value
) )
278 void SetOwner( wxDataViewColumn
*owner
) { m_owner
= owner
; }
279 wxDataViewColumn
* GetOwner() { return m_owner
; }
281 // renderer properties:
283 virtual bool SetValue( const wxVariant
& WXUNUSED(value
) ) = 0;
284 virtual bool GetValue( wxVariant
& WXUNUSED(value
) ) const = 0;
286 wxString
GetVariantType() const { return m_variantType
; }
288 virtual void SetMode( wxDataViewCellMode mode
) = 0;
289 virtual wxDataViewCellMode
GetMode() const = 0;
291 // NOTE: Set/GetAlignment do not take/return a wxAlignment enum but
292 // rather an "int"; that's because for rendering cells it's allowed
293 // to combine alignment flags (e.g. wxALIGN_LEFT|wxALIGN_BOTTOM)
294 virtual void SetAlignment( int align
) = 0;
295 virtual int GetAlignment() const = 0;
298 virtual bool HasEditorCtrl()
300 virtual wxControl
* CreateEditorCtrl(wxWindow
* WXUNUSED(parent
),
301 wxRect
WXUNUSED(labelRect
),
302 const wxVariant
& WXUNUSED(value
))
304 virtual bool GetValueFromEditorCtrl(wxControl
* WXUNUSED(editor
),
305 wxVariant
& WXUNUSED(value
))
308 virtual bool StartEditing( const wxDataViewItem
&item
, wxRect labelRect
);
309 virtual void CancelEditing();
310 virtual bool FinishEditing();
312 wxControl
*GetEditorCtrl() { return m_editorCtrl
; }
315 wxString m_variantType
;
316 wxDataViewColumn
*m_owner
;
317 wxControl
*m_editorCtrl
;
318 wxDataViewItem m_item
; // for m_editorCtrl
321 const wxDataViewCtrl
* GetView() const;
324 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase
)
327 // ---------------------------------------------------------
328 // wxDataViewColumnBase
329 // ---------------------------------------------------------
331 enum wxDataViewColumnFlags
333 wxDATAVIEW_COL_RESIZABLE
= 1,
334 wxDATAVIEW_COL_SORTABLE
= 2,
335 wxDATAVIEW_COL_HIDDEN
= 4
338 class WXDLLIMPEXP_ADV wxDataViewColumnBase
: public wxObject
341 wxDataViewColumnBase( const wxString
&title
, wxDataViewRenderer
*renderer
,
342 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
343 wxAlignment align
= wxALIGN_CENTER
,
344 int flags
= wxDATAVIEW_COL_RESIZABLE
);
345 wxDataViewColumnBase( const wxBitmap
&bitmap
, wxDataViewRenderer
*renderer
,
346 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
347 wxAlignment align
= wxALIGN_CENTER
,
348 int flags
= wxDATAVIEW_COL_RESIZABLE
);
349 virtual ~wxDataViewColumnBase();
353 virtual void SetTitle( const wxString
&title
) = 0;
354 virtual void SetAlignment( wxAlignment align
) = 0;
355 virtual void SetSortable( bool sortable
) = 0;
356 virtual void SetResizeable( bool resizeable
) = 0;
357 virtual void SetHidden( bool hidden
) = 0;
358 virtual void SetSortOrder( bool ascending
) = 0;
359 virtual void SetFlags( int flags
);
360 virtual void SetOwner( wxDataViewCtrl
*owner
)
362 virtual void SetBitmap( const wxBitmap
&bitmap
)
365 virtual void SetMinWidth( int minWidth
) = 0;
366 virtual void SetWidth( int width
) = 0;
371 virtual wxString
GetTitle() const = 0;
372 virtual wxAlignment
GetAlignment() const = 0;
373 virtual int GetWidth() const = 0;
374 virtual int GetMinWidth() const = 0;
376 virtual int GetFlags() const;
378 virtual bool IsSortable() const = 0;
379 virtual bool IsResizeable() const = 0;
380 virtual bool IsHidden() const = 0;
381 virtual bool IsSortOrderAscending() const = 0;
383 const wxBitmap
&GetBitmap() const { return m_bitmap
; }
384 unsigned int GetModelColumn() const { return m_model_column
; }
386 wxDataViewCtrl
*GetOwner() { return m_owner
; }
387 wxDataViewRenderer
* GetRenderer() { return m_renderer
; }
390 wxDataViewRenderer
*m_renderer
;
393 wxDataViewCtrl
*m_owner
;
396 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase
)
399 // ---------------------------------------------------------
400 // wxDataViewCtrlBase
401 // ---------------------------------------------------------
403 #define wxDV_SINGLE 0x0000 // for convenience
404 #define wxDV_MULTIPLE 0x0001 // can select multiple items
406 #define wxDV_NO_HEADER 0x0002 // column titles not visible
407 #define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
408 #define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
410 class WXDLLIMPEXP_ADV wxDataViewCtrlBase
: public wxControl
413 wxDataViewCtrlBase();
414 virtual ~wxDataViewCtrlBase();
416 virtual bool AssociateModel( wxDataViewModel
*model
);
417 wxDataViewModel
* GetModel();
420 bool AppendTextColumn( const wxString
&label
, unsigned int model_column
,
421 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
422 wxAlignment align
= wxALIGN_CENTER
,
423 int flags
= wxDATAVIEW_COL_RESIZABLE
);
424 bool AppendToggleColumn( const wxString
&label
, unsigned int model_column
,
425 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
426 wxAlignment align
= wxALIGN_CENTER
,
427 int flags
= wxDATAVIEW_COL_RESIZABLE
);
428 bool AppendProgressColumn( const wxString
&label
, unsigned int model_column
,
429 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
430 wxAlignment align
= wxALIGN_CENTER
,
431 int flags
= wxDATAVIEW_COL_RESIZABLE
);
432 bool AppendDateColumn( const wxString
&label
, unsigned int model_column
,
433 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
434 wxAlignment align
= wxALIGN_CENTER
,
435 int flags
= wxDATAVIEW_COL_RESIZABLE
);
436 bool AppendBitmapColumn( const wxString
&label
, unsigned int model_column
,
437 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
438 wxAlignment align
= wxALIGN_CENTER
,
439 int flags
= wxDATAVIEW_COL_RESIZABLE
);
440 bool AppendTextColumn( const wxBitmap
&label
, unsigned int model_column
,
441 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
442 wxAlignment align
= wxALIGN_CENTER
,
443 int flags
= wxDATAVIEW_COL_RESIZABLE
);
444 bool AppendToggleColumn( const wxBitmap
&label
, unsigned int model_column
,
445 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
446 wxAlignment align
= wxALIGN_CENTER
,
447 int flags
= wxDATAVIEW_COL_RESIZABLE
);
448 bool AppendProgressColumn( const wxBitmap
&label
, unsigned int model_column
,
449 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
450 wxAlignment align
= wxALIGN_CENTER
,
451 int flags
= wxDATAVIEW_COL_RESIZABLE
);
452 bool AppendDateColumn( const wxBitmap
&label
, unsigned int model_column
,
453 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
454 wxAlignment align
= wxALIGN_CENTER
,
455 int flags
= wxDATAVIEW_COL_RESIZABLE
);
456 bool AppendBitmapColumn( const wxBitmap
&label
, unsigned int model_column
,
457 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
458 wxAlignment align
= wxALIGN_CENTER
,
459 int flags
= wxDATAVIEW_COL_RESIZABLE
);
461 virtual bool AppendColumn( wxDataViewColumn
*col
);
463 virtual unsigned int GetColumnCount() const;
465 virtual bool DeleteColumn( unsigned int pos
);
466 virtual bool ClearColumns();
467 virtual wxDataViewColumn
* GetColumn( unsigned int pos
);
469 void SetExpanderColumn( unsigned int col
)
470 { m_expander_column
= col
; DoSetExpanderColumn(); }
471 unsigned int GetExpanderColumn() const
472 { return m_expander_column
; }
474 void SetIndent( int indent
)
475 { m_indent
= indent
; DoSetIndent(); }
476 int GetIndent() const
479 // TODO selection code
480 virtual wxDataViewItem
GetSelection() = 0;
483 virtual void DoSetExpanderColumn() = 0 ;
484 virtual void DoSetIndent() = 0;
487 wxDataViewModel
*m_model
;
489 wxDataViewEventModelNotifier
*m_eventNotifier
;
490 unsigned int m_expander_column
;
494 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase
)
497 // ----------------------------------------------------------------------------
498 // wxDataViewEvent - the event class for the wxDataViewCtrl notifications
499 // ----------------------------------------------------------------------------
501 class WXDLLIMPEXP_ADV wxDataViewEvent
: public wxNotifyEvent
504 wxDataViewEvent(wxEventType commandType
= wxEVT_NULL
, int winid
= 0)
505 : wxNotifyEvent(commandType
, winid
),
509 m_value(wxNullVariant
),
513 wxDataViewEvent(const wxDataViewEvent
& event
)
514 : wxNotifyEvent(event
),
515 m_item(event
.m_item
),
517 m_model(event
.m_model
),
518 m_value(event
.m_value
),
519 m_column(event
.m_column
)
522 wxDataViewItem
GetItem() const { return m_item
; }
523 void SetItem( const wxDataViewItem
&item
) { m_item
= item
; }
525 int GetColumn() const { return m_col
; }
526 void SetColumn( int col
) { m_col
= col
; }
528 wxDataViewModel
* GetModel() const { return m_model
; }
529 void SetModel( wxDataViewModel
*model
) { m_model
= model
; }
531 const wxVariant
&GetValue() const { return m_value
; }
532 void SetValue( const wxVariant
&value
) { m_value
= value
; }
534 // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
535 void SetDataViewColumn( wxDataViewColumn
*col
) { m_column
= col
; }
536 wxDataViewColumn
*GetDataViewColumn() const { return m_column
; }
538 virtual wxEvent
*Clone() const { return new wxDataViewEvent(*this); }
541 wxDataViewItem m_item
;
543 wxDataViewModel
*m_model
;
545 wxDataViewColumn
*m_column
;
548 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent
)
551 BEGIN_DECLARE_EVENT_TYPES()
552 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_SELECTED
, -1)
553 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED
, -1)
554 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK
, -1)
555 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK
, -1)
556 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED
, -1)
557 // notifications from the model to the control
558 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_ADDED
, -1)
559 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_DELETED
, -1)
560 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_CHANGED
, -1)
561 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_VALUE_CHANGED
, -1)
562 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_CLEARED
, -1)
563 END_DECLARE_EVENT_TYPES()
565 typedef void (wxEvtHandler::*wxDataViewEventFunction
)(wxDataViewEvent
&);
567 #define wxDataViewEventHandler(func) \
568 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDataViewEventFunction, &func)
570 #define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
571 wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
573 #define EVT_DATAVIEW_ITEM_SELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_SELECTED, id, fn)
574 #define EVT_DATAVIEW_ITEM_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_ACTIVATED, id, fn)
575 #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
576 #define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
577 #define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
579 #define EVT_DATAVIEW_MODEL_ITEM_ADDED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ITEM_ADDED, id, fn)
580 #define EVT_DATAVIEW_MODEL_ITEM_DELETED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ITEM_DELETED, id, fn)
581 #define EVT_DATAVIEW_MODEL_ITEM_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ITEM_CHANGED, id, fn)
582 #define EVT_DATAVIEW_MODEL_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_VALUE_CHANGED, id, fn)
583 #define EVT_DATAVIEW_MODEL_CLEARED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_CLEARED, id, fn)
586 #if defined(wxUSE_GENERICDATAVIEWCTRL)
587 #include "wx/generic/dataview.h"
588 #elif defined(__WXGTK20__)
589 #include "wx/gtk/dataview.h"
590 #elif defined(__WXMAC__)
591 #include "wx/mac/dataview.h"
593 #include "wx/generic/dataview.h"
596 #endif // wxUSE_DATAVIEWCTRL
599 // _WX_DATAVIEW_H_BASE_