Functions

Text Mask
[Utilities]

Collaboration diagram for Text Mask:

Functions

IUP_SDK_API Imask * iupMaskCreate (const char *mask_str)
IUP_SDK_API Imask * iupMaskCreateInt (int min, int max)
IUP_SDK_API Imask * iupMaskCreateFloat (float min, float max, const char *decimal_symbol)
IUP_SDK_API Imask * iupMaskCreateReal (int positive, const char *decimal_symbol)
IUP_SDK_API void iupMaskSetCaseI (Imask *mask, int casei)
IUP_SDK_API void iupMaskSetNoEmpty (Imask *mask, int noempty)
IUP_SDK_API void iupMaskDestroy (Imask *mask)
IUP_SDK_API int iupMaskCheck (Imask *mask, const char *value)
IUP_SDK_API char * iupMaskGetStr (Imask *mask)

Detailed Description

Used to filter text input in IupText.
See iup_mask.h

Function Documentation

IUP_SDK_API Imask* iupMaskCreate ( const char *  mask_str  ) 

Creates a mask given a string.
If casei is true, will turn the mask case insensitive.

IUP_SDK_API Imask* iupMaskCreateInt ( int  min,
int  max 
)

Creates an integer mask with limits.

IUP_SDK_API Imask* iupMaskCreateFloat ( float  min,
float  max,
const char *  decimal_symbol 
)

Creates a real mask with limits.

IUP_SDK_API Imask* iupMaskCreateReal ( int  positive,
const char *  decimal_symbol 
)

Creates a real mask.

IUP_SDK_API void iupMaskSetCaseI ( Imask *  mask,
int  casei 
)

If casei is 1, will turn the mask case insensitive. Default is case sensitive.

IUP_SDK_API void iupMaskSetNoEmpty ( Imask *  mask,
int  noempty 
)

If noempty is 1, the value can NOT be empty. Default can be empty.

IUP_SDK_API void iupMaskDestroy ( Imask *  mask  ) 

Destroys the mask.

IUP_SDK_API int iupMaskCheck ( Imask *  mask,
const char *  value 
)

Check if the value is valid using the mask to filter it. Returns 1 if full match, -1 if partial match, and 0 otherwise.

IUP_SDK_API char* iupMaskGetStr ( Imask *  mask  ) 

Returns the mask string.