]> git.saurik.com Git - wxWidgets.git/blob - contrib/docs/latex/deprecated/property.tex
Since it is documented, changed GetOrCreateCellAttr from protected to
[wxWidgets.git] / contrib / docs / latex / deprecated / property.tex
1 \section{\class{wxProperty}}\label{wxproperty}
2
3 The {\bf wxProperty} class represents a property, with a \helpref{wxPropertyValue}{wxpropertyvalue}\rtfsp
4 containing the actual value, a name a role, an optional validator, and
5 an optional associated window.
6
7 A property might correspond to an actual C++ data member, or it
8 might correspond to a conceptual property, such as the width of a window.
9 There is no explicit data member {\it wxWindow::width}, but it may be convenient
10 to invent such a property for the purposes of editing attributes of the window.
11 The properties in the property sheet can be mapped to ``reality" by
12 whatever means (in this case by calling wxWindow::SetSize when the user has
13 finished editing the property sheet).
14
15 A validator may be associated with the property in order to ensure that this and
16 only this validator will be used for editing and validating the property.
17 An alternative method is to use the {\it role} parameter to specify what kind
18 of validator would be appropriate; for example, specifying ``filename" for the role
19 would 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
33 Constructors.
34
35 \membersection{wxProperty::\destruct{wxProperty}}
36
37 \func{void}{\destruct{wxProperty}}{\void}
38
39 Destructor. Destroys the wxPropertyValue, and the property validator if there is one. However, if the
40 actual 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
46 Returns a reference to the property value.
47
48 \membersection{wxProperty::GetValidator}
49
50 \func{wxPropertyValidator *}{GetValidator}{\void}
51
52 Returns a pointer to the associated property validator (if any).
53
54 \membersection{wxProperty::GetName}
55
56 \func{wxString\&}{GetName}{\void}
57
58 Returns the name of the property.
59
60 \membersection{wxProperty::GetRole}
61
62 \func{wxRole\&}{GetRole}{\void}
63
64 Returns 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
70 Returns the window associated with the property (if any).
71
72 \membersection{wxProperty::SetValue}
73
74 \func{void}{SetValue}{\param{wxPropertyValue\&}{ val}}
75
76 Sets the value of the property.
77
78 \membersection{wxProperty::SetName}
79
80 \func{void}{SetName}{\param{wxString\&}{ name}}
81
82 Sets the name of the property.
83
84 \membersection{wxProperty::SetRole}
85
86 \func{void}{SetRole}{\param{wxString\&}{ role}}
87
88 Sets the role of the property.
89
90 \membersection{wxProperty::SetValidator}
91
92 \func{void}{SetValidator}{\param{wxPropertyValidator *}{validator}}
93
94 Sets 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
100 Sets the window associated with the property.
101
102 \membersection{wxProperty::operator $=$}
103
104 \func{void}{operator $=$}{\param{const wxPropertyValue\&}{ val}}
105
106 Assignment operator.
107