]> git.saurik.com Git - wxWidgets.git/blame - include/wx/dataview.h
Fix erasing wxHtmlWindow background in wxUniv.
[wxWidgets.git] / include / wx / dataview.h
CommitLineData
bcd846ea
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/dataview.h
3// Purpose: wxDataViewCtrl base classes
4// Author: Robert Roebling
b7e9f8b1 5// Modified by: Bo Yang
bcd846ea
RR
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
239eaa41 19#include "wx/textctrl.h"
56873923 20#include "wx/headercol.h"
64ffb888 21#include "wx/variant.h"
b7e9f8b1 22#include "wx/dynarray.h"
89352653 23#include "wx/icon.h"
87df1c87 24#include "wx/itemid.h"
c232dfe5 25#include "wx/weakref.h"
8eff6c56 26#include "wx/vector.h"
8c2654ce 27#include "wx/dataobj.h"
abfdefed 28#include "wx/withimages.h"
8c2654ce
PC
29
30class WXDLLIMPEXP_FWD_CORE wxImageList;
4ed7af08 31
e86edab0 32#if !(defined(__WXGTK20__) || defined(__WXOSX__)) || defined(__WXUNIVERSAL__)
0a807957 33// #if !(defined(__WXOSX__)) || defined(__WXUNIVERSAL__)
56873923
VZ
34 #define wxHAS_GENERIC_DATAVIEWCTRL
35#endif
36
6eec70b9
VZ
37#ifdef wxHAS_GENERIC_DATAVIEWCTRL
38 // this symbol doesn't follow the convention for wxUSE_XXX symbols which
39 // are normally always defined as either 0 or 1, so its use is deprecated
40 // and it only exists for backwards compatibility, don't use it any more
41 // and use wxHAS_GENERIC_DATAVIEWCTRL instead
42 #define wxUSE_GENERICDATAVIEWCTRL
43#endif
44
239eaa41
RR
45// ----------------------------------------------------------------------------
46// wxDataViewCtrl globals
47// ----------------------------------------------------------------------------
bcd846ea 48
b5dbe15d
VS
49class WXDLLIMPEXP_FWD_ADV wxDataViewModel;
50class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl;
51class WXDLLIMPEXP_FWD_ADV wxDataViewColumn;
52class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer;
53class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier;
fa28826d 54
23318a53 55extern WXDLLIMPEXP_DATA_ADV(const char) wxDataViewCtrlNameStr[];
bcd846ea 56
ce468dc2
FM
57// ----------------------------------------------------------------------------
58// wxDataViewCtrl flags
59// ----------------------------------------------------------------------------
60
61// size of a wxDataViewRenderer without contents:
62#define wxDVC_DEFAULT_RENDERER_SIZE 20
63
87f0efe2
RR
64// the default width of new (text) columns:
65#define wxDVC_DEFAULT_WIDTH 80
66
67// the default width of new toggle columns:
68#define wxDVC_TOGGLE_DEFAULT_WIDTH 30
69
9861f022
RR
70// the default minimal width of the columns:
71#define wxDVC_DEFAULT_MINWIDTH 30
72
f2b7492a
RR
73// The default alignment of wxDataViewRenderers is to take
74// the alignment from the column it owns.
75#define wxDVR_DEFAULT_ALIGNMENT -1
9861f022 76
87f0efe2 77
f554a14b 78// ---------------------------------------------------------
e0062c04 79// wxDataViewItem
f554a14b 80// ---------------------------------------------------------
239eaa41 81
87df1c87
VZ
82// Make it a class and not a typedef to allow forward declaring it.
83class wxDataViewItem : public wxItemId<void*>
239eaa41
RR
84{
85public:
87df1c87
VZ
86 wxDataViewItem() : wxItemId<void*>() { }
87 wxEXPLICIT wxDataViewItem(void* pItem) : wxItemId<void*>(pItem) { }
64ffb888 88};
239eaa41 89
cd722937
RR
90WX_DEFINE_ARRAY(wxDataViewItem, wxDataViewItemArray);
91
9d8fe14a
RR
92// ---------------------------------------------------------
93// wxDataViewModelNotifier
94// ---------------------------------------------------------
95
96class WXDLLIMPEXP_ADV wxDataViewModelNotifier
97{
98public:
5e6f8927 99 wxDataViewModelNotifier() { m_owner = NULL; }
9d8fe14a
RR
100 virtual ~wxDataViewModelNotifier() { m_owner = NULL; }
101
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;
854cdb09
RR
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 );
9d8fe14a
RR
108 virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col ) = 0;
109 virtual bool Cleared() = 0;
ce00f59b 110
d8090b5e
RR
111 // some platforms, such as GTK+, may need a two step procedure for ::Reset()
112 virtual bool BeforeReset() { return true; }
673810ee 113 virtual bool AfterReset() { return Cleared(); }
b5ec7dd6 114
d3f00f59 115 virtual void Resort() = 0;
9d8fe14a
RR
116
117 void SetOwner( wxDataViewModel *owner ) { m_owner = owner; }
e51bf699 118 wxDataViewModel *GetOwner() const { return m_owner; }
9d8fe14a
RR
119
120private:
121 wxDataViewModel *m_owner;
122};
123
124
4264606e
RR
125
126// ----------------------------------------------------------------------------
127// wxDataViewItemAttr: a structure containing the visual attributes of an item
128// ----------------------------------------------------------------------------
129
130// TODO: this should be renamed to wxItemAttr or something general like this
131
132class WXDLLIMPEXP_ADV wxDataViewItemAttr
133{
134public:
135 // ctors
c058cafa
VZ
136 wxDataViewItemAttr()
137 {
4264606e
RR
138 m_bold = false;
139 m_italic = false;
140 }
141
142 // setters
143 void SetColour(const wxColour& colour) { m_colour = colour; }
144 void SetBold( bool set ) { m_bold = set; }
145 void SetItalic( bool set ) { m_italic = set; }
1c959a62 146 void SetBackgroundColour(const wxColour& colour) { m_bgColour = colour; }
c058cafa 147
4264606e 148 // accessors
a1b806b9 149 bool HasColour() const { return m_colour.IsOk(); }
4264606e 150 const wxColour& GetColour() const { return m_colour; }
c058cafa 151
2d0d7813 152 bool HasFont() const { return m_bold || m_italic; }
4264606e
RR
153 bool GetBold() const { return m_bold; }
154 bool GetItalic() const { return m_italic; }
155
1c959a62
VZ
156 bool HasBackgroundColour() const { return m_bgColour.IsOk(); }
157 const wxColour& GetBackgroundColour() const { return m_bgColour; }
158
159 bool IsDefault() const { return !(HasColour() || HasFont() || HasBackgroundColour()); }
c80cde00 160
86755098
VS
161 // Return the font based on the given one with this attribute applied to it.
162 wxFont GetEffectiveFont(const wxFont& font) const;
163
4264606e
RR
164private:
165 wxColour m_colour;
166 bool m_bold;
167 bool m_italic;
1c959a62 168 wxColour m_bgColour;
4264606e
RR
169};
170
171
f554a14b 172// ---------------------------------------------------------
e0062c04 173// wxDataViewModel
f554a14b 174// ---------------------------------------------------------
239eaa41 175
d350fbec
VS
176WX_DECLARE_LIST_WITH_DECL(wxDataViewModelNotifier, wxDataViewModelNotifiers,
177 class WXDLLIMPEXP_ADV);
9d8fe14a 178
e4e83d3a 179class WXDLLIMPEXP_ADV wxDataViewModel: public wxRefCounter
239eaa41
RR
180{
181public:
e0062c04 182 wxDataViewModel();
239eaa41 183
9861f022 184 virtual unsigned int GetColumnCount() const = 0;
87f0efe2 185
a7f61f76 186 // return type as reported by wxVariant
9861f022 187 virtual wxString GetColumnType( unsigned int col ) const = 0;
87f0efe2 188
a7f61f76 189 // get value into a wxVariant
b5ec7dd6 190 virtual void GetValue( wxVariant &variant,
e0062c04 191 const wxDataViewItem &item, unsigned int col ) const = 0;
87f0efe2 192
b372f20e
VZ
193 // return true if the given item has a value to display in the given
194 // column: this is always true except for container items which by default
195 // only show their label in the first column (but see HasContainerColumns())
196 bool HasValue(const wxDataViewItem& item, unsigned col) const
197 {
198 return col == 0 || !IsContainer(item) || HasContainerColumns(item);
199 }
200
795dac4c
VZ
201 // usually ValueChanged() should be called after changing the value in the
202 // model to update the control, ChangeValue() does it on its own while
203 // SetValue() does not -- so while you will override SetValue(), you should
204 // be usually calling ChangeValue()
205 virtual bool SetValue(const wxVariant &variant,
206 const wxDataViewItem &item,
207 unsigned int col) = 0;
208
209 bool ChangeValue(const wxVariant& variant,
210 const wxDataViewItem& item,
211 unsigned int col)
212 {
213 return SetValue(variant, item, col) && ValueChanged(item, col);
214 }
239eaa41 215
4264606e 216 // Get text attribute, return false of default attributes should be used
7fadac88
VZ
217 virtual bool GetAttr(const wxDataViewItem &WXUNUSED(item),
218 unsigned int WXUNUSED(col),
219 wxDataViewItemAttr &WXUNUSED(attr)) const
220 {
221 return false;
222 }
4264606e 223
98f8e666
VZ
224 // Override this if you want to disable specific items
225 virtual bool IsEnabled(const wxDataViewItem &WXUNUSED(item),
226 unsigned int WXUNUSED(col)) const
227 {
228 return true;
229 }
230
e0062c04 231 // define hierachy
ed903e42
RR
232 virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const = 0;
233 virtual bool IsContainer( const wxDataViewItem &item ) const = 0;
1e40f667 234 // Is the container just a header or an item with all columns
b5ec7dd6
VZ
235 virtual bool HasContainerColumns(const wxDataViewItem& WXUNUSED(item)) const
236 { return false; }
74fe973b 237 virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const = 0;
b9b8b59c 238
239eaa41 239 // delegated notifiers
9ca2afd1
RR
240 bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item );
241 bool ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items );
242 bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item );
243 bool ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items );
244 bool ItemChanged( const wxDataViewItem &item );
245 bool ItemsChanged( const wxDataViewItemArray &items );
246 bool ValueChanged( const wxDataViewItem &item, unsigned int col );
247 bool Cleared();
b5d777c7 248
d8090b5e
RR
249 // some platforms, such as GTK+, may need a two step procedure for ::Reset()
250 bool BeforeReset();
673810ee
RR
251 bool AfterReset();
252
253
254 // delegated action
ef427989
RR
255 virtual void Resort();
256
e0062c04
RR
257 void AddNotifier( wxDataViewModelNotifier *notifier );
258 void RemoveNotifier( wxDataViewModelNotifier *notifier );
b5ec7dd6 259
ef427989 260 // default compare function
b5ec7dd6 261 virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
862de7b3 262 unsigned int column, bool ascending ) const;
09711964 263 virtual bool HasDefaultCompare() const { return false; }
c058cafa 264
2056dede 265 // internal
ce5abbf9 266 virtual bool IsListModel() const { return false; }
e39de702 267 virtual bool IsVirtualListModel() const { return false; }
66e09788 268
87f0efe2
RR
269protected:
270 // the user should not delete this class directly: he should use DecRef() instead!
5debbdcf 271 virtual ~wxDataViewModel() { }
87f0efe2 272
9d8fe14a 273 wxDataViewModelNotifiers m_notifiers;
ef427989
RR
274};
275
2feacb6e
VZ
276// ----------------------------------------------------------------------------
277// wxDataViewListModel: a model of a list, i.e. flat data structure without any
278// branches/containers, used as base class by wxDataViewIndexListModel and
279// wxDataViewVirtualListModel
280// ----------------------------------------------------------------------------
281
282class WXDLLIMPEXP_ADV wxDataViewListModel : public wxDataViewModel
283{
284public:
285 // derived classes should override these methods instead of
286 // {Get,Set}Value() and GetAttr() inherited from the base class
287
288 virtual void GetValueByRow(wxVariant &variant,
289 unsigned row, unsigned col) const = 0;
290
291 virtual bool SetValueByRow(const wxVariant &variant,
292 unsigned row, unsigned col) = 0;
293
294 virtual bool
295 GetAttrByRow(unsigned WXUNUSED(row), unsigned WXUNUSED(col),
7fadac88 296 wxDataViewItemAttr &WXUNUSED(attr)) const
2feacb6e
VZ
297 {
298 return false;
299 }
300
98f8e666
VZ
301 virtual bool IsEnabledByRow(unsigned int WXUNUSED(row),
302 unsigned int WXUNUSED(col)) const
303 {
304 return true;
305 }
306
2feacb6e
VZ
307
308 // helper methods provided by list models only
309 virtual unsigned GetRow( const wxDataViewItem &item ) const = 0;
310
ce00f59b 311 // returns the number of rows
b955766e 312 virtual unsigned int GetCount() const = 0;
2feacb6e
VZ
313
314 // implement some base class pure virtual directly
315 virtual wxDataViewItem
316 GetParent( const wxDataViewItem & WXUNUSED(item) ) const
317 {
318 // items never have valid parent in this model
319 return wxDataViewItem();
320 }
321
322 virtual bool IsContainer( const wxDataViewItem &item ) const
323 {
324 // only the invisible (and invalid) root item has children
325 return !item.IsOk();
326 }
327
328 // and implement some others by forwarding them to our own ones
329 virtual void GetValue( wxVariant &variant,
330 const wxDataViewItem &item, unsigned int col ) const
331 {
332 GetValueByRow(variant, GetRow(item), col);
333 }
334
335 virtual bool SetValue( const wxVariant &variant,
336 const wxDataViewItem &item, unsigned int col )
337 {
338 return SetValueByRow( variant, GetRow(item), col );
339 }
340
341 virtual bool GetAttr(const wxDataViewItem &item, unsigned int col,
7fadac88 342 wxDataViewItemAttr &attr) const
2feacb6e
VZ
343 {
344 return GetAttrByRow( GetRow(item), col, attr );
345 }
ce5abbf9 346
98f8e666
VZ
347 virtual bool IsEnabled(const wxDataViewItem &item, unsigned int col) const
348 {
349 return IsEnabledByRow( GetRow(item), col );
350 }
351
b955766e 352
ce5abbf9 353 virtual bool IsListModel() const { return true; }
2feacb6e
VZ
354};
355
ef427989 356// ---------------------------------------------------------
c534e696 357// wxDataViewIndexListModel
ef427989
RR
358// ---------------------------------------------------------
359
2feacb6e 360class WXDLLIMPEXP_ADV wxDataViewIndexListModel: public wxDataViewListModel
ef427989
RR
361{
362public:
c534e696 363 wxDataViewIndexListModel( unsigned int initial_size = 0 );
c058cafa 364
c534e696
RR
365 void RowPrepended();
366 void RowInserted( unsigned int before );
367 void RowAppended();
368 void RowDeleted( unsigned int row );
8b6cf9bf 369 void RowsDeleted( const wxArrayInt &rows );
c534e696
RR
370 void RowChanged( unsigned int row );
371 void RowValueChanged( unsigned int row, unsigned int col );
33ba5a05 372 void Reset( unsigned int new_size );
b5ec7dd6 373
c534e696 374 // convert to/from row/wxDataViewItem
b5ec7dd6 375
2feacb6e 376 virtual unsigned GetRow( const wxDataViewItem &item ) const;
c534e696 377 wxDataViewItem GetItem( unsigned int row ) const;
b5ec7dd6 378
c534e696 379 // implement base methods
74fe973b 380 virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
b5ec7dd6 381
9330d5af 382 unsigned int GetCount() const { return m_hash.GetCount(); }
c058cafa 383
c534e696 384private:
cd722937 385 wxDataViewItemArray m_hash;
9330d5af 386 unsigned int m_nextFreeID;
517166e6 387 bool m_ordered;
239eaa41
RR
388};
389
e39de702
RR
390// ---------------------------------------------------------
391// wxDataViewVirtualListModel
392// ---------------------------------------------------------
393
394#ifdef __WXMAC__
395// better than nothing
f1399150 396typedef wxDataViewIndexListModel wxDataViewVirtualListModel;
e39de702
RR
397#else
398
2feacb6e 399class WXDLLIMPEXP_ADV wxDataViewVirtualListModel: public wxDataViewListModel
e39de702
RR
400{
401public:
402 wxDataViewVirtualListModel( unsigned int initial_size = 0 );
e39de702
RR
403
404 void RowPrepended();
405 void RowInserted( unsigned int before );
406 void RowAppended();
407 void RowDeleted( unsigned int row );
408 void RowsDeleted( const wxArrayInt &rows );
409 void RowChanged( unsigned int row );
410 void RowValueChanged( unsigned int row, unsigned int col );
411 void Reset( unsigned int new_size );
412
413 // convert to/from row/wxDataViewItem
414
2feacb6e 415 virtual unsigned GetRow( const wxDataViewItem &item ) const;
e39de702
RR
416 wxDataViewItem GetItem( unsigned int row ) const;
417
418 // compare based on index
419
420 virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
862de7b3 421 unsigned int column, bool ascending ) const;
e39de702
RR
422 virtual bool HasDefaultCompare() const;
423
424 // implement base methods
e39de702
RR
425 virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
426
74d9b8fb
VZ
427 unsigned int GetCount() const { return m_size; }
428
e39de702
RR
429 // internal
430 virtual bool IsVirtualListModel() const { return true; }
e39de702
RR
431
432private:
9330d5af 433 unsigned int m_size;
e39de702
RR
434 bool m_ordered;
435};
436#endif
c33edc08 437
6eec70b9
VZ
438// ----------------------------------------------------------------------------
439// wxDataViewRenderer and related classes
440// ----------------------------------------------------------------------------
89352653 441
6eec70b9 442#include "wx/dvrenderers.h"
89352653 443
f554a14b 444// ---------------------------------------------------------
6842a71a 445// wxDataViewColumnBase
f554a14b 446// ---------------------------------------------------------
6842a71a 447
56873923 448// for compatibility only, do not use
fa28826d
RR
449enum wxDataViewColumnFlags
450{
56873923
VZ
451 wxDATAVIEW_COL_RESIZABLE = wxCOL_RESIZABLE,
452 wxDATAVIEW_COL_SORTABLE = wxCOL_SORTABLE,
453 wxDATAVIEW_COL_REORDERABLE = wxCOL_REORDERABLE,
454 wxDATAVIEW_COL_HIDDEN = wxCOL_HIDDEN
fa28826d
RR
455};
456
dcb6cbec 457class WXDLLIMPEXP_ADV wxDataViewColumnBase : public wxSettableHeaderColumn
fa28826d
RR
458{
459public:
e2bfe673
VZ
460 // ctor for the text columns: takes ownership of renderer
461 wxDataViewColumnBase(wxDataViewRenderer *renderer,
462 unsigned int model_column)
463 {
464 Init(renderer, model_column);
465 }
466
467 // ctor for the bitmap columns
468 wxDataViewColumnBase(const wxBitmap& bitmap,
469 wxDataViewRenderer *renderer,
470 unsigned int model_column)
471 : m_bitmap(bitmap)
472 {
473 Init(renderer, model_column);
474 }
475
d3c7fc99 476 virtual ~wxDataViewColumnBase();
fa28826d 477
9861f022 478 // setters:
b5ec7dd6 479 virtual void SetOwner( wxDataViewCtrl *owner )
9861f022 480 { m_owner = owner; }
f554a14b 481
9861f022 482 // getters:
e86edab0 483 unsigned int GetModelColumn() const { return static_cast<unsigned int>(m_model_column); }
594d5596
RR
484 wxDataViewCtrl *GetOwner() const { return m_owner; }
485 wxDataViewRenderer* GetRenderer() const { return m_renderer; }
9861f022 486
56873923
VZ
487 // implement some of base class pure virtuals (the rest is port-dependent
488 // and done differently in generic and native versions)
489 virtual void SetBitmap( const wxBitmap& bitmap ) { m_bitmap = bitmap; }
490 virtual wxBitmap GetBitmap() const { return m_bitmap; }
56873923 491
9861f022 492protected:
baa9ebc4 493 wxDataViewRenderer *m_renderer;
6842a71a 494 int m_model_column;
07a84e7b 495 wxBitmap m_bitmap;
6842a71a 496 wxDataViewCtrl *m_owner;
fa28826d 497
e2bfe673
VZ
498private:
499 // common part of all ctors
500 void Init(wxDataViewRenderer *renderer, unsigned int model_column);
fa28826d
RR
501};
502
f554a14b 503// ---------------------------------------------------------
239eaa41 504// wxDataViewCtrlBase
f554a14b 505// ---------------------------------------------------------
239eaa41 506
c21f7aa1 507#define wxDV_SINGLE 0x0000 // for convenience
9861f022
RR
508#define wxDV_MULTIPLE 0x0001 // can select multiple items
509
510#define wxDV_NO_HEADER 0x0002 // column titles not visible
511#define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
512#define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
c21f7aa1 513
1a07a730 514#define wxDV_ROW_LINES 0x0010 // alternating colour in rows
344ed1f3 515#define wxDV_VARIABLE_LINE_HEIGHT 0x0020 // variable line height
1a07a730 516
f460c29d 517class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
239eaa41
RR
518{
519public:
520 wxDataViewCtrlBase();
d3c7fc99 521 virtual ~wxDataViewCtrlBase();
f554a14b 522
ce468dc2
FM
523 // model
524 // -----
525
e0062c04
RR
526 virtual bool AssociateModel( wxDataViewModel *model );
527 wxDataViewModel* GetModel();
a75124d0 528 const wxDataViewModel* GetModel() const;
f554a14b 529
ce468dc2
FM
530
531 // column management
532 // -----------------
533
b5ec7dd6 534 wxDataViewColumn *PrependTextColumn( const wxString &label, unsigned int model_column,
736fe67c 535 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 536 wxAlignment align = wxALIGN_NOT,
736fe67c 537 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6 538 wxDataViewColumn *PrependIconTextColumn( const wxString &label, unsigned int model_column,
736fe67c 539 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 540 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
541 int flags = wxDATAVIEW_COL_RESIZABLE );
542 wxDataViewColumn *PrependToggleColumn( const wxString &label, unsigned int model_column,
543 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
544 wxAlignment align = wxALIGN_CENTER,
545 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6 546 wxDataViewColumn *PrependProgressColumn( const wxString &label, unsigned int model_column,
736fe67c
RR
547 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
548 wxAlignment align = wxALIGN_CENTER,
549 int flags = wxDATAVIEW_COL_RESIZABLE );
550 wxDataViewColumn *PrependDateColumn( const wxString &label, unsigned int model_column,
551 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
56873923 552 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
553 int flags = wxDATAVIEW_COL_RESIZABLE );
554 wxDataViewColumn *PrependBitmapColumn( const wxString &label, unsigned int model_column,
555 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
556 wxAlignment align = wxALIGN_CENTER,
557 int flags = wxDATAVIEW_COL_RESIZABLE );
558 wxDataViewColumn *PrependTextColumn( const wxBitmap &label, unsigned int model_column,
559 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 560 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
561 int flags = wxDATAVIEW_COL_RESIZABLE );
562 wxDataViewColumn *PrependIconTextColumn( const wxBitmap &label, unsigned int model_column,
563 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 564 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
565 int flags = wxDATAVIEW_COL_RESIZABLE );
566 wxDataViewColumn *PrependToggleColumn( const wxBitmap &label, unsigned int model_column,
567 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
568 wxAlignment align = wxALIGN_CENTER,
569 int flags = wxDATAVIEW_COL_RESIZABLE );
570 wxDataViewColumn *PrependProgressColumn( const wxBitmap &label, unsigned int model_column,
571 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
572 wxAlignment align = wxALIGN_CENTER,
573 int flags = wxDATAVIEW_COL_RESIZABLE );
574 wxDataViewColumn *PrependDateColumn( const wxBitmap &label, unsigned int model_column,
575 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
56873923 576 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
577 int flags = wxDATAVIEW_COL_RESIZABLE );
578 wxDataViewColumn *PrependBitmapColumn( const wxBitmap &label, unsigned int model_column,
579 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
580 wxAlignment align = wxALIGN_CENTER,
581 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6
VZ
582
583 wxDataViewColumn *AppendTextColumn( const wxString &label, unsigned int model_column,
87f0efe2 584 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 585 wxAlignment align = wxALIGN_NOT,
87f0efe2 586 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6 587 wxDataViewColumn *AppendIconTextColumn( const wxString &label, unsigned int model_column,
b04fcede 588 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 589 wxAlignment align = wxALIGN_NOT,
b04fcede 590 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 591 wxDataViewColumn *AppendToggleColumn( const wxString &label, unsigned int model_column,
87f0efe2
RR
592 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
593 wxAlignment align = wxALIGN_CENTER,
594 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6 595 wxDataViewColumn *AppendProgressColumn( const wxString &label, unsigned int model_column,
87f0efe2
RR
596 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
597 wxAlignment align = wxALIGN_CENTER,
598 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 599 wxDataViewColumn *AppendDateColumn( const wxString &label, unsigned int model_column,
87f0efe2 600 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
56873923 601 wxAlignment align = wxALIGN_NOT,
87f0efe2 602 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 603 wxDataViewColumn *AppendBitmapColumn( const wxString &label, unsigned int model_column,
87f0efe2
RR
604 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
605 wxAlignment align = wxALIGN_CENTER,
606 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 607 wxDataViewColumn *AppendTextColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2 608 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 609 wxAlignment align = wxALIGN_NOT,
87f0efe2 610 int flags = wxDATAVIEW_COL_RESIZABLE );
b04fcede
RR
611 wxDataViewColumn *AppendIconTextColumn( const wxBitmap &label, unsigned int model_column,
612 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 613 wxAlignment align = wxALIGN_NOT,
b04fcede 614 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 615 wxDataViewColumn *AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2
RR
616 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
617 wxAlignment align = wxALIGN_CENTER,
618 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 619 wxDataViewColumn *AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2
RR
620 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
621 wxAlignment align = wxALIGN_CENTER,
622 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 623 wxDataViewColumn *AppendDateColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2 624 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
56873923 625 wxAlignment align = wxALIGN_NOT,
87f0efe2 626 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 627 wxDataViewColumn *AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2
RR
628 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
629 wxAlignment align = wxALIGN_CENTER,
630 int flags = wxDATAVIEW_COL_RESIZABLE );
736fe67c 631
736fe67c 632 virtual bool PrependColumn( wxDataViewColumn *col );
19723525 633 virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
f554a14b 634 virtual bool AppendColumn( wxDataViewColumn *col );
9861f022 635
91a6c655
RR
636 virtual unsigned int GetColumnCount() const = 0;
637 virtual wxDataViewColumn* GetColumn( unsigned int pos ) const = 0;
453091c2 638 virtual int GetColumnPosition( const wxDataViewColumn *column ) const = 0;
b5ec7dd6 639
91a6c655
RR
640 virtual bool DeleteColumn( wxDataViewColumn *column ) = 0;
641 virtual bool ClearColumns() = 0;
b5ec7dd6 642
1b27b2bd 643 void SetExpanderColumn( wxDataViewColumn *col )
3b6280be 644 { m_expander_column = col ; DoSetExpanderColumn(); }
b5ec7dd6 645 wxDataViewColumn *GetExpanderColumn() const
3b6280be 646 { return m_expander_column; }
b5ec7dd6 647
21f47fb9 648 virtual wxDataViewColumn *GetSortingColumn() const = 0;
23318a53 649
ce468dc2
FM
650
651 // items management
652 // ----------------
653
3b6280be
RR
654 void SetIndent( int indent )
655 { m_indent = indent ; DoSetIndent(); }
b5ec7dd6
VZ
656 int GetIndent() const
657 { return m_indent; }
3b6280be 658
80ce465c
VZ
659 // Current item is the one used by the keyboard navigation, it is the same
660 // as the (unique) selected item in single selection mode so these
661 // functions are mostly useful for controls with wxDV_MULTIPLE style.
662 wxDataViewItem GetCurrentItem() const;
663 void SetCurrentItem(const wxDataViewItem& item);
664
ee1377e1
VS
665 // Currently focused column of the current item or NULL if no column has focus
666 virtual wxDataViewColumn *GetCurrentColumn() const = 0;
667
fa93d732
VZ
668 // Selection: both GetSelection() and GetSelections() can be used for the
669 // controls both with and without wxDV_MULTIPLE style. For single selection
670 // controls GetSelections() is not very useful however. And for multi
671 // selection controls GetSelection() returns an invalid item if more than
672 // one item is selected. Use GetSelectedItemsCount() or HasSelection() to
673 // check if any items are selected at all.
674 virtual int GetSelectedItemsCount() const = 0;
675 bool HasSelection() const { return GetSelectedItemsCount() != 0; }
676 wxDataViewItem GetSelection() const;
b7e9f8b1
RR
677 virtual int GetSelections( wxDataViewItemArray & sel ) const = 0;
678 virtual void SetSelections( const wxDataViewItemArray & sel ) = 0;
679 virtual void Select( const wxDataViewItem & item ) = 0;
680 virtual void Unselect( const wxDataViewItem & item ) = 0;
681 virtual bool IsSelected( const wxDataViewItem & item ) const = 0;
682
b7e9f8b1
RR
683 virtual void SelectAll() = 0;
684 virtual void UnselectAll() = 0;
685
f71d3ba4 686 virtual void Expand( const wxDataViewItem & item ) = 0;
4219d8b0 687 virtual void ExpandAncestors( const wxDataViewItem & item );
f71d3ba4 688 virtual void Collapse( const wxDataViewItem & item ) = 0;
739a8399 689 virtual bool IsExpanded( const wxDataViewItem & item ) const = 0;
f71d3ba4 690
6154212e 691 virtual void EnsureVisible( const wxDataViewItem & item,
4219d8b0 692 const wxDataViewColumn *column = NULL ) = 0;
a87b466d 693 virtual void HitTest( const wxPoint & point, wxDataViewItem &item, wxDataViewColumn* &column ) const = 0;
fbda518c 694 virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const = 0;
bbfd4548
VZ
695
696 virtual bool SetRowHeight( int WXUNUSED(rowHeight) ) { return false; }
697
907f09f4
VS
698 virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column) = 0;
699
700 // Use EditItem() instead
701 wxDEPRECATED( void StartEditor(const wxDataViewItem& item, unsigned int column) );
8c2654ce 702
f54e5c1a
VZ
703#if wxUSE_DRAG_AND_DROP
704 virtual bool EnableDragSource(const wxDataFormat& WXUNUSED(format))
705 { return false; }
706 virtual bool EnableDropTarget(const wxDataFormat& WXUNUSED(format))
707 { return false; }
708#endif // wxUSE_DRAG_AND_DROP
b7e9f8b1 709
2fa90e33
VZ
710 // define control visual attributes
711 // --------------------------------
712
713 virtual wxVisualAttributes GetDefaultAttributes() const
714 {
715 return GetClassDefaultAttributes(GetWindowVariant());
716 }
717
718 static wxVisualAttributes
719 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL)
720 {
721 return wxControl::GetCompositeControlsDefaultAttributes(variant);
722 }
723
3b6280be
RR
724protected:
725 virtual void DoSetExpanderColumn() = 0 ;
726 virtual void DoSetIndent() = 0;
727
239eaa41 728private:
80ce465c
VZ
729 // Implementation of the public Set/GetCurrentItem() methods which are only
730 // called in multi selection case (for single selection controls their
731 // implementation is trivial and is done in the base class itself).
732 virtual wxDataViewItem DoGetCurrentItem() const = 0;
733 virtual void DoSetCurrentItem(const wxDataViewItem& item) = 0;
734
e0062c04 735 wxDataViewModel *m_model;
1b27b2bd 736 wxDataViewColumn *m_expander_column;
3b6280be 737 int m_indent ;
b5ec7dd6 738
239eaa41 739protected:
260b9be7 740 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase)
239eaa41 741};
bcd846ea 742
eb7f97f8
RR
743// ----------------------------------------------------------------------------
744// wxDataViewEvent - the event class for the wxDataViewCtrl notifications
745// ----------------------------------------------------------------------------
746
2f799ae8 747class WXDLLIMPEXP_ADV wxDataViewEvent : public wxNotifyEvent
eb7f97f8
RR
748{
749public:
750 wxDataViewEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
751 : wxNotifyEvent(commandType, winid),
e0062c04 752 m_item(0),
eb7f97f8 753 m_col(-1),
eb7f97f8
RR
754 m_model(NULL),
755 m_value(wxNullVariant),
6af3eec2 756 m_column(NULL),
47a8b1e1
VZ
757 m_pos(-1,-1),
758 m_cacheFrom(0),
2a648479
VZ
759 m_cacheTo(0),
760 m_editCancelled(false)
6effcb7c
FM
761#if wxUSE_DRAG_AND_DROP
762 , m_dataObject(NULL),
e4de825e
RR
763 m_dataBuffer(NULL),
764 m_dataSize(0)
6effcb7c 765#endif
eb7f97f8
RR
766 { }
767
768 wxDataViewEvent(const wxDataViewEvent& event)
769 : wxNotifyEvent(event),
e0062c04 770 m_item(event.m_item),
eb7f97f8 771 m_col(event.m_col),
eb7f97f8
RR
772 m_model(event.m_model),
773 m_value(event.m_value),
6af3eec2 774 m_column(event.m_column),
4bc3adad 775 m_pos(event.m_pos),
47a8b1e1 776 m_cacheFrom(event.m_cacheFrom),
2a648479
VZ
777 m_cacheTo(event.m_cacheTo),
778 m_editCancelled(event.m_editCancelled)
6effcb7c
FM
779#if wxUSE_DRAG_AND_DROP
780 , m_dataObject(event.m_dataObject),
e4de825e
RR
781 m_dataFormat(event.m_dataFormat),
782 m_dataBuffer(event.m_dataBuffer),
783 m_dataSize(event.m_dataSize)
6effcb7c 784#endif
eb7f97f8
RR
785 { }
786
e0062c04
RR
787 wxDataViewItem GetItem() const { return m_item; }
788 void SetItem( const wxDataViewItem &item ) { m_item = item; }
789
eb7f97f8
RR
790 int GetColumn() const { return m_col; }
791 void SetColumn( int col ) { m_col = col; }
9861f022 792
eb7f97f8
RR
793 wxDataViewModel* GetModel() const { return m_model; }
794 void SetModel( wxDataViewModel *model ) { m_model = model; }
9861f022 795
eb7f97f8
RR
796 const wxVariant &GetValue() const { return m_value; }
797 void SetValue( const wxVariant &value ) { m_value = value; }
798
2a648479
VZ
799 // for wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE only
800 bool IsEditCancelled() const { return m_editCancelled; }
801 void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
802
31fb32e1
RR
803 // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
804 void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
9861f022 805 wxDataViewColumn *GetDataViewColumn() const { return m_column; }
c058cafa 806
6af3eec2 807 // for wxEVT_DATAVIEW_CONTEXT_MENU only
5cfb6fee 808 wxPoint GetPosition() const { return m_pos; }
6af3eec2 809 void SetPosition( int x, int y ) { m_pos.x = x; m_pos.y = y; }
31fb32e1 810
47a8b1e1
VZ
811 // For wxEVT_COMMAND_DATAVIEW_CACHE_HINT
812 int GetCacheFrom() const { return m_cacheFrom; }
813 int GetCacheTo() const { return m_cacheTo; }
814 void SetCache(int from, int to) { m_cacheFrom = from; m_cacheTo = to; }
815
816
62c9b3d7 817#if wxUSE_DRAG_AND_DROP
e4de825e 818 // For drag operations
591cc82d 819 void SetDataObject( wxDataObject *obj ) { m_dataObject = obj; }
e4de825e 820 wxDataObject *GetDataObject() const { return m_dataObject; }
8c2654ce 821
e4de825e
RR
822 // For drop operations
823 void SetDataFormat( const wxDataFormat &format ) { m_dataFormat = format; }
824 wxDataFormat GetDataFormat() const { return m_dataFormat; }
825 void SetDataSize( size_t size ) { m_dataSize = size; }
826 size_t GetDataSize() const { return m_dataSize; }
827 void SetDataBuffer( void* buf ) { m_dataBuffer = buf;}
828 void *GetDataBuffer() const { return m_dataBuffer; }
664e1314 829#endif // wxUSE_DRAG_AND_DROP
15cac64f 830
eb7f97f8
RR
831 virtual wxEvent *Clone() const { return new wxDataViewEvent(*this); }
832
833protected:
e0062c04 834 wxDataViewItem m_item;
eb7f97f8 835 int m_col;
eb7f97f8
RR
836 wxDataViewModel *m_model;
837 wxVariant m_value;
31fb32e1 838 wxDataViewColumn *m_column;
6af3eec2 839 wxPoint m_pos;
47a8b1e1
VZ
840 int m_cacheFrom;
841 int m_cacheTo;
2a648479 842 bool m_editCancelled;
8c2654ce 843
5e14f15d 844#if wxUSE_DRAG_AND_DROP
591cc82d 845 wxDataObject *m_dataObject;
8c2654ce 846
e4de825e
RR
847 wxDataFormat m_dataFormat;
848 void* m_dataBuffer;
849 size_t m_dataSize;
5e14f15d 850#endif // wxUSE_DRAG_AND_DROP
eb7f97f8
RR
851
852private:
853 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent)
854};
855
9b11752c
VZ
856wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent );
857
858wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent );
859wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent );
860wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent );
861wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent );
862wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent );
3e978cf7 863wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent );
9b11752c
VZ
864wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent );
865wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent );
866wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent );
867
868wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent );
869
870wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent );
871wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent );
872wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEvent );
873wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent );
874
47a8b1e1
VZ
875wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_CACHE_HINT, wxDataViewEvent );
876
9b11752c
VZ
877wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent );
878wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent );
879wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DROP, wxDataViewEvent );
15cac64f 880
eb7f97f8
RR
881typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
882
883#define wxDataViewEventHandler(func) \
3c778901 884 wxEVENT_HANDLER_CAST(wxDataViewEventFunction, func)
eb7f97f8
RR
885
886#define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
887 wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
888
d86c1870
RR
889#define EVT_DATAVIEW_SELECTION_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(SELECTION_CHANGED, id, fn)
890
e0062c04 891#define EVT_DATAVIEW_ITEM_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_ACTIVATED, id, fn)
6977c3bf 892#define EVT_DATAVIEW_ITEM_COLLAPSING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSING, id, fn)
3ecb8a53 893#define EVT_DATAVIEW_ITEM_COLLAPSED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSED, id, fn)
6977c3bf 894#define EVT_DATAVIEW_ITEM_EXPANDING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDING, id, fn)
3ecb8a53 895#define EVT_DATAVIEW_ITEM_EXPANDED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDED, id, fn)
3e978cf7 896#define EVT_DATAVIEW_ITEM_START_EDITING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_START_EDITING, id, fn)
e0000f94
RR
897#define EVT_DATAVIEW_ITEM_EDITING_STARTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_STARTED, id, fn)
898#define EVT_DATAVIEW_ITEM_EDITING_DONE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_DONE, id, fn)
6608fdab 899#define EVT_DATAVIEW_ITEM_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_VALUE_CHANGED, id, fn)
e0000f94 900
6af3eec2
RR
901#define EVT_DATAVIEW_ITEM_CONTEXT_MENU(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_CONTEXT_MENU, id, fn)
902
31fb32e1
RR
903#define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
904#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
c0a66d92 905#define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
e483dfcb 906#define EVT_DATAVIEW_COLUMN_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_REORDERED, id, fn)
47a8b1e1 907#define EVT_DATAVIEW_CACHE_HINT(id, fn) wx__DECLARE_DATAVIEWEVT(CACHE_HINT, id, fn)
eb7f97f8 908
591cc82d 909#define EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_BEGIN_DRAG, id, fn)
e4de825e
RR
910#define EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP_POSSIBLE, id, fn)
911#define EVT_DATAVIEW_ITEM_DROP(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP, id, fn)
fe9fb970 912
56873923 913#ifdef wxHAS_GENERIC_DATAVIEWCTRL
56873923
VZ
914 #include "wx/generic/dataview.h"
915#elif defined(__WXGTK20__)
bcd846ea 916 #include "wx/gtk/dataview.h"
56873923 917#elif defined(__WXMAC__)
ef0e9220 918 #include "wx/osx/dataview.h"
bcd846ea 919#else
56873923 920 #error "unknown native wxDataViewCtrl implementation"
bcd846ea
RR
921#endif
922
8eff6c56
RR
923//-----------------------------------------------------------------------------
924// wxDataViewListStore
925//-----------------------------------------------------------------------------
926
927class WXDLLIMPEXP_ADV wxDataViewListStoreLine
928{
929public:
930 wxDataViewListStoreLine( wxClientData *data = NULL )
931 {
932 m_data = data;
933 }
934 virtual ~wxDataViewListStoreLine()
935 {
936 delete m_data;
937 }
938
939 void SetData( wxClientData *data )
940 { if (m_data) delete m_data; m_data = data; }
941 wxClientData *GetData() const
942 { return m_data; }
8c2654ce 943
8eff6c56 944 wxVector<wxVariant> m_values;
8c2654ce 945
8eff6c56
RR
946private:
947 wxClientData *m_data;
948};
949
950
951class WXDLLIMPEXP_ADV wxDataViewListStore: public wxDataViewIndexListModel
952{
953public:
954 wxDataViewListStore();
955 ~wxDataViewListStore();
956
957 void PrependColumn( const wxString &varianttype );
958 void InsertColumn( unsigned int pos, const wxString &varianttype );
959 void AppendColumn( const wxString &varianttype );
8c2654ce 960
8eff6c56
RR
961 void AppendItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
962 void PrependItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
963 void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxClientData *data = NULL );
8af28fab 964 void DeleteItem( unsigned int pos );
8eff6c56
RR
965 void DeleteAllItems();
966
8eff6c56
RR
967 // override base virtuals
968
969 virtual unsigned int GetColumnCount() const;
970
971 virtual wxString GetColumnType( unsigned int col ) const;
972
973 virtual void GetValueByRow( wxVariant &value,
974 unsigned int row, unsigned int col ) const;
975
976 virtual bool SetValueByRow( const wxVariant &value,
977 unsigned int row, unsigned int col );
978
8c2654ce 979
8eff6c56
RR
980public:
981 wxVector<wxDataViewListStoreLine*> m_data;
982 wxArrayString m_cols;
983};
984
dc813e6c
RR
985//-----------------------------------------------------------------------------
986
987class WXDLLIMPEXP_ADV wxDataViewListCtrl: public wxDataViewCtrl
988{
989public:
990 wxDataViewListCtrl();
991 wxDataViewListCtrl( wxWindow *parent, wxWindowID id,
992 const wxPoint& pos = wxDefaultPosition,
993 const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES,
994 const wxValidator& validator = wxDefaultValidator );
995 ~wxDataViewListCtrl();
996
997 bool Create( wxWindow *parent, wxWindowID id,
998 const wxPoint& pos = wxDefaultPosition,
999 const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES,
1000 const wxValidator& validator = wxDefaultValidator );
1001
1002 wxDataViewListStore *GetStore()
1003 { return (wxDataViewListStore*) GetModel(); }
1004 const wxDataViewListStore *GetStore() const
1005 { return (const wxDataViewListStore*) GetModel(); }
1006
17de95e4 1007 int ItemToRow(const wxDataViewItem &item) const
780e4fd0 1008 { return item.IsOk() ? (int)GetStore()->GetRow(item) : wxNOT_FOUND; }
17de95e4
VS
1009 wxDataViewItem RowToItem(int row) const
1010 { return row == wxNOT_FOUND ? wxDataViewItem() : GetStore()->GetItem(row); }
1011
fa629ada
VS
1012 int GetSelectedRow() const
1013 { return ItemToRow(GetSelection()); }
1014 void SelectRow(unsigned row)
1015 { Select(RowToItem(row)); }
1016 void UnselectRow(unsigned row)
1017 { Unselect(RowToItem(row)); }
1018 bool IsRowSelected(unsigned row) const
1019 { return IsSelected(RowToItem(row)); }
1020
95b20f41
RR
1021 bool AppendColumn( wxDataViewColumn *column, const wxString &varianttype );
1022 bool PrependColumn( wxDataViewColumn *column, const wxString &varianttype );
1023 bool InsertColumn( unsigned int pos, wxDataViewColumn *column, const wxString &varianttype );
8c2654ce 1024
95b20f41
RR
1025 // overridden from base class
1026 virtual bool PrependColumn( wxDataViewColumn *col );
1027 virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
1028 virtual bool AppendColumn( wxDataViewColumn *col );
1029
f54e5c1a
VZ
1030 wxDataViewColumn *AppendTextColumn( const wxString &label,
1031 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
dc813e6c 1032 int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
f54e5c1a
VZ
1033 wxDataViewColumn *AppendToggleColumn( const wxString &label,
1034 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
dc813e6c 1035 int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
f54e5c1a
VZ
1036 wxDataViewColumn *AppendProgressColumn( const wxString &label,
1037 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
dc813e6c 1038 int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
f54e5c1a
VZ
1039 wxDataViewColumn *AppendIconTextColumn( const wxString &label,
1040 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
dc813e6c
RR
1041 int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
1042
1043 void AppendItem( const wxVector<wxVariant> &values, wxClientData *data = NULL )
1044 { GetStore()->AppendItem( values, data ); }
1045 void PrependItem( const wxVector<wxVariant> &values, wxClientData *data = NULL )
1046 { GetStore()->PrependItem( values, data ); }
1047 void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxClientData *data = NULL )
1048 { GetStore()->InsertItem( row, values, data ); }
1049 void DeleteItem( unsigned row )
1050 { GetStore()->DeleteItem( row ); }
1051 void DeleteAllItems()
1052 { GetStore()->DeleteAllItems(); }
1053
1054 void SetValue( const wxVariant &value, unsigned int row, unsigned int col )
f54e5c1a 1055 { GetStore()->SetValueByRow( value, row, col );
832df171
RR
1056 GetStore()->RowValueChanged( row, col); }
1057 void GetValue( wxVariant &value, unsigned int row, unsigned int col )
1058 { GetStore()->GetValueByRow( value, row, col ); }
dc813e6c
RR
1059
1060 void SetTextValue( const wxString &value, unsigned int row, unsigned int col )
832df171
RR
1061 { GetStore()->SetValueByRow( value, row, col );
1062 GetStore()->RowValueChanged( row, col); }
dc813e6c
RR
1063 wxString GetTextValue( unsigned int row, unsigned int col ) const
1064 { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetString(); }
1065
1066 void SetToggleValue( bool value, unsigned int row, unsigned int col )
832df171
RR
1067 { GetStore()->SetValueByRow( value, row, col );
1068 GetStore()->RowValueChanged( row, col); }
dc813e6c
RR
1069 bool GetToggleValue( unsigned int row, unsigned int col ) const
1070 { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetBool(); }
1071
1072 void OnSize( wxSizeEvent &event );
1073
1074private:
1075 DECLARE_EVENT_TABLE()
1076 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewListCtrl)
1077};
8eff6c56 1078
e94d0c1e
RR
1079//-----------------------------------------------------------------------------
1080// wxDataViewTreeStore
1081//-----------------------------------------------------------------------------
1082
1083class WXDLLIMPEXP_ADV wxDataViewTreeStoreNode
1084{
1085public:
1086 wxDataViewTreeStoreNode( wxDataViewTreeStoreNode *parent,
1087 const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL );
1088 virtual ~wxDataViewTreeStoreNode();
b5ec7dd6
VZ
1089
1090 void SetText( const wxString &text )
e94d0c1e
RR
1091 { m_text = text; }
1092 wxString GetText() const
1093 { return m_text; }
1094 void SetIcon( const wxIcon &icon )
1095 { m_icon = icon; }
1096 const wxIcon &GetIcon() const
1097 { return m_icon; }
1098 void SetData( wxClientData *data )
1099 { if (m_data) delete m_data; m_data = data; }
1100 wxClientData *GetData() const
1101 { return m_data; }
b5ec7dd6 1102
e94d0c1e
RR
1103 wxDataViewItem GetItem() const
1104 { return wxDataViewItem( (void*) this ); }
b5ec7dd6 1105
e94d0c1e
RR
1106 virtual bool IsContainer()
1107 { return false; }
b5ec7dd6 1108
e94d0c1e
RR
1109 wxDataViewTreeStoreNode *GetParent()
1110 { return m_parent; }
b5ec7dd6 1111
e94d0c1e
RR
1112private:
1113 wxDataViewTreeStoreNode *m_parent;
1114 wxString m_text;
1115 wxIcon m_icon;
1116 wxClientData *m_data;
1117};
1118
1119WX_DECLARE_LIST_WITH_DECL(wxDataViewTreeStoreNode, wxDataViewTreeStoreNodeList,
1120 class WXDLLIMPEXP_ADV);
1121
1122class WXDLLIMPEXP_ADV wxDataViewTreeStoreContainerNode: public wxDataViewTreeStoreNode
1123{
1124public:
b5ec7dd6
VZ
1125 wxDataViewTreeStoreContainerNode( wxDataViewTreeStoreNode *parent,
1126 const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon,
e94d0c1e
RR
1127 wxClientData *data = NULL );
1128 virtual ~wxDataViewTreeStoreContainerNode();
1129
b5ec7dd6 1130 const wxDataViewTreeStoreNodeList &GetChildren() const
e94d0c1e 1131 { return m_children; }
b5ec7dd6 1132 wxDataViewTreeStoreNodeList &GetChildren()
e94d0c1e
RR
1133 { return m_children; }
1134
1135 void SetExpandedIcon( const wxIcon &icon )
1136 { m_iconExpanded = icon; }
1137 const wxIcon &GetExpandedIcon() const
1138 { return m_iconExpanded; }
b5ec7dd6 1139
a75124d0
RR
1140 void SetExpanded( bool expanded = true )
1141 { m_isExpanded = expanded; }
1142 bool IsExpanded() const
1143 { return m_isExpanded; }
1144
e94d0c1e
RR
1145 virtual bool IsContainer()
1146 { return true; }
b5ec7dd6 1147
e94d0c1e
RR
1148private:
1149 wxDataViewTreeStoreNodeList m_children;
1150 wxIcon m_iconExpanded;
a75124d0 1151 bool m_isExpanded;
e94d0c1e
RR
1152};
1153
1154//-----------------------------------------------------------------------------
1155
1156class WXDLLIMPEXP_ADV wxDataViewTreeStore: public wxDataViewModel
1157{
1158public:
1159 wxDataViewTreeStore();
1160 ~wxDataViewTreeStore();
1161
b5ec7dd6 1162 wxDataViewItem AppendItem( const wxDataViewItem& parent,
e94d0c1e
RR
1163 const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL );
1164 wxDataViewItem PrependItem( const wxDataViewItem& parent,
1165 const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL );
1166 wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous,
1167 const wxString &text, const wxIcon &icon = wxNullIcon, wxClientData *data = NULL );
b5ec7dd6
VZ
1168
1169 wxDataViewItem PrependContainer( const wxDataViewItem& parent,
1170 const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon,
e94d0c1e
RR
1171 wxClientData *data = NULL );
1172 wxDataViewItem AppendContainer( const wxDataViewItem& parent,
b5ec7dd6 1173 const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon,
e94d0c1e
RR
1174 wxClientData *data = NULL );
1175 wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous,
b5ec7dd6 1176 const wxString &text, const wxIcon &icon = wxNullIcon, const wxIcon &expanded = wxNullIcon,
e94d0c1e
RR
1177 wxClientData *data = NULL );
1178
1179 wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const;
1180 int GetChildCount( const wxDataViewItem& parent ) const;
ce00f59b 1181
e94d0c1e
RR
1182 void SetItemText( const wxDataViewItem& item, const wxString &text );
1183 wxString GetItemText( const wxDataViewItem& item ) const;
b5ec7dd6 1184 void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon );
e94d0c1e
RR
1185 const wxIcon &GetItemIcon( const wxDataViewItem& item ) const;
1186 void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon );
1187 const wxIcon &GetItemExpandedIcon( const wxDataViewItem& item ) const;
1188 void SetItemData( const wxDataViewItem& item, wxClientData *data );
1189 wxClientData *GetItemData( const wxDataViewItem& item ) const;
1190
1191 void DeleteItem( const wxDataViewItem& item );
1192 void DeleteChildren( const wxDataViewItem& item );
1193 void DeleteAllItems();
b5ec7dd6 1194
e94d0c1e
RR
1195 // implement base methods
1196
b5ec7dd6 1197 virtual void GetValue( wxVariant &variant,
e94d0c1e 1198 const wxDataViewItem &item, unsigned int col ) const;
b5ec7dd6 1199 virtual bool SetValue( const wxVariant &variant,
e94d0c1e
RR
1200 const wxDataViewItem &item, unsigned int col );
1201 virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
1202 virtual bool IsContainer( const wxDataViewItem &item ) const;
1203 virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
1204
b5ec7dd6 1205 virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
862de7b3 1206 unsigned int column, bool ascending ) const;
b5ec7dd6
VZ
1207
1208 virtual bool HasDefaultCompare() const
e94d0c1e 1209 { return true; }
b5ec7dd6 1210 virtual unsigned int GetColumnCount() const
6dd0883d 1211 { return 1; }
b5ec7dd6 1212 virtual wxString GetColumnType( unsigned int WXUNUSED(col) ) const
594d5596 1213 { return wxT("wxDataViewIconText"); }
b5ec7dd6 1214
e94d0c1e
RR
1215 wxDataViewTreeStoreNode *FindNode( const wxDataViewItem &item ) const;
1216 wxDataViewTreeStoreContainerNode *FindContainerNode( const wxDataViewItem &item ) const;
1217 wxDataViewTreeStoreNode *GetRoot() const { return m_root; }
b5ec7dd6 1218
e94d0c1e
RR
1219public:
1220 wxDataViewTreeStoreNode *m_root;
1221};
1222
dc813e6c
RR
1223//-----------------------------------------------------------------------------
1224
abfdefed
VZ
1225class WXDLLIMPEXP_ADV wxDataViewTreeCtrl: public wxDataViewCtrl,
1226 public wxWithImages
e94d0c1e
RR
1227{
1228public:
abfdefed 1229 wxDataViewTreeCtrl() { }
43c64cc6
VZ
1230 wxDataViewTreeCtrl(wxWindow *parent,
1231 wxWindowID id,
1232 const wxPoint& pos = wxDefaultPosition,
1233 const wxSize& size = wxDefaultSize,
1234 long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
1235 const wxValidator& validator = wxDefaultValidator)
1236 {
43c64cc6
VZ
1237 Create(parent, id, pos, size, style, validator);
1238 }
1239
43c64cc6
VZ
1240 bool Create(wxWindow *parent,
1241 wxWindowID id,
1242 const wxPoint& pos = wxDefaultPosition,
1243 const wxSize& size = wxDefaultSize,
1244 long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
1245 const wxValidator& validator = wxDefaultValidator);
e94d0c1e
RR
1246
1247 wxDataViewTreeStore *GetStore()
1248 { return (wxDataViewTreeStore*) GetModel(); }
a75124d0
RR
1249 const wxDataViewTreeStore *GetStore() const
1250 { return (const wxDataViewTreeStore*) GetModel(); }
b5ec7dd6 1251
8ddda15b
RR
1252 bool IsContainer( const wxDataViewItem& item ) const
1253 { return GetStore()->IsContainer(item); }
1254
a75124d0 1255 wxDataViewItem AppendItem( const wxDataViewItem& parent,
1871b9fa 1256 const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
a75124d0 1257 wxDataViewItem PrependItem( const wxDataViewItem& parent,
1871b9fa 1258 const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
a75124d0 1259 wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous,
1871b9fa 1260 const wxString &text, int icon = NO_IMAGE, wxClientData *data = NULL );
a75124d0
RR
1261
1262 wxDataViewItem PrependContainer( const wxDataViewItem& parent,
1871b9fa 1263 const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
a75124d0
RR
1264 wxClientData *data = NULL );
1265 wxDataViewItem AppendContainer( const wxDataViewItem& parent,
1871b9fa 1266 const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
a75124d0
RR
1267 wxClientData *data = NULL );
1268 wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous,
1871b9fa 1269 const wxString &text, int icon = NO_IMAGE, int expanded = NO_IMAGE,
a75124d0
RR
1270 wxClientData *data = NULL );
1271
1272 wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const
1273 { return GetStore()->GetNthChild(parent, pos); }
1274 int GetChildCount( const wxDataViewItem& parent ) const
1275 { return GetStore()->GetChildCount(parent); }
1276
e700e296 1277 void SetItemText( const wxDataViewItem& item, const wxString &text );
a75124d0
RR
1278 wxString GetItemText( const wxDataViewItem& item ) const
1279 { return GetStore()->GetItemText(item); }
e700e296 1280 void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon );
a75124d0
RR
1281 const wxIcon &GetItemIcon( const wxDataViewItem& item ) const
1282 { return GetStore()->GetItemIcon(item); }
e700e296 1283 void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon );
a75124d0
RR
1284 const wxIcon &GetItemExpandedIcon( const wxDataViewItem& item ) const
1285 { return GetStore()->GetItemExpandedIcon(item); }
1286 void SetItemData( const wxDataViewItem& item, wxClientData *data )
1287 { GetStore()->SetItemData(item,data); }
1288 wxClientData *GetItemData( const wxDataViewItem& item ) const
1289 { return GetStore()->GetItemData(item); }
1290
e700e296
RR
1291 void DeleteItem( const wxDataViewItem& item );
1292 void DeleteChildren( const wxDataViewItem& item );
1293 void DeleteAllItems();
a75124d0
RR
1294
1295 void OnExpanded( wxDataViewEvent &event );
1296 void OnCollapsed( wxDataViewEvent &event );
1a07a730 1297 void OnSize( wxSizeEvent &event );
b5ec7dd6 1298
a75124d0
RR
1299private:
1300 DECLARE_EVENT_TABLE()
e94d0c1e
RR
1301 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl)
1302};
e94d0c1e 1303
bcd846ea
RR
1304#endif // wxUSE_DATAVIEWCTRL
1305
1306#endif
1307 // _WX_DATAVIEW_H_BASE_