Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Input mask class. More...
#include <ilviews/dataccess/inpmask.h>
Public Member Functions | |
IliInputMask (const IliInputMask &msk) | |
Initializes an instance of IliInputMask with another mask. | |
IliInputMask (const char *definition) | |
Initializes a mask according to one definition. | |
IliInputMask () | |
Initializes a default mask. | |
IlBoolean | format (IliString &dest, const IliValue &src, IlBoolean forEdit) const |
Formats a value. | |
void | formatForClipboard (IliString &dest, const char *src, IlInt startPos) const |
Formats a character string for the clipboard. | |
const char * | getDefinition () const |
Returns the mask definition. | |
IlBoolean | isNull () const |
Returns IlTrue if the mask definition is null. | |
IliInputMask & | operator= (const IliInputMask &msk) |
Copies a mask. | |
int | operator== (const IliInputMask &) const |
Compares two masks. | |
void | read (IL_STDPREF istream &input) |
Reads the mask from an input stream. | |
void | setDefinition (const char *definition) |
Sets the mask definition. | |
IlBoolean | unFormat (IliString &dest, const char *src) const |
Unformats a character string. | |
void | write (IL_STDPREF ostream &output) const |
Writes the mask definition to an output stream in such a way that it may be read back by the read member function. | |
Static Public Member Functions | |
static void | AddAlias (const char *aliasName, const char *definition) |
Defines a new alias. | |
static const char * | GetAliasDefinition (const char *aliasName) |
Returns the alias definition. | |
static const char * | GetAliasDefinition (IlInt aliasIndex) |
Returns the alias definition. | |
static IlInt | GetAliasesCount () |
Returns the count of the mask aliases. | |
static IlInt | GetAliasIndex (const char *aliasName) |
Returns the alias index. | |
static const char * | GetAliasName (IlInt aliasIndex) |
Returns the name of one alias. | |
static IliInputMask & | GetDefaultMask () |
Returns a constant reference to the default mask. | |
static wchar_t | GetPlaceHolderChar () |
Returns the character used to represent the missing character during the edit mode. | |
static void | RemoveAlias (IlInt aliasIndex) |
Removes an alias. | |
static void | SetAliasDefinition (IlInt aliasIndex, const char *definition) |
Sets alias definition. | |
static void | SetAliasName (IlInt aliasIndex, const char *name) |
Sets alias name. | |
static void | SetPlaceHolderValue (IliPlaceHolderName name, wchar_t value) |
Input mask class.
Library: dataccess
This class defines the mask that is used to enter data into an IliEntryField
. The mask is defined by a character string (see specifications syntax). The mask has two modes:
IliEntryField
does not have the keyboard focus. IliInputMask::IliInputMask | ( | const char * | definition | ) |
Initializes a mask according to one definition.
definition | The definition. |
IliInputMask::IliInputMask | ( | const IliInputMask & | msk | ) |
Initializes an instance of IliInputMask
with another mask.
msk | The origin mask. |
static void IliInputMask::AddAlias | ( | const char * | aliasName, | |
const char * | definition | |||
) | [static] |
Defines a new alias.
aliasName | The alias name. | |
definition | The alias definition. |
Formats a value.
dest | The formatted string. | |
src | The value. | |
forEdit | If IlTrue , the missing characters are replaced by the character returned by the function GetPlaceHolderChar . |
IlTrue
if it is successful. Formats a character string for the clipboard.
All mandatory missing characters are replaced by the default character.
dest | The formatted string. | |
src | The string. | |
startPos | The position of the first character to format (position begins at 0 ). |
static const char* IliInputMask::GetAliasDefinition | ( | const char * | aliasName | ) | [static] |
Returns the alias definition.
aliasName | The alias name. |
aliasName
parameter. Returns -1
if no such alias is found. static const char* IliInputMask::GetAliasDefinition | ( | IlInt | aliasIndex | ) | [static] |
Returns the alias definition.
aliasIndex | The alias index. |
aliasIndex
position. static IlInt IliInputMask::GetAliasesCount | ( | ) | [static] |
Returns the count of the mask aliases.
static IlInt IliInputMask::GetAliasIndex | ( | const char * | aliasName | ) | [static] |
Returns the alias index.
aliasName | The alias name. |
aliasName
parameter. Returns -1
if no such alias is found. static const char* IliInputMask::GetAliasName | ( | IlInt | aliasIndex | ) | [static] |
Returns the name of one alias.
aliasIndex | The alias index. |
static IliInputMask& IliInputMask::GetDefaultMask | ( | ) | [static] |
Returns a constant reference to the default mask.
const char* IliInputMask::getDefinition | ( | ) | const |
Returns the mask definition.
static wchar_t IliInputMask::GetPlaceHolderChar | ( | ) | [static] |
Returns the character used to represent the missing character during the edit mode.
IlBoolean IliInputMask::isNull | ( | ) | const |
Returns IlTrue
if the mask definition is null.
IlTrue
if the mask definition is null. IliInputMask& IliInputMask::operator= | ( | const IliInputMask & | msk | ) |
Copies a mask.
msk | The mask which is copied. |
int IliInputMask::operator== | ( | const IliInputMask & | ) | const |
Compares two masks.
1
if the masks are equal. void IliInputMask::read | ( | IL_STDPREF istream & | input | ) |
Reads the mask from an input stream.
input | The input stream. |
static void IliInputMask::RemoveAlias | ( | IlInt | aliasIndex | ) | [static] |
Removes an alias.
aliasIndex | The alias index. |
static void IliInputMask::SetAliasDefinition | ( | IlInt | aliasIndex, | |
const char * | definition | |||
) | [static] |
Sets alias definition.
aliasIndex | The alias index. | |
definition | The alias definition. |
static void IliInputMask::SetAliasName | ( | IlInt | aliasIndex, | |
const char * | name | |||
) | [static] |
Sets alias name.
aliasIndex | The alias index. | |
name | The alias name. |
void IliInputMask::setDefinition | ( | const char * | definition | ) |
Sets the mask definition.
definition | The definition. |
static void IliInputMask::SetPlaceHolderValue | ( | IliPlaceHolderName | name, | |
wchar_t | value | |||
) | [static] |
Changes a place holder which is used to define a mask.
You can use this function to change the value of the placeholders. For example, you decide that the colon is the date separator for the mask definition. But, in this case, you must change the placeholder for time separator because two placeholders can not have the same value, Except, for the placeholders about set of characters. Note: If you change the value for a placeholder, the correct working of the default mask is not guaranteed.
name | The placeholder name. | |
value | The new value. |
Unformats a character string.
dest | The unformatted string. | |
src | The string. |
IlTrue
if it is successful. void IliInputMask::write | ( | IL_STDPREF ostream & | output | ) | const |
Writes the mask definition to an output stream in such a way that it may be read back by the read
member function.
output | The output stream. |
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.