]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/property.tex
Removed OGL prior to re-adding; some Watcom corrections
[wxWidgets.git] / docs / latex / wx / property.tex
CommitLineData
200fed6c
VS
1\section{\class{wxProperty}}\label{wxproperty}
2
3The {\bf wxProperty} class represents a property, with a \helpref{wxPropertyValue}{wxpropertyvalue}\rtfsp
4containing the actual value, a name a role, an optional validator, and
5an optional associated window.
6
7A property might correspond to an actual C++ data member, or it
8might correspond to a conceptual property, such as the width of a window.
9There is no explicit data member {\it wxWindow::width}, but it may be convenient
10to invent such a property for the purposes of editing attributes of the window.
11The properties in the property sheet can be mapped to ``reality" by
12whatever means (in this case by calling wxWindow::SetSize when the user has
13finished editing the property sheet).
14
15A validator may be associated with the property in order to ensure that this and
16only this validator will be used for editing and validating the property.
17An alternative method is to use the {\it role} parameter to specify what kind
18of validator would be appropriate; for example, specifying ``filename" for the role
19would allow the property view to find an appropriate validator at edit time.
20
21
22\membersection{wxProperty::wxProperty}
23
24\func{void}{wxProperty}{\void}
25
26\func{void}{wxProperty}{\param{wxProperty\& }{prop}}
27
28\func{void}{wxProperty}{\param{wxString}{ name}, \param{wxString}{ role}, \param{wxPropertyValidator *}{validator=NULL}}
29
30\func{void}{wxProperty}{\param{wxString}{ name}, \param{const wxPropertyValue\&}{ val}, \param{wxString}{ role}, \param{wxPropertyValidator *}{validator=NULL}}
31
32Constructors.
33
34\membersection{wxProperty::\destruct{wxProperty}}
35
36\func{void}{\destruct{wxProperty}}{\void}
37
38Destructor. Destroys the wxPropertyValue, and the property validator if there is one. However, if the
39actual C++ value in the wxPropertyValue is a pointer, the data in that variable is not destroyed.
40
41\membersection{wxProperty::GetValue}
42
43\func{wxPropertyValue\&}{GetValue}{\void}
44
45Returns a reference to the property value.
46
47\membersection{wxProperty::GetValidator}
48
49\func{wxPropertyValidator *}{GetValidator}{\void}
50
51Returns a pointer to the associated property validator (if any).
52
53\membersection{wxProperty::GetName}
54
55\func{wxString\&}{GetName}{\void}
56
57Returns the name of the property.
58
59\membersection{wxProperty::GetRole}
60
61\func{wxRole\&}{GetRole}{\void}
62
63Returns the role of the property, to be used when choosing an appropriate validator.
64
65\membersection{wxProperty::GetWindow}
66
67\func{wxWindow *}{GetWindow}{\void}
68
69Returns the window associated with the property (if any).
70
71\membersection{wxProperty::SetValue}
72
73\func{void}{SetValue}{\param{wxPropertyValue\&}{ val}}
74
75Sets the value of the property.
76
77\membersection{wxProperty::SetName}
78
79\func{void}{SetName}{\param{wxString\&}{ name}}
80
81Sets the name of the property.
82
83\membersection{wxProperty::SetRole}
84
85\func{void}{SetRole}{\param{wxString\&}{ role}}
86
87Sets the role of the property.
88
89\membersection{wxProperty::SetValidator}
90
91\func{void}{SetValidator}{\param{wxPropertyValidator *}{validator}}
92
93Sets the validator: this will be deleted when the property is deleted.
94
95\membersection{wxProperty::SetWindow}
96
97\func{void}{SetWindow}{\param{wxWindow *}{win}}
98
99Sets the window associated with the property.
100
101\membersection{wxProperty::operator $=$}
102
103\func{void}{operator $=$}{\param{const wxPropertyValue\&}{ val}}
104
105Assignment operator.
106