]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/clientdat.tex
added wxMessageQueue class for inter-thread communications
[wxWidgets.git] / docs / latex / wx / clientdat.tex
... / ...
CommitLineData
1\section{\class{wxClientData}}\label{wxclientdata}
2
3All classes deriving from \helpref{wxEvtHandler}{wxevthandler}
4(such as all controls and \helpref{wxApp}{wxapp})
5can hold arbitrary data which is here referred to as "client data".
6This is useful e.g. for scripting languages which need to handle
7shadow objects for most of wxWidgets' classes and which store
8a handle to such a shadow class as client data in that class.
9This data can either be of type void - in which case the data
10{\it container} does not take care of freeing the data again
11or it is of type wxClientData or its derivatives. In that case the
12container (e.g. a control) will free the memory itself later.
13Note that you {\it must not} assign both void data and data
14derived from the wxClientData class to a container.
15
16Some controls can hold various items and these controls can
17additionally hold client data for each item. This is the case for
18\helpref{wxChoice}{wxchoice}, \helpref{wxComboBox}{wxcombobox}
19and \helpref{wxListBox}{wxlistbox}. \helpref{wxTreeCtrl}{wxtreectrl}
20has a specialized class \helpref{wxTreeItemData}{wxtreeitemdata}
21for each item in the tree.
22
23If you want to add client data to your own classes, you may
24use the mix-in class \helpref{wxClientDataContainer}{wxclientdatacontainer}.
25
26\wxheading{Include files}
27
28<wx/clntdata.h>
29
30\wxheading{Library}
31
32\helpref{wxBase}{librarieslist}
33
34\wxheading{See also}
35
36\helpref{wxEvtHandler}{wxevthandler}, \helpref{wxTreeItemData}{wxtreeitemdata},
37\helpref{wxStringClientData}{wxstringclientdata}, \helpref{wxClientDataContainer}{wxclientdatacontainer}
38
39\latexignore{\rtfignore{\wxheading{Members}}}
40
41
42\membersection{wxClientData::wxClientData}\label{wxclientdatawxclientdata}
43
44\func{}{wxClientData}{\void}
45
46Constructor.
47
48\membersection{wxClientData::\destruct{wxClientData}}\label{wxclientdatadtor}
49
50\func{}{\destruct{wxClientData}}{\void}
51
52Virtual destructor.
53
54\section{\class{wxClientDataContainer}}\label{wxclientdatacontainer}
55
56This class is a mixin that provides storage and management of "client
57data." This data can either be of type void - in which case the data
58{\it container} does not take care of freeing the data again
59or it is of type wxClientData or its derivatives. In that case the
60container will free the memory itself later.
61Note that you {\it must not} assign both void data and data
62derived from the wxClientData class to a container.
63
64NOTE: This functionality is currently duplicated in wxEvtHandler in
65order to avoid having more than one vtable in that class hierarchy.
66
67\wxheading{See also}
68
69\helpref{wxEvtHandler}{wxevthandler}, \helpref{wxClientData}{wxclientdata}
70
71\wxheading{Derived from}
72
73No base class
74
75\wxheading{Include files}
76
77<wx/clntdata.h>
78
79\wxheading{Library}
80
81\helpref{wxBase}{librarieslist}
82
83\wxheading{Data structures}
84
85\latexignore{\rtfignore{\wxheading{Members}}}
86
87
88\membersection{wxClientDataContainer::wxClientDataContainer}\label{wxclientdatacontainerwxclientdatacontainer}
89
90\func{}{wxClientDataContainer}{\void}
91
92
93\membersection{wxClientDataContainer::\destruct{wxClientDataContainer}}\label{wxclientdatacontainerdtor}
94
95\func{}{\destruct{wxClientDataContainer}}{\void}
96
97
98\membersection{wxClientDataContainer::GetClientData}\label{wxclientdatacontainergetclientdata}
99
100\constfunc{void*}{GetClientData}{\void}
101
102Get the untyped client data.
103
104\membersection{wxClientDataContainer::GetClientObject}\label{wxclientdatacontainergetclientobject}
105
106\constfunc{wxClientData*}{GetClientObject}{\void}
107
108Get a pointer to the client data object.
109
110\membersection{wxClientDataContainer::SetClientData}\label{wxclientdatacontainersetclientdata}
111
112\func{void}{SetClientData}{\param{void* }{data}}
113
114Set the untyped client data.
115
116\membersection{wxClientDataContainer::SetClientObject}\label{wxclientdatacontainersetclientobject}
117
118\func{void}{SetClientObject}{\param{wxClientData* }{data}}
119
120Set the client data object. Any previous object will be deleted.
121