]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/dataview.h
Make wx{List,Tree}Ctrl resize their standard font if the user changes the system...
[wxWidgets.git] / include / wx / gtk / dataview.h
CommitLineData
239eaa41
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/dataview.h
3// Purpose: wxDataViewCtrl GTK+2 implementation header
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef __GTKDATAVIEWCTRLH__
11#define __GTKDATAVIEWCTRLH__
12
13#include "wx/defs.h"
14#include "wx/object.h"
15#include "wx/list.h"
16#include "wx/control.h"
17
18// ---------------------------------------------------------
19// classes
20// ---------------------------------------------------------
21
22class WXDLLIMPEXP_CORE wxDataViewCtrl;
23
6842a71a
RR
24// ---------------------------------------------------------
25// wxDataViewCell
26// ---------------------------------------------------------
27
28class wxDataViewCell: public wxDataViewCellBase
29{
30public:
31 wxDataViewCell( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
32
33 // implementation
34 void* GetGtkHandle() { return m_renderer; }
35
36protected:
37 // holds the GTK handle
38 void* m_renderer;
39
40protected:
41 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCell)
42};
43
44// ---------------------------------------------------------
45// wxDataViewTextCell
46// ---------------------------------------------------------
47
48class wxDataViewTextCell: public wxDataViewCell
49{
50public:
51 wxDataViewTextCell( const wxString &varianttype = wxT("string"),
52 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
53
7b4fde82 54 bool SetValue( const wxVariant &value );
a7f61f76 55 bool GetValue( wxVariant &value );
7b4fde82 56
6842a71a
RR
57protected:
58 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextCell)
59};
60
605c2c4a
RR
61// ---------------------------------------------------------
62// wxDataViewToggleCell
63// ---------------------------------------------------------
64
65class wxDataViewToggleCell: public wxDataViewCell
66{
67public:
68 wxDataViewToggleCell( const wxString &varianttype = wxT("bool"),
69 wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
70
71 bool SetValue( const wxVariant &value );
72 bool GetValue( wxVariant &value );
73
74protected:
75 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleCell)
76};
77
fa28826d
RR
78// ---------------------------------------------------------
79// wxDataViewColumn
80// ---------------------------------------------------------
81
82class WXDLLIMPEXP_CORE wxDataViewColumn: public wxDataViewColumnBase
83{
84public:
6842a71a 85 wxDataViewColumn( const wxString &title, wxDataViewCell *cell, size_t model_column, int flags = 0 );
fa28826d
RR
86 virtual ~wxDataViewColumn();
87
88 virtual void SetTitle( const wxString &title );
89
90 // implementation
91 void* GetGtkHandle() { return m_column; }
92
93private:
6842a71a 94 // holds the GTK handle
fa28826d
RR
95 void* m_column;
96
97protected:
98 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn)
99};
100
239eaa41
RR
101// ---------------------------------------------------------
102// wxDataViewCtrl
103// ---------------------------------------------------------
104
105class WXDLLIMPEXP_CORE wxDataViewCtrl: public wxDataViewCtrlBase
106{
107public:
108 wxDataViewCtrl()
109 {
110 Init();
111 }
112
113 wxDataViewCtrl( wxWindow *parent, wxWindowID id,
114 const wxPoint& pos = wxDefaultPosition,
115 const wxSize& size = wxDefaultSize, long style = 0,
116 const wxValidator& validator = wxDefaultValidator )
117 {
118 Create(parent, id, pos, size, style, validator );
119 }
120
121 virtual ~wxDataViewCtrl();
122
123 void Init();
124
125 bool Create(wxWindow *parent, wxWindowID id,
126 const wxPoint& pos = wxDefaultPosition,
127 const wxSize& size = wxDefaultSize, long style = 0,
128 const wxValidator& validator = wxDefaultValidator );
129
6e2e590f 130 virtual bool AssociateModel( wxDataViewListModel *model );
fa28826d 131 virtual bool AppendColumn( wxDataViewColumn *col );
239eaa41
RR
132
133private:
134 DECLARE_DYNAMIC_CLASS(wxDataViewCtrl)
135 DECLARE_NO_COPY_CLASS(wxDataViewCtrl)
136};
137
138
139#endif // __GTKDATAVIEWCTRLH__