#include </home/zeitlin/src/wx/github/interface/wx/valgen.h>
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.
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 wxObject * | Clone () 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. |
wxGenericValidator::wxGenericValidator | ( | const wxGenericValidator & | validator | ) |
Copy constructor.
validator | Validator to copy. |
wxGenericValidator::wxGenericValidator | ( | bool * | valPtr | ) |
Constructor taking a bool pointer.
This will be used for wxCheckBox, wxRadioButton, wxToggleButton and wxBitmapToggleButton.
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.
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.
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.
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.
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 | ( | wxFileName * | valPtr | ) |
Constructor taking a wxFileName pointer.
This will be used for wxTextCtrl.
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 | ( | float * | valPtr | ) |
Constructor taking a float pointer.
This will be used for wxTextCtrl.
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 | ( | double * | valPtr | ) |
Constructor taking a double pointer.
This will be used for wxTextCtrl.
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.
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.