]> git.saurik.com Git - wxWidgets.git/blob - include/wx/dataview.h
9cbdf29fef25ca2ae364490dd0771a8cf6521e42
[wxWidgets.git] / include / wx / dataview.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/dataview.h
3 // Purpose: wxDataViewCtrl base classes
4 // Author: Robert Roebling
5 // Modified by:
6 // Created: 08.01.06
7 // RCS-ID: $Id$
8 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_DATAVIEW_H_BASE_
13 #define _WX_DATAVIEW_H_BASE_
14
15 #include "wx/defs.h"
16
17 #if wxUSE_DATAVIEWCTRL
18
19 #include "wx/control.h"
20 #include "wx/textctrl.h"
21 #include "wx/bitmap.h"
22 #include "wx/variant.h"
23
24
25 #if defined(__WXGTK20__)
26 // for testing
27 // #define wxUSE_GENERICDATAVIEWCTRL 1
28 #elif defined(__WXMAC__)
29 #define wxUSE_GENERICDATAVIEWCTRL 1
30 #else
31 #define wxUSE_GENERICDATAVIEWCTRL 1
32 #endif
33
34 // ----------------------------------------------------------------------------
35 // wxDataViewCtrl flags
36 // ----------------------------------------------------------------------------
37
38 // ----------------------------------------------------------------------------
39 // wxDataViewCtrl globals
40 // ----------------------------------------------------------------------------
41
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
48 extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxDataViewCtrlNameStr[];
49
50 // the default width of new (text) columns:
51 #define wxDVC_DEFAULT_WIDTH 80
52
53 // the default width of new toggle columns:
54 #define wxDVC_TOGGLE_DEFAULT_WIDTH 30
55
56 // the default minimal width of the columns:
57 #define wxDVC_DEFAULT_MINWIDTH 30
58
59 // the default alignment of wxDataViewRenderers:
60 #define wxDVR_DEFAULT_ALIGNMENT (wxALIGN_LEFT|wxALIGN_TOP)
61
62
63 // ---------------------------------------------------------
64 // wxDataViewModel
65 // ---------------------------------------------------------
66
67 class WXDLLIMPEXP_ADV wxDataViewModel: public wxObjectRefData
68 {
69 public:
70 wxDataViewModel() { }
71
72 protected:
73 // the user should not delete this class directly: he should use DecRef() instead!
74 virtual ~wxDataViewModel() { }
75 };
76
77 // ---------------------------------------------------------
78 // wxDataViewListModelNotifier
79 // ---------------------------------------------------------
80
81 class WXDLLIMPEXP_ADV wxDataViewListModelNotifier: public wxObject
82 {
83 public:
84 wxDataViewListModelNotifier() { }
85 virtual ~wxDataViewListModelNotifier() { m_owner = NULL; }
86
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;
95
96 void SetOwner( wxDataViewListModel *owner ) { m_owner = owner; }
97 wxDataViewListModel *GetOwner() { return m_owner; }
98
99 private:
100 wxDataViewListModel *m_owner;
101 };
102
103 // ---------------------------------------------------------
104 // wxDataViewListModel
105 // ---------------------------------------------------------
106
107 class WXDLLIMPEXP_ADV wxDataViewViewingColumn: public wxObject
108 {
109 public:
110 wxDataViewViewingColumn( wxDataViewColumn *view_column, unsigned int model_column )
111 {
112 m_viewColumn = view_column;
113 m_modelColumn = model_column;
114 }
115
116 wxDataViewColumn *m_viewColumn;
117 unsigned int m_modelColumn;
118 };
119
120 class WXDLLIMPEXP_ADV wxDataViewListModel: public wxDataViewModel
121 {
122 public:
123 wxDataViewListModel();
124
125 virtual unsigned int GetRowCount() const = 0;
126 virtual unsigned int GetColumnCount() const = 0;
127
128 // return type as reported by wxVariant
129 virtual wxString GetColumnType( unsigned int col ) const = 0;
130
131 // get value into a wxVariant
132 virtual void GetValue( wxVariant &variant, unsigned int col, unsigned int row ) const = 0;
133
134 // set value, call ValueChanged() afterwards!
135 virtual bool SetValue( const wxVariant &variant, unsigned int col, unsigned int row ) = 0;
136
137 // delegated notifiers
138 virtual bool RowAppended();
139 virtual bool RowPrepended();
140 virtual bool RowInserted( unsigned int before );
141 virtual bool RowDeleted( unsigned int row );
142 virtual bool RowChanged( unsigned int row );
143 virtual bool ValueChanged( unsigned int col, unsigned int row );
144 virtual bool RowsReordered( unsigned int *new_order );
145 virtual bool Cleared();
146
147 void AddNotifier( wxDataViewListModelNotifier *notifier );
148 void RemoveNotifier( wxDataViewListModelNotifier *notifier );
149
150 protected:
151 // the user should not delete this class directly: he should use DecRef() instead!
152 virtual ~wxDataViewListModel();
153
154 wxList m_notifiers;
155 };
156
157
158 // ---------------------------------------------------------
159 // wxDataViewSortedListModel
160 // ---------------------------------------------------------
161
162 typedef int (wxCALLBACK *wxDataViewListModelCompare)
163 (unsigned int row1, unsigned int row2, unsigned int col, wxDataViewListModel* model );
164
165 WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(unsigned int,
166 wxDataViewSortedIndexArray, WXDLLIMPEXP_ADV);
167
168 class WXDLLIMPEXP_ADV wxDataViewSortedListModel: public wxDataViewListModel
169 {
170 friend class wxDataViewSortedListModelNotifier;
171
172 public:
173 wxDataViewSortedListModel( wxDataViewListModel *child );
174 virtual ~wxDataViewSortedListModel();
175
176 void SetAscending( bool ascending ) { m_ascending = ascending; }
177 bool IsAscending() const { return m_ascending; }
178
179 virtual unsigned int GetRowCount() const;
180 virtual unsigned int GetColumnCount() const;
181
182 // return type as reported by wxVariant
183 virtual wxString GetColumnType( unsigned int col ) const;
184
185 // get value into a wxVariant
186 virtual void GetValue( wxVariant &variant, unsigned int col, unsigned int row ) const;
187
188 // set value, call ValueChanged() afterwards!
189 virtual bool SetValue( const wxVariant &variant, unsigned int col, unsigned int row );
190
191 // called from user
192 virtual bool RowAppended();
193 virtual bool RowPrepended();
194 virtual bool RowInserted( unsigned int before );
195 virtual bool RowDeleted( unsigned int row );
196 virtual bool RowChanged( unsigned int row );
197 virtual bool ValueChanged( unsigned int col, unsigned int row );
198 virtual bool RowsReordered( unsigned int *new_order );
199 virtual bool Cleared();
200
201 // called if child's notifiers are called
202 bool ChildRowAppended();
203 bool ChildRowPrepended();
204 bool ChildRowInserted( unsigned int before );
205 bool ChildRowDeleted( unsigned int row );
206 bool ChildRowChanged( unsigned int row );
207 bool ChildValueChanged( unsigned int col, unsigned int row );
208 bool ChildRowsReordered( unsigned int *new_order );
209 bool ChildCleared();
210
211 virtual void Resort();
212
213 void DetachChild();
214
215 private:
216 bool m_ascending;
217 wxDataViewListModel *m_child;
218 wxDataViewSortedIndexArray m_array;
219 wxDataViewListModelNotifier *m_notifierOnChild;
220
221 void InitStatics(); // BAD
222 };
223
224 //-----------------------------------------------------------------------------
225 // wxDataViewEditorCtrlEvtHandler
226 //-----------------------------------------------------------------------------
227
228 class wxDataViewEditorCtrlEvtHandler: public wxEvtHandler
229 {
230 public:
231 wxDataViewEditorCtrlEvtHandler( wxControl *editor, wxDataViewRenderer *owner );
232
233 void AcceptChangesAndFinish();
234 void SetFocusOnIdle( bool focus = true ) { m_focusOnIdle = focus; }
235
236 protected:
237 void OnChar( wxKeyEvent &event );
238 void OnKillFocus( wxFocusEvent &event );
239 void OnIdle( wxIdleEvent &event );
240
241 private:
242 wxDataViewRenderer *m_owner;
243 wxControl *m_editorCtrl;
244 bool m_finished;
245 bool m_focusOnIdle;
246
247 private:
248 DECLARE_EVENT_TABLE()
249 };
250
251 // ---------------------------------------------------------
252 // wxDataViewRendererBase
253 // ---------------------------------------------------------
254
255 enum wxDataViewCellMode
256 {
257 wxDATAVIEW_CELL_INERT,
258 wxDATAVIEW_CELL_ACTIVATABLE,
259 wxDATAVIEW_CELL_EDITABLE
260 };
261
262 enum wxDataViewCellRenderState
263 {
264 wxDATAVIEW_CELL_SELECTED = 1,
265 wxDATAVIEW_CELL_PRELIT = 2,
266 wxDATAVIEW_CELL_INSENSITIVE = 4,
267 wxDATAVIEW_CELL_FOCUSED = 8
268 };
269
270 class WXDLLIMPEXP_ADV wxDataViewRendererBase: public wxObject
271 {
272 public:
273 wxDataViewRendererBase( const wxString &varianttype,
274 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
275 int alignment = wxDVR_DEFAULT_ALIGNMENT );
276
277 virtual bool Validate( wxVariant& WXUNUSED(value) )
278 { return true; }
279
280 void SetOwner( wxDataViewColumn *owner ) { m_owner = owner; }
281 wxDataViewColumn* GetOwner() { return m_owner; }
282
283 // renderer properties:
284
285 virtual bool SetValue( const wxVariant& WXUNUSED(value) ) = 0;
286 virtual bool GetValue( wxVariant& WXUNUSED(value) ) const = 0;
287
288 wxString GetVariantType() const { return m_variantType; }
289
290 virtual void SetMode( wxDataViewCellMode mode ) = 0;
291 virtual wxDataViewCellMode GetMode() const = 0;
292
293 // NOTE: Set/GetAlignment do not take/return a wxAlignment enum but
294 // rather an "int"; that's because for rendering cells it's allowed
295 // to combine alignment flags (e.g. wxALIGN_LEFT|wxALIGN_BOTTOM)
296 virtual void SetAlignment( int align ) = 0;
297 virtual int GetAlignment() const = 0;
298
299 // in-place editing
300 virtual bool HasEditorCtrl()
301 { return false; }
302 virtual wxControl* CreateEditorCtrl(wxWindow * WXUNUSED(parent),
303 wxRect WXUNUSED(labelRect),
304 const wxVariant& WXUNUSED(value))
305 { return NULL; }
306 virtual bool GetValueFromEditorCtrl(wxControl * WXUNUSED(editor),
307 wxVariant& WXUNUSED(value))
308 { return false; }
309
310 virtual bool StartEditing( unsigned int row, wxRect labelRect );
311 virtual void CancelEditing();
312 virtual bool FinishEditing();
313
314 wxControl *GetEditorCtrl() { return m_editorCtrl; }
315
316 protected:
317 wxString m_variantType;
318 wxDataViewColumn *m_owner;
319 wxControl *m_editorCtrl;
320 unsigned int m_row; // for m_editorCtrl
321
322 // internal utility:
323 const wxDataViewCtrl* GetView() const;
324
325 protected:
326 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase)
327 };
328
329 // ---------------------------------------------------------
330 // wxDataViewColumnBase
331 // ---------------------------------------------------------
332
333 enum wxDataViewColumnFlags
334 {
335 wxDATAVIEW_COL_RESIZABLE = 1,
336 wxDATAVIEW_COL_SORTABLE = 2,
337 wxDATAVIEW_COL_HIDDEN = 4
338 };
339
340 class WXDLLIMPEXP_ADV wxDataViewColumnBase: public wxObject
341 {
342 public:
343 wxDataViewColumnBase( const wxString &title, wxDataViewRenderer *renderer,
344 unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
345 wxAlignment align = wxALIGN_CENTER,
346 int flags = wxDATAVIEW_COL_RESIZABLE );
347 wxDataViewColumnBase( const wxBitmap &bitmap, wxDataViewRenderer *renderer,
348 unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
349 wxAlignment align = wxALIGN_CENTER,
350 int flags = wxDATAVIEW_COL_RESIZABLE );
351 virtual ~wxDataViewColumnBase();
352
353 // setters:
354
355 virtual void SetTitle( const wxString &title ) = 0;
356 virtual void SetAlignment( wxAlignment align ) = 0;
357 virtual void SetSortable( bool sortable ) = 0;
358 virtual void SetResizeable( bool resizeable ) = 0;
359 virtual void SetHidden( bool hidden ) = 0;
360 virtual void SetSortOrder( bool ascending ) = 0;
361 virtual void SetFlags( int flags );
362 virtual void SetOwner( wxDataViewCtrl *owner )
363 { m_owner = owner; }
364 virtual void SetBitmap( const wxBitmap &bitmap )
365 { m_bitmap=bitmap; }
366
367 virtual void SetMinWidth( int minWidth ) = 0;
368 virtual void SetWidth( int width ) = 0;
369
370
371 // getters:
372
373 virtual wxString GetTitle() const = 0;
374 virtual wxAlignment GetAlignment() const = 0;
375 virtual int GetWidth() const = 0;
376 virtual int GetMinWidth() const = 0;
377
378 virtual int GetFlags() const;
379
380 virtual bool IsSortable() const = 0;
381 virtual bool IsResizeable() const = 0;
382 virtual bool IsHidden() const = 0;
383 virtual bool IsSortOrderAscending() const = 0;
384
385 const wxBitmap &GetBitmap() const { return m_bitmap; }
386 unsigned int GetModelColumn() const { return m_model_column; }
387
388 wxDataViewCtrl *GetOwner() { return m_owner; }
389 wxDataViewRenderer* GetRenderer() { return m_renderer; }
390
391 protected:
392 wxDataViewRenderer *m_renderer;
393 int m_model_column;
394 wxBitmap m_bitmap;
395 wxDataViewCtrl *m_owner;
396
397 protected:
398 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase)
399 };
400
401 // ---------------------------------------------------------
402 // wxDataViewCtrlBase
403 // ---------------------------------------------------------
404
405 #define wxDV_SINGLE 0x0000 // for convenience
406 #define wxDV_MULTIPLE 0x0001 // can select multiple items
407
408 #define wxDV_NO_HEADER 0x0002 // column titles not visible
409 #define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
410 #define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
411
412 class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
413 {
414 public:
415 wxDataViewCtrlBase();
416 virtual ~wxDataViewCtrlBase();
417
418 virtual bool AssociateModel( wxDataViewListModel *model );
419 wxDataViewListModel* GetModel();
420
421 // short cuts
422 bool AppendTextColumn( const wxString &label, unsigned int model_column,
423 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
424 wxAlignment align = wxALIGN_CENTER,
425 int flags = wxDATAVIEW_COL_RESIZABLE );
426 bool AppendToggleColumn( const wxString &label, unsigned int model_column,
427 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
428 wxAlignment align = wxALIGN_CENTER,
429 int flags = wxDATAVIEW_COL_RESIZABLE );
430 bool AppendProgressColumn( const wxString &label, unsigned int model_column,
431 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
432 wxAlignment align = wxALIGN_CENTER,
433 int flags = wxDATAVIEW_COL_RESIZABLE );
434 bool AppendDateColumn( const wxString &label, unsigned int model_column,
435 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
436 wxAlignment align = wxALIGN_CENTER,
437 int flags = wxDATAVIEW_COL_RESIZABLE );
438 bool AppendBitmapColumn( const wxString &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 AppendTextColumn( const wxBitmap &label, unsigned int model_column,
443 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
444 wxAlignment align = wxALIGN_CENTER,
445 int flags = wxDATAVIEW_COL_RESIZABLE );
446 bool AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
447 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
448 wxAlignment align = wxALIGN_CENTER,
449 int flags = wxDATAVIEW_COL_RESIZABLE );
450 bool AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
451 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
452 wxAlignment align = wxALIGN_CENTER,
453 int flags = wxDATAVIEW_COL_RESIZABLE );
454 bool AppendDateColumn( const wxBitmap &label, unsigned int model_column,
455 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
456 wxAlignment align = wxALIGN_CENTER,
457 int flags = wxDATAVIEW_COL_RESIZABLE );
458 bool AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
459 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
460 wxAlignment align = wxALIGN_CENTER,
461 int flags = wxDATAVIEW_COL_RESIZABLE );
462
463 virtual bool AppendColumn( wxDataViewColumn *col );
464
465 virtual unsigned int GetColumnCount() const;
466
467 virtual bool DeleteColumn( unsigned int pos );
468 virtual bool ClearColumns();
469 virtual wxDataViewColumn* GetColumn( unsigned int pos );
470
471 virtual void SetSelection( int row ) = 0; // -1 for unselect
472 inline void ClearSelection() { SetSelection( -1 ); }
473 virtual void Unselect( unsigned int row ) = 0;
474 virtual void SetSelectionRange( unsigned int from, unsigned int to ) = 0;
475 virtual void SetSelections( const wxArrayInt& aSelections) = 0;
476
477 virtual bool IsSelected( unsigned int row ) const = 0;
478 virtual int GetSelection() const = 0;
479 virtual int GetSelections(wxArrayInt& aSelections) const = 0;
480
481 private:
482 wxDataViewListModel *m_model;
483 wxList m_cols;
484
485 protected:
486 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase)
487 };
488
489
490 // ----------------------------------------------------------------------------
491 // wxDataViewEvent - the event class for the wxDataViewCtrl notifications
492 // ----------------------------------------------------------------------------
493
494 class WXDLLIMPEXP_ADV wxDataViewEvent : public wxNotifyEvent
495 {
496 public:
497 wxDataViewEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
498 : wxNotifyEvent(commandType, winid),
499 m_col(-1),
500 m_row(-1),
501 m_model(NULL),
502 m_value(wxNullVariant),
503 m_editCancelled(false),
504 m_column(NULL)
505 { }
506
507 wxDataViewEvent(const wxDataViewEvent& event)
508 : wxNotifyEvent(event),
509 m_col(event.m_col),
510 m_row(event.m_col),
511 m_model(event.m_model),
512 m_value(event.m_value),
513 m_editCancelled(event.m_editCancelled),
514 m_column(event.m_column)
515 { }
516
517 int GetColumn() const { return m_col; }
518 void SetColumn( int col ) { m_col = col; }
519
520 int GetRow() const { return m_row; }
521 void SetRow( int row ) { m_row = row; }
522
523 wxDataViewModel* GetModel() const { return m_model; }
524 void SetModel( wxDataViewModel *model ) { m_model = model; }
525
526 const wxVariant &GetValue() const { return m_value; }
527 void SetValue( const wxVariant &value ) { m_value = value; }
528
529 // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
530 void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
531 wxDataViewColumn *GetDataViewColumn() const { return m_column; }
532
533 // was label editing canceled? (for wxEVT_COMMAND_DATVIEW_END_LABEL_EDIT only)
534 bool IsEditCancelled() const { return m_editCancelled; }
535 void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
536
537 virtual wxEvent *Clone() const { return new wxDataViewEvent(*this); }
538
539 protected:
540 int m_col;
541 int m_row;
542 wxDataViewModel *m_model;
543 wxVariant m_value;
544 bool m_editCancelled;
545 wxDataViewColumn *m_column;
546
547 private:
548 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent)
549 };
550
551 BEGIN_DECLARE_EVENT_TYPES()
552 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ROW_SELECTED, -1)
553 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ROW_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 END_DECLARE_EVENT_TYPES()
557
558 typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
559
560 #define wxDataViewEventHandler(func) \
561 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDataViewEventFunction, &func)
562
563 #define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
564 wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
565
566 #define EVT_DATAVIEW_ROW_SELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_SELECTED, id, fn)
567 #define EVT_DATAVIEW_ROW_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_ACTIVATED, id, fn)
568 #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
569 #define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
570
571
572 #if defined(wxUSE_GENERICDATAVIEWCTRL)
573 #include "wx/generic/dataview.h"
574 #elif defined(__WXGTK20__)
575 #include "wx/gtk/dataview.h"
576 #elif defined(__WXMAC__)
577 // TODO
578 // #include "wx/mac/dataview.h"
579 #else
580 #include "wx/generic/dataview.h"
581 #endif
582
583 #endif // wxUSE_DATAVIEWCTRL
584
585 #endif
586 // _WX_DATAVIEW_H_BASE_