wxWidgets: interface/wx/valnum.h File Reference

| Version: 3.2.7

Classes | Enumerations | Functions
valnum.h File Reference

## Classes
class | wxNumValidator< T >
| wxNumValidator is the common base class for numeric validator classes. More...
class | wxIntegerValidator< T >
| Validator for text entries used for integer entry. More...
class | wxFloatingPointValidator< T >
| Validator for text entries used for floating point numbers entry. More...

## Enumerations
enum | wxNumValidatorStyle { wxNUM_VAL_DEFAULT = 0 , wxNUM_VAL_THOUSANDS_SEPARATOR = 1 , wxNUM_VAL_ZERO_AS_BLANK = 2 , wxNUM_VAL_NO_TRAILING_ZEROES }
| Bit masks used for numeric validator styles. More...

## Functions
template<typename T >
wxIntegerValidator< T > | wxMakeIntegerValidator (T *value, int style=wxNUM_VAL_DEFAULT)
| Creates a wxIntegerValidator object with automatic type deduction. More...
template<typename T >
wxFloatingPointValidator< T > | wxMakeFloatingPointValidator (T *value, int style=wxNUM_VAL_DEFAULT)
| Creates a wxFloatingPointValidator object with automatic type deduction. More...
template<typename T >
wxFloatingPointValidator< T > | wxMakeFloatingPointValidator (int precision, T *value, int style=wxNUM_VAL_DEFAULT)
| Creates a wxFloatingPointValidator object with automatic type deduction. More...

## Function Documentation

## ◆ wxMakeFloatingPointValidator() [1/2]

template<typename T >

wxFloatingPointValidator<T> wxMakeFloatingPointValidator | ( | int | precision,
|  | T * | value,
|  | int | style = `wxNUM_VAL_DEFAULT`
| ) |  |
| inline

Creates a wxFloatingPointValidator object with automatic type deduction.

Similarly to wxMakeIntegerValidator(), this function allows avoiding explicitly specifying the validator type.

Since
  2.9.2

## ◆ wxMakeFloatingPointValidator() [2/2]

template<typename T >

wxFloatingPointValidator<T> wxMakeFloatingPointValidator | ( | T * | value,
|  | int | style = `wxNUM_VAL_DEFAULT`
| ) |  |
| inline

Creates a wxFloatingPointValidator object with automatic type deduction.

Similarly to wxMakeIntegerValidator(), this function allows avoiding explicitly specifying the validator type.

Since
  2.9.2

## ◆ wxMakeIntegerValidator()

template<typename T >

wxIntegerValidator<T> wxMakeIntegerValidator | ( | T * | value,
|  | int | style = `wxNUM_VAL_DEFAULT`
| ) |  |

Creates a wxIntegerValidator object with automatic type deduction.

This function can be used to create wxIntegerValidator object without explicitly specifying its type, e.g. write just:

new wxTextCtrl(..., wxMakeIntegerValidator(&m_var));
wxTextCtrl
A text control allows text to be displayed and edited.
Definition: textctrl.h:1436
wxMakeIntegerValidator
wxIntegerValidator< T > wxMakeIntegerValidator(T *value, int style=wxNUM_VAL_DEFAULT)
Creates a wxIntegerValidator object with automatic type deduction.

instead of more verbose

new wxTextCtrl(..., wxIntegerValidator<unsigned long>(&m_var));
wxIntegerValidator
Validator for text entries used for integer entry.
Definition: valnum.h:273

Since
  2.9.2