]>
Commit | Line | Data |
---|---|---|
1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
2 | %% Name: listview.tex | |
3 | %% Purpose: wxListView documentation | |
4 | %% Author: Vadim Zeitlin | |
5 | %% Modified by: | |
6 | %% Created: 07.11.02 | |
7 | %% RCS-ID: $Id$ | |
8 | %% Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwindows.org> | |
9 | %% License: wxWindows license | |
10 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
11 | ||
12 | \section{\class{wxListView}}\label{wxlistview} | |
13 | ||
14 | This class currently simply presents a simpler to use interface for the | |
15 | \helpref{wxListCtrl}{wxlistctrl} -- it can be thought of as a {\it fa\c{c}ade} | |
16 | for that complicated class. Using it is preferable to using | |
17 | \helpref{wxListCtrl}{wxlistctrl} directly whenever possible because in the | |
18 | future some ports might implement wxListView but not the full set of wxListCtrl | |
19 | features. | |
20 | ||
21 | Other than different interface, this class is identical to wxListCtrl. In | |
22 | particular, it uses the same events, same window styles and so on. | |
23 | ||
24 | \wxheading{Derived from} | |
25 | ||
26 | \helpref{wxListCtrl}{wxlistctrl}\\ | |
27 | \helpref{wxControl}{wxcontrol}\\ | |
28 | \helpref{wxWindow}{wxwindow}\\ | |
29 | \helpref{wxEvtHandler}{wxevthandler}\\ | |
30 | \helpref{wxObject}{wxobject} | |
31 | ||
32 | \wxheading{Include files} | |
33 | ||
34 | <wx/listctrl.h> | |
35 | ||
36 | %%%%%%%%%%%%% Methods in alphabetic order %%%%%%%%%%%%% | |
37 | \latexignore{\rtfignore{\wxheading{Members}}} | |
38 | ||
39 | \membersection{wxListView::ClearColumnImage}\label{wxlistviewclearcolumnimage} | |
40 | ||
41 | \func{void}{ClearColumnImage}{\param{int }{col}} | |
42 | ||
43 | Resets the column image -- after calling this function, no image will be shown. | |
44 | ||
45 | \wxheading{Parameters} | |
46 | ||
47 | \docparam{col}{the column to clear image for} | |
48 | ||
49 | \wxheading{See also} | |
50 | ||
51 | \helpref{SetColumnImage}{wxlistviewsetcolumnimage} | |
52 | ||
53 | ||
54 | \membersection{wxListView::Focus}\label{wxlistviewfocus} | |
55 | ||
56 | \func{void}{Focus}{\param{long }{index}} | |
57 | ||
58 | Sets focus to the item with the given {\it index}. | |
59 | ||
60 | ||
61 | \membersection{wxListView::GetFirstSelected}\label{wxlistviewgetfirstselected} | |
62 | ||
63 | \constfunc{long}{GetFirstSelected}{\void} | |
64 | ||
65 | Returns the first selected item in a (presumably) multiple selection control. | |
66 | Together with \helpref{GetNextSelected}{wxlistviewgetnextselected} it can be | |
67 | used to iterate over all selected items in the control. | |
68 | ||
69 | \wxheading{Return value} | |
70 | ||
71 | The first selected item, if any, $-1$ otherwise. | |
72 | ||
73 | ||
74 | \membersection{wxListView::GetFocusedItem}\label{wxlistviewgetfocuseditem} | |
75 | ||
76 | \constfunc{long}{GetFocusedItem}{\void} | |
77 | ||
78 | Returns the currently focused item or $-1$ if none. | |
79 | ||
80 | \wxheading{See also} | |
81 | ||
82 | \helpref{IsSelected}{wxlistviewisselected},\\ | |
83 | \helpref{Focus}{wxlistviewfocus} | |
84 | ||
85 | ||
86 | \membersection{wxListView::GetNextSelected}\label{wxlistviewgetnextselected} | |
87 | ||
88 | \constfunc{long}{GetNextSelected}{\param{long }{item}} | |
89 | ||
90 | Used together with \helpref{GetFirstSelected}{wxlistviewgetfirstselected} to | |
91 | iterate over all selected items in the control. | |
92 | ||
93 | \wxheading{Return value} | |
94 | ||
95 | Returns the next selected item or $-1$ if there are no more of them. | |
96 | ||
97 | ||
98 | \membersection{wxListView::IsSelected}\label{wxlistviewisselected} | |
99 | ||
100 | \constfunc{bool}{IsSelected}{\param{long }{index}} | |
101 | ||
102 | Returns {\tt true} if the item with the given {\it index} is selected, | |
103 | {\tt false} otherwise. | |
104 | ||
105 | \wxheading{See also} | |
106 | ||
107 | \helpref{GetFirstSelected}{wxlistviewgetfirstselected},\\ | |
108 | \helpref{GetNextSelected}{wxlistviewgetnextselected} | |
109 | ||
110 | ||
111 | \membersection{wxListView::Select}\label{wxlistviewselect} | |
112 | ||
113 | \func{void}{Select}{long n, \param{bool }{on = true}} | |
114 | ||
115 | Selects or unselects the given item. | |
116 | ||
117 | \wxheading{Parameters} | |
118 | ||
119 | \docparam{n}{the item to select or unselect} | |
120 | ||
121 | \docparam{on}{if {\tt true} (default), selects the item, otherwise unselects it} | |
122 | ||
123 | \wxheading{See also} | |
124 | ||
125 | \helpref{SetItemState}{wxlistctrlsetitemstate} | |
126 | ||
127 | ||
128 | \membersection{wxListView::SetColumnImage}\label{wxlistviewsetcolumnimage} | |
129 | ||
130 | \func{void}{SetColumnImage}{\param{int }{col}, \param{int }{image}} | |
131 | ||
132 | Sets the column image for the specified column. To use the column images, the | |
133 | control must have a valid image list with at least one image. | |
134 | ||
135 | \wxheading{Parameters} | |
136 | ||
137 | \docparam{col}{the column to set image for} | |
138 | ||
139 | \docparam{image}{the index of the column image in the controls image list} | |
140 | ||
141 | \wxheading{See also} | |
142 | ||
143 | \helpref{ClearColumnImage}{wxlistviewclearcolumnimage},\\ | |
144 | \helpref{SetImageList}{wxlistctrlsetimagelist} | |
145 |