]> git.saurik.com Git - wxWidgets.git/blame - include/wx/dataview.h
Typo
[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
RR
19#include "wx/control.h"
20#include "wx/textctrl.h"
56873923 21#include "wx/headercol.h"
64ffb888 22#include "wx/variant.h"
b7e9f8b1 23#include "wx/dynarray.h"
89352653 24#include "wx/icon.h"
a75124d0 25#include "wx/imaglist.h"
c232dfe5 26#include "wx/weakref.h"
8eff6c56 27#include "wx/vector.h"
4ed7af08 28
56873923 29#if !(defined(__WXGTK20__) || defined(__WXMAC__)) || defined(__WXUNIVERSAL__)
a881f34e 30// #if !(defined(__WXMAC__)) || defined(__WXUNIVERSAL__)
56873923
VZ
31 #define wxHAS_GENERIC_DATAVIEWCTRL
32#endif
33
5e6f8927
PC
34class WXDLLIMPEXP_FWD_CORE wxDataFormat;
35
bcd846ea 36// ----------------------------------------------------------------------------
f554a14b 37// wxDataViewCtrl flags
bcd846ea
RR
38// ----------------------------------------------------------------------------
39
239eaa41
RR
40// ----------------------------------------------------------------------------
41// wxDataViewCtrl globals
42// ----------------------------------------------------------------------------
bcd846ea 43
b5dbe15d
VS
44class WXDLLIMPEXP_FWD_ADV wxDataViewItem;
45class WXDLLIMPEXP_FWD_ADV wxDataViewModel;
46class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl;
47class WXDLLIMPEXP_FWD_ADV wxDataViewColumn;
48class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer;
49class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier;
fa28826d 50
23318a53 51extern WXDLLIMPEXP_DATA_ADV(const char) wxDataViewCtrlNameStr[];
bcd846ea 52
87f0efe2
RR
53// the default width of new (text) columns:
54#define wxDVC_DEFAULT_WIDTH 80
55
56// the default width of new toggle columns:
57#define wxDVC_TOGGLE_DEFAULT_WIDTH 30
58
9861f022
RR
59// the default minimal width of the columns:
60#define wxDVC_DEFAULT_MINWIDTH 30
61
f2b7492a
RR
62// The default alignment of wxDataViewRenderers is to take
63// the alignment from the column it owns.
64#define wxDVR_DEFAULT_ALIGNMENT -1
9861f022 65
87f0efe2 66
f554a14b 67// ---------------------------------------------------------
e0062c04 68// wxDataViewItem
f554a14b 69// ---------------------------------------------------------
239eaa41 70
e0062c04 71class WXDLLIMPEXP_ADV wxDataViewItem
239eaa41
RR
72{
73public:
b5ec7dd6 74 wxDataViewItem( void* id = NULL )
9d52aad3 75 { m_id = id; }
e0062c04 76 wxDataViewItem( const wxDataViewItem &item )
9d52aad3
RR
77 { m_id = item.m_id; }
78 bool IsOk() const { return m_id != NULL; }
79 void* GetID() const { return m_id; }
4f1cf94b 80 operator const void* () const { return m_id; }
b5ec7dd6 81
e94d0c1e 82#ifdef __WXDEBUG__
c3c62822 83 void Print( const wxString &text ) const;
e94d0c1e 84#endif
b5ec7dd6 85
8f850e28 86private:
9d52aad3 87 void* m_id;
64ffb888 88};
239eaa41 89
d5025dc0 90bool operator == (const wxDataViewItem &left, const wxDataViewItem &right);
aba9bfd0 91
cd722937
RR
92WX_DEFINE_ARRAY(wxDataViewItem, wxDataViewItemArray);
93
9d8fe14a
RR
94// ---------------------------------------------------------
95// wxDataViewModelNotifier
96// ---------------------------------------------------------
97
98class WXDLLIMPEXP_ADV wxDataViewModelNotifier
99{
100public:
5e6f8927 101 wxDataViewModelNotifier() { m_owner = NULL; }
9d8fe14a
RR
102 virtual ~wxDataViewModelNotifier() { m_owner = NULL; }
103
104 virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0;
105 virtual bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0;
106 virtual bool ItemChanged( const wxDataViewItem &item ) = 0;
854cdb09
RR
107 virtual bool ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items );
108 virtual bool ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items );
109 virtual bool ItemsChanged( const wxDataViewItemArray &items );
9d8fe14a
RR
110 virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col ) = 0;
111 virtual bool Cleared() = 0;
b5ec7dd6 112
d3f00f59 113 virtual void Resort() = 0;
9d8fe14a
RR
114
115 void SetOwner( wxDataViewModel *owner ) { m_owner = owner; }
e51bf699 116 wxDataViewModel *GetOwner() const { return m_owner; }
9d8fe14a
RR
117
118private:
119 wxDataViewModel *m_owner;
120};
121
122
4264606e
RR
123
124// ----------------------------------------------------------------------------
125// wxDataViewItemAttr: a structure containing the visual attributes of an item
126// ----------------------------------------------------------------------------
127
128// TODO: this should be renamed to wxItemAttr or something general like this
129
130class WXDLLIMPEXP_ADV wxDataViewItemAttr
131{
132public:
133 // ctors
c058cafa
VZ
134 wxDataViewItemAttr()
135 {
4264606e
RR
136 m_bold = false;
137 m_italic = false;
138 }
139
140 // setters
141 void SetColour(const wxColour& colour) { m_colour = colour; }
142 void SetBold( bool set ) { m_bold = set; }
143 void SetItalic( bool set ) { m_italic = set; }
c058cafa 144
4264606e
RR
145 // accessors
146 bool HasColour() const { return m_colour.Ok(); }
147 const wxColour& GetColour() const { return m_colour; }
c058cafa 148
4264606e
RR
149 bool GetBold() const { return m_bold; }
150 bool GetItalic() const { return m_italic; }
151
152private:
153 wxColour m_colour;
154 bool m_bold;
155 bool m_italic;
156};
157
158
f554a14b 159// ---------------------------------------------------------
e0062c04 160// wxDataViewModel
f554a14b 161// ---------------------------------------------------------
239eaa41 162
d350fbec
VS
163WX_DECLARE_LIST_WITH_DECL(wxDataViewModelNotifier, wxDataViewModelNotifiers,
164 class WXDLLIMPEXP_ADV);
9d8fe14a 165
e0062c04 166class WXDLLIMPEXP_ADV wxDataViewModel: public wxObjectRefData
239eaa41
RR
167{
168public:
e0062c04 169 wxDataViewModel();
239eaa41 170
9861f022 171 virtual unsigned int GetColumnCount() const = 0;
87f0efe2 172
a7f61f76 173 // return type as reported by wxVariant
9861f022 174 virtual wxString GetColumnType( unsigned int col ) const = 0;
87f0efe2 175
a7f61f76 176 // get value into a wxVariant
b5ec7dd6 177 virtual void GetValue( wxVariant &variant,
e0062c04 178 const wxDataViewItem &item, unsigned int col ) const = 0;
87f0efe2 179
a7f61f76 180 // set value, call ValueChanged() afterwards!
b5ec7dd6 181 virtual bool SetValue( const wxVariant &variant,
e0062c04 182 const wxDataViewItem &item, unsigned int col ) = 0;
239eaa41 183
4264606e
RR
184 // Get text attribute, return false of default attributes should be used
185 virtual bool GetAttr( const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col), wxDataViewItemAttr &WXUNUSED(attr) )
186 { return false; }
187
e0062c04 188 // define hierachy
ed903e42
RR
189 virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const = 0;
190 virtual bool IsContainer( const wxDataViewItem &item ) const = 0;
1e40f667 191 // Is the container just a header or an item with all columns
b5ec7dd6
VZ
192 virtual bool HasContainerColumns(const wxDataViewItem& WXUNUSED(item)) const
193 { return false; }
74fe973b 194 virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const = 0;
b9b8b59c 195
239eaa41 196 // delegated notifiers
e0062c04 197 virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item );
854cdb09 198 virtual bool ItemsAdded( const wxDataViewItem &parent, const wxDataViewItemArray &items );
469d3e9b 199 virtual bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item );
854cdb09 200 virtual bool ItemsDeleted( const wxDataViewItem &parent, const wxDataViewItemArray &items );
e0062c04 201 virtual bool ItemChanged( const wxDataViewItem &item );
854cdb09 202 virtual bool ItemsChanged( const wxDataViewItemArray &items );
e0062c04 203 virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col );
8981608c 204 virtual bool Cleared();
b5d777c7 205
ef427989
RR
206 // delegatd action
207 virtual void Resort();
208
e0062c04
RR
209 void AddNotifier( wxDataViewModelNotifier *notifier );
210 void RemoveNotifier( wxDataViewModelNotifier *notifier );
b5ec7dd6 211
ef427989 212 // default compare function
b5ec7dd6 213 virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
7ee7191c 214 unsigned int column, bool ascending );
09711964 215 virtual bool HasDefaultCompare() const { return false; }
c058cafa 216
2056dede 217 // internal
e39de702 218 virtual bool IsVirtualListModel() const { return false; }
66e09788 219
87f0efe2
RR
220protected:
221 // the user should not delete this class directly: he should use DecRef() instead!
5debbdcf 222 virtual ~wxDataViewModel() { }
87f0efe2 223
9d8fe14a 224 wxDataViewModelNotifiers m_notifiers;
ef427989
RR
225};
226
227// ---------------------------------------------------------
c534e696 228// wxDataViewIndexListModel
ef427989
RR
229// ---------------------------------------------------------
230
d350fbec 231class WXDLLIMPEXP_ADV wxDataViewIndexListModel: public wxDataViewModel
ef427989
RR
232{
233public:
c534e696 234 wxDataViewIndexListModel( unsigned int initial_size = 0 );
ef427989 235 ~wxDataViewIndexListModel();
b5ec7dd6 236
8eff6c56 237 virtual void GetValueByRow( wxVariant &variant,
ef427989
RR
238 unsigned int row, unsigned int col ) const = 0;
239
8eff6c56 240 virtual bool SetValueByRow( const wxVariant &variant,
ef427989 241 unsigned int row, unsigned int col ) = 0;
b5ec7dd6 242
8eff6c56 243 virtual bool GetAttrByRow( unsigned int WXUNUSED(row), unsigned int WXUNUSED(col), wxDataViewItemAttr &WXUNUSED(attr) )
4264606e 244 { return false; }
c058cafa 245
c534e696
RR
246 void RowPrepended();
247 void RowInserted( unsigned int before );
248 void RowAppended();
249 void RowDeleted( unsigned int row );
8b6cf9bf 250 void RowsDeleted( const wxArrayInt &rows );
c534e696
RR
251 void RowChanged( unsigned int row );
252 void RowValueChanged( unsigned int row, unsigned int col );
33ba5a05 253 void Reset( unsigned int new_size );
b5ec7dd6 254
c534e696 255 // convert to/from row/wxDataViewItem
b5ec7dd6 256
c534e696
RR
257 unsigned int GetRow( const wxDataViewItem &item ) const;
258 wxDataViewItem GetItem( unsigned int row ) const;
b5ec7dd6 259
c534e696 260 // compare based on index
b5ec7dd6
VZ
261
262 virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
7ee7191c 263 unsigned int column, bool ascending );
517166e6 264 virtual bool HasDefaultCompare() const;
c534e696
RR
265
266 // implement base methods
267
b5ec7dd6 268 virtual void GetValue( wxVariant &variant,
c534e696 269 const wxDataViewItem &item, unsigned int col ) const;
b5ec7dd6 270 virtual bool SetValue( const wxVariant &variant,
c534e696 271 const wxDataViewItem &item, unsigned int col );
4264606e 272 virtual bool GetAttr( const wxDataViewItem &item, unsigned int col, wxDataViewItemAttr &attr );
c534e696
RR
273 virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
274 virtual bool IsContainer( const wxDataViewItem &item ) const;
74fe973b 275 virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
b5ec7dd6 276
2056dede 277 // internal
e39de702 278 virtual bool IsVirtualListModel() const { return false; }
2056dede 279 unsigned int GetLastIndex() const { return m_lastIndex; }
c058cafa 280
c534e696 281private:
cd722937 282 wxDataViewItemArray m_hash;
c534e696 283 unsigned int m_lastIndex;
517166e6 284 bool m_ordered;
239eaa41
RR
285};
286
e39de702
RR
287// ---------------------------------------------------------
288// wxDataViewVirtualListModel
289// ---------------------------------------------------------
290
291#ifdef __WXMAC__
292// better than nothing
f1399150 293typedef wxDataViewIndexListModel wxDataViewVirtualListModel;
e39de702
RR
294#else
295
296class WXDLLIMPEXP_ADV wxDataViewVirtualListModel: public wxDataViewModel
297{
298public:
299 wxDataViewVirtualListModel( unsigned int initial_size = 0 );
300 ~wxDataViewVirtualListModel();
301
8eff6c56 302 virtual void GetValueByRow( wxVariant &variant,
e39de702
RR
303 unsigned int row, unsigned int col ) const = 0;
304
8eff6c56 305 virtual bool SetValueByRow( const wxVariant &variant,
e39de702
RR
306 unsigned int row, unsigned int col ) = 0;
307
8eff6c56 308 virtual bool GetAttrByRow( unsigned int WXUNUSED(row), unsigned int WXUNUSED(col), wxDataViewItemAttr &WXUNUSED(attr) )
e39de702
RR
309 { return false; }
310
311 void RowPrepended();
312 void RowInserted( unsigned int before );
313 void RowAppended();
314 void RowDeleted( unsigned int row );
315 void RowsDeleted( const wxArrayInt &rows );
316 void RowChanged( unsigned int row );
317 void RowValueChanged( unsigned int row, unsigned int col );
318 void Reset( unsigned int new_size );
319
320 // convert to/from row/wxDataViewItem
321
322 unsigned int GetRow( const wxDataViewItem &item ) const;
323 wxDataViewItem GetItem( unsigned int row ) const;
324
325 // compare based on index
326
327 virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
328 unsigned int column, bool ascending );
329 virtual bool HasDefaultCompare() const;
330
331 // implement base methods
332
333 virtual void GetValue( wxVariant &variant,
334 const wxDataViewItem &item, unsigned int col ) const;
335 virtual bool SetValue( const wxVariant &variant,
336 const wxDataViewItem &item, unsigned int col );
337 virtual bool GetAttr( const wxDataViewItem &item, unsigned int col, wxDataViewItemAttr &attr );
338 virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
339 virtual bool IsContainer( const wxDataViewItem &item ) const;
340 virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
341
342 // internal
343 virtual bool IsVirtualListModel() const { return true; }
344 unsigned int GetLastIndex() const { return m_lastIndex; }
345
346private:
347 wxDataViewItemArray m_hash;
348 unsigned int m_lastIndex;
349 bool m_ordered;
350};
351#endif
c33edc08 352
1e510b1e
RR
353//-----------------------------------------------------------------------------
354// wxDataViewEditorCtrlEvtHandler
355//-----------------------------------------------------------------------------
356
357class wxDataViewEditorCtrlEvtHandler: public wxEvtHandler
358{
359public:
360 wxDataViewEditorCtrlEvtHandler( wxControl *editor, wxDataViewRenderer *owner );
b5ec7dd6 361
1e510b1e 362 void AcceptChangesAndFinish();
30715fa1 363 void SetFocusOnIdle( bool focus = true ) { m_focusOnIdle = focus; }
1e510b1e
RR
364
365protected:
366 void OnChar( wxKeyEvent &event );
724852da 367 void OnTextEnter( wxCommandEvent &event );
1e510b1e 368 void OnKillFocus( wxFocusEvent &event );
30715fa1 369 void OnIdle( wxIdleEvent &event );
1e510b1e
RR
370
371private:
372 wxDataViewRenderer *m_owner;
373 wxControl *m_editorCtrl;
374 bool m_finished;
30715fa1 375 bool m_focusOnIdle;
1e510b1e
RR
376
377private:
378 DECLARE_EVENT_TABLE()
379};
380
f554a14b 381// ---------------------------------------------------------
baa9ebc4 382// wxDataViewRendererBase
f554a14b 383// ---------------------------------------------------------
fa28826d 384
6842a71a 385enum wxDataViewCellMode
fa28826d 386{
6842a71a
RR
387 wxDATAVIEW_CELL_INERT,
388 wxDATAVIEW_CELL_ACTIVATABLE,
389 wxDATAVIEW_CELL_EDITABLE
fa28826d
RR
390};
391
6842a71a
RR
392enum wxDataViewCellRenderState
393{
394 wxDATAVIEW_CELL_SELECTED = 1,
395 wxDATAVIEW_CELL_PRELIT = 2,
396 wxDATAVIEW_CELL_INSENSITIVE = 4,
397 wxDATAVIEW_CELL_FOCUSED = 8
398};
399
baa9ebc4 400class WXDLLIMPEXP_ADV wxDataViewRendererBase: public wxObject
6842a71a
RR
401{
402public:
b5ec7dd6 403 wxDataViewRendererBase( const wxString &varianttype,
9861f022
RR
404 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
405 int alignment = wxDVR_DEFAULT_ALIGNMENT );
c232dfe5 406 ~wxDataViewRendererBase();
6842a71a 407
9861f022
RR
408 virtual bool Validate( wxVariant& WXUNUSED(value) )
409 { return true; }
f554a14b 410
6842a71a 411 void SetOwner( wxDataViewColumn *owner ) { m_owner = owner; }
e51bf699 412 wxDataViewColumn* GetOwner() const { return m_owner; }
f554a14b 413
9861f022
RR
414 // renderer properties:
415
416 virtual bool SetValue( const wxVariant& WXUNUSED(value) ) = 0;
417 virtual bool GetValue( wxVariant& WXUNUSED(value) ) const = 0;
418
419 wxString GetVariantType() const { return m_variantType; }
420
421 virtual void SetMode( wxDataViewCellMode mode ) = 0;
422 virtual wxDataViewCellMode GetMode() const = 0;
423
424 // NOTE: Set/GetAlignment do not take/return a wxAlignment enum but
425 // rather an "int"; that's because for rendering cells it's allowed
426 // to combine alignment flags (e.g. wxALIGN_LEFT|wxALIGN_BOTTOM)
427 virtual void SetAlignment( int align ) = 0;
428 virtual int GetAlignment() const = 0;
b5ec7dd6 429
1e510b1e
RR
430 // in-place editing
431 virtual bool HasEditorCtrl()
432 { return false; }
96c2a0dd
VZ
433 virtual wxControl* CreateEditorCtrl(wxWindow * WXUNUSED(parent),
434 wxRect WXUNUSED(labelRect),
435 const wxVariant& WXUNUSED(value))
1e510b1e 436 { return NULL; }
96c2a0dd
VZ
437 virtual bool GetValueFromEditorCtrl(wxControl * WXUNUSED(editor),
438 wxVariant& WXUNUSED(value))
1e510b1e
RR
439 { return false; }
440
e0062c04 441 virtual bool StartEditing( const wxDataViewItem &item, wxRect labelRect );
1e510b1e
RR
442 virtual void CancelEditing();
443 virtual bool FinishEditing();
b5ec7dd6 444
1e510b1e 445 wxControl *GetEditorCtrl() { return m_editorCtrl; }
b5ec7dd6 446
a7f61f76 447protected:
6842a71a
RR
448 wxString m_variantType;
449 wxDataViewColumn *m_owner;
c232dfe5 450 wxWeakRef<wxControl> m_editorCtrl;
e0062c04 451 wxDataViewItem m_item; // for m_editorCtrl
6842a71a 452
9861f022
RR
453 // internal utility:
454 const wxDataViewCtrl* GetView() const;
455
6842a71a 456protected:
baa9ebc4 457 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase)
6842a71a
RR
458};
459
89352653
RR
460//-----------------------------------------------------------------------------
461// wxDataViewIconText
462//-----------------------------------------------------------------------------
463
d350fbec 464class WXDLLIMPEXP_ADV wxDataViewIconText: public wxObject
89352653
RR
465{
466public:
467 wxDataViewIconText( const wxString &text = wxEmptyString, const wxIcon& icon = wxNullIcon )
5e6f8927
PC
468 : m_text(text), m_icon(icon)
469 { }
89352653 470 wxDataViewIconText( const wxDataViewIconText &other )
4f271814 471 : wxObject()
344ed1f3 472 { m_icon = other.m_icon; m_text = other.m_text; }
89352653
RR
473
474 void SetText( const wxString &text ) { m_text = text; }
475 wxString GetText() const { return m_text; }
476 void SetIcon( const wxIcon &icon ) { m_icon = icon; }
477 const wxIcon &GetIcon() const { return m_icon; }
478
479private:
480 wxString m_text;
481 wxIcon m_icon;
482
483private:
484 DECLARE_DYNAMIC_CLASS(wxDataViewIconText)
485};
486
487bool operator == (const wxDataViewIconText &one, const wxDataViewIconText &two);
488
d350fbec 489DECLARE_VARIANT_OBJECT_EXPORTED(wxDataViewIconText, WXDLLIMPEXP_ADV)
89352653 490
f554a14b 491// ---------------------------------------------------------
6842a71a 492// wxDataViewColumnBase
f554a14b 493// ---------------------------------------------------------
6842a71a 494
56873923 495// for compatibility only, do not use
fa28826d
RR
496enum wxDataViewColumnFlags
497{
56873923
VZ
498 wxDATAVIEW_COL_RESIZABLE = wxCOL_RESIZABLE,
499 wxDATAVIEW_COL_SORTABLE = wxCOL_SORTABLE,
500 wxDATAVIEW_COL_REORDERABLE = wxCOL_REORDERABLE,
501 wxDATAVIEW_COL_HIDDEN = wxCOL_HIDDEN
fa28826d
RR
502};
503
dcb6cbec 504class WXDLLIMPEXP_ADV wxDataViewColumnBase : public wxSettableHeaderColumn
fa28826d
RR
505{
506public:
e2bfe673
VZ
507 // ctor for the text columns: takes ownership of renderer
508 wxDataViewColumnBase(wxDataViewRenderer *renderer,
509 unsigned int model_column)
510 {
511 Init(renderer, model_column);
512 }
513
514 // ctor for the bitmap columns
515 wxDataViewColumnBase(const wxBitmap& bitmap,
516 wxDataViewRenderer *renderer,
517 unsigned int model_column)
518 : m_bitmap(bitmap)
519 {
520 Init(renderer, model_column);
521 }
522
d3c7fc99 523 virtual ~wxDataViewColumnBase();
fa28826d 524
9861f022 525 // setters:
b5ec7dd6 526 virtual void SetOwner( wxDataViewCtrl *owner )
9861f022 527 { m_owner = owner; }
f554a14b 528
9861f022 529 // getters:
56873923 530 unsigned int GetModelColumn() const { return static_cast<unsigned int>(m_model_column); }
594d5596
RR
531 wxDataViewCtrl *GetOwner() const { return m_owner; }
532 wxDataViewRenderer* GetRenderer() const { return m_renderer; }
9861f022 533
56873923
VZ
534 // implement some of base class pure virtuals (the rest is port-dependent
535 // and done differently in generic and native versions)
536 virtual void SetBitmap( const wxBitmap& bitmap ) { m_bitmap = bitmap; }
537 virtual wxBitmap GetBitmap() const { return m_bitmap; }
56873923 538
9861f022 539protected:
baa9ebc4 540 wxDataViewRenderer *m_renderer;
6842a71a 541 int m_model_column;
07a84e7b 542 wxBitmap m_bitmap;
6842a71a 543 wxDataViewCtrl *m_owner;
fa28826d 544
e2bfe673
VZ
545private:
546 // common part of all ctors
547 void Init(wxDataViewRenderer *renderer, unsigned int model_column);
fa28826d
RR
548};
549
f554a14b 550// ---------------------------------------------------------
239eaa41 551// wxDataViewCtrlBase
f554a14b 552// ---------------------------------------------------------
239eaa41 553
c21f7aa1 554#define wxDV_SINGLE 0x0000 // for convenience
9861f022
RR
555#define wxDV_MULTIPLE 0x0001 // can select multiple items
556
557#define wxDV_NO_HEADER 0x0002 // column titles not visible
558#define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
559#define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
c21f7aa1 560
1a07a730 561#define wxDV_ROW_LINES 0x0010 // alternating colour in rows
344ed1f3 562#define wxDV_VARIABLE_LINE_HEIGHT 0x0020 // variable line height
1a07a730 563
f460c29d 564class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
239eaa41
RR
565{
566public:
567 wxDataViewCtrlBase();
d3c7fc99 568 virtual ~wxDataViewCtrlBase();
f554a14b 569
e0062c04
RR
570 virtual bool AssociateModel( wxDataViewModel *model );
571 wxDataViewModel* GetModel();
a75124d0 572 const wxDataViewModel* GetModel() const;
f554a14b 573
07a84e7b 574 // short cuts
b5ec7dd6 575 wxDataViewColumn *PrependTextColumn( const wxString &label, unsigned int model_column,
736fe67c 576 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 577 wxAlignment align = wxALIGN_NOT,
736fe67c 578 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6 579 wxDataViewColumn *PrependIconTextColumn( const wxString &label, unsigned int model_column,
736fe67c 580 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 581 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
582 int flags = wxDATAVIEW_COL_RESIZABLE );
583 wxDataViewColumn *PrependToggleColumn( const wxString &label, unsigned int model_column,
584 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
585 wxAlignment align = wxALIGN_CENTER,
586 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6 587 wxDataViewColumn *PrependProgressColumn( const wxString &label, unsigned int model_column,
736fe67c
RR
588 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
589 wxAlignment align = wxALIGN_CENTER,
590 int flags = wxDATAVIEW_COL_RESIZABLE );
591 wxDataViewColumn *PrependDateColumn( const wxString &label, unsigned int model_column,
592 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
56873923 593 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
594 int flags = wxDATAVIEW_COL_RESIZABLE );
595 wxDataViewColumn *PrependBitmapColumn( const wxString &label, unsigned int model_column,
596 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
597 wxAlignment align = wxALIGN_CENTER,
598 int flags = wxDATAVIEW_COL_RESIZABLE );
599 wxDataViewColumn *PrependTextColumn( const wxBitmap &label, unsigned int model_column,
600 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 601 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
602 int flags = wxDATAVIEW_COL_RESIZABLE );
603 wxDataViewColumn *PrependIconTextColumn( const wxBitmap &label, unsigned int model_column,
604 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 605 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
606 int flags = wxDATAVIEW_COL_RESIZABLE );
607 wxDataViewColumn *PrependToggleColumn( const wxBitmap &label, unsigned int model_column,
608 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
609 wxAlignment align = wxALIGN_CENTER,
610 int flags = wxDATAVIEW_COL_RESIZABLE );
611 wxDataViewColumn *PrependProgressColumn( const wxBitmap &label, unsigned int model_column,
612 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
613 wxAlignment align = wxALIGN_CENTER,
614 int flags = wxDATAVIEW_COL_RESIZABLE );
615 wxDataViewColumn *PrependDateColumn( const wxBitmap &label, unsigned int model_column,
616 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
56873923 617 wxAlignment align = wxALIGN_NOT,
736fe67c
RR
618 int flags = wxDATAVIEW_COL_RESIZABLE );
619 wxDataViewColumn *PrependBitmapColumn( const wxBitmap &label, unsigned int model_column,
620 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
621 wxAlignment align = wxALIGN_CENTER,
622 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6
VZ
623
624 wxDataViewColumn *AppendTextColumn( const wxString &label, unsigned int model_column,
87f0efe2 625 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 626 wxAlignment align = wxALIGN_NOT,
87f0efe2 627 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6 628 wxDataViewColumn *AppendIconTextColumn( const wxString &label, unsigned int model_column,
b04fcede 629 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 630 wxAlignment align = wxALIGN_NOT,
b04fcede 631 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 632 wxDataViewColumn *AppendToggleColumn( const wxString &label, unsigned int model_column,
87f0efe2
RR
633 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
634 wxAlignment align = wxALIGN_CENTER,
635 int flags = wxDATAVIEW_COL_RESIZABLE );
b5ec7dd6 636 wxDataViewColumn *AppendProgressColumn( const wxString &label, unsigned int model_column,
87f0efe2
RR
637 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
638 wxAlignment align = wxALIGN_CENTER,
639 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 640 wxDataViewColumn *AppendDateColumn( const wxString &label, unsigned int model_column,
87f0efe2 641 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
56873923 642 wxAlignment align = wxALIGN_NOT,
87f0efe2 643 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 644 wxDataViewColumn *AppendBitmapColumn( const wxString &label, unsigned int model_column,
87f0efe2
RR
645 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
646 wxAlignment align = wxALIGN_CENTER,
647 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 648 wxDataViewColumn *AppendTextColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2 649 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 650 wxAlignment align = wxALIGN_NOT,
87f0efe2 651 int flags = wxDATAVIEW_COL_RESIZABLE );
b04fcede
RR
652 wxDataViewColumn *AppendIconTextColumn( const wxBitmap &label, unsigned int model_column,
653 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
56873923 654 wxAlignment align = wxALIGN_NOT,
b04fcede 655 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 656 wxDataViewColumn *AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2
RR
657 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
658 wxAlignment align = wxALIGN_CENTER,
659 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 660 wxDataViewColumn *AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2
RR
661 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
662 wxAlignment align = wxALIGN_CENTER,
663 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 664 wxDataViewColumn *AppendDateColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2 665 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
56873923 666 wxAlignment align = wxALIGN_NOT,
87f0efe2 667 int flags = wxDATAVIEW_COL_RESIZABLE );
c7074d44 668 wxDataViewColumn *AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
87f0efe2
RR
669 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
670 wxAlignment align = wxALIGN_CENTER,
671 int flags = wxDATAVIEW_COL_RESIZABLE );
736fe67c
RR
672
673
674 virtual bool PrependColumn( wxDataViewColumn *col );
19723525 675 virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
f554a14b 676 virtual bool AppendColumn( wxDataViewColumn *col );
9861f022 677
91a6c655
RR
678 virtual unsigned int GetColumnCount() const = 0;
679 virtual wxDataViewColumn* GetColumn( unsigned int pos ) const = 0;
453091c2 680 virtual int GetColumnPosition( const wxDataViewColumn *column ) const = 0;
b5ec7dd6 681
91a6c655
RR
682 virtual bool DeleteColumn( wxDataViewColumn *column ) = 0;
683 virtual bool ClearColumns() = 0;
b5ec7dd6 684
1b27b2bd 685 void SetExpanderColumn( wxDataViewColumn *col )
3b6280be 686 { m_expander_column = col ; DoSetExpanderColumn(); }
b5ec7dd6 687 wxDataViewColumn *GetExpanderColumn() const
3b6280be 688 { return m_expander_column; }
b5ec7dd6 689
21f47fb9 690 virtual wxDataViewColumn *GetSortingColumn() const = 0;
23318a53 691
3b6280be
RR
692 void SetIndent( int indent )
693 { m_indent = indent ; DoSetIndent(); }
b5ec7dd6
VZ
694 int GetIndent() const
695 { return m_indent; }
3b6280be 696
fbda518c 697 virtual wxDataViewItem GetSelection() const = 0;
b7e9f8b1
RR
698 virtual int GetSelections( wxDataViewItemArray & sel ) const = 0;
699 virtual void SetSelections( const wxDataViewItemArray & sel ) = 0;
700 virtual void Select( const wxDataViewItem & item ) = 0;
701 virtual void Unselect( const wxDataViewItem & item ) = 0;
702 virtual bool IsSelected( const wxDataViewItem & item ) const = 0;
703
b7e9f8b1
RR
704 virtual void SelectAll() = 0;
705 virtual void UnselectAll() = 0;
706
f71d3ba4 707 virtual void Expand( const wxDataViewItem & item ) = 0;
4219d8b0 708 virtual void ExpandAncestors( const wxDataViewItem & item );
f71d3ba4 709 virtual void Collapse( const wxDataViewItem & item ) = 0;
739a8399 710 virtual bool IsExpanded( const wxDataViewItem & item ) const = 0;
f71d3ba4 711
6154212e 712 virtual void EnsureVisible( const wxDataViewItem & item,
4219d8b0 713 const wxDataViewColumn *column = NULL ) = 0;
a87b466d 714 virtual void HitTest( const wxPoint & point, wxDataViewItem &item, wxDataViewColumn* &column ) const = 0;
fbda518c 715 virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const = 0;
15cac64f
RR
716
717 virtual bool EnableDragSource( const wxDataFormat &format );
e4de825e 718 virtual bool EnableDropTarget( const wxDataFormat &format );
b7e9f8b1 719
3b6280be
RR
720protected:
721 virtual void DoSetExpanderColumn() = 0 ;
722 virtual void DoSetIndent() = 0;
723
239eaa41 724private:
e0062c04 725 wxDataViewModel *m_model;
1b27b2bd 726 wxDataViewColumn *m_expander_column;
3b6280be 727 int m_indent ;
b5ec7dd6 728
239eaa41 729protected:
260b9be7 730 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase)
239eaa41 731};
bcd846ea 732
eb7f97f8
RR
733// ----------------------------------------------------------------------------
734// wxDataViewEvent - the event class for the wxDataViewCtrl notifications
735// ----------------------------------------------------------------------------
736
2f799ae8 737class WXDLLIMPEXP_ADV wxDataViewEvent : public wxNotifyEvent
eb7f97f8
RR
738{
739public:
740 wxDataViewEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
741 : wxNotifyEvent(commandType, winid),
e0062c04 742 m_item(0),
eb7f97f8 743 m_col(-1),
eb7f97f8
RR
744 m_model(NULL),
745 m_value(wxNullVariant),
6af3eec2 746 m_column(NULL),
15cac64f 747 m_pos(-1,-1),
e4de825e
RR
748 m_dataObject(NULL),
749 m_dataBuffer(NULL),
750 m_dataSize(0)
eb7f97f8
RR
751 { }
752
753 wxDataViewEvent(const wxDataViewEvent& event)
754 : wxNotifyEvent(event),
e0062c04 755 m_item(event.m_item),
eb7f97f8 756 m_col(event.m_col),
eb7f97f8
RR
757 m_model(event.m_model),
758 m_value(event.m_value),
6af3eec2 759 m_column(event.m_column),
15cac64f 760 m_pos(m_pos),
e4de825e
RR
761 m_dataObject(event.m_dataObject),
762 m_dataFormat(event.m_dataFormat),
763 m_dataBuffer(event.m_dataBuffer),
764 m_dataSize(event.m_dataSize)
eb7f97f8
RR
765 { }
766
e0062c04
RR
767 wxDataViewItem GetItem() const { return m_item; }
768 void SetItem( const wxDataViewItem &item ) { m_item = item; }
769
eb7f97f8
RR
770 int GetColumn() const { return m_col; }
771 void SetColumn( int col ) { m_col = col; }
9861f022 772
eb7f97f8
RR
773 wxDataViewModel* GetModel() const { return m_model; }
774 void SetModel( wxDataViewModel *model ) { m_model = model; }
9861f022 775
eb7f97f8
RR
776 const wxVariant &GetValue() const { return m_value; }
777 void SetValue( const wxVariant &value ) { m_value = value; }
778
31fb32e1
RR
779 // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
780 void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
9861f022 781 wxDataViewColumn *GetDataViewColumn() const { return m_column; }
c058cafa 782
6af3eec2 783 // for wxEVT_DATAVIEW_CONTEXT_MENU only
5cfb6fee 784 wxPoint GetPosition() const { return m_pos; }
6af3eec2 785 void SetPosition( int x, int y ) { m_pos.x = x; m_pos.y = y; }
31fb32e1 786
e4de825e 787 // For drag operations
591cc82d 788 void SetDataObject( wxDataObject *obj ) { m_dataObject = obj; }
e4de825e
RR
789 wxDataObject *GetDataObject() const { return m_dataObject; }
790
791 // For drop operations
792 void SetDataFormat( const wxDataFormat &format ) { m_dataFormat = format; }
793 wxDataFormat GetDataFormat() const { return m_dataFormat; }
794 void SetDataSize( size_t size ) { m_dataSize = size; }
795 size_t GetDataSize() const { return m_dataSize; }
796 void SetDataBuffer( void* buf ) { m_dataBuffer = buf;}
797 void *GetDataBuffer() const { return m_dataBuffer; }
15cac64f 798
eb7f97f8
RR
799 virtual wxEvent *Clone() const { return new wxDataViewEvent(*this); }
800
801protected:
e0062c04 802 wxDataViewItem m_item;
eb7f97f8 803 int m_col;
eb7f97f8
RR
804 wxDataViewModel *m_model;
805 wxVariant m_value;
31fb32e1 806 wxDataViewColumn *m_column;
6af3eec2 807 wxPoint m_pos;
e4de825e 808
591cc82d 809 wxDataObject *m_dataObject;
e4de825e
RR
810
811 wxDataFormat m_dataFormat;
812 void* m_dataBuffer;
813 size_t m_dataSize;
eb7f97f8
RR
814
815private:
816 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent)
817};
818
3c778901 819wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent )
c058cafa 820
3c778901
VZ
821wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent )
822wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent )
823wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent )
824wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent )
825wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent )
826wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent )
827wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent )
828wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent )
c058cafa 829
3c778901 830wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent )
c058cafa 831
3c778901
VZ
832wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent )
833wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent )
834wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEvent )
835wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent )
eb7f97f8 836
591cc82d 837wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent )
e4de825e
RR
838wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent )
839wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DROP, wxDataViewEvent )
15cac64f 840
eb7f97f8
RR
841typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
842
843#define wxDataViewEventHandler(func) \
3c778901 844 wxEVENT_HANDLER_CAST(wxDataViewEventFunction, func)
eb7f97f8
RR
845
846#define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
847 wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
848
d86c1870
RR
849#define EVT_DATAVIEW_SELECTION_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(SELECTION_CHANGED, id, fn)
850
e0062c04 851#define EVT_DATAVIEW_ITEM_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_ACTIVATED, id, fn)
6977c3bf 852#define EVT_DATAVIEW_ITEM_COLLAPSING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSING, id, fn)
3ecb8a53 853#define EVT_DATAVIEW_ITEM_COLLAPSED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSED, id, fn)
6977c3bf 854#define EVT_DATAVIEW_ITEM_EXPANDING(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDING, id, fn)
3ecb8a53 855#define EVT_DATAVIEW_ITEM_EXPANDED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDED, id, fn)
e0000f94
RR
856#define EVT_DATAVIEW_ITEM_EDITING_STARTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_STARTED, id, fn)
857#define EVT_DATAVIEW_ITEM_EDITING_DONE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EDITING_DONE, id, fn)
6608fdab 858#define EVT_DATAVIEW_ITEM_VALUE_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_VALUE_CHANGED, id, fn)
e0000f94 859
6af3eec2
RR
860#define EVT_DATAVIEW_ITEM_CONTEXT_MENU(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_CONTEXT_MENU, id, fn)
861
31fb32e1
RR
862#define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
863#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
c0a66d92 864#define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
e483dfcb 865#define EVT_DATAVIEW_COLUMN_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_REORDERED, id, fn)
eb7f97f8 866
591cc82d 867#define EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_BEGIN_DRAG, id, fn)
e4de825e
RR
868#define EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP_POSSIBLE, id, fn)
869#define EVT_DATAVIEW_ITEM_DROP(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP, id, fn)
fe9fb970 870
56873923
VZ
871#ifdef wxHAS_GENERIC_DATAVIEWCTRL
872 // this symbol doesn't follow the convention for wxUSE_XXX symbols which
873 // are normally always defined as either 0 or 1, so its use is deprecated
874 // and it only exists for backwards compatibility, don't use it any more
875 // and use wxHAS_GENERIC_DATAVIEWCTRL instead
876 #define wxUSE_GENERICDATAVIEWCTRL
877
878 #include "wx/generic/dataview.h"
879#elif defined(__WXGTK20__)
bcd846ea 880 #include "wx/gtk/dataview.h"
56873923 881#elif defined(__WXMAC__)
ef0e9220 882 #include "wx/osx/dataview.h"
bcd846ea 883#else
56873923 884 #error "unknown native wxDataViewCtrl implementation"
bcd846ea
RR
885#endif
886
52e750fc
RR
887// -------------------------------------
888// wxDataViewSpinRenderer
889// -------------------------------------
890
4660b556 891class WXDLLIMPEXP_ADV wxDataViewSpinRenderer: public wxDataViewCustomRenderer
52e750fc
RR
892{
893public:
894 wxDataViewSpinRenderer( int min, int max,
895 wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
896 int alignment = wxDVR_DEFAULT_ALIGNMENT );
897 virtual bool HasEditorCtrl() { return true; }
898 virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
899 virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
900 virtual bool Render( wxRect rect, wxDC *dc, int state );
901 virtual wxSize GetSize() const;
902 virtual bool SetValue( const wxVariant &value );
903 virtual bool GetValue( wxVariant &value ) const;
b5ec7dd6 904
52e750fc
RR
905private:
906 long m_data;
907 long m_min,m_max;
908};
909
a881f34e 910#if defined(wxHAS_GENERIC_DATAVIEWCTRL) || defined(__WXMAC__)
7448d67c
RR
911
912// -------------------------------------
913// wxDataViewChoiceRenderer
914// -------------------------------------
915
916class WXDLLIMPEXP_ADV wxDataViewChoiceRenderer: public wxDataViewCustomRenderer
917{
918public:
919 wxDataViewChoiceRenderer( const wxArrayString &choices,
920 wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
921 int alignment = wxDVR_DEFAULT_ALIGNMENT );
922 virtual bool HasEditorCtrl() { return true; }
923 virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
924 virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
925 virtual bool Render( wxRect rect, wxDC *dc, int state );
926 virtual wxSize GetSize() const;
927 virtual bool SetValue( const wxVariant &value );
928 virtual bool GetValue( wxVariant &value ) const;
929
930private:
931 wxArrayString m_choices;
932 wxString m_data;
933};
934
935#endif
936
8eff6c56
RR
937//-----------------------------------------------------------------------------
938// wxDataViewListStore
939//-----------------------------------------------------------------------------
940
941class WXDLLIMPEXP_ADV wxDataViewListStoreLine
942{
943public:
944 wxDataViewListStoreLine( wxClientData *data = NULL )
945 {
946 m_data = data;
947 }
948 virtual ~wxDataViewListStoreLine()
949 {
950 delete m_data;
951 }
952
953 void SetData( wxClientData *data )
954 { if (m_data) delete m_data; m_data = data; }
955 wxClientData *GetData() const
956 { return m_data; }
957
958 wxVector<wxVariant> m_values;
959
960private:
961 wxClientData *m_data;
962};
963
964
965class WXDLLIMPEXP_ADV wxDataViewListStore: public wxDataViewIndexListModel
966{
967public:
968 wxDataViewListStore();
969 ~wxDataViewListStore();
970
971 void PrependColumn( const wxString &varianttype );
972 void InsertColumn( unsigned int pos, const wxString &varianttype );
973 void AppendColumn( const wxString &varianttype );
974
8eff6c56
RR
975 void AppendItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
976 void PrependItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
977 void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxClientData *data = NULL );
978 void DeleteItem( unsigned pos );
979 void DeleteAllItems();
980
8eff6c56
RR
981 // override base virtuals
982
983 virtual unsigned int GetColumnCount() const;
984
985 virtual wxString GetColumnType( unsigned int col ) const;
986
987 virtual void GetValueByRow( wxVariant &value,
988 unsigned int row, unsigned int col ) const;
989
990 virtual bool SetValueByRow( const wxVariant &value,
991 unsigned int row, unsigned int col );
992
993
994public:
995 wxVector<wxDataViewListStoreLine*> m_data;
996 wxArrayString m_cols;
997};
998
dc813e6c
RR
999//-----------------------------------------------------------------------------
1000
1001class WXDLLIMPEXP_ADV wxDataViewListCtrl: public wxDataViewCtrl
1002{
1003public:
1004 wxDataViewListCtrl();
1005 wxDataViewListCtrl( 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 ~wxDataViewListCtrl();
1010
1011 bool Create( wxWindow *parent, wxWindowID id,
1012 const wxPoint& pos = wxDefaultPosition,
1013 const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES,
1014 const wxValidator& validator = wxDefaultValidator );
1015
1016 wxDataViewListStore *GetStore()
1017 { return (wxDataViewListStore*) GetModel(); }
1018 const wxDataViewListStore *GetStore() const
1019 { return (const wxDataViewListStore*) GetModel(); }
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 );
dc813e6c 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
1030 wxDataViewColumn *AppendTextColumn( const wxString &label,
dc813e6c
RR
1031 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
1032 int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
95b20f41 1033 wxDataViewColumn *AppendToggleColumn( const wxString &label,
dc813e6c
RR
1034 wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
1035 int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
95b20f41 1036 wxDataViewColumn *AppendProgressColumn( const wxString &label,
dc813e6c
RR
1037 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
1038 int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
95b20f41 1039 wxDataViewColumn *AppendIconTextColumn( const wxString &label,
dc813e6c
RR
1040 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
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 )
832df171
RR
1055 { GetStore()->SetValueByRow( value, row, col );
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;
b5ec7dd6 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,
e94d0c1e 1206 unsigned int column, bool ascending );
b5ec7dd6
VZ
1207
1208 virtual bool HasDefaultCompare() const
e94d0c1e 1209 { return true; }
b5ec7dd6 1210 virtual unsigned int GetColumnCount() const
e94d0c1e 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
e94d0c1e
RR
1225class WXDLLIMPEXP_ADV wxDataViewTreeCtrl: public wxDataViewCtrl
1226{
1227public:
a75124d0
RR
1228 wxDataViewTreeCtrl();
1229 wxDataViewTreeCtrl( wxWindow *parent, wxWindowID id,
e94d0c1e 1230 const wxPoint& pos = wxDefaultPosition,
1a07a730 1231 const wxSize& size = wxDefaultSize, long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
e94d0c1e 1232 const wxValidator& validator = wxDefaultValidator );
a75124d0 1233 ~wxDataViewTreeCtrl();
e94d0c1e
RR
1234
1235 bool Create( wxWindow *parent, wxWindowID id,
1236 const wxPoint& pos = wxDefaultPosition,
1a07a730 1237 const wxSize& size = wxDefaultSize, long style = wxDV_NO_HEADER | wxDV_ROW_LINES,
e94d0c1e
RR
1238 const wxValidator& validator = wxDefaultValidator );
1239
1240 wxDataViewTreeStore *GetStore()
1241 { return (wxDataViewTreeStore*) GetModel(); }
a75124d0
RR
1242 const wxDataViewTreeStore *GetStore() const
1243 { return (const wxDataViewTreeStore*) GetModel(); }
b5ec7dd6 1244
a75124d0
RR
1245 void SetImageList( wxImageList *imagelist );
1246 wxImageList* GetImageList() { return m_imageList; }
c058cafa 1247
a75124d0
RR
1248 wxDataViewItem AppendItem( const wxDataViewItem& parent,
1249 const wxString &text, int icon = -1, wxClientData *data = NULL );
1250 wxDataViewItem PrependItem( const wxDataViewItem& parent,
1251 const wxString &text, int icon = -1, wxClientData *data = NULL );
1252 wxDataViewItem InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous,
1253 const wxString &text, int icon = -1, wxClientData *data = NULL );
1254
1255 wxDataViewItem PrependContainer( const wxDataViewItem& parent,
1256 const wxString &text, int icon = -1, int expanded = -1,
1257 wxClientData *data = NULL );
1258 wxDataViewItem AppendContainer( const wxDataViewItem& parent,
1259 const wxString &text, int icon = -1, int expanded = -1,
1260 wxClientData *data = NULL );
1261 wxDataViewItem InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous,
1262 const wxString &text, int icon = -1, int expanded = -1,
1263 wxClientData *data = NULL );
1264
1265 wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const
1266 { return GetStore()->GetNthChild(parent, pos); }
1267 int GetChildCount( const wxDataViewItem& parent ) const
1268 { return GetStore()->GetChildCount(parent); }
1269
e700e296 1270 void SetItemText( const wxDataViewItem& item, const wxString &text );
a75124d0
RR
1271 wxString GetItemText( const wxDataViewItem& item ) const
1272 { return GetStore()->GetItemText(item); }
e700e296 1273 void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon );
a75124d0
RR
1274 const wxIcon &GetItemIcon( const wxDataViewItem& item ) const
1275 { return GetStore()->GetItemIcon(item); }
e700e296 1276 void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon );
a75124d0
RR
1277 const wxIcon &GetItemExpandedIcon( const wxDataViewItem& item ) const
1278 { return GetStore()->GetItemExpandedIcon(item); }
1279 void SetItemData( const wxDataViewItem& item, wxClientData *data )
1280 { GetStore()->SetItemData(item,data); }
1281 wxClientData *GetItemData( const wxDataViewItem& item ) const
1282 { return GetStore()->GetItemData(item); }
1283
e700e296
RR
1284 void DeleteItem( const wxDataViewItem& item );
1285 void DeleteChildren( const wxDataViewItem& item );
1286 void DeleteAllItems();
a75124d0
RR
1287
1288 void OnExpanded( wxDataViewEvent &event );
1289 void OnCollapsed( wxDataViewEvent &event );
1a07a730 1290 void OnSize( wxSizeEvent &event );
b5ec7dd6 1291
e94d0c1e 1292private:
a75124d0
RR
1293 wxImageList *m_imageList;
1294
1295private:
1296 DECLARE_EVENT_TABLE()
e94d0c1e
RR
1297 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl)
1298};
e94d0c1e 1299
bcd846ea
RR
1300#endif // wxUSE_DATAVIEWCTRL
1301
1302#endif
1303 // _WX_DATAVIEW_H_BASE_