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 // ---------------------------------------------------------
85 // wxDataViewModelNotifier
86 // ---------------------------------------------------------
88 class WXDLLIMPEXP_ADV wxDataViewModelNotifier
91 wxDataViewModelNotifier() { }
92 virtual ~wxDataViewModelNotifier() { m_owner
= NULL
; }
94 virtual bool ItemAdded( const wxDataViewItem
&parent
, const wxDataViewItem
&item
) = 0;
95 virtual bool ItemDeleted( const wxDataViewItem
&parent
, const wxDataViewItem
&item
) = 0;
96 virtual bool ItemChanged( const wxDataViewItem
&item
) = 0;
97 virtual bool ValueChanged( const wxDataViewItem
&item
, unsigned int col
) = 0;
98 virtual bool Cleared() = 0;
100 virtual void Resort() = 0;
102 void SetOwner( wxDataViewModel
*owner
) { m_owner
= owner
; }
103 wxDataViewModel
*GetOwner() { return m_owner
; }
106 wxDataViewModel
*m_owner
;
110 // ---------------------------------------------------------
112 // ---------------------------------------------------------
114 WX_DECLARE_LIST(wxDataViewModelNotifier
, wxDataViewModelNotifiers
);
116 class WXDLLIMPEXP_ADV wxDataViewModel
: public wxObjectRefData
121 virtual unsigned int GetColumnCount() const = 0;
123 // return type as reported by wxVariant
124 virtual wxString
GetColumnType( unsigned int col
) const = 0;
126 // get value into a wxVariant
127 virtual void GetValue( wxVariant
&variant
,
128 const wxDataViewItem
&item
, unsigned int col
) const = 0;
130 // set value, call ValueChanged() afterwards!
131 virtual bool SetValue( const wxVariant
&variant
,
132 const wxDataViewItem
&item
, unsigned int col
) = 0;
135 virtual wxDataViewItem
GetParent( const wxDataViewItem
&item
) const = 0;
136 virtual bool IsContainer( const wxDataViewItem
&item
) const = 0;
137 virtual wxDataViewItem
GetFirstChild( const wxDataViewItem
&parent
) const = 0;
138 virtual wxDataViewItem
GetNextSibling( const wxDataViewItem
&item
) const = 0;
140 // delegated notifiers
141 virtual bool ItemAdded( const wxDataViewItem
&parent
, const wxDataViewItem
&item
);
142 virtual bool ItemDeleted( const wxDataViewItem
&parent
, const wxDataViewItem
&item
);
143 virtual bool ItemChanged( const wxDataViewItem
&item
);
144 virtual bool ValueChanged( const wxDataViewItem
&item
, unsigned int col
);
145 virtual bool Cleared();
148 virtual void Resort();
150 void AddNotifier( wxDataViewModelNotifier
*notifier
);
151 void RemoveNotifier( wxDataViewModelNotifier
*notifier
);
153 // default compare function
154 virtual int Compare( const wxDataViewItem
&item1
, const wxDataViewItem
&item2
);
156 void SetSortingColumn( unsigned int col
) { m_sortingColumn
= col
; }
157 unsigned int GetSortingColumn() { return m_sortingColumn
; }
160 // the user should not delete this class directly: he should use DecRef() instead!
161 virtual ~wxDataViewModel() { }
163 wxDataViewModelNotifiers m_notifiers
;
164 unsigned int m_sortingColumn
;
167 // ---------------------------------------------------------
168 // wxDataViewIndexListModel
169 // ---------------------------------------------------------
171 // use hash map later
172 WX_DEFINE_ARRAY_PTR( void*, wxDataViewItemHash
);
174 class wxDataViewIndexListModel
: public wxDataViewModel
177 wxDataViewIndexListModel( unsigned int initial_size
= 0 );
178 ~wxDataViewIndexListModel();
180 virtual unsigned int GetRowCount() = 0;
182 virtual void GetValue( wxVariant
&variant
,
183 unsigned int row
, unsigned int col
) const = 0;
185 virtual bool SetValue( const wxVariant
&variant
,
186 unsigned int row
, unsigned int col
) = 0;
189 void RowInserted( unsigned int before
);
191 void RowDeleted( unsigned int row
);
192 void RowChanged( unsigned int row
);
193 void RowValueChanged( unsigned int row
, unsigned int col
);
195 // convert to/from row/wxDataViewItem
197 unsigned int GetRow( const wxDataViewItem
&item
) const;
198 wxDataViewItem
GetItem( unsigned int row
) const;
200 // compare based on index
202 virtual int Compare( const wxDataViewItem
&item1
, const wxDataViewItem
&item2
);
204 // implement base methods
206 virtual void GetValue( wxVariant
&variant
,
207 const wxDataViewItem
&item
, unsigned int col
) const;
208 virtual bool SetValue( const wxVariant
&variant
,
209 const wxDataViewItem
&item
, unsigned int col
);
210 virtual wxDataViewItem
GetParent( const wxDataViewItem
&item
) const;
211 virtual bool IsContainer( const wxDataViewItem
&item
) const;
212 virtual wxDataViewItem
GetFirstChild( const wxDataViewItem
&parent
) const;
213 virtual wxDataViewItem
GetNextSibling( const wxDataViewItem
&item
) const;
216 wxDataViewItemHash m_hash
;
217 unsigned int m_lastIndex
;
220 //-----------------------------------------------------------------------------
221 // wxDataViewEditorCtrlEvtHandler
222 //-----------------------------------------------------------------------------
224 class wxDataViewEditorCtrlEvtHandler
: public wxEvtHandler
227 wxDataViewEditorCtrlEvtHandler( wxControl
*editor
, wxDataViewRenderer
*owner
);
229 void AcceptChangesAndFinish();
230 void SetFocusOnIdle( bool focus
= true ) { m_focusOnIdle
= focus
; }
233 void OnChar( wxKeyEvent
&event
);
234 void OnKillFocus( wxFocusEvent
&event
);
235 void OnIdle( wxIdleEvent
&event
);
238 wxDataViewRenderer
*m_owner
;
239 wxControl
*m_editorCtrl
;
244 DECLARE_EVENT_TABLE()
247 // ---------------------------------------------------------
248 // wxDataViewRendererBase
249 // ---------------------------------------------------------
251 enum wxDataViewCellMode
253 wxDATAVIEW_CELL_INERT
,
254 wxDATAVIEW_CELL_ACTIVATABLE
,
255 wxDATAVIEW_CELL_EDITABLE
258 enum wxDataViewCellRenderState
260 wxDATAVIEW_CELL_SELECTED
= 1,
261 wxDATAVIEW_CELL_PRELIT
= 2,
262 wxDATAVIEW_CELL_INSENSITIVE
= 4,
263 wxDATAVIEW_CELL_FOCUSED
= 8
266 class WXDLLIMPEXP_ADV wxDataViewRendererBase
: public wxObject
269 wxDataViewRendererBase( const wxString
&varianttype
,
270 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
,
271 int alignment
= wxDVR_DEFAULT_ALIGNMENT
);
273 virtual bool Validate( wxVariant
& WXUNUSED(value
) )
276 void SetOwner( wxDataViewColumn
*owner
) { m_owner
= owner
; }
277 wxDataViewColumn
* GetOwner() { return m_owner
; }
279 // renderer properties:
281 virtual bool SetValue( const wxVariant
& WXUNUSED(value
) ) = 0;
282 virtual bool GetValue( wxVariant
& WXUNUSED(value
) ) const = 0;
284 wxString
GetVariantType() const { return m_variantType
; }
286 virtual void SetMode( wxDataViewCellMode mode
) = 0;
287 virtual wxDataViewCellMode
GetMode() const = 0;
289 // NOTE: Set/GetAlignment do not take/return a wxAlignment enum but
290 // rather an "int"; that's because for rendering cells it's allowed
291 // to combine alignment flags (e.g. wxALIGN_LEFT|wxALIGN_BOTTOM)
292 virtual void SetAlignment( int align
) = 0;
293 virtual int GetAlignment() const = 0;
296 virtual bool HasEditorCtrl()
298 virtual wxControl
* CreateEditorCtrl(wxWindow
* WXUNUSED(parent
),
299 wxRect
WXUNUSED(labelRect
),
300 const wxVariant
& WXUNUSED(value
))
302 virtual bool GetValueFromEditorCtrl(wxControl
* WXUNUSED(editor
),
303 wxVariant
& WXUNUSED(value
))
306 virtual bool StartEditing( const wxDataViewItem
&item
, wxRect labelRect
);
307 virtual void CancelEditing();
308 virtual bool FinishEditing();
310 wxControl
*GetEditorCtrl() { return m_editorCtrl
; }
313 wxString m_variantType
;
314 wxDataViewColumn
*m_owner
;
315 wxControl
*m_editorCtrl
;
316 wxDataViewItem m_item
; // for m_editorCtrl
319 const wxDataViewCtrl
* GetView() const;
322 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase
)
325 // ---------------------------------------------------------
326 // wxDataViewColumnBase
327 // ---------------------------------------------------------
329 enum wxDataViewColumnFlags
331 wxDATAVIEW_COL_RESIZABLE
= 1,
332 wxDATAVIEW_COL_SORTABLE
= 2,
333 wxDATAVIEW_COL_HIDDEN
= 4
336 class WXDLLIMPEXP_ADV wxDataViewColumnBase
: public wxObject
339 wxDataViewColumnBase( const wxString
&title
, wxDataViewRenderer
*renderer
,
340 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
341 wxAlignment align
= wxALIGN_CENTER
,
342 int flags
= wxDATAVIEW_COL_RESIZABLE
);
343 wxDataViewColumnBase( const wxBitmap
&bitmap
, wxDataViewRenderer
*renderer
,
344 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
345 wxAlignment align
= wxALIGN_CENTER
,
346 int flags
= wxDATAVIEW_COL_RESIZABLE
);
347 virtual ~wxDataViewColumnBase();
351 virtual void SetTitle( const wxString
&title
) = 0;
352 virtual void SetAlignment( wxAlignment align
) = 0;
353 virtual void SetSortable( bool sortable
) = 0;
354 virtual void SetResizeable( bool resizeable
) = 0;
355 virtual void SetHidden( bool hidden
) = 0;
356 virtual void SetSortOrder( bool ascending
) = 0;
357 virtual void SetFlags( int flags
);
358 virtual void SetOwner( wxDataViewCtrl
*owner
)
360 virtual void SetBitmap( const wxBitmap
&bitmap
)
363 virtual void SetMinWidth( int minWidth
) = 0;
364 virtual void SetWidth( int width
) = 0;
369 virtual wxString
GetTitle() const = 0;
370 virtual wxAlignment
GetAlignment() const = 0;
371 virtual int GetWidth() const = 0;
372 virtual int GetMinWidth() const = 0;
374 virtual int GetFlags() const;
376 virtual bool IsSortable() const = 0;
377 virtual bool IsResizeable() const = 0;
378 virtual bool IsHidden() const = 0;
379 virtual bool IsSortOrderAscending() const = 0;
381 const wxBitmap
&GetBitmap() const { return m_bitmap
; }
382 unsigned int GetModelColumn() const { return m_model_column
; }
384 wxDataViewCtrl
*GetOwner() { return m_owner
; }
385 wxDataViewRenderer
* GetRenderer() { return m_renderer
; }
388 wxDataViewRenderer
*m_renderer
;
391 wxDataViewCtrl
*m_owner
;
394 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase
)
397 // ---------------------------------------------------------
398 // wxDataViewCtrlBase
399 // ---------------------------------------------------------
401 #define wxDV_SINGLE 0x0000 // for convenience
402 #define wxDV_MULTIPLE 0x0001 // can select multiple items
404 #define wxDV_NO_HEADER 0x0002 // column titles not visible
405 #define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
406 #define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
408 class WXDLLIMPEXP_ADV wxDataViewCtrlBase
: public wxControl
411 wxDataViewCtrlBase();
412 virtual ~wxDataViewCtrlBase();
414 virtual bool AssociateModel( wxDataViewModel
*model
);
415 wxDataViewModel
* GetModel();
418 bool AppendTextColumn( const wxString
&label
, unsigned int model_column
,
419 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
420 wxAlignment align
= wxALIGN_CENTER
,
421 int flags
= wxDATAVIEW_COL_RESIZABLE
);
422 bool AppendToggleColumn( const wxString
&label
, unsigned int model_column
,
423 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
424 wxAlignment align
= wxALIGN_CENTER
,
425 int flags
= wxDATAVIEW_COL_RESIZABLE
);
426 bool AppendProgressColumn( const wxString
&label
, unsigned int model_column
,
427 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
428 wxAlignment align
= wxALIGN_CENTER
,
429 int flags
= wxDATAVIEW_COL_RESIZABLE
);
430 bool AppendDateColumn( const wxString
&label
, unsigned int model_column
,
431 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
432 wxAlignment align
= wxALIGN_CENTER
,
433 int flags
= wxDATAVIEW_COL_RESIZABLE
);
434 bool AppendBitmapColumn( const wxString
&label
, unsigned int model_column
,
435 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
436 wxAlignment align
= wxALIGN_CENTER
,
437 int flags
= wxDATAVIEW_COL_RESIZABLE
);
438 bool AppendTextColumn( const wxBitmap
&label
, unsigned int model_column
,
439 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
440 wxAlignment align
= wxALIGN_CENTER
,
441 int flags
= wxDATAVIEW_COL_RESIZABLE
);
442 bool AppendToggleColumn( const wxBitmap
&label
, unsigned int model_column
,
443 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
444 wxAlignment align
= wxALIGN_CENTER
,
445 int flags
= wxDATAVIEW_COL_RESIZABLE
);
446 bool AppendProgressColumn( const wxBitmap
&label
, unsigned int model_column
,
447 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
448 wxAlignment align
= wxALIGN_CENTER
,
449 int flags
= wxDATAVIEW_COL_RESIZABLE
);
450 bool AppendDateColumn( const wxBitmap
&label
, unsigned int model_column
,
451 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
452 wxAlignment align
= wxALIGN_CENTER
,
453 int flags
= wxDATAVIEW_COL_RESIZABLE
);
454 bool AppendBitmapColumn( const wxBitmap
&label
, unsigned int model_column
,
455 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
456 wxAlignment align
= wxALIGN_CENTER
,
457 int flags
= wxDATAVIEW_COL_RESIZABLE
);
459 virtual bool AppendColumn( wxDataViewColumn
*col
);
461 virtual unsigned int GetColumnCount() const;
463 virtual bool DeleteColumn( unsigned int pos
);
464 virtual bool ClearColumns();
465 virtual wxDataViewColumn
* GetColumn( unsigned int pos
);
467 void SetExpanderColumn( unsigned int col
)
468 { m_expander_column
= col
; DoSetExpanderColumn(); }
469 unsigned int GetExpanderColumn() const
470 { return m_expander_column
; }
472 void SetIndent( int indent
)
473 { m_indent
= indent
; DoSetIndent(); }
474 int GetIndent() const
477 // TODO selection code
478 virtual wxDataViewItem
GetSelection() = 0;
481 virtual void DoSetExpanderColumn() = 0 ;
482 virtual void DoSetIndent() = 0;
485 wxDataViewModel
*m_model
;
487 wxDataViewEventModelNotifier
*m_eventNotifier
;
488 unsigned int m_expander_column
;
492 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase
)
495 // ----------------------------------------------------------------------------
496 // wxDataViewEvent - the event class for the wxDataViewCtrl notifications
497 // ----------------------------------------------------------------------------
499 class WXDLLIMPEXP_ADV wxDataViewEvent
: public wxNotifyEvent
502 wxDataViewEvent(wxEventType commandType
= wxEVT_NULL
, int winid
= 0)
503 : wxNotifyEvent(commandType
, winid
),
507 m_value(wxNullVariant
),
511 wxDataViewEvent(const wxDataViewEvent
& event
)
512 : wxNotifyEvent(event
),
513 m_item(event
.m_item
),
515 m_model(event
.m_model
),
516 m_value(event
.m_value
),
517 m_column(event
.m_column
)
520 wxDataViewItem
GetItem() const { return m_item
; }
521 void SetItem( const wxDataViewItem
&item
) { m_item
= item
; }
523 int GetColumn() const { return m_col
; }
524 void SetColumn( int col
) { m_col
= col
; }
526 wxDataViewModel
* GetModel() const { return m_model
; }
527 void SetModel( wxDataViewModel
*model
) { m_model
= model
; }
529 const wxVariant
&GetValue() const { return m_value
; }
530 void SetValue( const wxVariant
&value
) { m_value
= value
; }
532 // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
533 void SetDataViewColumn( wxDataViewColumn
*col
) { m_column
= col
; }
534 wxDataViewColumn
*GetDataViewColumn() const { return m_column
; }
536 virtual wxEvent
*Clone() const { return new wxDataViewEvent(*this); }
539 wxDataViewItem m_item
;
541 wxDataViewModel
*m_model
;
543 wxDataViewColumn
*m_column
;
546 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent
)
549 BEGIN_DECLARE_EVENT_TYPES()
550 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_SELECTED
, -1)
551 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED
, -1)
552 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK
, -1)
553 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK
, -1)
554 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED
, -1)
555 // notifications from the model to the control
556 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_ADDED
, -1)
557 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_DELETED
, -1)
558 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_CHANGED
, -1)
559 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_VALUE_CHANGED
, -1)
560 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_CLEARED
, -1)
561 END_DECLARE_EVENT_TYPES()
563 typedef void (wxEvtHandler::*wxDataViewEventFunction
)(wxDataViewEvent
&);
565 #define wxDataViewEventHandler(func) \
566 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDataViewEventFunction, &func)
568 #define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
569 wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
571 #define EVT_DATAVIEW_ITEM_SELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_SELECTED, id, fn)
572 #define EVT_DATAVIEW_ITEM_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_ACTIVATED, id, fn)
573 #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
574 #define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
575 #define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
577 #define EVT_DATAVIEW_MODEL_ITEM_ADDED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ITEM_ADDED, id, fn)
578 #define EVT_DATAVIEW_MODEL_ITEM_DELETED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ITEM_DELETED, id, fn)
579 #define EVT_DATAVIEW_MODEL_ITEM_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ITEM_CHANGED, id, fn)
580 #define EVT_DATAVIEW_MODEL_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_VALUE_CHANGED, id, fn)
581 #define EVT_DATAVIEW_MODEL_CLEARED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_CLEARED, id, fn)
584 #if defined(wxUSE_GENERICDATAVIEWCTRL)
585 #include "wx/generic/dataview.h"
586 #elif defined(__WXGTK20__)
587 #include "wx/gtk/dataview.h"
588 #elif defined(__WXMAC__)
589 #include "wx/mac/dataview.h"
591 #include "wx/generic/dataview.h"
594 #endif // wxUSE_DATAVIEWCTRL
597 // _WX_DATAVIEW_H_BASE_