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"
25 #if defined(__WXGTK20__)
27 // #define wxUSE_GENERICDATAVIEWCTRL 1
28 #elif defined(__WXMAC__)
29 #define wxUSE_GENERICDATAVIEWCTRL 1
31 #define wxUSE_GENERICDATAVIEWCTRL 1
34 // ----------------------------------------------------------------------------
35 // wxDataViewCtrl flags
36 // ----------------------------------------------------------------------------
38 // ----------------------------------------------------------------------------
39 // wxDataViewCtrl globals
40 // ----------------------------------------------------------------------------
42 class WXDLLIMPEXP_ADV wxDataViewModel
;
43 class WXDLLIMPEXP_ADV wxDataViewListModel
;
44 class WXDLLIMPEXP_ADV wxDataViewCtrl
;
45 class WXDLLIMPEXP_ADV wxDataViewColumn
;
46 class WXDLLIMPEXP_ADV wxDataViewRenderer
;
47 class wxDataViewEventListModelNotifier
;
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 wxDataViewModel
: public wxObjectRefData
74 // the user should not delete this class directly: he should use DecRef() instead!
75 virtual ~wxDataViewModel() { }
78 // ---------------------------------------------------------
79 // wxDataViewListModelNotifier
80 // ---------------------------------------------------------
82 class WXDLLIMPEXP_ADV wxDataViewListModelNotifier
: public wxObject
85 wxDataViewListModelNotifier() { }
86 virtual ~wxDataViewListModelNotifier() { m_owner
= NULL
; }
88 virtual bool RowAppended() = 0;
89 virtual bool RowPrepended() = 0;
90 virtual bool RowInserted( unsigned int before
) = 0;
91 virtual bool RowDeleted( unsigned int row
) = 0;
92 virtual bool RowChanged( unsigned int row
) = 0;
93 virtual bool ValueChanged( unsigned int col
, unsigned int row
) = 0;
94 virtual bool RowsReordered( unsigned int *new_order
) = 0;
95 virtual bool Cleared() = 0;
97 void SetOwner( wxDataViewListModel
*owner
) { m_owner
= owner
; }
98 wxDataViewListModel
*GetOwner() { return m_owner
; }
101 wxDataViewListModel
*m_owner
;
104 // ---------------------------------------------------------
105 // wxDataViewListModel
106 // ---------------------------------------------------------
108 class WXDLLIMPEXP_ADV wxDataViewListModel
: public wxDataViewModel
111 wxDataViewListModel();
113 virtual unsigned int GetRowCount() const = 0;
114 virtual unsigned int GetColumnCount() const = 0;
116 // return type as reported by wxVariant
117 virtual wxString
GetColumnType( unsigned int col
) const = 0;
119 // get value into a wxVariant
120 virtual void GetValue( wxVariant
&variant
, unsigned int col
, unsigned int row
) const = 0;
122 // set value, call ValueChanged() afterwards!
123 virtual bool SetValue( const wxVariant
&variant
, unsigned int col
, unsigned int row
) = 0;
125 // delegated notifiers
126 virtual bool RowAppended();
127 virtual bool RowPrepended();
128 virtual bool RowInserted( unsigned int before
);
129 virtual bool RowDeleted( unsigned int row
);
130 virtual bool RowChanged( unsigned int row
);
131 virtual bool ValueChanged( unsigned int col
, unsigned int row
);
132 virtual bool RowsReordered( unsigned int *new_order
);
133 virtual bool Cleared();
135 void AddNotifier( wxDataViewListModelNotifier
*notifier
);
136 void RemoveNotifier( wxDataViewListModelNotifier
*notifier
);
139 // the user should not delete this class directly: he should use DecRef() instead!
140 virtual ~wxDataViewListModel();
145 // ---------------------------------------------------------
146 // wxDataViewSortedListModel
147 // ---------------------------------------------------------
149 typedef int (wxCALLBACK
*wxDataViewListModelCompare
)
150 (unsigned int row1
, unsigned int row2
, unsigned int col
, wxDataViewListModel
* model
);
152 WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(unsigned int,
153 wxDataViewSortedIndexArray
, WXDLLIMPEXP_ADV
);
155 class WXDLLIMPEXP_ADV wxDataViewSortedListModel
: public wxDataViewListModel
157 friend class wxDataViewSortedListModelNotifier
;
160 wxDataViewSortedListModel( wxDataViewListModel
*child
);
161 virtual ~wxDataViewSortedListModel();
163 void SetAscending( bool ascending
) { m_ascending
= ascending
; }
164 bool IsAscending() const { return m_ascending
; }
166 virtual unsigned int GetRowCount() const;
167 virtual unsigned int GetColumnCount() const;
169 // return type as reported by wxVariant
170 virtual wxString
GetColumnType( unsigned int col
) const;
172 // get value into a wxVariant
173 virtual void GetValue( wxVariant
&variant
, unsigned int col
, unsigned int row
) const;
175 // set value, call ValueChanged() afterwards!
176 virtual bool SetValue( const wxVariant
&variant
, unsigned int col
, unsigned int row
);
179 virtual bool RowAppended();
180 virtual bool RowPrepended();
181 virtual bool RowInserted( unsigned int before
);
182 virtual bool RowDeleted( unsigned int row
);
183 virtual bool RowChanged( unsigned int row
);
184 virtual bool ValueChanged( unsigned int col
, unsigned int row
);
185 virtual bool RowsReordered( unsigned int *new_order
);
186 virtual bool Cleared();
188 // called if child's notifiers are called
189 bool ChildRowAppended();
190 bool ChildRowPrepended();
191 bool ChildRowInserted( unsigned int before
);
192 bool ChildRowDeleted( unsigned int row
);
193 bool ChildRowChanged( unsigned int row
);
194 bool ChildValueChanged( unsigned int col
, unsigned int row
);
195 bool ChildRowsReordered( unsigned int *new_order
);
198 virtual void Resort();
204 wxDataViewListModel
*m_child
;
205 wxDataViewSortedIndexArray m_array
;
206 wxDataViewListModelNotifier
*m_notifierOnChild
;
208 void InitStatics(); // BAD
211 //-----------------------------------------------------------------------------
212 // wxDataViewEditorCtrlEvtHandler
213 //-----------------------------------------------------------------------------
215 class wxDataViewEditorCtrlEvtHandler
: public wxEvtHandler
218 wxDataViewEditorCtrlEvtHandler( wxControl
*editor
, wxDataViewRenderer
*owner
);
220 void AcceptChangesAndFinish();
221 void SetFocusOnIdle( bool focus
= true ) { m_focusOnIdle
= focus
; }
224 void OnChar( wxKeyEvent
&event
);
225 void OnKillFocus( wxFocusEvent
&event
);
226 void OnIdle( wxIdleEvent
&event
);
229 wxDataViewRenderer
*m_owner
;
230 wxControl
*m_editorCtrl
;
235 DECLARE_EVENT_TABLE()
238 // ---------------------------------------------------------
239 // wxDataViewRendererBase
240 // ---------------------------------------------------------
242 enum wxDataViewCellMode
244 wxDATAVIEW_CELL_INERT
,
245 wxDATAVIEW_CELL_ACTIVATABLE
,
246 wxDATAVIEW_CELL_EDITABLE
249 enum wxDataViewCellRenderState
251 wxDATAVIEW_CELL_SELECTED
= 1,
252 wxDATAVIEW_CELL_PRELIT
= 2,
253 wxDATAVIEW_CELL_INSENSITIVE
= 4,
254 wxDATAVIEW_CELL_FOCUSED
= 8
257 class WXDLLIMPEXP_ADV wxDataViewRendererBase
: public wxObject
260 wxDataViewRendererBase( const wxString
&varianttype
,
261 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
,
262 int alignment
= wxDVR_DEFAULT_ALIGNMENT
);
264 virtual bool Validate( wxVariant
& WXUNUSED(value
) )
267 void SetOwner( wxDataViewColumn
*owner
) { m_owner
= owner
; }
268 wxDataViewColumn
* GetOwner() { return m_owner
; }
270 // renderer properties:
272 virtual bool SetValue( const wxVariant
& WXUNUSED(value
) ) = 0;
273 virtual bool GetValue( wxVariant
& WXUNUSED(value
) ) const = 0;
275 wxString
GetVariantType() const { return m_variantType
; }
277 virtual void SetMode( wxDataViewCellMode mode
) = 0;
278 virtual wxDataViewCellMode
GetMode() const = 0;
280 // NOTE: Set/GetAlignment do not take/return a wxAlignment enum but
281 // rather an "int"; that's because for rendering cells it's allowed
282 // to combine alignment flags (e.g. wxALIGN_LEFT|wxALIGN_BOTTOM)
283 virtual void SetAlignment( int align
) = 0;
284 virtual int GetAlignment() const = 0;
287 virtual bool HasEditorCtrl()
289 virtual wxControl
* CreateEditorCtrl(wxWindow
* WXUNUSED(parent
),
290 wxRect
WXUNUSED(labelRect
),
291 const wxVariant
& WXUNUSED(value
))
293 virtual bool GetValueFromEditorCtrl(wxControl
* WXUNUSED(editor
),
294 wxVariant
& WXUNUSED(value
))
297 virtual bool StartEditing( unsigned int row
, wxRect labelRect
);
298 virtual void CancelEditing();
299 virtual bool FinishEditing();
301 wxControl
*GetEditorCtrl() { return m_editorCtrl
; }
304 wxString m_variantType
;
305 wxDataViewColumn
*m_owner
;
306 wxControl
*m_editorCtrl
;
307 unsigned int m_row
; // for m_editorCtrl
310 const wxDataViewCtrl
* GetView() const;
313 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase
)
316 // ---------------------------------------------------------
317 // wxDataViewColumnBase
318 // ---------------------------------------------------------
320 enum wxDataViewColumnFlags
322 wxDATAVIEW_COL_RESIZABLE
= 1,
323 wxDATAVIEW_COL_SORTABLE
= 2,
324 wxDATAVIEW_COL_HIDDEN
= 4
327 class WXDLLIMPEXP_ADV wxDataViewColumnBase
: public wxObject
330 wxDataViewColumnBase( const wxString
&title
, wxDataViewRenderer
*renderer
,
331 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
332 wxAlignment align
= wxALIGN_CENTER
,
333 int flags
= wxDATAVIEW_COL_RESIZABLE
);
334 wxDataViewColumnBase( const wxBitmap
&bitmap
, wxDataViewRenderer
*renderer
,
335 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
336 wxAlignment align
= wxALIGN_CENTER
,
337 int flags
= wxDATAVIEW_COL_RESIZABLE
);
338 virtual ~wxDataViewColumnBase();
342 virtual void SetTitle( const wxString
&title
) = 0;
343 virtual void SetAlignment( wxAlignment align
) = 0;
344 virtual void SetSortable( bool sortable
) = 0;
345 virtual void SetResizeable( bool resizeable
) = 0;
346 virtual void SetHidden( bool hidden
) = 0;
347 virtual void SetSortOrder( bool ascending
) = 0;
348 virtual void SetFlags( int flags
);
349 virtual void SetOwner( wxDataViewCtrl
*owner
)
351 virtual void SetBitmap( const wxBitmap
&bitmap
)
354 virtual void SetMinWidth( int minWidth
) = 0;
355 virtual void SetWidth( int width
) = 0;
360 virtual wxString
GetTitle() const = 0;
361 virtual wxAlignment
GetAlignment() const = 0;
362 virtual int GetWidth() const = 0;
363 virtual int GetMinWidth() const = 0;
365 virtual int GetFlags() const;
367 virtual bool IsSortable() const = 0;
368 virtual bool IsResizeable() const = 0;
369 virtual bool IsHidden() const = 0;
370 virtual bool IsSortOrderAscending() const = 0;
372 const wxBitmap
&GetBitmap() const { return m_bitmap
; }
373 unsigned int GetModelColumn() const { return m_model_column
; }
375 wxDataViewCtrl
*GetOwner() { return m_owner
; }
376 wxDataViewRenderer
* GetRenderer() { return m_renderer
; }
379 wxDataViewRenderer
*m_renderer
;
382 wxDataViewCtrl
*m_owner
;
385 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase
)
388 // ---------------------------------------------------------
389 // wxDataViewCtrlBase
390 // ---------------------------------------------------------
392 #define wxDV_SINGLE 0x0000 // for convenience
393 #define wxDV_MULTIPLE 0x0001 // can select multiple items
395 #define wxDV_NO_HEADER 0x0002 // column titles not visible
396 #define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
397 #define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
399 class WXDLLIMPEXP_ADV wxDataViewCtrlBase
: public wxControl
402 wxDataViewCtrlBase();
403 virtual ~wxDataViewCtrlBase();
405 virtual bool AssociateModel( wxDataViewListModel
*model
);
406 wxDataViewListModel
* GetModel();
409 bool AppendTextColumn( const wxString
&label
, unsigned int model_column
,
410 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
411 wxAlignment align
= wxALIGN_CENTER
,
412 int flags
= wxDATAVIEW_COL_RESIZABLE
);
413 bool AppendToggleColumn( const wxString
&label
, unsigned int model_column
,
414 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
415 wxAlignment align
= wxALIGN_CENTER
,
416 int flags
= wxDATAVIEW_COL_RESIZABLE
);
417 bool AppendProgressColumn( const wxString
&label
, unsigned int model_column
,
418 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
419 wxAlignment align
= wxALIGN_CENTER
,
420 int flags
= wxDATAVIEW_COL_RESIZABLE
);
421 bool AppendDateColumn( const wxString
&label
, unsigned int model_column
,
422 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
423 wxAlignment align
= wxALIGN_CENTER
,
424 int flags
= wxDATAVIEW_COL_RESIZABLE
);
425 bool AppendBitmapColumn( const wxString
&label
, unsigned int model_column
,
426 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
427 wxAlignment align
= wxALIGN_CENTER
,
428 int flags
= wxDATAVIEW_COL_RESIZABLE
);
429 bool AppendTextColumn( const wxBitmap
&label
, unsigned int model_column
,
430 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
431 wxAlignment align
= wxALIGN_CENTER
,
432 int flags
= wxDATAVIEW_COL_RESIZABLE
);
433 bool AppendToggleColumn( const wxBitmap
&label
, unsigned int model_column
,
434 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
435 wxAlignment align
= wxALIGN_CENTER
,
436 int flags
= wxDATAVIEW_COL_RESIZABLE
);
437 bool AppendProgressColumn( const wxBitmap
&label
, unsigned int model_column
,
438 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
439 wxAlignment align
= wxALIGN_CENTER
,
440 int flags
= wxDATAVIEW_COL_RESIZABLE
);
441 bool AppendDateColumn( const wxBitmap
&label
, unsigned int model_column
,
442 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
443 wxAlignment align
= wxALIGN_CENTER
,
444 int flags
= wxDATAVIEW_COL_RESIZABLE
);
445 bool AppendBitmapColumn( const wxBitmap
&label
, unsigned int model_column
,
446 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
447 wxAlignment align
= wxALIGN_CENTER
,
448 int flags
= wxDATAVIEW_COL_RESIZABLE
);
450 virtual bool AppendColumn( wxDataViewColumn
*col
);
452 virtual unsigned int GetColumnCount() const;
454 virtual bool DeleteColumn( unsigned int pos
);
455 virtual bool ClearColumns();
456 virtual wxDataViewColumn
* GetColumn( unsigned int pos
);
458 virtual void SetSelection( int row
) = 0; // -1 for unselect
459 inline void ClearSelection() { SetSelection( -1 ); }
460 virtual void Unselect( unsigned int row
) = 0;
461 virtual void SetSelectionRange( unsigned int from
, unsigned int to
) = 0;
462 virtual void SetSelections( const wxArrayInt
& aSelections
) = 0;
464 virtual bool IsSelected( unsigned int row
) const = 0;
465 virtual int GetSelection() const = 0;
466 virtual int GetSelections(wxArrayInt
& aSelections
) const = 0;
469 wxDataViewListModel
*m_model
;
471 wxDataViewEventListModelNotifier
*m_eventNotifier
;
474 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase
)
478 // ----------------------------------------------------------------------------
479 // wxDataViewEvent - the event class for the wxDataViewCtrl notifications
480 // ----------------------------------------------------------------------------
482 class WXDLLIMPEXP_ADV wxDataViewEvent
: public wxNotifyEvent
485 wxDataViewEvent(wxEventType commandType
= wxEVT_NULL
, int winid
= 0)
486 : wxNotifyEvent(commandType
, winid
),
490 m_value(wxNullVariant
),
491 m_editCancelled(false),
495 wxDataViewEvent(const wxDataViewEvent
& event
)
496 : wxNotifyEvent(event
),
499 m_model(event
.m_model
),
500 m_value(event
.m_value
),
501 m_editCancelled(event
.m_editCancelled
),
502 m_column(event
.m_column
)
505 int GetColumn() const { return m_col
; }
506 void SetColumn( int col
) { m_col
= col
; }
508 int GetRow() const { return m_row
; }
509 void SetRow( int row
) { m_row
= row
; }
511 wxDataViewModel
* GetModel() const { return m_model
; }
512 void SetModel( wxDataViewModel
*model
) { m_model
= model
; }
514 const wxVariant
&GetValue() const { return m_value
; }
515 void SetValue( const wxVariant
&value
) { m_value
= value
; }
517 // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
518 void SetDataViewColumn( wxDataViewColumn
*col
) { m_column
= col
; }
519 wxDataViewColumn
*GetDataViewColumn() const { return m_column
; }
521 // was label editing canceled? (for wxEVT_COMMAND_DATVIEW_END_LABEL_EDIT only)
522 bool IsEditCancelled() const { return m_editCancelled
; }
523 void SetEditCanceled(bool editCancelled
) { m_editCancelled
= editCancelled
; }
525 virtual wxEvent
*Clone() const { return new wxDataViewEvent(*this); }
530 wxDataViewModel
*m_model
;
532 bool m_editCancelled
;
533 wxDataViewColumn
*m_column
;
536 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent
)
539 BEGIN_DECLARE_EVENT_TYPES()
540 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ROW_SELECTED
, -1)
541 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ROW_ACTIVATED
, -1)
542 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK
, -1)
543 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK
, -1)
544 // notifications from the model to the control
545 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_APPENDED
, -1)
546 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_PREPENDED
, -1)
547 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_INSERTED
, -1)
548 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_DELETED
, -1)
549 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_CHANGED
, -1)
550 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_VALUE_CHANGED
, -1)
551 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROWS_REORDERED
, -1)
552 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_CLEARED
, -1)
553 END_DECLARE_EVENT_TYPES()
555 typedef void (wxEvtHandler::*wxDataViewEventFunction
)(wxDataViewEvent
&);
557 #define wxDataViewEventHandler(func) \
558 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDataViewEventFunction, &func)
560 #define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
561 wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
563 #define EVT_DATAVIEW_ROW_SELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_SELECTED, id, fn)
564 #define EVT_DATAVIEW_ROW_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_ACTIVATED, id, fn)
565 #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
566 #define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
568 #define EVT_DATAVIEW_MODEL_ROW_APPENDED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_APPENDED, id, fn)
569 #define EVT_DATAVIEW_MODEL_ROW_PREPENDED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_PREPENDED, id, fn)
570 #define EVT_DATAVIEW_MODEL_ROW_INSERTED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_INSERTED, id, fn)
571 #define EVT_DATAVIEW_MODEL_ROW_DELETED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_DELETED, id, fn)
572 #define EVT_DATAVIEW_MODEL_ROW_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_CHANGED, id, fn)
573 #define EVT_DATAVIEW_MODEL_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_VALUE_CHANGED, id, fn)
574 #define EVT_DATAVIEW_MODEL_ROWS_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROWS_REORDERED, id, fn)
575 #define EVT_DATAVIEW_MODEL_CLEARED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_CLEARED, id, fn)
578 #if defined(wxUSE_GENERICDATAVIEWCTRL)
579 #include "wx/generic/dataview.h"
580 #elif defined(__WXGTK20__)
581 #include "wx/gtk/dataview.h"
582 #elif defined(__WXMAC__)
584 // #include "wx/mac/dataview.h"
586 #include "wx/generic/dataview.h"
589 #endif // wxUSE_DATAVIEWCTRL
592 // _WX_DATAVIEW_H_BASE_