Text Mask

Collaboration diagram for Text Mask:


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

Detailed Description

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

Function Documentation

Imask* iupMaskCreate ( const char *  mask_str  ) 

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

Imask* iupMaskCreateInt ( int  min,
int  max 

Creates an integer mask with limits.

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

Creates a real mask with limits.

Imask* iupMaskCreateReal ( int  positive,
const char *  decimal_symbol 

Creates a real mask.

void iupMaskSetCaseI ( Imask *  mask,
int  casei 

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

void iupMaskSetNoEmpty ( Imask *  mask,
int  noempty 

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

void iupMaskDestroy ( Imask *  mask  ) 

Destroys the mask.

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.

char* iupMaskGetStr ( Imask *  mask  ) 

Returns the mask string.