wxGenericValidator Class Reference
[Validators]

#include <wx/valgen.h>

Inheritance diagram for wxGenericValidator:
Inheritance graph
[legend]

Detailed Description

wxGenericValidator performs data transfer (but not validation or filtering) for many type of controls.

wxGenericValidator supports:

It checks the type of the window and uses an appropriate type for it. For example, wxButton and wxTextCtrl transfer data to and from a wxString variable; wxListBox uses a wxArrayInt; wxCheckBox uses a boolean.

For more information, please see wxValidator Overview.

Library:  wxCore
Category:  Validators
See also:
wxValidator Overview, wxValidator, wxTextValidator

Public Member Functions

 wxGenericValidator (const wxGenericValidator &validator)
 Copy constructor.
 wxGenericValidator (bool *valPtr)
 Constructor taking a bool pointer.
 wxGenericValidator (wxString *valPtr)
 Constructor taking a wxString pointer.
 wxGenericValidator (int *valPtr)
 Constructor taking an integer pointer.
 wxGenericValidator (wxArrayInt *valPtr)
 Constructor taking a wxArrayInt pointer.
 wxGenericValidator (wxDateTime *valPtr)
 Constructor taking a wxDateTime pointer.
virtual ~wxGenericValidator ()
 Destructor.
virtual wxObjectClone () const
 Clones the generic validator using the copy constructor.
virtual bool TransferFromWindow ()
 Transfers the value from the window to the appropriate data type.
virtual bool TransferToWindow ()
 Transfers the value to the window.

List of all members.


Constructor & Destructor Documentation

wxGenericValidator::wxGenericValidator ( const wxGenericValidator validator  ) 

Copy constructor.

Parameters:
validator Validator to copy.
wxGenericValidator::wxGenericValidator ( bool *  valPtr  ) 

Constructor taking a bool pointer.

This will be used for wxCheckBox, wxRadioButton, wxToggleButton and wxBitmapToggleButton.

Parameters:
valPtr 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).
wxGenericValidator::wxGenericValidator ( wxString valPtr  ) 

Constructor taking a wxString pointer.

This will be used for wxButton, wxComboBox, wxStaticText, wxTextCtrl.

Parameters:
valPtr 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).
wxGenericValidator::wxGenericValidator ( int *  valPtr  ) 

Constructor taking an integer pointer.

This will be used for wxChoice, wxGauge, wxScrollBar, wxRadioBox, wxSlider, wxSpinButton and wxSpinCtrl.

Parameters:
valPtr 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).
wxGenericValidator::wxGenericValidator ( wxArrayInt valPtr  ) 

Constructor taking a wxArrayInt pointer.

This will be used for wxListBox, wxCheckListBox.

Parameters:
valPtr 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).
wxGenericValidator::wxGenericValidator ( wxDateTime valPtr  ) 

Constructor taking a wxDateTime pointer.

This will be used for wxDatePickerCtrl.

Parameters:
valPtr 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).
virtual wxGenericValidator::~wxGenericValidator (  )  [virtual]

Destructor.


Member Function Documentation

virtual wxObject* wxGenericValidator::Clone (  )  const [virtual]

Clones the generic validator using the copy constructor.

Reimplemented from wxValidator.

virtual bool wxGenericValidator::TransferFromWindow (  )  [virtual]

Transfers the value from the window to the appropriate data type.

Reimplemented from wxValidator.

virtual bool wxGenericValidator::TransferToWindow (  )  [virtual]

Transfers the value to the window.

Reimplemented from wxValidator.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



wxWidgets logo

[ top ]