Version: 2.9.4
Public Member Functions
wxGenericValidator Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/valgen.h>

Inheritance diagram for wxGenericValidator:

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
参照:
wxValidator Overview, wxValidator, wxTextValidator, wxIntegerValidator, wxFloatingPointValidator

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.
 wxGenericValidator (wxFileName *valPtr)
 Constructor taking a wxFileName pointer.
 wxGenericValidator (float *valPtr)
 Constructor taking a float pointer.
 wxGenericValidator (double *valPtr)
 Constructor taking a double 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:
validatorValidator to copy.
wxGenericValidator::wxGenericValidator ( bool *  valPtr)

Constructor taking a bool pointer.

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

Parameters:
valPtrA 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:
valPtrA 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:
valPtrA 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:
valPtrA 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:
valPtrA 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 ( wxFileName valPtr)

Constructor taking a wxFileName pointer.

This will be used for wxTextCtrl.

Parameters:
valPtrA 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).
Since:
2.9.3
wxGenericValidator::wxGenericValidator ( float *  valPtr)

Constructor taking a float pointer.

This will be used for wxTextCtrl.

Parameters:
valPtrA 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).
Since:
2.9.3
wxGenericValidator::wxGenericValidator ( double *  valPtr)

Constructor taking a double pointer.

This will be used for wxTextCtrl.

Parameters:
valPtrA 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).
Since:
2.9.3
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