Views Data Access Package API Reference Guide |
Views Documentation Home |
Field gadget class. More...
#include <ilviews/dataccess/gadgets/dbfield.h>
Public Member Functions | |
IliDbField (IlvDisplay *display, const IlvRect &rect, IliDbFieldStyle style=IliEntryFieldStyle, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Initializes a DbField gadget that initially resembles an entry field. More... | |
virtual IlBoolean | f_complete () |
Updates the internal value of the field, according to its current external representation and its foreign table, provided completion is enabled for the field. More... | |
virtual void | f_enableCompletion (IlBoolean) |
Sets the completion property of the field. More... | |
virtual IlBoolean | f_externalToInternal () |
Updates the internal value of a field according to its current external representation. More... | |
virtual IlvAlignment | f_getAlignment () const |
Returns the text alignment of the field. More... | |
virtual const IliFormat & | f_getFormat () const |
Returns the format used to derive the external representation of the field from its internal value. More... | |
virtual const char * | f_getLabel () const |
Returns the label displayed by the field gadget. More... | |
virtual const IliInputMask & | f_getMask () const |
Returns the input mask used to edit values in the field. More... | |
virtual IlShort | f_getMaxLength () const |
Returns the maximum length allowed for the external representation of the field. More... | |
virtual const IliValue & | f_getValue (IlBoolean=IlFalse) const |
Returns the value of the field. More... | |
virtual IlBoolean | f_hasLabel () const |
Returns IlTrue if the field gadget can display a label. More... | |
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. More... | |
virtual IlBoolean | f_isInputModified () const |
Returns IlTrue if the external representation has been edited by the end-user. More... | |
virtual IlBoolean | f_isReadOnly () const |
Returns IlTrue if the field is read-only. More... | |
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. More... | |
virtual void | f_setConstrained (IlBoolean) |
Sets the constrained property of the field. More... | |
virtual void | f_setForeignDisplayColumnName (const char *) |
Sets the name of the column of the foreign table that will serve as a result, when the table is used as a map to convert internal values into external representations. More... | |
virtual void | f_setForeignTable (IliTable *, IlBoolean=IlFalse) |
Sets the foreign table of the field. More... | |
virtual void | f_setForeignValueColumnName (const char *) |
Sets the name of the column of the foreign table that will serve as a key, when the table is used as a map to convert internal values into external representations. More... | |
virtual void | f_setFormat (const IliFormat &) |
Sets the format used to derive the external representation of the field from its internal value. More... | |
virtual void | f_setInputModified (IlBoolean) |
Sets the input-modified attribute of the field. More... | |
virtual void | f_setLabel (const char *) |
Sets the label of the field gadget. More... | |
virtual void | f_setMask (const IliInputMask &) |
Sets the input mask. More... | |
virtual void | f_setMaxLength (IlShort) |
Sets the maximum length allowed for the external representation of the field. More... | |
virtual void | f_setReadOnly (IlBoolean) |
Sets the read-only property for the field. More... | |
virtual IlBoolean | f_setValue (const IliValue &, IlBoolean=IlFalse) |
Sets the value of the field. More... | |
virtual void | f_setVisibleRowsCount (IlInt) |
Sets the number of rows to be displayed when the foreign table is displayed. More... | |
IlvFont * | getLabelFont () const |
Returns the label font. More... | |
IlvColor * | getLabelForeground () const |
Returns the foreground color of the label. More... | |
const IlvPoint & | getLabelPosition () const |
Returns the position of the label. More... | |
IliDbFieldStyle | getStyle () const |
Returns the current style of the DbField gadget. More... | |
IliFieldItf * | getSubField () |
Returns the internal IliFieldItf object that implements the current DbField style. More... | |
const IliFieldItf * | getSubField () const |
Returns the internal IliFieldItf object that implements the current DbField style. More... | |
void | putLabelAtLeft () |
Changes the position of the label so that it appears to the left of the gadget. | |
void | putLabelOnTop () |
Changes the position of the label so that it appears above the gadget. | |
void | setLabelFont (IlvFont *font) |
Sets the label font. More... | |
void | setLabelForeground (IlvColor *color) |
Sets the foreground color of the label. More... | |
void | setLabelPosition (const IlvPoint &pos) |
Sets the position of the label. More... | |
virtual void | setStyle (IliDbFieldStyle style) |
Sets the style of the DbField gadget. More... | |
![]() | |
void | f_applyReferences (IlvApplyObject f, IlAny a) |
Should be called when the applyReferences() member function, of the gadget class, is called. More... | |
IliDataSource * | f_getDataSource () |
Returns the data source. More... | |
const IliDataSource * | f_getDataSource () const |
Returns the data source. More... | |
const char * | f_getDataSourceColumnName () const |
Returns the name of the column. More... | |
const char * | f_getDataSourceName () const |
Returns the name of the data source, which this field is (or must be) connected to. More... | |
virtual IliTablePropertyManager * | f_getEffectiveTablePropertyManager () |
Returns the effective table property manager. More... | |
virtual const IliTablePropertyManager * | f_getEffectiveTablePropertyManager () const |
Returns the effective table property manager. More... | |
const char * | f_getForeignDataSourceName () const |
Returns the name of the foreign data source. More... | |
const char * | f_getForeignDisplayColumnName () const |
Returns the name of the column of the foreign table that will serve as a result. More... | |
IliTable * | f_getForeignTable () |
Returns the foreign table. More... | |
const IliTable * | f_getForeignTable () const |
Returns the foreign table. More... | |
const char * | f_getForeignValueColumnName () const |
Returns the name of the column of the foreign table that will serve as a key. More... | |
IlvGadget * | f_getGadget () |
Returns the gadget associated with this field through multiple inheritance. More... | |
const IlvGadget * | f_getGadget () const |
Returns the constant gadget associated with this field through multiple inheritance. More... | |
IlvGraphic * | f_getGraphic () |
Returns the graphic associated with this field through multiple inheritance. More... | |
const IlvGraphic * | f_getGraphic () const |
Returns the constant graphic associated with this field through multiple inheritance. More... | |
const char * | f_getTablePropertyManagerName () const |
Returns the name of the table property manager used by this field. More... | |
IlInt | f_getVisibleRowsCount () const |
Returns the number of rows that will be displayed when the foreign table is displayed. More... | |
virtual void | f_ignoreModifiedState (IlBoolean ignore) |
Sets the ignore modified state attribute of the field. More... | |
virtual IlBoolean | f_isAutoFitPullDown () const |
Returns IlTrue if the width of the pull-down menu is automatically computed so that its contents fit. More... | |
IlBoolean | f_isCompletionEnabled () const |
Returns IlTrue if completion is enabled. More... | |
IlBoolean | f_isConnectedToDataSource () const |
Returns IlTrue if the field is currently connected to a column of a data source. More... | |
IlBoolean | f_isConstrained () const |
Returns IlTrue if the foreign table limits the set of possible internal values for this field. More... | |
IlBoolean | f_isDataSourceOwner () const |
Returns IlTrue if the field owns the data source. More... | |
IlBoolean | f_isForeignTableOwner () const |
Returns IlTrue if the field owns its foreign table. More... | |
virtual IlBoolean | f_isModifiedStateIgnored () const |
Returns IlTrue if the modified states are ignored when the f_setValue() function is called. More... | |
IlBoolean | f_isUsingTableProperties () const |
Returns IlTrue if the field uses table properties. More... | |
void | f_killFocus () |
Should be called when the gadget loses the focus. | |
virtual void | f_setAutoFitPullDown (IlBoolean flag) |
Enables/disables the automatic width computing of the pull-down menu. More... | |
virtual void | f_setDataSourceColumnName (const char *name) |
Sets the name of the column. More... | |
virtual void | f_setDataSourceName (const char *name) |
Sets the name of the data source. More... | |
void | f_setFocus () |
Should be called when the gadget receives the focus. | |
virtual void | f_setForeignDataSourceName (const char *name) |
Sets the name of the foreign data source. More... | |
virtual void | f_setTablePropertyManagerName (const char *name) |
Sets the name of the table property manager to use. More... | |
virtual IlBoolean | f_supportsTableProperties () const |
Returns IlTrue if this gadget supports table properties. More... | |
virtual void | f_useTableProperties (IlBoolean flag) |
Enables/Disables the use of the table properties. More... | |
Additional Inherited Members | |
![]() | |
static IlvSymbol * | InputModifiedSymbol () |
Returns the name of the callback that the field gadget will invoke every time the field input-modified property changes from IlFalse to IlTrue . More... | |
![]() | |
void | f_read (IlvInputFile &input) |
Should be called by the stream-based constructor of the gadget. More... | |
void | f_set (IlvGraphic *g, const IliFieldItf &other) |
Should be called by the copy constructor of the graphic class that is passed. More... | |
void | f_setGraphic (IlvGraphic *g) |
Should be called by all constructors of the graphic class (except the copy constructor). More... | |
void | f_subscribe () |
Should be called after the setHolder() member function of the gadget class. | |
void | f_unsubscribe () |
Should be called before the setHolder() member function of the gadget class. More... | |
void | f_write (IlvOutputFile &output) const |
Should be called by the write() member function of the gadget class. More... | |
Field gadget class.
Library: dbgadget
The IliDbField
class defines gadgets that can dynamically change their look and feel. An IliDbField
has the following properties: A style that determines the look and feel of the gadget. It may be one of the following values:
A label that will be displayed near the gadget. The label can be positioned anywhere unless the style is either IliToggleStyle
or IliToggleSelectorStyle
.
IliEntryField
, IliDbFieldStyle
.Name | Type | Equivalent methods |
---|---|---|
labelColor | Color | getLabelForeground() , setLabelForeground() |
labelFont | Font | getLabelFont() , setLabelFont() |
style | Object | getStyle() , setStyle() |
subField | Object | getSubField() . See [subField] below. |
[subField] Contains the gadget object that corresponds to the DbField style. If the style is IliEntryFieldStyle
, the subField property contains an IliEntryField
gadget. If the style is IliTextStyle
, it contains an IliDbText
gadget, and so on.
Name | Return type | Equivalent methods |
---|---|---|
putLabelAtLeft() | Void | putLabelAtLeft() |
putLabelOnTop() | Void | putLabelOnTop() |
IliDbField::IliDbField | ( | IlvDisplay * | display, |
const IlvRect & | rect, | ||
IliDbFieldStyle | style = IliEntryFieldStyle , |
||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
Initializes a DbField gadget that initially resembles an entry field.
display | The display. |
rect | The location. |
style | The style. |
thickness | The border thickness. |
palette | The palette. |
|
virtual |
Updates the internal value of the field, according to its current external representation and its foreign table, provided completion is enabled for the field.
For more information on completion, see the f_iscompletionEnabled()
member function.
IlTrue
if successful. Reimplemented from IliFieldItf.
|
virtual |
Sets the completion property of the field.
flag | If IlTrue , the completion property is on. |
Reimplemented from IliFieldItf.
|
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.
|
virtual |
|
virtual |
Returns the format used to derive the external representation of the field from its internal value.
Reimplemented from IliFieldItf.
|
virtual |
|
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 |
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 |
Returns IlTrue
if the field gadget can display a label.
IlTrue
if the field gadget can display a label. Reimplemented from IliFieldItf.
|
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.
|
virtual |
Returns IlTrue
if the external representation has been edited by the end-user.
IlTrue
if the external representation 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. Reimplemented from IliFieldItf.
|
virtual |
Returns IlTrue
if the field is read-only.
IlTrue
if the field is read-only. Reimplemented from IliFieldItf.
|
virtual |
Sets the text alignment of the field.
align | The alignment. |
Reimplemented from IliFieldItf.
|
virtual |
Sets the constrained property of the field.
flag | If IlTrue the constrained property is on. |
Reimplemented from IliFieldItf.
|
virtual |
Sets the name of the column of the foreign table that will serve as a result, when the table is used as a map to convert internal values into external representations.
name | The column name. |
Reimplemented from IliFieldItf.
Sets the foreign table of the field.
tbl | The table. |
owner | Determines whether the field will own the table. |
Reimplemented from IliFieldItf.
|
virtual |
Sets the name of the column of the foreign table that will serve as a key, when the table is used as a map to convert internal values into external representations.
name | The column name. |
Reimplemented from IliFieldItf.
|
virtual |
Sets the format used to derive the external representation of the field from its internal value.
fmt | The format. |
Reimplemented from IliFieldItf.
|
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 |
|
virtual |
|
virtual |
Sets the maximum length allowed for the external representation of the field.
vmax | The maximum length. |
Reimplemented from IliFieldItf.
|
virtual |
Sets the read-only property for the field.
flag | The read-only flag. |
Reimplemented from IliFieldItf.
|
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.
|
virtual |
Sets the number of rows to be displayed when the foreign table is displayed.
count | The row count. |
Reimplemented from IliFieldItf.
IlvFont* IliDbField::getLabelFont | ( | ) | const |
Returns the label font.
IlvColor* IliDbField::getLabelForeground | ( | ) | const |
Returns the foreground color of the label.
const IlvPoint& IliDbField::getLabelPosition | ( | ) | const |
Returns the position of the label.
IliDbFieldStyle IliDbField::getStyle | ( | ) | const |
Returns the current style of the DbField gadget.
IliFieldItf* IliDbField::getSubField | ( | ) |
Returns the internal IliFieldItf
object that implements the current DbField style.
IliFieldItf
object that implements the current DbField style. If the style is IliEntryFieldStyle
, this member function returns an IliEntryField
gadget, if the style is IliDbTextStyle
it returns an IliDbText
gadget, and so on. const IliFieldItf* IliDbField::getSubField | ( | ) | const |
Returns the internal IliFieldItf
object that implements the current DbField style.
IliFieldItf
object that implements the current DbField style. If the style is IliEntryFieldStyle
, this member function returns an IliEntryField
gadget, if the style is IliDbTextStyle
it returns an IliDbText
gadget, and so on. void IliDbField::setLabelFont | ( | IlvFont * | font | ) |
Sets the label font.
font | The font. |
void IliDbField::setLabelForeground | ( | IlvColor * | color | ) |
Sets the foreground color of the label.
color | The foreground color. |
void IliDbField::setLabelPosition | ( | const IlvPoint & | pos | ) |
Sets the position of the label.
pos | The position. |
|
virtual |
Sets the style of the DbField gadget.
style | The new style. |