File: prop193.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (35 lines) | stat: -rw-r--r-- 2,413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<HTML>
<head><title>wxPropertyValidator overview</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="wxpropertyvalidatoroverview"></A><CENTER>
<A HREF="prop.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="prop192.htm#validatoroverview"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="prop192.htm#validatoroverview"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="prop194.htm#wxpropertylistvalidatoroverview"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H3>wxPropertyValidator overview</H3>
<P>
Class: <A HREF="prop122.htm#wxpropertyvalidator">wxPropertyValidator</A><P>
This class is the root of all property validator classes. It contains a small
amount of common functionality, including functions to convert between
strings and C++ values.<P>
A validator is notionally an object which sits between a property and its displayed
value, and checks that the value the user enters is correct, giving an error message
if the validation fails. In fact, the validator does more than that, and is akin to
a view class but at a finer level of detail. It is also responsible for
loading the dialog box control with the value from the property, putting it back
into the property, preparing special controls for editing the value, and
may even invoke special dialogs for editing the value in a convenient way.<P>
In a property list dialog, there is quite a lot of scope for supplying custom dialogs,
such as file or colour selectors. For a form dialog, there is less scope because
there is no concept of 'detailed editing' of a value: one control is associated with
one property, and there is no provision for invoking further dialogs. The reader
may like to work out how the form view could be extended to provide some of the
functionality of the property list!<P>
Validator objects may be associated explictly with a wxProperty, or they may be
indirectly associated by virtue of a property 'kind' that matches validators having
that kind. In the latter case, such validators are stored in a validator registry
which is passed to the view before the dialog is shown. If the validator takes
arguments, such as minimum and maximum values in the case of a wxIntegerListValidator,
then the validator must be associated explicitly with the property. The validator
will be deleted when the property is deleted.<P>

</BODY></HTML>