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