Version: 3.0.5
Loading...
Searching...
No Matches
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.
 
template<typename T >
wxFloatingPointValidator< T > wxMakeFloatingPointValidator (T *value, int style=wxNUM_VAL_DEFAULT)
 Creates a wxFloatingPointValidator object with automatic type deduction.
 
template<typename T >
wxFloatingPointValidator< T > wxMakeFloatingPointValidator (int precision, T *value, int style=wxNUM_VAL_DEFAULT)
 

Function Documentation

◆ wxMakeFloatingPointValidator() [1/2]

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

◆ 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));
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));
Validator for text entries used for integer entry.
Definition valnum.h:202
Since
2.9.2