]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/dataview.h
Test the commit announcement bot some more by fixing more gtk signal callback handler...
[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
RR
54 bool SetValue( const wxVariant &value );
55
6842a71a
RR
56protected:
57 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextCell)
58};
59
fa28826d
RR
60// ---------------------------------------------------------
61// wxDataViewColumn
62// ---------------------------------------------------------
63
64class WXDLLIMPEXP_CORE wxDataViewColumn: public wxDataViewColumnBase
65{
66public:
6842a71a 67 wxDataViewColumn( const wxString &title, wxDataViewCell *cell, size_t model_column, int flags = 0 );
fa28826d
RR
68 virtual ~wxDataViewColumn();
69
70 virtual void SetTitle( const wxString &title );
71
72 // implementation
73 void* GetGtkHandle() { return m_column; }
74
75private:
6842a71a 76 // holds the GTK handle
fa28826d
RR
77 void* m_column;
78
79protected:
80 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn)
81};
82
239eaa41
RR
83// ---------------------------------------------------------
84// wxDataViewCtrl
85// ---------------------------------------------------------
86
87class WXDLLIMPEXP_CORE wxDataViewCtrl: public wxDataViewCtrlBase
88{
89public:
90 wxDataViewCtrl()
91 {
92 Init();
93 }
94
95 wxDataViewCtrl( wxWindow *parent, wxWindowID id,
96 const wxPoint& pos = wxDefaultPosition,
97 const wxSize& size = wxDefaultSize, long style = 0,
98 const wxValidator& validator = wxDefaultValidator )
99 {
100 Create(parent, id, pos, size, style, validator );
101 }
102
103 virtual ~wxDataViewCtrl();
104
105 void Init();
106
107 bool Create(wxWindow *parent, wxWindowID id,
108 const wxPoint& pos = wxDefaultPosition,
109 const wxSize& size = wxDefaultSize, long style = 0,
110 const wxValidator& validator = wxDefaultValidator );
111
6e2e590f 112 virtual bool AssociateModel( wxDataViewListModel *model );
fa28826d 113 virtual bool AppendColumn( wxDataViewColumn *col );
239eaa41
RR
114
115private:
116 DECLARE_DYNAMIC_CLASS(wxDataViewCtrl)
117 DECLARE_NO_COPY_CLASS(wxDataViewCtrl)
118};
119
120
121#endif // __GTKDATAVIEWCTRLH__