1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDataViewCtrl base classes
4 // Author: Robert Roebling
5 // Modified by: Bo Yang
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/dynarray.h"
25 #include "wx/imaglist.h"
27 #if defined(__WXGTK20__)
29 // #define wxUSE_GENERICDATAVIEWCTRL 1
30 #elif defined(__WXMAC__)
32 #define wxUSE_GENERICDATAVIEWCTRL 1
35 // ----------------------------------------------------------------------------
36 // wxDataViewCtrl flags
37 // ----------------------------------------------------------------------------
39 // ----------------------------------------------------------------------------
40 // wxDataViewCtrl globals
41 // ----------------------------------------------------------------------------
43 class WXDLLIMPEXP_FWD_ADV wxDataViewItem
;
44 class WXDLLIMPEXP_FWD_ADV wxDataViewModel
;
45 class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl
;
46 class WXDLLIMPEXP_FWD_ADV wxDataViewColumn
;
47 class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer
;
48 class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier
;
50 extern WXDLLIMPEXP_DATA_ADV(const wxChar
) wxDataViewCtrlNameStr
[];
52 // the default width of new (text) columns:
53 #define wxDVC_DEFAULT_WIDTH 80
55 // the default width of new toggle columns:
56 #define wxDVC_TOGGLE_DEFAULT_WIDTH 30
58 // the default minimal width of the columns:
59 #define wxDVC_DEFAULT_MINWIDTH 30
61 // the default alignment of wxDataViewRenderers:
62 #define wxDVR_DEFAULT_ALIGNMENT (wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL)
65 // ---------------------------------------------------------
67 // ---------------------------------------------------------
69 class WXDLLIMPEXP_ADV wxDataViewItem
72 wxDataViewItem( void* id
= NULL
)
74 wxDataViewItem( const wxDataViewItem
&item
)
76 bool IsOk() const { return m_id
!= NULL
; }
77 void* GetID() const { return m_id
; }
78 operator const void* () const { return m_id
; }
81 void Print( const wxString
&text
) const;
88 bool operator == (const wxDataViewItem
&left
, const wxDataViewItem
&right
);
90 WX_DEFINE_ARRAY(wxDataViewItem
, wxDataViewItemArray
);
92 // ---------------------------------------------------------
93 // wxDataViewModelNotifier
94 // ---------------------------------------------------------
96 class WXDLLIMPEXP_ADV wxDataViewModelNotifier
99 wxDataViewModelNotifier() { }
100 virtual ~wxDataViewModelNotifier() { m_owner
= NULL
; }
102 virtual bool ItemAdded( const wxDataViewItem
&parent
, const wxDataViewItem
&item
) = 0;
103 virtual bool ItemDeleted( const wxDataViewItem
&parent
, const wxDataViewItem
&item
) = 0;
104 virtual bool ItemChanged( const wxDataViewItem
&item
) = 0;
105 virtual bool ItemsAdded( const wxDataViewItem
&parent
, const wxDataViewItemArray
&items
);
106 virtual bool ItemsDeleted( const wxDataViewItem
&parent
, const wxDataViewItemArray
&items
);
107 virtual bool ItemsChanged( const wxDataViewItemArray
&items
);
108 virtual bool ValueChanged( const wxDataViewItem
&item
, unsigned int col
) = 0;
109 virtual bool Cleared() = 0;
111 virtual void Resort() = 0;
113 void SetOwner( wxDataViewModel
*owner
) { m_owner
= owner
; }
114 wxDataViewModel
*GetOwner() { return m_owner
; }
117 wxDataViewModel
*m_owner
;
122 // ----------------------------------------------------------------------------
123 // wxDataViewItemAttr: a structure containing the visual attributes of an item
124 // ----------------------------------------------------------------------------
126 // TODO: this should be renamed to wxItemAttr or something general like this
128 class WXDLLIMPEXP_ADV wxDataViewItemAttr
139 void SetColour(const wxColour
& colour
) { m_colour
= colour
; }
140 void SetBold( bool set
) { m_bold
= set
; }
141 void SetItalic( bool set
) { m_italic
= set
; }
144 bool HasColour() const { return m_colour
.Ok(); }
145 const wxColour
& GetColour() const { return m_colour
; }
147 bool GetBold() const { return m_bold
; }
148 bool GetItalic() const { return m_italic
; }
157 // ---------------------------------------------------------
159 // ---------------------------------------------------------
161 WX_DECLARE_LIST_WITH_DECL(wxDataViewModelNotifier
, wxDataViewModelNotifiers
,
162 class WXDLLIMPEXP_ADV
);
164 class WXDLLIMPEXP_ADV wxDataViewModel
: public wxObjectRefData
169 virtual unsigned int GetColumnCount() const = 0;
171 // return type as reported by wxVariant
172 virtual wxString
GetColumnType( unsigned int col
) const = 0;
174 // get value into a wxVariant
175 virtual void GetValue( wxVariant
&variant
,
176 const wxDataViewItem
&item
, unsigned int col
) const = 0;
178 // set value, call ValueChanged() afterwards!
179 virtual bool SetValue( const wxVariant
&variant
,
180 const wxDataViewItem
&item
, unsigned int col
) = 0;
182 // Get text attribute, return false of default attributes should be used
183 virtual bool GetAttr( const wxDataViewItem
&WXUNUSED(item
), unsigned int WXUNUSED(col
), wxDataViewItemAttr
&WXUNUSED(attr
) )
187 virtual wxDataViewItem
GetParent( const wxDataViewItem
&item
) const = 0;
188 virtual bool IsContainer( const wxDataViewItem
&item
) const = 0;
189 // Is the container just a header or an item with all columns
190 virtual bool HasContainerColumns(const wxDataViewItem
& WXUNUSED(item
)) const
192 virtual unsigned int GetChildren( const wxDataViewItem
&item
, wxDataViewItemArray
&children
) const = 0;
194 // delegated notifiers
195 virtual bool ItemAdded( const wxDataViewItem
&parent
, const wxDataViewItem
&item
);
196 virtual bool ItemsAdded( const wxDataViewItem
&parent
, const wxDataViewItemArray
&items
);
197 virtual bool ItemDeleted( const wxDataViewItem
&parent
, const wxDataViewItem
&item
);
198 virtual bool ItemsDeleted( const wxDataViewItem
&parent
, const wxDataViewItemArray
&items
);
199 virtual bool ItemChanged( const wxDataViewItem
&item
);
200 virtual bool ItemsChanged( const wxDataViewItemArray
&items
);
201 virtual bool ValueChanged( const wxDataViewItem
&item
, unsigned int col
);
202 virtual bool Cleared();
205 virtual void Resort();
207 void AddNotifier( wxDataViewModelNotifier
*notifier
);
208 void RemoveNotifier( wxDataViewModelNotifier
*notifier
);
210 // default compare function
211 virtual int Compare( const wxDataViewItem
&item1
, const wxDataViewItem
&item2
,
212 unsigned int column
, bool ascending
);
213 virtual bool HasDefaultCompare() const { return false; }
216 virtual bool IsIndexListModel() const { return false; }
219 // the user should not delete this class directly: he should use DecRef() instead!
220 virtual ~wxDataViewModel() { }
222 wxDataViewModelNotifiers m_notifiers
;
225 // ---------------------------------------------------------
226 // wxDataViewIndexListModel
227 // ---------------------------------------------------------
229 class WXDLLIMPEXP_ADV wxDataViewIndexListModel
: public wxDataViewModel
232 wxDataViewIndexListModel( unsigned int initial_size
= 0 );
233 ~wxDataViewIndexListModel();
235 virtual void GetValue( wxVariant
&variant
,
236 unsigned int row
, unsigned int col
) const = 0;
238 virtual bool SetValue( const wxVariant
&variant
,
239 unsigned int row
, unsigned int col
) = 0;
241 virtual bool GetAttr( unsigned int WXUNUSED(row
), unsigned int WXUNUSED(col
), wxDataViewItemAttr
&WXUNUSED(attr
) )
245 void RowInserted( unsigned int before
);
247 void RowDeleted( unsigned int row
);
248 void RowChanged( unsigned int row
);
249 void RowValueChanged( unsigned int row
, unsigned int col
);
251 // convert to/from row/wxDataViewItem
253 unsigned int GetRow( const wxDataViewItem
&item
) const;
254 wxDataViewItem
GetItem( unsigned int row
) const;
256 // compare based on index
258 virtual int Compare( const wxDataViewItem
&item1
, const wxDataViewItem
&item2
,
259 unsigned int column
, bool ascending
);
260 virtual bool HasDefaultCompare() const;
262 // implement base methods
264 virtual void GetValue( wxVariant
&variant
,
265 const wxDataViewItem
&item
, unsigned int col
) const;
266 virtual bool SetValue( const wxVariant
&variant
,
267 const wxDataViewItem
&item
, unsigned int col
);
268 virtual bool GetAttr( const wxDataViewItem
&item
, unsigned int col
, wxDataViewItemAttr
&attr
);
269 virtual wxDataViewItem
GetParent( const wxDataViewItem
&item
) const;
270 virtual bool IsContainer( const wxDataViewItem
&item
) const;
271 virtual unsigned int GetChildren( const wxDataViewItem
&item
, wxDataViewItemArray
&children
) const;
274 virtual bool IsIndexListModel() const { return true; }
275 unsigned int GetLastIndex() const { return m_lastIndex
; }
278 wxDataViewItemArray m_hash
;
279 unsigned int m_lastIndex
;
285 //-----------------------------------------------------------------------------
286 // wxDataViewEditorCtrlEvtHandler
287 //-----------------------------------------------------------------------------
289 class wxDataViewEditorCtrlEvtHandler
: public wxEvtHandler
292 wxDataViewEditorCtrlEvtHandler( wxControl
*editor
, wxDataViewRenderer
*owner
);
294 void AcceptChangesAndFinish();
295 void SetFocusOnIdle( bool focus
= true ) { m_focusOnIdle
= focus
; }
298 void OnChar( wxKeyEvent
&event
);
299 void OnKillFocus( wxFocusEvent
&event
);
300 void OnIdle( wxIdleEvent
&event
);
303 wxDataViewRenderer
*m_owner
;
304 wxControl
*m_editorCtrl
;
309 DECLARE_EVENT_TABLE()
312 // ---------------------------------------------------------
313 // wxDataViewRendererBase
314 // ---------------------------------------------------------
316 enum wxDataViewCellMode
318 wxDATAVIEW_CELL_INERT
,
319 wxDATAVIEW_CELL_ACTIVATABLE
,
320 wxDATAVIEW_CELL_EDITABLE
323 enum wxDataViewCellRenderState
325 wxDATAVIEW_CELL_SELECTED
= 1,
326 wxDATAVIEW_CELL_PRELIT
= 2,
327 wxDATAVIEW_CELL_INSENSITIVE
= 4,
328 wxDATAVIEW_CELL_FOCUSED
= 8
331 class WXDLLIMPEXP_ADV wxDataViewRendererBase
: public wxObject
334 wxDataViewRendererBase( const wxString
&varianttype
,
335 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
,
336 int alignment
= wxDVR_DEFAULT_ALIGNMENT
);
338 virtual bool Validate( wxVariant
& WXUNUSED(value
) )
341 void SetOwner( wxDataViewColumn
*owner
) { m_owner
= owner
; }
342 wxDataViewColumn
* GetOwner() { return m_owner
; }
344 // renderer properties:
346 virtual bool SetValue( const wxVariant
& WXUNUSED(value
) ) = 0;
347 virtual bool GetValue( wxVariant
& WXUNUSED(value
) ) const = 0;
349 wxString
GetVariantType() const { return m_variantType
; }
351 virtual void SetMode( wxDataViewCellMode mode
) = 0;
352 virtual wxDataViewCellMode
GetMode() const = 0;
354 // NOTE: Set/GetAlignment do not take/return a wxAlignment enum but
355 // rather an "int"; that's because for rendering cells it's allowed
356 // to combine alignment flags (e.g. wxALIGN_LEFT|wxALIGN_BOTTOM)
357 virtual void SetAlignment( int align
) = 0;
358 virtual int GetAlignment() const = 0;
361 virtual bool HasEditorCtrl()
363 virtual wxControl
* CreateEditorCtrl(wxWindow
* WXUNUSED(parent
),
364 wxRect
WXUNUSED(labelRect
),
365 const wxVariant
& WXUNUSED(value
))
367 virtual bool GetValueFromEditorCtrl(wxControl
* WXUNUSED(editor
),
368 wxVariant
& WXUNUSED(value
))
371 virtual bool StartEditing( const wxDataViewItem
&item
, wxRect labelRect
);
372 virtual void CancelEditing();
373 virtual bool FinishEditing();
375 wxControl
*GetEditorCtrl() { return m_editorCtrl
; }
378 wxString m_variantType
;
379 wxDataViewColumn
*m_owner
;
380 wxControl
*m_editorCtrl
;
381 wxDataViewItem m_item
; // for m_editorCtrl
384 const wxDataViewCtrl
* GetView() const;
387 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase
)
390 //-----------------------------------------------------------------------------
391 // wxDataViewIconText
392 //-----------------------------------------------------------------------------
394 class WXDLLIMPEXP_ADV wxDataViewIconText
: public wxObject
397 wxDataViewIconText( const wxString
&text
= wxEmptyString
, const wxIcon
& icon
= wxNullIcon
)
398 { m_icon
= icon
; m_text
= text
; }
399 wxDataViewIconText( const wxDataViewIconText
&other
)
400 { m_icon
= other
.m_icon
; m_text
= other
.m_text
; }
402 void SetText( const wxString
&text
) { m_text
= text
; }
403 wxString
GetText() const { return m_text
; }
404 void SetIcon( const wxIcon
&icon
) { m_icon
= icon
; }
405 const wxIcon
&GetIcon() const { return m_icon
; }
412 DECLARE_DYNAMIC_CLASS(wxDataViewIconText
)
415 bool operator == (const wxDataViewIconText
&one
, const wxDataViewIconText
&two
);
417 DECLARE_VARIANT_OBJECT_EXPORTED(wxDataViewIconText
, WXDLLIMPEXP_ADV
)
419 // ---------------------------------------------------------
420 // wxDataViewColumnBase
421 // ---------------------------------------------------------
423 enum wxDataViewColumnFlags
425 wxDATAVIEW_COL_RESIZABLE
= 1,
426 wxDATAVIEW_COL_SORTABLE
= 2,
427 wxDATAVIEW_COL_HIDDEN
= 4
430 class WXDLLIMPEXP_ADV wxDataViewColumnBase
: public wxObject
433 wxDataViewColumnBase( const wxString
&title
, wxDataViewRenderer
*renderer
,
434 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
435 wxAlignment align
= wxALIGN_CENTER
,
436 int flags
= wxDATAVIEW_COL_RESIZABLE
);
437 wxDataViewColumnBase( const wxBitmap
&bitmap
, wxDataViewRenderer
*renderer
,
438 unsigned int model_column
, int width
= wxDVC_DEFAULT_WIDTH
,
439 wxAlignment align
= wxALIGN_CENTER
,
440 int flags
= wxDATAVIEW_COL_RESIZABLE
);
441 virtual ~wxDataViewColumnBase();
445 virtual void SetTitle( const wxString
&title
) = 0;
446 virtual void SetAlignment( wxAlignment align
) = 0;
447 virtual void SetSortable( bool sortable
) = 0;
448 virtual void SetResizeable( bool resizeable
) = 0;
449 virtual void SetHidden( bool hidden
) = 0;
450 virtual void SetSortOrder( bool ascending
) = 0;
451 virtual void SetFlags( int flags
);
452 virtual void SetOwner( wxDataViewCtrl
*owner
)
454 virtual void SetBitmap( const wxBitmap
&bitmap
)
457 virtual void SetMinWidth( int minWidth
) = 0;
458 virtual void SetWidth( int width
) = 0;
463 virtual wxString
GetTitle() const = 0;
464 virtual wxAlignment
GetAlignment() const = 0;
465 virtual int GetWidth() const = 0;
466 virtual int GetMinWidth() const = 0;
468 virtual int GetFlags() const;
470 virtual bool IsSortable() const = 0;
471 virtual bool IsResizeable() const = 0;
472 virtual bool IsHidden() const = 0;
473 virtual bool IsSortOrderAscending() const = 0;
475 const wxBitmap
&GetBitmap() const { return m_bitmap
; }
476 unsigned int GetModelColumn() const { return static_cast<unsigned int>(m_model_column
); }
478 wxDataViewCtrl
*GetOwner() const { return m_owner
; }
479 wxDataViewRenderer
* GetRenderer() const { return m_renderer
; }
482 wxDataViewRenderer
*m_renderer
;
485 wxDataViewCtrl
*m_owner
;
488 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase
)
491 // ---------------------------------------------------------
492 // wxDataViewCtrlBase
493 // ---------------------------------------------------------
495 #define wxDV_SINGLE 0x0000 // for convenience
496 #define wxDV_MULTIPLE 0x0001 // can select multiple items
498 #define wxDV_NO_HEADER 0x0002 // column titles not visible
499 #define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
500 #define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
502 #define wxDV_ROW_LINES 0x0010 // alternating colour in rows
504 class WXDLLIMPEXP_ADV wxDataViewCtrlBase
: public wxControl
507 wxDataViewCtrlBase();
508 virtual ~wxDataViewCtrlBase();
510 virtual bool AssociateModel( wxDataViewModel
*model
);
511 wxDataViewModel
* GetModel();
512 const wxDataViewModel
* GetModel() const;
515 wxDataViewColumn
*PrependTextColumn( const wxString
&label
, unsigned int model_column
,
516 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
517 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
518 int flags
= wxDATAVIEW_COL_RESIZABLE
);
519 wxDataViewColumn
*PrependIconTextColumn( const wxString
&label
, unsigned int model_column
,
520 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
521 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
522 int flags
= wxDATAVIEW_COL_RESIZABLE
);
523 wxDataViewColumn
*PrependToggleColumn( const wxString
&label
, unsigned int model_column
,
524 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
525 wxAlignment align
= wxALIGN_CENTER
,
526 int flags
= wxDATAVIEW_COL_RESIZABLE
);
527 wxDataViewColumn
*PrependProgressColumn( const wxString
&label
, unsigned int model_column
,
528 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
529 wxAlignment align
= wxALIGN_CENTER
,
530 int flags
= wxDATAVIEW_COL_RESIZABLE
);
531 wxDataViewColumn
*PrependDateColumn( const wxString
&label
, unsigned int model_column
,
532 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
533 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
534 int flags
= wxDATAVIEW_COL_RESIZABLE
);
535 wxDataViewColumn
*PrependBitmapColumn( const wxString
&label
, unsigned int model_column
,
536 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
537 wxAlignment align
= wxALIGN_CENTER
,
538 int flags
= wxDATAVIEW_COL_RESIZABLE
);
539 wxDataViewColumn
*PrependTextColumn( const wxBitmap
&label
, unsigned int model_column
,
540 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
541 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
542 int flags
= wxDATAVIEW_COL_RESIZABLE
);
543 wxDataViewColumn
*PrependIconTextColumn( const wxBitmap
&label
, unsigned int model_column
,
544 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
545 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
546 int flags
= wxDATAVIEW_COL_RESIZABLE
);
547 wxDataViewColumn
*PrependToggleColumn( const wxBitmap
&label
, unsigned int model_column
,
548 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
549 wxAlignment align
= wxALIGN_CENTER
,
550 int flags
= wxDATAVIEW_COL_RESIZABLE
);
551 wxDataViewColumn
*PrependProgressColumn( const wxBitmap
&label
, unsigned int model_column
,
552 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
553 wxAlignment align
= wxALIGN_CENTER
,
554 int flags
= wxDATAVIEW_COL_RESIZABLE
);
555 wxDataViewColumn
*PrependDateColumn( const wxBitmap
&label
, unsigned int model_column
,
556 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
557 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
558 int flags
= wxDATAVIEW_COL_RESIZABLE
);
559 wxDataViewColumn
*PrependBitmapColumn( const wxBitmap
&label
, unsigned int model_column
,
560 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
561 wxAlignment align
= wxALIGN_CENTER
,
562 int flags
= wxDATAVIEW_COL_RESIZABLE
);
564 wxDataViewColumn
*AppendTextColumn( const wxString
&label
, unsigned int model_column
,
565 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
566 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
567 int flags
= wxDATAVIEW_COL_RESIZABLE
);
568 wxDataViewColumn
*AppendIconTextColumn( const wxString
&label
, unsigned int model_column
,
569 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
570 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
571 int flags
= wxDATAVIEW_COL_RESIZABLE
);
572 wxDataViewColumn
*AppendToggleColumn( const wxString
&label
, unsigned int model_column
,
573 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
574 wxAlignment align
= wxALIGN_CENTER
,
575 int flags
= wxDATAVIEW_COL_RESIZABLE
);
576 wxDataViewColumn
*AppendProgressColumn( const wxString
&label
, unsigned int model_column
,
577 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
578 wxAlignment align
= wxALIGN_CENTER
,
579 int flags
= wxDATAVIEW_COL_RESIZABLE
);
580 wxDataViewColumn
*AppendDateColumn( const wxString
&label
, unsigned int model_column
,
581 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
582 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
583 int flags
= wxDATAVIEW_COL_RESIZABLE
);
584 wxDataViewColumn
*AppendBitmapColumn( const wxString
&label
, unsigned int model_column
,
585 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
586 wxAlignment align
= wxALIGN_CENTER
,
587 int flags
= wxDATAVIEW_COL_RESIZABLE
);
588 wxDataViewColumn
*AppendTextColumn( const wxBitmap
&label
, unsigned int model_column
,
589 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
590 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
591 int flags
= wxDATAVIEW_COL_RESIZABLE
);
592 wxDataViewColumn
*AppendIconTextColumn( const wxBitmap
&label
, unsigned int model_column
,
593 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
594 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
595 int flags
= wxDATAVIEW_COL_RESIZABLE
);
596 wxDataViewColumn
*AppendToggleColumn( const wxBitmap
&label
, unsigned int model_column
,
597 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_TOGGLE_DEFAULT_WIDTH
,
598 wxAlignment align
= wxALIGN_CENTER
,
599 int flags
= wxDATAVIEW_COL_RESIZABLE
);
600 wxDataViewColumn
*AppendProgressColumn( const wxBitmap
&label
, unsigned int model_column
,
601 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= wxDVC_DEFAULT_WIDTH
,
602 wxAlignment align
= wxALIGN_CENTER
,
603 int flags
= wxDATAVIEW_COL_RESIZABLE
);
604 wxDataViewColumn
*AppendDateColumn( const wxBitmap
&label
, unsigned int model_column
,
605 wxDataViewCellMode mode
= wxDATAVIEW_CELL_ACTIVATABLE
, int width
= -1,
606 wxAlignment align
= (wxAlignment
)(wxALIGN_LEFT
|wxALIGN_CENTRE_VERTICAL
),
607 int flags
= wxDATAVIEW_COL_RESIZABLE
);
608 wxDataViewColumn
*AppendBitmapColumn( const wxBitmap
&label
, unsigned int model_column
,
609 wxDataViewCellMode mode
= wxDATAVIEW_CELL_INERT
, int width
= -1,
610 wxAlignment align
= wxALIGN_CENTER
,
611 int flags
= wxDATAVIEW_COL_RESIZABLE
);
614 virtual bool PrependColumn( wxDataViewColumn
*col
);
615 virtual bool AppendColumn( wxDataViewColumn
*col
);
617 virtual unsigned int GetColumnCount() const = 0;
618 virtual wxDataViewColumn
* GetColumn( unsigned int pos
) const = 0;
619 virtual int GetColumnPosition( const wxDataViewColumn
*column
) const = 0;
621 virtual bool DeleteColumn( wxDataViewColumn
*column
) = 0;
622 virtual bool ClearColumns() = 0;
624 void SetExpanderColumn( wxDataViewColumn
*col
)
625 { m_expander_column
= col
; DoSetExpanderColumn(); }
626 wxDataViewColumn
*GetExpanderColumn() const
627 { return m_expander_column
; }
629 virtual wxDataViewColumn
*GetSortingColumn() const = 0;
631 void SetIndent( int indent
)
632 { m_indent
= indent
; DoSetIndent(); }
633 int GetIndent() const
636 virtual wxDataViewItem
GetSelection() const = 0;
637 virtual int GetSelections( wxDataViewItemArray
& sel
) const = 0;
638 virtual void SetSelections( const wxDataViewItemArray
& sel
) = 0;
639 virtual void Select( const wxDataViewItem
& item
) = 0;
640 virtual void Unselect( const wxDataViewItem
& item
) = 0;
641 virtual bool IsSelected( const wxDataViewItem
& item
) const = 0;
643 virtual void SelectAll() = 0;
644 virtual void UnselectAll() = 0;
646 virtual void Expand( const wxDataViewItem
& item
) = 0;
647 virtual void Collapse( const wxDataViewItem
& item
) = 0;
649 virtual void EnsureVisible( const wxDataViewItem
& item
,
650 const wxDataViewColumn
*column
= NULL
) = 0;
651 virtual void HitTest( const wxPoint
& point
, wxDataViewItem
&item
, wxDataViewColumn
* &column
) const = 0;
652 virtual wxRect
GetItemRect( const wxDataViewItem
& item
, const wxDataViewColumn
*column
= NULL
) const = 0;
655 virtual void DoSetExpanderColumn() = 0 ;
656 virtual void DoSetIndent() = 0;
659 wxDataViewModel
*m_model
;
660 wxDataViewColumn
*m_expander_column
;
664 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase
)
667 // ----------------------------------------------------------------------------
668 // wxDataViewEvent - the event class for the wxDataViewCtrl notifications
669 // ----------------------------------------------------------------------------
671 class WXDLLIMPEXP_ADV wxDataViewEvent
: public wxNotifyEvent
674 wxDataViewEvent(wxEventType commandType
= wxEVT_NULL
, int winid
= 0)
675 : wxNotifyEvent(commandType
, winid
),
679 m_value(wxNullVariant
),
683 wxDataViewEvent(const wxDataViewEvent
& event
)
684 : wxNotifyEvent(event
),
685 m_item(event
.m_item
),
687 m_model(event
.m_model
),
688 m_value(event
.m_value
),
689 m_column(event
.m_column
)
692 wxDataViewItem
GetItem() const { return m_item
; }
693 void SetItem( const wxDataViewItem
&item
) { m_item
= item
; }
695 int GetColumn() const { return m_col
; }
696 void SetColumn( int col
) { m_col
= col
; }
698 wxDataViewModel
* GetModel() const { return m_model
; }
699 void SetModel( wxDataViewModel
*model
) { m_model
= model
; }
701 const wxVariant
&GetValue() const { return m_value
; }
702 void SetValue( const wxVariant
&value
) { m_value
= value
; }
704 // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
705 void SetDataViewColumn( wxDataViewColumn
*col
) { m_column
= col
; }
706 wxDataViewColumn
*GetDataViewColumn() const { return m_column
; }
708 virtual wxEvent
*Clone() const { return new wxDataViewEvent(*this); }
711 wxDataViewItem m_item
;
713 wxDataViewModel
*m_model
;
715 wxDataViewColumn
*m_column
;
718 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent
)
721 BEGIN_DECLARE_EVENT_TYPES()
722 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED
, -1)
724 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED
, -1)
725 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED
, -1)
726 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED
, -1)
727 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING
, -1)
728 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING
, -1)
729 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED
, -1)
730 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE
, -1)
731 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED
, -1)
733 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK
, -1)
734 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK
, -1)
735 DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV
, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED
, -1)
736 END_DECLARE_EVENT_TYPES()
738 typedef void (wxEvtHandler::*wxDataViewEventFunction
)(wxDataViewEvent
&);
740 #define wxDataViewEventHandler(func) \
741 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDataViewEventFunction, &func)
743 #define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
744 wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
746 #define EVT_DATAVIEW_SELECTION_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(SELECTION_CHANGED, id, fn)
748 #define EVT_DATAVIEW_ITEM_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_ACTIVATED, id, fn)
749 #define EVT_DATAVIEW_ITEM_COLLAPSING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSING, id, fn)
750 #define EVT_DATAVIEW_ITEM_COLLAPSED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSED, id, fn)
751 #define EVT_DATAVIEW_ITEM_EXPANDING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDING, id, fn)
752 #define EVT_DATAVIEW_ITEM_EXPANDED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDED, id, fn)
753 #define EVT_DATAVIEW_ITEM_EDITING_STARTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_STARTED, id, fn)
754 #define EVT_DATAVIEW_ITEM_EDITING_DONE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_DONE, id, fn)
755 #define EVT_DATAVIEW_ITEM_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_VALUE_CHANGED, id, fn)
757 #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
758 #define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
759 #define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
761 #if defined(wxUSE_GENERICDATAVIEWCTRL)
762 #include "wx/generic/dataview.h"
763 #elif defined(__WXGTK20__)
764 #include "wx/gtk/dataview.h"
765 #elif defined(__WXMAC__)
766 #include "wx/mac/dataview.h"
768 #include "wx/generic/dataview.h"
771 // -------------------------------------
772 // wxDataViewSpinRenderer
773 // -------------------------------------
775 class WXDLLIMPEXP_ADV wxDataViewSpinRenderer
: public wxDataViewCustomRenderer
778 wxDataViewSpinRenderer( int min
, int max
,
779 wxDataViewCellMode mode
= wxDATAVIEW_CELL_EDITABLE
,
780 int alignment
= wxDVR_DEFAULT_ALIGNMENT
);
781 virtual bool HasEditorCtrl() { return true; }
782 virtual wxControl
* CreateEditorCtrl( wxWindow
*parent
, wxRect labelRect
, const wxVariant
&value
);
783 virtual bool GetValueFromEditorCtrl( wxControl
* editor
, wxVariant
&value
);
784 virtual bool Render( wxRect rect
, wxDC
*dc
, int state
);
785 virtual wxSize
GetSize() const;
786 virtual bool SetValue( const wxVariant
&value
);
787 virtual bool GetValue( wxVariant
&value
) const;
794 //-----------------------------------------------------------------------------
795 // wxDataViewTreeStore
796 //-----------------------------------------------------------------------------
798 class WXDLLIMPEXP_ADV wxDataViewTreeStoreNode
801 wxDataViewTreeStoreNode( wxDataViewTreeStoreNode
*parent
,
802 const wxString
&text
, const wxIcon
&icon
= wxNullIcon
, wxClientData
*data
= NULL
);
803 virtual ~wxDataViewTreeStoreNode();
805 void SetText( const wxString
&text
)
807 wxString
GetText() const
809 void SetIcon( const wxIcon
&icon
)
811 const wxIcon
&GetIcon() const
813 void SetData( wxClientData
*data
)
814 { if (m_data
) delete m_data
; m_data
= data
; }
815 wxClientData
*GetData() const
818 wxDataViewItem
GetItem() const
819 { return wxDataViewItem( (void*) this ); }
821 virtual bool IsContainer()
824 wxDataViewTreeStoreNode
*GetParent()
828 wxDataViewTreeStoreNode
*m_parent
;
831 wxClientData
*m_data
;
834 WX_DECLARE_LIST_WITH_DECL(wxDataViewTreeStoreNode
, wxDataViewTreeStoreNodeList
,
835 class WXDLLIMPEXP_ADV
);
837 class WXDLLIMPEXP_ADV wxDataViewTreeStoreContainerNode
: public wxDataViewTreeStoreNode
840 wxDataViewTreeStoreContainerNode( wxDataViewTreeStoreNode
*parent
,
841 const wxString
&text
, const wxIcon
&icon
= wxNullIcon
, const wxIcon
&expanded
= wxNullIcon
,
842 wxClientData
*data
= NULL
);
843 virtual ~wxDataViewTreeStoreContainerNode();
845 const wxDataViewTreeStoreNodeList
&GetChildren() const
846 { return m_children
; }
847 wxDataViewTreeStoreNodeList
&GetChildren()
848 { return m_children
; }
850 void SetExpandedIcon( const wxIcon
&icon
)
851 { m_iconExpanded
= icon
; }
852 const wxIcon
&GetExpandedIcon() const
853 { return m_iconExpanded
; }
855 void SetExpanded( bool expanded
= true )
856 { m_isExpanded
= expanded
; }
857 bool IsExpanded() const
858 { return m_isExpanded
; }
860 virtual bool IsContainer()
864 wxDataViewTreeStoreNodeList m_children
;
865 wxIcon m_iconExpanded
;
869 //-----------------------------------------------------------------------------
871 class WXDLLIMPEXP_ADV wxDataViewTreeStore
: public wxDataViewModel
874 wxDataViewTreeStore();
875 ~wxDataViewTreeStore();
877 wxDataViewItem
AppendItem( const wxDataViewItem
& parent
,
878 const wxString
&text
, const wxIcon
&icon
= wxNullIcon
, wxClientData
*data
= NULL
);
879 wxDataViewItem
PrependItem( const wxDataViewItem
& parent
,
880 const wxString
&text
, const wxIcon
&icon
= wxNullIcon
, wxClientData
*data
= NULL
);
881 wxDataViewItem
InsertItem( const wxDataViewItem
& parent
, const wxDataViewItem
& previous
,
882 const wxString
&text
, const wxIcon
&icon
= wxNullIcon
, wxClientData
*data
= NULL
);
884 wxDataViewItem
PrependContainer( const wxDataViewItem
& parent
,
885 const wxString
&text
, const wxIcon
&icon
= wxNullIcon
, const wxIcon
&expanded
= wxNullIcon
,
886 wxClientData
*data
= NULL
);
887 wxDataViewItem
AppendContainer( const wxDataViewItem
& parent
,
888 const wxString
&text
, const wxIcon
&icon
= wxNullIcon
, const wxIcon
&expanded
= wxNullIcon
,
889 wxClientData
*data
= NULL
);
890 wxDataViewItem
InsertContainer( const wxDataViewItem
& parent
, const wxDataViewItem
& previous
,
891 const wxString
&text
, const wxIcon
&icon
= wxNullIcon
, const wxIcon
&expanded
= wxNullIcon
,
892 wxClientData
*data
= NULL
);
894 wxDataViewItem
GetNthChild( const wxDataViewItem
& parent
, unsigned int pos
) const;
895 int GetChildCount( const wxDataViewItem
& parent
) const;
897 void SetItemText( const wxDataViewItem
& item
, const wxString
&text
);
898 wxString
GetItemText( const wxDataViewItem
& item
) const;
899 void SetItemIcon( const wxDataViewItem
& item
, const wxIcon
&icon
);
900 const wxIcon
&GetItemIcon( const wxDataViewItem
& item
) const;
901 void SetItemExpandedIcon( const wxDataViewItem
& item
, const wxIcon
&icon
);
902 const wxIcon
&GetItemExpandedIcon( const wxDataViewItem
& item
) const;
903 void SetItemData( const wxDataViewItem
& item
, wxClientData
*data
);
904 wxClientData
*GetItemData( const wxDataViewItem
& item
) const;
906 void DeleteItem( const wxDataViewItem
& item
);
907 void DeleteChildren( const wxDataViewItem
& item
);
908 void DeleteAllItems();
910 // implement base methods
912 virtual void GetValue( wxVariant
&variant
,
913 const wxDataViewItem
&item
, unsigned int col
) const;
914 virtual bool SetValue( const wxVariant
&variant
,
915 const wxDataViewItem
&item
, unsigned int col
);
916 virtual wxDataViewItem
GetParent( const wxDataViewItem
&item
) const;
917 virtual bool IsContainer( const wxDataViewItem
&item
) const;
918 virtual unsigned int GetChildren( const wxDataViewItem
&item
, wxDataViewItemArray
&children
) const;
920 virtual int Compare( const wxDataViewItem
&item1
, const wxDataViewItem
&item2
,
921 unsigned int column
, bool ascending
);
923 virtual bool HasDefaultCompare() const
925 virtual unsigned int GetColumnCount() const
927 virtual wxString
GetColumnType( unsigned int WXUNUSED(col
) ) const
928 { return wxT("wxDataViewIconText"); }
930 wxDataViewTreeStoreNode
*FindNode( const wxDataViewItem
&item
) const;
931 wxDataViewTreeStoreContainerNode
*FindContainerNode( const wxDataViewItem
&item
) const;
932 wxDataViewTreeStoreNode
*GetRoot() const { return m_root
; }
935 wxDataViewTreeStoreNode
*m_root
;
938 class WXDLLIMPEXP_ADV wxDataViewTreeCtrl
: public wxDataViewCtrl
941 wxDataViewTreeCtrl();
942 wxDataViewTreeCtrl( wxWindow
*parent
, wxWindowID id
,
943 const wxPoint
& pos
= wxDefaultPosition
,
944 const wxSize
& size
= wxDefaultSize
, long style
= wxDV_NO_HEADER
| wxDV_ROW_LINES
,
945 const wxValidator
& validator
= wxDefaultValidator
);
946 ~wxDataViewTreeCtrl();
948 bool Create( wxWindow
*parent
, wxWindowID id
,
949 const wxPoint
& pos
= wxDefaultPosition
,
950 const wxSize
& size
= wxDefaultSize
, long style
= wxDV_NO_HEADER
| wxDV_ROW_LINES
,
951 const wxValidator
& validator
= wxDefaultValidator
);
953 wxDataViewTreeStore
*GetStore()
954 { return (wxDataViewTreeStore
*) GetModel(); }
955 const wxDataViewTreeStore
*GetStore() const
956 { return (const wxDataViewTreeStore
*) GetModel(); }
958 void SetImageList( wxImageList
*imagelist
);
959 wxImageList
* GetImageList() { return m_imageList
; }
961 wxDataViewItem
AppendItem( const wxDataViewItem
& parent
,
962 const wxString
&text
, int icon
= -1, wxClientData
*data
= NULL
);
963 wxDataViewItem
PrependItem( const wxDataViewItem
& parent
,
964 const wxString
&text
, int icon
= -1, wxClientData
*data
= NULL
);
965 wxDataViewItem
InsertItem( const wxDataViewItem
& parent
, const wxDataViewItem
& previous
,
966 const wxString
&text
, int icon
= -1, wxClientData
*data
= NULL
);
968 wxDataViewItem
PrependContainer( const wxDataViewItem
& parent
,
969 const wxString
&text
, int icon
= -1, int expanded
= -1,
970 wxClientData
*data
= NULL
);
971 wxDataViewItem
AppendContainer( const wxDataViewItem
& parent
,
972 const wxString
&text
, int icon
= -1, int expanded
= -1,
973 wxClientData
*data
= NULL
);
974 wxDataViewItem
InsertContainer( const wxDataViewItem
& parent
, const wxDataViewItem
& previous
,
975 const wxString
&text
, int icon
= -1, int expanded
= -1,
976 wxClientData
*data
= NULL
);
978 wxDataViewItem
GetNthChild( const wxDataViewItem
& parent
, unsigned int pos
) const
979 { return GetStore()->GetNthChild(parent
, pos
); }
980 int GetChildCount( const wxDataViewItem
& parent
) const
981 { return GetStore()->GetChildCount(parent
); }
983 void SetItemText( const wxDataViewItem
& item
, const wxString
&text
)
984 { GetStore()->SetItemText(item
,text
); }
985 wxString
GetItemText( const wxDataViewItem
& item
) const
986 { return GetStore()->GetItemText(item
); }
987 void SetItemIcon( const wxDataViewItem
& item
, const wxIcon
&icon
)
988 { GetStore()->SetItemIcon(item
,icon
); }
989 const wxIcon
&GetItemIcon( const wxDataViewItem
& item
) const
990 { return GetStore()->GetItemIcon(item
); }
991 void SetItemExpandedIcon( const wxDataViewItem
& item
, const wxIcon
&icon
)
992 { GetStore()->SetItemExpandedIcon(item
,icon
); }
993 const wxIcon
&GetItemExpandedIcon( const wxDataViewItem
& item
) const
994 { return GetStore()->GetItemExpandedIcon(item
); }
995 void SetItemData( const wxDataViewItem
& item
, wxClientData
*data
)
996 { GetStore()->SetItemData(item
,data
); }
997 wxClientData
*GetItemData( const wxDataViewItem
& item
) const
998 { return GetStore()->GetItemData(item
); }
1000 void DeleteItem( const wxDataViewItem
& item
)
1001 { GetStore()->DeleteItem(item
); }
1002 void DeleteChildren( const wxDataViewItem
& item
)
1003 { GetStore()->DeleteChildren(item
); }
1004 void DeleteAllItems()
1005 { GetStore()->DeleteAllItems(); }
1007 void OnExpanded( wxDataViewEvent
&event
);
1008 void OnCollapsed( wxDataViewEvent
&event
);
1009 void OnSize( wxSizeEvent
&event
);
1012 wxImageList
*m_imageList
;
1015 DECLARE_EVENT_TABLE()
1016 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl
)
1019 #endif // wxUSE_DATAVIEWCTRL
1022 // _WX_DATAVIEW_H_BASE_