]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/dataviewcolumn.tex
Added API for column reordering
[wxWidgets.git] / docs / latex / wx / dataviewcolumn.tex
1
2 \section{\class{wxDataViewColumn}}\label{wxdataviewcolumn}
3
4
5 This class represents a column in a \helpref{wxDataViewCtrl}{wxdataviewctrl}.
6 One wxDataViewColumn is bound to one column in the data model,
7 to which the wxDataViewCtrl has been associated.
8
9 An instance of \helpref{wxDataViewRenderer}{wxdataviewrenderer} is used by
10 this class to render its data.
11
12 \wxheading{Constants}
13
14 These flags define behaviour of the column:
15
16 {\small
17 \begin{verbatim}
18 enum wxDataViewColumnFlags
19 {
20 wxDATAVIEW_COL_RESIZABLE = 1, // the user can resize the column
21 wxDATAVIEW_COL_SORTABLE = 2, // same as SetSortable()
22 wxDATAVIEW_COL_REORDERABLE = 4, // column can be reordered
23 wxDATAVIEW_COL_HIDDEN = 8 // column is hidden
24 };
25 \end{verbatim}
26 }
27
28 \wxheading{Derived from}
29
30 \helpref{wxObject}{wxobject}
31
32 \wxheading{Include files}
33
34 <wx/dataview.h>
35
36 \wxheading{Library}
37
38 \helpref{wxAdv}{librarieslist}
39
40
41 \latexignore{\rtfignore{\wxheading{Members}}}
42
43 \membersection{wxDataViewColumn::wxDataViewColumn}\label{wxdataviewcolumnwxdataviewcolumn}
44
45 \func{}{wxDataViewColumn}{\param{const wxString\& }{title}, \param{wxDataViewRenderer* }{renderer}, \param{unsigned int }{model\_column}, \param{int }{width = wxDVC\_DEFAULT\_WIDTH}, \param{wxAlignment }{align = wxALIGN\_CENTRE}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
46
47 \func{}{wxDataViewColumn}{\param{const wxBitmap\& }{bitmap}, \param{wxDataViewRenderer* }{renderer}, \param{unsigned int }{model\_column}, \param{int }{width = wxDVC\_DEFAULT\_WIDTH}, \param{wxAlignment }{align = wxALIGN\_CENTRE}, \param{int }{flags = wxDATAVIEW\_COL\_RESIZABLE}}
48
49 Constructors.
50
51
52 \membersection{wxDataViewColumn::\destruct{wxDataViewColumn}}\label{wxdataviewcolumndtor}
53
54 \func{}{\destruct{wxDataViewColumn}}{\void}
55
56 Destructor.
57
58 \membersection{wxDataViewColumn::GetBitmap}\label{wxdataviewcolumngetbitmap}
59
60 \func{const wxBitmap\&}{GetBitmap}{\void}
61
62 Returns the bitmap in the header of the column, if any.
63
64 \membersection{wxDataViewColumn::GetModelColumn}\label{wxdataviewcolumngetmodelcolumn}
65
66 \func{unsigned int}{GetModelColumn}{\void}
67
68 Returns the index of the column of the model, which this
69 wxDataViewColumn is displaying.
70
71 \membersection{wxDataViewColumn::GetOwner}\label{wxdataviewcolumngetowner}
72
73 \func{wxDataViewCtrl*}{GetOwner}{\void}
74
75 Returns the owning \helpref{wxDataViewCtrl}{wxdataviewctrl}.
76
77 \membersection{wxDataViewColumn::GetRenderer}\label{wxdataviewcolumngetrenderer}
78
79 \func{wxDataViewRenderer*}{GetRenderer}{\void}
80
81 Returns the renderer of this wxDataViewColumn.
82
83 See also \helpref{wxDataViewRenderer}{wxdataviewrenderer}.
84
85 \membersection{wxDataViewColumn::GetSortable}\label{wxdataviewcolumngetsortable}
86
87 \func{bool}{GetSortable}{\void}
88
89 Returns true if the column is sortable.
90
91 See \helpref{SetSortable}{wxdataviewcolumnsetsortable}
92
93 \membersection{wxDataViewColumn::GetWidth}\label{wxdataviewcolumngetwidth}
94
95 \func{int}{GetWidth}{\void}
96
97 Returns the width of the column.
98
99 \membersection{wxDataViewColumn::IsSortOrderAscending}\label{wxdataviewcolumnissortorderascending}
100
101 \func{bool}{IsSortOrderAscending}{\void}
102
103 Returns true, if the sort order is ascending.
104
105 See also \helpref{SetSortOrder}{wxdataviewcolumnsetsortorder}
106
107 \membersection{wxDataViewColumn::SetAlignment}\label{wxdataviewcolumnsetalignment}
108
109 \func{void}{SetAlignment}{\param{wxAlignment }{align}}
110
111 Set the alignment of the column header.
112
113 \membersection{wxDataViewColumn::SetBitmap}\label{wxdataviewcolumnsetbitmap}
114
115 \func{void}{SetBitmap}{\param{const wxBitmap\& }{bitmap}}
116
117 Set the bitmap of the column header.
118
119 \membersection{wxDataViewColumn::SetSortOrder}\label{wxdataviewcolumnsetsortorder}
120
121 \func{void}{SetSortOrder}{\param{bool }{ascending}}
122
123 Indicate the sort order if the implementation of the
124 wxDataViewCtrl supports it, most commonly by showing
125 a little arrow.
126
127 \membersection{wxDataViewColumn::SetSortable}\label{wxdataviewcolumnsetsortable}
128
129 \func{void}{SetSortable}{\param{bool }{sortable}}
130
131 Indicate that the column is sortable. This does
132 not show any sorting indicate yet, but it does
133 make the column header clickable. Call
134 \helpref{SetSortOrder}{wxdataviewcolumnsetsortorder}
135 afterwards to actually make the sort indicator appear.
136 If {\it sortable} is false, the column header is
137 no longer clickable and the sort indicator (little
138 arrow) will disappear.
139
140 \membersection{wxDataViewColumn::SetTitle}\label{wxdataviewcolumnsettitle}
141
142 \func{void}{SetTitle}{\param{const wxString\& }{title}}
143
144 Set the title of the column header to {\it title}.
145