]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/property.tex
removed small as otherwise the code was apparently unreadable in HTML docs
[wxWidgets.git] / docs / latex / wx / property.tex
... / ...
CommitLineData
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\latexignore{\rtfignore{\wxheading{Members}}}
22
23\membersection{wxProperty::wxProperty}
24
25\func{void}{wxProperty}{\void}
26
27\func{void}{wxProperty}{\param{wxProperty\& }{prop}}
28
29\func{void}{wxProperty}{\param{wxString}{ name}, \param{wxString}{ role}, \param{wxPropertyValidator *}{validator=NULL}}
30
31\func{void}{wxProperty}{\param{wxString}{ name}, \param{const wxPropertyValue\&}{ val}, \param{wxString}{ role}, \param{wxPropertyValidator *}{validator=NULL}}
32
33Constructors.
34
35\membersection{wxProperty::\destruct{wxProperty}}
36
37\func{void}{\destruct{wxProperty}}{\void}
38
39Destructor. Destroys the wxPropertyValue, and the property validator if there is one. However, if the
40actual C++ value in the wxPropertyValue is a pointer, the data in that variable is not destroyed.
41
42\membersection{wxProperty::GetValue}
43
44\func{wxPropertyValue\&}{GetValue}{\void}
45
46Returns a reference to the property value.
47
48\membersection{wxProperty::GetValidator}
49
50\func{wxPropertyValidator *}{GetValidator}{\void}
51
52Returns a pointer to the associated property validator (if any).
53
54\membersection{wxProperty::GetName}
55
56\func{wxString\&}{GetName}{\void}
57
58Returns the name of the property.
59
60\membersection{wxProperty::GetRole}
61
62\func{wxRole\&}{GetRole}{\void}
63
64Returns the role of the property, to be used when choosing an appropriate validator.
65
66\membersection{wxProperty::GetWindow}
67
68\func{wxWindow *}{GetWindow}{\void}
69
70Returns the window associated with the property (if any).
71
72\membersection{wxProperty::SetValue}
73
74\func{void}{SetValue}{\param{wxPropertyValue\&}{ val}}
75
76Sets the value of the property.
77
78\membersection{wxProperty::SetName}
79
80\func{void}{SetName}{\param{wxString\&}{ name}}
81
82Sets the name of the property.
83
84\membersection{wxProperty::SetRole}
85
86\func{void}{SetRole}{\param{wxString\&}{ role}}
87
88Sets the role of the property.
89
90\membersection{wxProperty::SetValidator}
91
92\func{void}{SetValidator}{\param{wxPropertyValidator *}{validator}}
93
94Sets the validator: this will be deleted when the property is deleted.
95
96\membersection{wxProperty::SetWindow}
97
98\func{void}{SetWindow}{\param{wxWindow *}{win}}
99
100Sets the window associated with the property.
101
102\membersection{wxProperty::operator $=$}
103
104\func{void}{operator $=$}{\param{const wxPropertyValue\&}{ val}}
105
106Assignment operator.
107