File: wx108.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 (90 lines) | stat: -rw-r--r-- 4,110 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<HTML>
<head><title>wxGenericValidator</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="wxgenericvalidator"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx107.htm#wxgdiobject"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx109.htm#wxgrid"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>wxGenericValidator</H2>
<P>
wxGenericValidator performs data transfer (but not validation or filtering) for the following
basic controls: wxButton, wxCheckBox, wxListBox, wxStaticText, wxRadioButton, wxRadioBox,
wxChoice, wxComboBox, wxGauge, wxSlider, wxScrollBar, wxSpinButton, wxTextCtrl, wxCheckListBox.<P>
It checks the type of the window and uses an appropriate type for that window. For example,
wxButton and wxTextCtrl transfer data to and from a wxString variable; wxListBox uses a
wxArrayInt; wxCheckBox uses a bool.<P>
For more information, please see <A HREF="wx309.htm#validatoroverview">Validator overview</A>.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx255.htm#wxvalidator">wxValidator</A><BR>

<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><BR>

<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/valgen.h&gt;<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx309.htm#validatoroverview">Validator overview</A>, <A HREF="wx255.htm#wxvalidator">wxValidator</A>, 
wxTextValidator (REF NOT FOUND)<P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#wxgenericvalidatorconstr">wxGenericValidator::wxGenericValidator</A><BR>
<A HREF="#topic426">wxGenericValidator::~wxGenericValidator</A><BR>
<A HREF="#wxgenericvalidatorclone">wxGenericValidator::Clone</A><BR>
<A HREF="#wxgenericvalidatortransferfromwindow">wxGenericValidator::TransferFromWindow</A><BR>
<A HREF="#wxgenericvalidatortransfertowindow">wxGenericValidator::TransferToWindow</A><BR>
<P>

<HR>
<A NAME="wxgenericvalidatorconstr"></A>
<H3>wxGenericValidator::wxGenericValidator</H3>
<P>
<B></B> <B>wxGenericValidator</B>(<B>const wxGenericValidator&amp;</B><I> validator</I>)<P>
Copy constructor.<P>
<B></B> <B>wxGenericValidator</B>(<B>bool*</B><I> valPtr</I>)<P>
Constructor taking a bool pointer. This will be used for wxCheckBox and wxRadioButton.<P>
<B></B> <B>wxGenericValidator</B>(<B>wxString*</B><I> valPtr</I>)<P>
Constructor taking a wxString pointer. This will be used for wxButton, wxComboBox, wxStaticText,
wxTextCtrl.<P>
<B></B> <B>wxGenericValidator</B>(<B>int*</B><I> valPtr</I>)<P>
Constructor taking an integer pointer. This will be used for wxGauge, wxScrollBar, wxRadioBox, wxSpinButton,
wxChoice.<P>
<B></B> <B>wxGenericValidator</B>(<B>wxArrayInt*</B><I> valPtr</I>)<P>
Constructor taking a wxArrayInt pointer. This will be used for wxListBox, wxCheckListBox.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>validator</I><UL><UL>
Validator to copy.</UL></UL>
<P>
<I>valPtr</I><UL><UL>
A pointer to a variable that contains the value. This variable
should have a lifetime equal to or longer than the validator lifetime (which is usually
determined by the lifetime of the window).</UL></UL>
<P>

<HR>
<A NAME="topic426"></A>
<H3>wxGenericValidator::~wxGenericValidator</H3>
<P>
<B></B> <B>~wxGenericValidator</B>()<P>
Destructor.<P>

<HR>
<A NAME="wxgenericvalidatorclone"></A>
<H3>wxGenericValidator::Clone</H3>
<P>
<B>virtual wxValidator*</B> <B>Clone</B>() <B>const</B><P>
Clones the generic validator using the copy constructor.<P>

<HR>
<A NAME="wxgenericvalidatortransferfromwindow"></A>
<H3>wxGenericValidator::TransferFromWindow</H3>
<P>
<B>virtual bool</B> <B>TransferToWindow</B>(<B>wxWindow*</B><I> parent</I>)<P>
Transfers the value to the window.<P>

<HR>
<A NAME="wxgenericvalidatortransfertowindow"></A>
<H3>wxGenericValidator::TransferToWindow</H3>
<P>
<B>virtual bool</B> <B>TransferToWindow</B>(<B>wxWindow*</B><I> parent</I>)<P>
Transfers the window value to the appropriate data type.<P>

</BODY></HTML>