Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/dataccess/gadgets/entryfld.h>
Public Member Functions | |
IliEntryField (IlvDisplay *display, const IlvPoint &at, const char *label, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Initializes a new IliEntryField instance. | |
IliEntryField (IlvDisplay *display, const char *label, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Initializes a new IliEntryField instance. | |
IliEntryField (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Initializes a new IliEntryField instance. | |
virtual IlBoolean | f_externalToInternal () |
Updates the internal value of a field according to its current external representation. | |
virtual IlvAlignment | f_getAlignment () const |
Returns the text alignment of the field. | |
virtual const IliFormat & | f_getFormat () const |
Returns the format used to derive the external representation of the field from its internal value. | |
virtual const IliInputMask & | f_getMask () const |
Returns the input mask used to edit values in the field. | |
virtual IlShort | f_getMaxLength () const |
Returns the maximum length allowed for the external representation of the field. | |
virtual const IliValue & | f_getValue (IlBoolean internalP=IlFalse) const |
Returns the value of the field. | |
virtual void | f_internalToExternal () |
Updates the external representation of the field and its display according to its current internal value. | |
virtual IlBoolean | f_isConsistent () const |
Returns IlTrue if the internal value of the field corresponds to its current external representation. | |
virtual IlBoolean | f_isReadOnly () const |
Returns IlTrue if the field is read-only. | |
virtual void | f_selectTextForAppend () |
Deselects all the text and positions the editing caret at the end of the text, provided the field gadget supports text selection. | |
virtual void | f_selectTextForOverwrite () |
Selects all the text, provided the field gadget supports text selection. | |
virtual void | f_setAlignment (IlvAlignment) |
Sets the text alignment of the field. | |
virtual void | f_setFormat (const IliFormat &) |
Sets the format used to derive the external representation of the field from its internal value. | |
virtual void | f_setInputModified (IlBoolean f) |
Sets the input-modified attribute of the field. | |
virtual void | f_setMask (const IliInputMask &) |
Sets the input mask. | |
virtual void | f_setMaxLength (IlShort) |
Sets the maximum length allowed for the external representation of the field. | |
virtual void | f_setReadOnly (IlBoolean) |
Sets the read-only property for the field. | |
virtual IlBoolean | f_setValue (const IliValue &, IlBoolean internalP=IlFalse) |
Sets the value of the field. | |
Protected Member Functions | |
const char * | formatValue (IliString &dest, const IliValue &val) |
Returns a character string which contains the formatted value. | |
void | setLabelSilently (const char *label) |
Sets a new label and launches the drawing of the new label. | |
virtual void | valueToLabel (const IliValue &value) |
Sets the value to the label of the entry field. |
Gadget class.
Library: dbgadget
The IliEntryField
class defines a text field gadget that can be connected to a data source.
IliEntryField::IliEntryField | ( | IlvDisplay * | display, | |
const IlvRect & | rect, | |||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Initializes a new IliEntryField
instance.
display | The display. | |
rect | The location. | |
thickness | The border thickness. | |
palette | The palette. |
IliEntryField::IliEntryField | ( | IlvDisplay * | display, | |
const char * | label, | |||
const IlvRect & | rect, | |||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Initializes a new IliEntryField
instance.
display | The display. | |
label | The label. | |
rect | The location. | |
thickness | The border thickness. | |
palette | The palette. |
IliEntryField::IliEntryField | ( | IlvDisplay * | display, | |
const IlvPoint & | at, | |||
const char * | label, | |||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Initializes a new IliEntryField
instance.
display | The display. | |
at | The position. | |
label | The label. | |
thickness | The border thickness. | |
palette | The palette. |
virtual IlBoolean IliEntryField::f_externalToInternal | ( | ) | [virtual] |
Updates the internal value of a field according to its current external representation.
IlTrue
if successful and IlFalse
otherwise. Note that this may fail due to the fact that not all external representations can be converted to a value object. For example, this is especially true for text fields that are used to edit numeric or date values. Reimplemented from IliFieldItf.
Reimplemented in IliTableComboBox.
virtual IlvAlignment IliEntryField::f_getAlignment | ( | ) | const [virtual] |
virtual const IliFormat& IliEntryField::f_getFormat | ( | ) | const [virtual] |
Returns the format used to derive the external representation of the field from its internal value.
Reimplemented from IliFieldItf.
virtual const IliInputMask& IliEntryField::f_getMask | ( | ) | const [virtual] |
Returns the input mask used to edit values in the field.
Currently, the classes that take into account the input mask are: IliEntryField
and its subclasses.
Reimplemented from IliFieldItf.
virtual IlShort IliEntryField::f_getMaxLength | ( | ) | const [virtual] |
Returns the maximum length allowed for the external representation of the field.
Reimplemented from IliFieldItf.
Returns the value of the field.
internal | If IlTrue , the returned value does not necessarily reflect the state of the field as the user sees it. |
Reimplemented from IliFieldItf.
virtual IlBoolean IliEntryField::f_isConsistent | ( | ) | const [virtual] |
Returns IlTrue
if the internal value of the field corresponds to its current external representation.
A return value of IlFalse
means that the external representation of the field has been edited by the end-user since the last time one of the member functions, f_setValue
, f_externalToInternal
, f_internalToExternal
or f_complete
was successfully called.
IlTrue
if the internal value of the field corresponds to its current external representation. Reimplemented from IliFieldItf.
Reimplemented in IliTableComboBox.
virtual IlBoolean IliEntryField::f_isReadOnly | ( | ) | const [virtual] |
Returns IlTrue
if the field is read-only.
IlTrue
if the field is read-only. Reimplemented from IliFieldItf.
Reimplemented in IliAbstractComboBox.
virtual void IliEntryField::f_setAlignment | ( | IlvAlignment | align | ) | [virtual] |
Sets the text alignment of the field.
align | The alignment. |
Reimplemented from IliFieldItf.
virtual void IliEntryField::f_setFormat | ( | const IliFormat & | fmt | ) | [virtual] |
Sets the format used to derive the external representation of the field from its internal value.
fmt | The format. |
Reimplemented from IliFieldItf.
virtual void IliEntryField::f_setInputModified | ( | IlBoolean | flag | ) | [virtual] |
Sets the input-modified attribute of the field.
This member function is presented here for completeness. However, it should be used with care since it may cause the field, and other related components, to be in error with regard to the current state of the field.
flag | The input-modified attribute. |
Reimplemented from IliFieldItf.
virtual void IliEntryField::f_setMask | ( | const IliInputMask & | msk | ) | [virtual] |
virtual void IliEntryField::f_setMaxLength | ( | IlShort | vmax | ) | [virtual] |
Sets the maximum length allowed for the external representation of the field.
vmax | The maximum length. |
Reimplemented from IliFieldItf.
virtual void IliEntryField::f_setReadOnly | ( | IlBoolean | flag | ) | [virtual] |
Sets the read-only property for the field.
flag | The read-only flag. |
Reimplemented from IliFieldItf.
Reimplemented in IliAbstractComboBox.
virtual IlBoolean IliEntryField::f_setValue | ( | const IliValue & | val, | |
IlBoolean | internal = IlFalse | |||
) | [virtual] |
Sets the value of the field.
val | The value. | |
internal | If IlFalse , then the external representation and the display of the field are automatically updated. |
IlTrue
if successful, and IlFalse
otherwise. Reimplemented from IliFieldItf.
Reimplemented in IliTableComboBox.
Returns a character string which contains the formatted value.
dest | The string which contains the formatted value. | |
val | The value. |
void IliEntryField::setLabelSilently | ( | const char * | label | ) | [protected] |
Sets a new label and launches the drawing of the new label.
label | The label. |
virtual void IliEntryField::valueToLabel | ( | const IliValue & | value | ) | [protected, virtual] |
Sets the value to the label of the entry field.
However if a format is defined the function formatValue
is called to format the value. If there is no format but there is a mask, the value is formatted with the mask.
At the end the function setLabelSilently
is called to set the value to the label and to launch the drawing of the label.
value | The value. |
Reimplemented in IliTableComboBox.
© 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.