]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/dataview.h
e9a485ea3029bbdc195a574bc9661a8fa19171f6
[wxWidgets.git] / include / wx / gtk / dataview.h
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
22 class WXDLLIMPEXP_CORE wxDataViewCtrl;
23
24 // ---------------------------------------------------------
25 // wxDataViewColumn
26 // ---------------------------------------------------------
27
28 class WXDLLIMPEXP_CORE wxDataViewColumn: public wxDataViewColumnBase
29 {
30 public:
31 wxDataViewColumn( const wxString &title, wxDataViewCtrl *ctrl,
32 wxDataViewColumnType kind, int flags = 0 );
33 virtual ~wxDataViewColumn();
34
35 virtual void SetTitle( const wxString &title );
36
37 // implementation
38 void* GetGtkHandle() { return m_column; }
39
40 private:
41 void* m_column;
42
43 protected:
44 DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn)
45 };
46
47 // ---------------------------------------------------------
48 // wxDataViewCtrl
49 // ---------------------------------------------------------
50
51 class WXDLLIMPEXP_CORE wxDataViewCtrl: public wxDataViewCtrlBase
52 {
53 public:
54 wxDataViewCtrl()
55 {
56 Init();
57 }
58
59 wxDataViewCtrl( wxWindow *parent, wxWindowID id,
60 const wxPoint& pos = wxDefaultPosition,
61 const wxSize& size = wxDefaultSize, long style = 0,
62 const wxValidator& validator = wxDefaultValidator )
63 {
64 Create(parent, id, pos, size, style, validator );
65 }
66
67 virtual ~wxDataViewCtrl();
68
69 void Init();
70
71 bool Create(wxWindow *parent, wxWindowID id,
72 const wxPoint& pos = wxDefaultPosition,
73 const wxSize& size = wxDefaultSize, long style = 0,
74 const wxValidator& validator = wxDefaultValidator );
75
76 virtual bool AssociateModel( wxDataViewListModel *model );
77 virtual bool AppendColumn( wxDataViewColumn *col );
78
79 private:
80 DECLARE_DYNAMIC_CLASS(wxDataViewCtrl)
81 DECLARE_NO_COPY_CLASS(wxDataViewCtrl)
82 };
83
84
85 #endif // __GTKDATAVIEWCTRLH__