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_ADV wxDataViewModel
;
42 class WXDLLIMPEXP_ADV wxDataViewListModel
;
43 class WXDLLIMPEXP_ADV wxDataViewCtrl
;
44 class WXDLLIMPEXP_ADV wxDataViewColumn
;
45 class WXDLLIMPEXP_ADV wxDataViewRenderer
;
46 class wxDataViewEventListModelNotifier
;
48 extern WXDLLIMPEXP_DATA_ADV(const wxChar
) wxDataViewCtrlNameStr
[];
50 // the default width of new (text) columns:
51 #define wxDVC_DEFAULT_WIDTH 80
53 // the default width of new toggle columns:
54 #define wxDVC_TOGGLE_DEFAULT_WIDTH 30
56 // the default minimal width of the columns:
57 #define wxDVC_DEFAULT_MINWIDTH 30
59 // the default alignment of wxDataViewRenderers:
60 #define wxDVR_DEFAULT_ALIGNMENT (wxALIGN_LEFT|wxALIGN_TOP)
63 // ---------------------------------------------------------
65 // ---------------------------------------------------------
67 class WXDLLIMPEXP_ADV wxDataViewModel
: public wxObjectRefData
73 // the user should not delete this class directly: he should use DecRef() instead!
74 virtual ~wxDataViewModel() { }
77 // ---------------------------------------------------------
78 // wxDataViewListModelNotifier
79 // ---------------------------------------------------------
81 class WXDLLIMPEXP_ADV wxDataViewListModelNotifier
: public wxObject
84 wxDataViewListModelNotifier() { }
85 virtual ~wxDataViewListModelNotifier() { m_owner
= NULL
; }
87 virtual bool RowAppended() = 0;
88 virtual bool RowPrepended() = 0;
89 virtual bool RowInserted( unsigned int before
) = 0;
90 virtual bool RowDeleted( unsigned int row
) = 0;
91 virtual bool RowChanged( unsigned int row
) = 0;
92 virtual bool ValueChanged( unsigned int col
, unsigned int row
) = 0;
93 virtual bool RowsReordered( unsigned int *new_order
) = 0;
94 virtual bool Cleared() = 0;
96 void SetOwner( wxDataViewListModel
*owner
) { m_owner
= owner
; }
97 wxDataViewListModel
*GetOwner() { return m_owner
; }
100 wxDataViewListModel
*m_owner
;
103 // ---------------------------------------------------------
104 // wxDataViewListModel
105 // ---------------------------------------------------------
107 class WXDLLIMPEXP_ADV wxDataViewListModel
: public wxDataViewModel
110 wxDataViewListModel();
112 virtual unsigned int GetRowCount() const = 0;
113 virtual unsigned int GetColumnCount() const = 0;
115 // return type as reported by wxVariant
116 virtual wxString
GetColumnType( unsigned int col
) const = 0;
118 // get value into a wxVariant
119 virtual void GetValue( wxVariant
&variant
, unsigned int col
, unsigned int row
) const = 0;
121 // set value, call ValueChanged() afterwards!
122 virtual bool SetValue( const wxVariant
&variant
, unsigned int col
, unsigned int row
) = 0;
124 // override to set cell attributes
125 virtual void GetAttr( wxListItemAttr
& WXUNUSED(attr
),
126 unsigned int WXUNUSED(col
),
127 unsigned int WXUNUSED(row
) )
131 // delegated notifiers
132 virtual bool RowAppended();
133 virtual bool RowPrepended();
134 virtual bool RowInserted( unsigned int before
);
135 virtual bool RowDeleted( unsigned int row
);
136 virtual bool RowChanged( unsigned int row
);
137 virtual bool ValueChanged( unsigned int col
, unsigned int row
);
138 virtual bool RowsReordered( unsigned int *new_order
);
139 virtual bool Cleared();
141 void AddNotifier( wxDataViewListModelNotifier
*notifier
);
142 void RemoveNotifier( wxDataViewListModelNotifier
*notifier
);
145 // the user should not delete this class directly: he should use DecRef() instead!
146 virtual ~wxDataViewListModel();
151 // ---------------------------------------------------------
152 // wxDataViewSortedListModel
153 // ---------------------------------------------------------
155 typedef int (wxCALLBACK
*wxDataViewListModelCompare
)
156 (unsigned int row1
, unsigned int row2
, unsigned int col
, wxDataViewListModel
* model
);
158 WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(unsigned int,
159 wxDataViewSortedIndexArray
, WXDLLIMPEXP_ADV
);
161 class WXDLLIMPEXP_ADV wxDataViewSortedListModel
: public wxDataViewListModel
163 friend class wxDataViewSortedListModelNotifier
;
166 wxDataViewSortedListModel( wxDataViewListModel
*child
);
167 virtual ~wxDataViewSortedListModel();
169 void SetAscending( bool ascending
) { m_ascending
= ascending
; }
170 bool IsAscending() const { return m_ascending
; }
172 virtual unsigned int GetRowCount() const;
173 virtual unsigned int GetColumnCount() const;
175 // return type as reported by wxVariant
176 virtual wxString
GetColumnType( unsigned int col
) const;
178 // get value into a wxVariant
179 virtual void GetValue( wxVariant
&variant
, unsigned int col
, unsigned int row
) const;
181 // set value, call ValueChanged() afterwards!
182 virtual bool SetValue( const wxVariant
&variant
, unsigned int col
, unsigned int row
);
185 virtual bool RowAppended();
186 virtual bool RowPrepended();
187 virtual bool RowInserted( unsigned int before
);
188 virtual bool RowDeleted( unsigned int row
);
189 virtual bool RowChanged( unsigned int row
);
190 virtual bool ValueChanged( unsigned int col
, unsigned int row
);
191 virtual bool RowsReordered( unsigned int *new_order
);
192 virtual bool Cleared();
194 // called if child's notifiers are called
195 bool ChildRowAppended();
196 bool ChildRowPrepended();
197 bool ChildRowInserted( unsigned int before
);
198 bool ChildRowDeleted( unsigned int row
);
199 bool ChildRowChanged( unsigned int row
);
200 bool ChildValueChanged( unsigned int col
, unsigned int row
);
201 bool ChildRowsReordered( unsigned int *new_order
);
204 virtual void Resort();
210 wxDataViewListModel
*m_child
;
211 wxDataViewSortedIndexArray m_array
;
212 wxDataViewListModelNotifier
*m_notifierOnChild
;
214 void InitStatics(); // BAD
217 //-----------------------------------------------------------------------------
218 // wxDataViewEditorCtrlEvtHandler
219 //-----------------------------------------------------------------------------
221 class wxDataViewEditorCtrlEvtHandler
: public wxEvtHandler
224 wxDataViewEditorCtrlEvtHandler( wxControl
*editor
, wxDataViewRenderer
*owner
);
226 void AcceptChangesAndFinish();
227 void SetFocusOnIdle( bool focus
= true ) { m_focusOnIdle
= focus
; }
230 void OnChar( wxKeyEvent
&event
);
231 void OnKillFocus( wxFocusEvent
&event
);
232 void OnIdle( wxIdleEvent
&event
);
235 wxDataViewRenderer
*m_owner
;
236 wxControl
*m_editorCtrl
;
241 DECLARE_EVENT_TABLE()
244 // ---------------------------------------------------------
245 // wxDataViewRendererBase
246 // ---------------------------------------------------------
248 enum wxDataViewCellMode
250 wxDATAVIEW_CELL_INERT
,
251 wxDATAVIEW_CELL_ACTIVATABLE
,
252 wxDATAVIEW_CELL_EDITABLE
255 enum wxDataViewCellRenderState
257 wxDATAVIEW_CELL_SELECTED
= 1,
258 wxDATAVIEW_CELL_PRELIT
= 2,
259 wxDATAVIEW_CELL_INSENSITIVE
= 4,
260 wxDATAVIEW_CELL_FOCUSED
= 8
263 class WXDLLIMPEXP_ADV wxDataViewRendererBase
: public wxObject
266 wxDataViewRendererBase( const wxString
&varianttype
,
267 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
,
268 int alignment
= wxDVR_DEFAULT_ALIGNMENT
);
270 virtual bool Validate( wxVariant
& WXUNUSED(value
) )
273 void SetOwner( wxDataViewColumn
*owner
) { m_owner
= owner
; }
274 wxDataViewColumn
* GetOwner() { return m_owner
; }
276 // renderer properties:
278 virtual bool SetValue( const wxVariant
& WXUNUSED(value
) ) = 0;
279 virtual bool GetValue( wxVariant
& WXUNUSED(value
) ) const = 0;
281 wxString
GetVariantType() const { return m_variantType
; }
283 virtual void SetMode( wxDataViewCellMode mode
) = 0;
284 virtual wxDataViewCellMode
GetMode() const = 0;
286 // NOTE: Set/GetAlignment do not take/return a wxAlignment enum but
287 // rather an "int"; that's because for rendering cells it's allowed
288 // to combine alignment flags (e.g. wxALIGN_LEFT|wxALIGN_BOTTOM)
289 virtual void SetAlignment( int align
) = 0;
290 virtual int GetAlignment() const = 0;
293 virtual bool HasEditorCtrl()
295 virtual wxControl
* CreateEditorCtrl(wxWindow
* WXUNUSED(parent
),
296 wxRect
WXUNUSED(labelRect
),
297 const wxVariant
& WXUNUSED(value
))
299 virtual bool GetValueFromEditorCtrl(wxControl
* WXUNUSED(editor
),
300 wxVariant
& WXUNUSED(value
))
303 virtual bool StartEditing( unsigned int row
, wxRect labelRect
);
304 virtual void CancelEditing();
305 virtual bool FinishEditing();
307 wxControl
*GetEditorCtrl() { return m_editorCtrl
; }
310 wxString m_variantType
;
311 wxDataViewColumn
*m_owner
;
312 wxControl
*m_editorCtrl
;
313 unsigned int m_row
; // for m_editorCtrl
316 const wxDataViewCtrl
* GetView() const;
319 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase
)
322 // ---------------------------------------------------------
323 // wxDataViewColumnBase
324 // ---------------------------------------------------------
326 enum wxDataViewColumnFlags
328 wxDATAVIEW_COL_RESIZABLE
= 1,
329 wxDATAVIEW_COL_SORTABLE
= 2,
330 wxDATAVIEW_COL_HIDDEN
= 4
333 class WXDLLIMPEXP_ADV wxDataViewColumnBase
: public wxObject
336 wxDataViewColumnBase( const wxString
&title
, wxDataViewRenderer
*renderer
,
337 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
338 wxAlignment align
= wxALIGN_CENTER
,
339 int flags
= wxDATAVIEW_COL_RESIZABLE
);
340 wxDataViewColumnBase( const wxBitmap
&bitmap
, wxDataViewRenderer
*renderer
,
341 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
342 wxAlignment align
= wxALIGN_CENTER
,
343 int flags
= wxDATAVIEW_COL_RESIZABLE
);
344 virtual ~wxDataViewColumnBase();
348 virtual void SetTitle( const wxString
&title
) = 0;
349 virtual void SetAlignment( wxAlignment align
) = 0;
350 virtual void SetSortable( bool sortable
) = 0;
351 virtual void SetResizeable( bool resizeable
) = 0;
352 virtual void SetHidden( bool hidden
) = 0;
353 virtual void SetSortOrder( bool ascending
) = 0;
354 virtual void SetFlags( int flags
);
355 virtual void SetOwner( wxDataViewCtrl
*owner
)
357 virtual void SetBitmap( const wxBitmap
&bitmap
)
360 virtual void SetMinWidth( int minWidth
) = 0;
361 virtual void SetWidth( int width
) = 0;
366 virtual wxString
GetTitle() const = 0;
367 virtual wxAlignment
GetAlignment() const = 0;
368 virtual int GetWidth() const = 0;
369 virtual int GetMinWidth() const = 0;
371 virtual int GetFlags() const;
373 virtual bool IsSortable() const = 0;
374 virtual bool IsResizeable() const = 0;
375 virtual bool IsHidden() const = 0;
376 virtual bool IsSortOrderAscending() const = 0;
378 const wxBitmap
&GetBitmap() const { return m_bitmap
; }
379 unsigned int GetModelColumn() const { return m_model_column
; }
381 wxDataViewCtrl
*GetOwner() { return m_owner
; }
382 wxDataViewRenderer
* GetRenderer() { return m_renderer
; }
385 wxDataViewRenderer
*m_renderer
;
388 wxDataViewCtrl
*m_owner
;
391 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase
)
394 // ---------------------------------------------------------
395 // wxDataViewCtrlBase
396 // ---------------------------------------------------------
398 #define wxDV_SINGLE 0x0000 // for convenience
399 #define wxDV_MULTIPLE 0x0001 // can select multiple items
401 #define wxDV_NO_HEADER 0x0002 // column titles not visible
402 #define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
403 #define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
405 class WXDLLIMPEXP_ADV wxDataViewCtrlBase
: public wxControl
408 wxDataViewCtrlBase();
409 virtual ~wxDataViewCtrlBase();
411 virtual bool AssociateModel( wxDataViewListModel
*model
);
412 wxDataViewListModel
* GetModel();
415 bool AppendTextColumn( const wxString
&label
, unsigned int model_column
,
416 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
417 wxAlignment align
= wxALIGN_CENTER
,
418 int flags
= wxDATAVIEW_COL_RESIZABLE
);
419 bool AppendToggleColumn( const wxString
&label
, unsigned int model_column
,
420 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
421 wxAlignment align
= wxALIGN_CENTER
,
422 int flags
= wxDATAVIEW_COL_RESIZABLE
);
423 bool AppendProgressColumn( const wxString
&label
, unsigned int model_column
,
424 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
425 wxAlignment align
= wxALIGN_CENTER
,
426 int flags
= wxDATAVIEW_COL_RESIZABLE
);
427 bool AppendDateColumn( const wxString
&label
, unsigned int model_column
,
428 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
429 wxAlignment align
= wxALIGN_CENTER
,
430 int flags
= wxDATAVIEW_COL_RESIZABLE
);
431 bool AppendBitmapColumn( const wxString
&label
, unsigned int model_column
,
432 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
433 wxAlignment align
= wxALIGN_CENTER
,
434 int flags
= wxDATAVIEW_COL_RESIZABLE
);
435 bool AppendTextColumn( const wxBitmap
&label
, unsigned int model_column
,
436 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
437 wxAlignment align
= wxALIGN_CENTER
,
438 int flags
= wxDATAVIEW_COL_RESIZABLE
);
439 bool AppendToggleColumn( const wxBitmap
&label
, unsigned int model_column
,
440 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
441 wxAlignment align
= wxALIGN_CENTER
,
442 int flags
= wxDATAVIEW_COL_RESIZABLE
);
443 bool AppendProgressColumn( const wxBitmap
&label
, unsigned int model_column
,
444 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
445 wxAlignment align
= wxALIGN_CENTER
,
446 int flags
= wxDATAVIEW_COL_RESIZABLE
);
447 bool AppendDateColumn( const wxBitmap
&label
, unsigned int model_column
,
448 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
449 wxAlignment align
= wxALIGN_CENTER
,
450 int flags
= wxDATAVIEW_COL_RESIZABLE
);
451 bool AppendBitmapColumn( const wxBitmap
&label
, unsigned int model_column
,
452 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
453 wxAlignment align
= wxALIGN_CENTER
,
454 int flags
= wxDATAVIEW_COL_RESIZABLE
);
456 virtual bool AppendColumn( wxDataViewColumn
*col
);
458 virtual unsigned int GetColumnCount() const;
460 virtual bool DeleteColumn( unsigned int pos
);
461 virtual bool ClearColumns();
462 virtual wxDataViewColumn
* GetColumn( unsigned int pos
);
464 virtual void SetSelection( int row
) = 0; // -1 for unselect
465 inline void ClearSelection() { SetSelection( -1 ); }
466 virtual void Unselect( unsigned int row
) = 0;
467 virtual void SetSelectionRange( unsigned int from
, unsigned int to
) = 0;
468 virtual void SetSelections( const wxArrayInt
& aSelections
) = 0;
470 virtual bool IsSelected( unsigned int row
) const = 0;
471 virtual int GetSelection() const = 0;
472 virtual int GetSelections(wxArrayInt
& aSelections
) const = 0;
475 wxDataViewListModel
*m_model
;
477 wxDataViewEventListModelNotifier
*m_eventNotifier
;
480 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase
)
484 // ----------------------------------------------------------------------------
485 // wxDataViewEvent - the event class for the wxDataViewCtrl notifications
486 // ----------------------------------------------------------------------------
488 class WXDLLIMPEXP_ADV wxDataViewEvent
: public wxNotifyEvent
491 wxDataViewEvent(wxEventType commandType
= wxEVT_NULL
, int winid
= 0)
492 : wxNotifyEvent(commandType
, winid
),
496 m_value(wxNullVariant
),
497 m_editCancelled(false),
501 wxDataViewEvent(const wxDataViewEvent
& event
)
502 : wxNotifyEvent(event
),
505 m_model(event
.m_model
),
506 m_value(event
.m_value
),
507 m_editCancelled(event
.m_editCancelled
),
508 m_column(event
.m_column
)
511 int GetColumn() const { return m_col
; }
512 void SetColumn( int col
) { m_col
= col
; }
514 int GetRow() const { return m_row
; }
515 void SetRow( int row
) { m_row
= row
; }
517 wxDataViewModel
* GetModel() const { return m_model
; }
518 void SetModel( wxDataViewModel
*model
) { m_model
= model
; }
520 const wxVariant
&GetValue() const { return m_value
; }
521 void SetValue( const wxVariant
&value
) { m_value
= value
; }
523 // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
524 void SetDataViewColumn( wxDataViewColumn
*col
) { m_column
= col
; }
525 wxDataViewColumn
*GetDataViewColumn() const { return m_column
; }
527 // was label editing canceled? (for wxEVT_COMMAND_DATVIEW_END_LABEL_EDIT only)
528 bool IsEditCancelled() const { return m_editCancelled
; }
529 void SetEditCanceled(bool editCancelled
) { m_editCancelled
= editCancelled
; }
531 virtual wxEvent
*Clone() const { return new wxDataViewEvent(*this); }
536 wxDataViewModel
*m_model
;
538 bool m_editCancelled
;
539 wxDataViewColumn
*m_column
;
542 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent
)
545 BEGIN_DECLARE_EVENT_TYPES()
546 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ROW_SELECTED
, -1)
547 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ROW_ACTIVATED
, -1)
548 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK
, -1)
549 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK
, -1)
550 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED
, -1)
551 // notifications from the model to the control
552 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_APPENDED
, -1)
553 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_PREPENDED
, -1)
554 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_INSERTED
, -1)
555 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_DELETED
, -1)
556 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROW_CHANGED
, -1)
557 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_VALUE_CHANGED
, -1)
558 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_ROWS_REORDERED
, -1)
559 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_MODEL_CLEARED
, -1)
560 END_DECLARE_EVENT_TYPES()
562 typedef void (wxEvtHandler::*wxDataViewEventFunction
)(wxDataViewEvent
&);
564 #define wxDataViewEventHandler(func) \
565 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDataViewEventFunction, &func)
567 #define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
568 wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
570 #define EVT_DATAVIEW_ROW_SELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_SELECTED, id, fn)
571 #define EVT_DATAVIEW_ROW_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_ACTIVATED, id, fn)
572 #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
573 #define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
574 #define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
576 #define EVT_DATAVIEW_MODEL_ROW_APPENDED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_APPENDED, id, fn)
577 #define EVT_DATAVIEW_MODEL_ROW_PREPENDED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_PREPENDED, id, fn)
578 #define EVT_DATAVIEW_MODEL_ROW_INSERTED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_INSERTED, id, fn)
579 #define EVT_DATAVIEW_MODEL_ROW_DELETED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_DELETED, id, fn)
580 #define EVT_DATAVIEW_MODEL_ROW_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROW_CHANGED, id, fn)
581 #define EVT_DATAVIEW_MODEL_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_VALUE_CHANGED, id, fn)
582 #define EVT_DATAVIEW_MODEL_ROWS_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(MODEL_ROWS_REORDERED, 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_