Functions

Text Mask
[Utilities]

Collaboration diagram for Text Mask:

Functions

Imask * iupMaskCreate (const char *mask_str, int casei)
Imask * iupMaskCreateInt (int min, int max)
Imask * iupMaskCreateFloat (float min, float max)
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,
int  casei 
)

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 
)

Creates a float mask with limits.

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.