Rogue Wave Views
Data Access Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
IliFieldItf Class Referenceabstract

Field class. More...

#include <ilviews/dataccess/fielditf.h>

Inheritance diagram for IliFieldItf:
IliDbField IliDbNavigator IliDbOptionMenu IliDbPicture IliDbStringList IliDbText IliDbToggle IliEntryField IliScrolledComboBox IliTableGadget IliToggleSelector

Public Member Functions

void f_applyReferences (IlvApplyObject f, IlAny a)
 Should be called when the applyReferences() member function, of the gadget class, is called. 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 flag)
 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...
 
const IliDataSourcef_getDataSource () const
 Returns the data source. More...
 
IliDataSourcef_getDataSource ()
 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 const IliTablePropertyManagerf_getEffectiveTablePropertyManager () const
 Returns the effective table property manager. More...
 
virtual IliTablePropertyManagerf_getEffectiveTablePropertyManager ()
 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...
 
const IliTablef_getForeignTable () const
 Returns the foreign table. More...
 
IliTablef_getForeignTable ()
 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...
 
virtual const IliFormatf_getFormat () const
 Returns the format used to derive the external representation of the field from its internal value. More...
 
const IlvGadgetf_getGadget () const
 Returns the constant gadget associated with this field through multiple inheritance. More...
 
IlvGadgetf_getGadget ()
 Returns the gadget associated with this field through multiple inheritance. More...
 
const IlvGraphicf_getGraphic () const
 Returns the constant graphic associated with this field through multiple inheritance. More...
 
IlvGraphicf_getGraphic ()
 Returns the graphic associated with this field through multiple inheritance. More...
 
virtual const char * f_getLabel () const
 Returns the label displayed by the field gadget. More...
 
virtual const IliInputMaskf_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...
 
const char * f_getTablePropertyManagerName () const
 Returns the name of the table property manager used by this field. More...
 
virtual const IliValuef_getValue (IlBoolean internal=IlFalse) const
 Returns the value of the field. More...
 
IlInt f_getVisibleRowsCount () const
 Returns the number of rows that will be displayed when the foreign table is displayed. More...
 
virtual IlBoolean f_hasLabel () const
 Returns IlTrue if the field gadget can display a label. More...
 
virtual void f_ignoreModifiedState (IlBoolean ignore)
 Sets the ignore modified state attribute of the field. More...
 
virtual void f_internalToExternal ()
 Updates the external representation of the field and its display according to its current internal value.
 
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...
 
virtual IlBoolean f_isConsistent () const
 Returns IlTrue if the internal value of the field corresponds to its current external representation. 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_isInputModified () const
 Returns IlTrue if the external representation has been edited by the end-user. More...
 
virtual IlBoolean f_isModifiedStateIgnored () const
 Returns IlTrue if the modified states are ignored when the f_setValue() function is called. More...
 
virtual IlBoolean f_isReadOnly () const
 Returns IlTrue if the field is read-only. 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_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 align)
 Sets the text alignment of the field. More...
 
virtual void f_setAutoFitPullDown (IlBoolean flag)
 Enables/disables the automatic width computing of the pull-down menu. More...
 
virtual void f_setConstrained (IlBoolean flag)
 Sets the constrained property of the field. 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_setForeignDisplayColumnName (const char *name)
 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 *tbl, IlBoolean owner=IlFalse)
 Sets the foreign table of the field. More...
 
virtual void f_setForeignValueColumnName (const char *name)
 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 &fmt)
 Sets the format used to derive the external representation of the field from its internal value. More...
 
virtual void f_setInputModified (IlBoolean flag)
 Sets the input-modified attribute of the field. More...
 
virtual void f_setLabel (const char *label)
 Sets the label of the field gadget. More...
 
virtual void f_setMask (const IliInputMask &msk)
 Sets the input mask. More...
 
virtual void f_setMaxLength (IlShort vmax)
 Sets the maximum length allowed for the external representation of the field. More...
 
virtual void f_setReadOnly (IlBoolean flag)
 Sets the read-only property for the field. More...
 
virtual void f_setTablePropertyManagerName (const char *name)
 Sets the name of the table property manager to use. More...
 
virtual IlBoolean f_setValue (const IliValue &val, IlBoolean internal=IlFalse)
 Sets the value of the field. More...
 
virtual void f_setVisibleRowsCount (IlInt count)
 Sets the number of rows to be displayed when the foreign table is displayed. 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...
 

Static Public Member Functions

static IlvSymbolInputModifiedSymbol ()
 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...
 

Protected Member Functions

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...
 

Detailed Description

Field class.

Library: dataccess

This class defines the interface that is common to all data-source-aware gadgets. A data-source-aware gadget can connect to a data source and participate in the data source protocol. A data-source-aware gadget class is usually a subclass of both IlvGadget and IliFieldItf.

Warning
The IliFieldItf class also supports subclassing from the IlvGraphic class. But since it is most often used in conjunction with the IlvGadget class, we usually refer to such subclasses as data-source-aware gadgets.

A data-source-aware gadget (or field) has an internal value and an external representation. Sometimes the external representation corresponds exactly to the internal value. The end-user may then edit the external representation, therefore breaking the correspondence between them. At this point, it is possible to request that the field parse its external representation deriving a new internal value or, alternatively, that the end user edits are canceled and that the external representation is reset. The internal value is always represented as an instance of the IliValue class, whereas the external representation is specific to the gadget class. For instance, a text field will use a character string for its external representation, whereas a toggle field will use a shaded rectangle. The external representation is what the end-user sees; the internal value is what the application sees. A field can also be connected to a data source column. In this situation, the data source will set the internal value of the field each time a row change event occurs on the data source.

See also
IliDataSource, IliFormat, IliTable, IliValue, IlvGadget.

Accessors

Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue(), IlvValueInterface::queryValues(), IlvValueInterface::changeValue(), IlvValueInterface::changeValues(). This class defines the following accessors:

Data accessors

Name Type Equivalent methods
alignment Direction f_getAlignment(), f_setAlignment(). See [Alignment] below.
columnName String f_getDataSourceColumnName(), f_setDataSourceColumnName(). See [ColumnName] below.
completion Boolean f_isCompletionEnabled(), f_enableCompletion(). See [Completion] below.
constrained Boolean f_isConstrained(), f_setConstrained(). See [Contrained] below.
dataSource Object f_getDataSource(). See [DataSource]"</b> below. <tr><td>`dataSourceName` <td> String <td> `f_getDataSourceName()`, `f_setDataSourceName()`. See <b>\ref IliFieldItf_DataSource "[DataSource]"</b> below. <tr><td>`foreignDataSourceName` <td> String <td> `f_getForeignDataSourceName()`, `f_setForeignDataSourceName()`. See <b>\ref IliFieldItf_ForeignDataSourceName "[ForeignDataSourceName]"</b> below. <tr><td>`foreignDisplayColumnName` <td> String <td> `f_getForeignDisplayColumnName()`, `f_setForeignDisplayColumnName()`. See <b>\ref IliFieldItf_ForeignDisplayColumnName "[ForeignDisplayColumnName]"</b> below. <tr><td>`foreignTable` <td> Object <td> `f_getForeignTable()`, `f_setForeignTable()`. See <b>\ref IliFieldItf_ForeignTable "[ForeignTable]"</b> below. <tr><td>`foreignValueColumnName` <td> String <td> `f_getForeignValueColumnName()`, `f_setForeignValueColumnName()`. See <b>\ref IliFieldItf_ForeignValueColumnName "[ForeignValueColumnName]"</b> below. <tr><td>`format` <td> String <td> `f_getFormat()`, `f_setFormat()`. See <b>\ref IliFieldItf_Format "[Format]"</b> below. <tr><td>`inputModified` <td> Boolean <td> `f_isInputModified()`, `f_setInputModified()`. See <b>\ref IliFieldItf_InputModified "[InputModified]"</b> below. <tr><td>`label` <td> String <td> `f_getLabel()`, `f_setLabel()`. See <b>\ref IliFieldItf_Label "[Label]"</b> below. <tr><td>`mask` <td> String <td> `f_getMask()`, `f_setMask()`. See <b>\ref IliFieldItf_Mask "[Mask]"</b> below. <tr><td>`maxLength` <td> Int <td> `f_getMaxLength()`, `f_setMaxLength()`. See <b>\ref IliFieldItf_MaxLength "[MaxLength]"</b> below. <tr><td>`readOnly` <td> Boolean <td> `f_isReadOnly()`, `f_setReadOnly()`. See <b>\ref IliFieldItf_ReadOnly "[ReadOnly]"</b> below. <tr><td>`tablePropertyManagerName` <td> String <td> `f_getTablePropertyManagerName()`, `f_setTablePropertyManagerName()`. See <b>\ref IliFieldItf_TablePropertyManagerName "[TablePropertyManagerName]"</b> below. <tr><td>`useTableProperties` <td> Boolean <td> `f_isUsingTableProperties()`, `f_useTableProperties()`. See <b>\ref IliFieldItf_UseTableProperties "[UseTableProperties]"</b> below. <tr><td>`value` <td> Object <td> `f_getValue()`, `f_setValue()`. See <b>\ref IliFieldItf_Value "[Value]"</b> below. <tr><td>`visibleRowsCount` <td> Int <td> `f_getVisibleRowsCount()`, `f_setVisibleRowsCount()`. See <b>\ref IliFieldItf_VisibleRowsCount "[VisibleRowsCount]" below.

[Alignment]: available for IliDbField, IliDbPicture, IliEntryField only.

[ColumnName]: available for IliDbField, IliDbPicture, IliDbStringList, IliEntryField, IliDbOptionMenu, IliDbText, IliDbToggle, IliToggleSelector only.

[Completion]: available for IliDbField only.

[Contrained]: available for IliDbField only.

[DataSource]: available for IliDbField, IliEntryField, IliDbNavigator, IliDbOptionMenu, IliDbPicture, IliDbStringList, IliDbText, IliDbToggle, IliTableGadget, IliToggleSelector only.

[ForeignTable]: available for IliDbField, IliDbOptionMenu, IliDbStringList, IliDbToggle, IliToggleSelector only.

[ForeignDisplayColumnName]: available for IliDbField, IliDbOptionMenu, IliDbStringList, IliDbToggle, IliToggleSelector only.

[ForeignValueColumnName]: available for IliDbField, IliDbOptionMenu, IliDbStringList, IliDbToggle, IliToggleSelector only.

[Format]: available for IliDbField, IliEntryField only.

[InputModified]: available for IliEntryField, IliDbOptionMenu, IliDbPicture, IliDbStringList, IliDbText, IliDbToggle, IliTableGadget, IliToggleSelector only.

[Label]: available for IliDbField, IliDbToggle, IliToggleSelector only.

[Mask]: available for IliDbField, IliEntryField only.

[MaxLength]: available for IliDbField, IliEntryField, IliDbOptionMenu only.

[ReadOnly]: available for IliDbField, IliEntryField, IliDbOptionMenu, IliDbStringList, IliDbText, IliDbToggle, IliTableGadget, IliToggleSelector only.

[TablePropertyManagerName]: available for IliDbField, IliEntryField, IliDbOptionMenu, IliDbStringList, IliDbText, IliDbToggle, IliTableGadget, IliToggleSelector only.

[UseTableProperties]: available for IliDbField, IliEntryField, IliDbOptionMenu, IliDbStringList, IliDbText, IliDbToggle, IliTableGadget, IliToggleSelector only.

[Value]: available for IliDbField, IliEntryField, IliDbOptionMenu, IliDbPicture, IliDbStringList, IliDbText, IliDbToggle, IliToggleSelector only.

[VisibleRowsCount]: available for IliDbField only.

Member Function Documentation

§ f_applyReferences()

void IliFieldItf::f_applyReferences ( IlvApplyObject  f,
IlAny  a 
)

Should be called when the applyReferences() member function, of the gadget class, is called.

Parameters
fThe function.
aThe user data.

§ f_complete()

virtual IlBoolean IliFieldItf::f_complete ( )
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.

Returns
IlTrue if successful.

Reimplemented in IliTableGadget, IliTableComboBox, IliDbField, and IliDbToggle.

§ f_enableCompletion()

virtual void IliFieldItf::f_enableCompletion ( IlBoolean  flag)
virtual

Sets the completion property of the field.

Parameters
flagIf IlTrue, the completion property is on.

Reimplemented in IliDbField.

§ f_externalToInternal()

virtual IlBoolean IliFieldItf::f_externalToInternal ( )
virtual

Updates the internal value of a field according to its current external representation.

Returns
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 in IliTableGadget, IliTableComboBox, IliToggleSelector, IliDbField, IliDbToggle, IliScrolledComboBox, IliEntryField, IliDbPicture, IliDbStringList, IliDbOptionMenu, and IliDbText.

§ f_getAlignment()

virtual IlvAlignment IliFieldItf::f_getAlignment ( ) const
virtual

Returns the text alignment of the field.

Returns
The alignment.

Reimplemented in IliDbField, IliDbPicture, and IliEntryField.

§ f_getDataSource() [1/2]

const IliDataSource* IliFieldItf::f_getDataSource ( ) const

Returns the data source.

Returns
The data source which this field is connected to, or 0, if it is not currently connected.

§ f_getDataSource() [2/2]

IliDataSource* IliFieldItf::f_getDataSource ( )

Returns the data source.

Returns
The data source which this field is connected to, or 0, if it is not currently connected.

§ f_getDataSourceColumnName()

const char* IliFieldItf::f_getDataSourceColumnName ( ) const

Returns the name of the column.

Returns
The name of the column which the field is (or must be) connected to.

§ f_getDataSourceName()

const char* IliFieldItf::f_getDataSourceName ( ) const

Returns the name of the data source, which this field is (or must be) connected to.

Returns
The name of the data source.

§ f_getEffectiveTablePropertyManager() [1/2]

virtual const IliTablePropertyManager* IliFieldItf::f_getEffectiveTablePropertyManager ( ) const
virtual

Returns the effective table property manager.

Returns
The effective table property manager that is obtained as follows:
  • If the useTableProperties property is IlFalse or if the data source to which the field is connected has its useTableProperties property set to IlFalse, this member function returns 0.
  • Otherwise, if the tablePropertyManagerName property is not empty, the table property manager with that name is returned.
  • Otherwise, if the data source to which the field is connected has a tablePropertyManagerName property that is not empty, the table property manager with that name is returned.
  • Otherwise, the table default property manager is returned.

Reimplemented in IliTableGadget.

§ f_getEffectiveTablePropertyManager() [2/2]

virtual IliTablePropertyManager* IliFieldItf::f_getEffectiveTablePropertyManager ( )
virtual

Returns the effective table property manager.

Returns
The effective table property manager that is obtained as follows:
  • If the useTableProperties property is IlFalse or if the data source to which the field is connected has its useTableProperties property set to IlFalse, this member function returns 0.
  • Otherwise, if the tablePropertyManagerName property is not empty, the table property manager with that name is returned.
  • Otherwise, if the data source to which the field is connected has a tablePropertyManagerName property that is not empty, the table property manager with that name is returned.
  • Otherwise, the table default property manager is returned.

Reimplemented in IliTableGadget.

§ f_getForeignDataSourceName()

const char* IliFieldItf::f_getForeignDataSourceName ( ) const

Returns the name of the foreign data source.

Returns
The name.

§ f_getForeignDisplayColumnName()

const char* IliFieldItf::f_getForeignDisplayColumnName ( ) const

Returns the name of the column of the foreign table that will serve as a result.

Returns
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.

§ f_getForeignTable() [1/2]

const IliTable* IliFieldItf::f_getForeignTable ( ) const

Returns the foreign table.

Returns
The foreign table.

§ f_getForeignTable() [2/2]

IliTable* IliFieldItf::f_getForeignTable ( )

Returns the foreign table.

Returns
The foreign table.

§ f_getForeignValueColumnName()

const char* IliFieldItf::f_getForeignValueColumnName ( ) const

Returns the name of the column of the foreign table that will serve as a key.

Returns
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.

§ f_getFormat()

virtual const IliFormat& IliFieldItf::f_getFormat ( ) const
virtual

Returns the format used to derive the external representation of the field from its internal value.

Returns
The format.

Reimplemented in IliDbField, and IliEntryField.

§ f_getGadget() [1/2]

const IlvGadget* IliFieldItf::f_getGadget ( ) const

Returns the constant gadget associated with this field through multiple inheritance.

Returns
The constant gadget associated with this field through multiple inheritance. If the graphic object which this field is associated with, is not a gadget, then this member function returns 0.

§ f_getGadget() [2/2]

IlvGadget* IliFieldItf::f_getGadget ( )

Returns the gadget associated with this field through multiple inheritance.

Returns
The gadget associated with this field through multiple inheritance. If the graphic object which this field is associated with, is not a gadget, then this member function returns 0.

§ f_getGraphic() [1/2]

const IlvGraphic* IliFieldItf::f_getGraphic ( ) const

Returns the constant graphic associated with this field through multiple inheritance.

Returns
The graphic.

§ f_getGraphic() [2/2]

IlvGraphic* IliFieldItf::f_getGraphic ( )

Returns the graphic associated with this field through multiple inheritance.

Returns
The graphic.

§ f_getLabel()

virtual const char* IliFieldItf::f_getLabel ( ) const
virtual

Returns the label displayed by the field gadget.

Returns
The label.

Reimplemented in IliToggleSelector, IliDbField, and IliDbToggle.

§ f_getMask()

virtual const IliInputMask& IliFieldItf::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.

Returns
The mask.

Reimplemented in IliDbField, and IliEntryField.

§ f_getMaxLength()

virtual IlShort IliFieldItf::f_getMaxLength ( ) const
virtual

Returns the maximum length allowed for the external representation of the field.

Returns
The maximum.

Reimplemented in IliDbField, and IliEntryField.

§ f_getTablePropertyManagerName()

const char* IliFieldItf::f_getTablePropertyManagerName ( ) const

Returns the name of the table property manager used by this field.

Initially, this property is 0.

Returns
The name of the table property manager used by this field or 0 if the default table property manager is to be used.

§ f_getValue()

virtual const IliValue& IliFieldItf::f_getValue ( IlBoolean  internal = IlFalse) const
virtual

Returns the value of the field.

Parameters
internalIf IlTrue, the returned value does not necessarily reflect the state of the field as the user sees it.
Returns
The value.

Reimplemented in IliTableGadget, IliToggleSelector, IliDbField, IliDbToggle, IliScrolledComboBox, IliDbPicture, IliEntryField, IliDbStringList, IliDbOptionMenu, and IliDbText.

§ f_getVisibleRowsCount()

IlInt IliFieldItf::f_getVisibleRowsCount ( ) const

Returns the number of rows that will be displayed when the foreign table is displayed.

Returns
The number of rows that will be displayed when the foreign table is displayed. This is typically used for combo boxes.

§ f_hasLabel()

virtual IlBoolean IliFieldItf::f_hasLabel ( ) const
virtual

Returns IlTrue if the field gadget can display a label.

Returns
IlTrue if the field gadget can display a label.

Reimplemented in IliToggleSelector, IliDbField, and IliDbToggle.

§ f_ignoreModifiedState()

virtual void IliFieldItf::f_ignoreModifiedState ( IlBoolean  ignore)
virtual

Sets the ignore modified state attribute of the field.

When the modified state are ignored, the input-modified attribute is not modified and the enterModifiedState callback is not called.

Parameters
ignoreIf the value is IlTrue then all modified state are ignored.

§ f_isAutoFitPullDown()

virtual IlBoolean IliFieldItf::f_isAutoFitPullDown ( ) const
virtual

Returns IlTrue if the width of the pull-down menu is automatically computed so that its contents fit.

Returns
IlTrue if the width of the pull-down menu is automatically computed so that its contents fit. The value returned by this virtual member function is currently meaningful only when the field gadget is one of the following: For a table gadget, this property applies to all table combo boxes contained in the table gadget.

Reimplemented in IliTableGadget, and IliTableComboBox.

§ f_isCompletionEnabled()

IlBoolean IliFieldItf::f_isCompletionEnabled ( ) const

Returns IlTrue if completion is enabled.

Returns
IlTrue if completion is enabled for the field. Completion is the mechanism that allows an incomplete external representation to be completed using the foreign table to supply a valid external representation, and therefore the corresponding internal value. This allows the user to enter the initial characters of a word and have the field automatically complete the word.

§ f_isConnectedToDataSource()

IlBoolean IliFieldItf::f_isConnectedToDataSource ( ) const

Returns IlTrue if the field is currently connected to a column of a data source.

Returns
IlTrue if the field is currently connected to a column of a data source.

§ f_isConsistent()

virtual IlBoolean IliFieldItf::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.

Returns
IlTrue if the internal value of the field corresponds to its current external representation.

Reimplemented in IliTableGadget, IliTableComboBox, IliToggleSelector, IliDbField, IliDbToggle, IliScrolledComboBox, IliDbPicture, IliEntryField, IliDbStringList, IliDbOptionMenu, IliDbText, and IliSimpleToggle.

§ f_isConstrained()

IlBoolean IliFieldItf::f_isConstrained ( ) const

Returns IlTrue if the foreign table limits the set of possible internal values for this field.

Returns
IlTrue if the foreign table limits the set of possible internal values for this field.

§ f_isDataSourceOwner()

IlBoolean IliFieldItf::f_isDataSourceOwner ( ) const

Returns IlTrue if the field owns the data source.

Returns
IlTrue if the field owns the data source which it is connected to.

§ f_isForeignTableOwner()

IlBoolean IliFieldItf::f_isForeignTableOwner ( ) const

Returns IlTrue if the field owns its foreign table.

Returns
IlTrue if the field owns its foreign table.

§ f_isInputModified()

virtual IlBoolean IliFieldItf::f_isInputModified ( ) const
virtual

Returns IlTrue if the external representation has been edited by the end-user.

Returns
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 in IliTableGadget, and IliDbField.

§ f_isModifiedStateIgnored()

virtual IlBoolean IliFieldItf::f_isModifiedStateIgnored ( ) const
virtual

Returns IlTrue if the modified states are ignored when the f_setValue() function is called.

For example: When you call the cancel() of the IliDataSource the modified state are ignored.

Returns
IlTrue if the modified states are ignored when the f_setValue() function is called. The default value is IlFalse.

§ f_isReadOnly()

virtual IlBoolean IliFieldItf::f_isReadOnly ( ) const
virtual

Returns IlTrue if the field is read-only.

Returns
IlTrue if the field is read-only.

Reimplemented in IliTableGadget, IliToggleSelector, IliDbField, IliDbToggle, IliAbstractComboBox, IliScrolledComboBox, IliDbPicture, IliEntryField, IliDbStringList, IliDbOptionMenu, and IliDbText.

§ f_isUsingTableProperties()

IlBoolean IliFieldItf::f_isUsingTableProperties ( ) const

Returns IlTrue if the field uses table properties.

Returns
IlTrue if the field uses table properties. Note that for the field to effectively use table properties, this property must be IlTrue and the data source to which it is connected must also be using table properties. Initially, this property is true.

§ f_read()

void IliFieldItf::f_read ( IlvInputFile input)
protected

Should be called by the stream-based constructor of the gadget.

Parameters
inputThe input stream.

§ f_set()

void IliFieldItf::f_set ( IlvGraphic g,
const IliFieldItf other 
)
protected

Should be called by the copy constructor of the graphic class that is passed.

Parameters
gThe object being constructed.
otherThe object being copied.

§ f_setAlignment()

virtual void IliFieldItf::f_setAlignment ( IlvAlignment  align)
virtual

Sets the text alignment of the field.

Parameters
alignThe alignment.

Reimplemented in IliDbField, IliDbPicture, and IliEntryField.

§ f_setAutoFitPullDown()

virtual void IliFieldItf::f_setAutoFitPullDown ( IlBoolean  flag)
virtual

Enables/disables the automatic width computing of the pull-down menu.

Parameters
flagIf IlTrue, the width of the pull-down menu is automatically computed so that its contents fit. See the description of f_isAutoFitPullDown() for more information on this property.

Reimplemented in IliTableGadget, and IliTableComboBox.

§ f_setConstrained()

virtual void IliFieldItf::f_setConstrained ( IlBoolean  flag)
virtual

Sets the constrained property of the field.

Parameters
flagIf IlTrue the constrained property is on.

Reimplemented in IliDbField.

§ f_setDataSourceColumnName()

virtual void IliFieldItf::f_setDataSourceColumnName ( const char *  name)
virtual

Sets the name of the column.

Sets the name of the column which the field must connect to. In order for the field to be successfully connected, the column name must designate a valid column of the data source specified by the f_setDataSourceName() or f_setDataSource() member functions.

Parameters
nameThe column name.

§ f_setDataSourceName()

virtual void IliFieldItf::f_setDataSourceName ( const char *  name)
virtual

Sets the name of the data source.

Sets the name of the data source, which this field must be connected to. To disconnect the field from a data source, the parameter can be passed as a 0. Note that actual connection to a data source occurs when the field is given a valid data source name and a valid column name.

Parameters
nameThe data source name.

§ f_setForeignDataSourceName()

virtual void IliFieldItf::f_setForeignDataSourceName ( const char *  name)
virtual

Sets the name of the foreign data source.

Parameters
nameThe data source name.

§ f_setForeignDisplayColumnName()

virtual void IliFieldItf::f_setForeignDisplayColumnName ( const char *  name)
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.

Parameters
nameThe column name.

Reimplemented in IliTableComboBox, IliToggleSelector, IliDbField, IliDbToggle, IliScrolledComboBox, IliDbStringList, and IliDbOptionMenu.

§ f_setForeignTable()

virtual void IliFieldItf::f_setForeignTable ( IliTable tbl,
IlBoolean  owner = IlFalse 
)
virtual

Sets the foreign table of the field.

Parameters
tblThe table.
ownerDetermines whether the field will own the table.

Reimplemented in IliTableComboBox, IliToggleSelector, IliDbField, IliDbToggle, IliScrolledComboBox, IliDbStringList, and IliDbOptionMenu.

§ f_setForeignValueColumnName()

virtual void IliFieldItf::f_setForeignValueColumnName ( const char *  name)
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.

Parameters
nameThe column name.

Reimplemented in IliTableComboBox, IliToggleSelector, IliDbField, IliDbToggle, IliScrolledComboBox, IliDbStringList, and IliDbOptionMenu.

§ f_setFormat()

virtual void IliFieldItf::f_setFormat ( const IliFormat fmt)
virtual

Sets the format used to derive the external representation of the field from its internal value.

Parameters
fmtThe format.

Reimplemented in IliDbField, and IliEntryField.

§ f_setGraphic()

void IliFieldItf::f_setGraphic ( IlvGraphic g)
protected

Should be called by all constructors of the graphic class (except the copy constructor).

Parameters
gThe object being constructed.

§ f_setInputModified()

virtual void IliFieldItf::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.

Parameters
flagThe input-modified attribute.

Reimplemented in IliTableGadget, IliDbField, and IliEntryField.

§ f_setLabel()

virtual void IliFieldItf::f_setLabel ( const char *  label)
virtual

Sets the label of the field gadget.

Parameters
labelThe label.

Reimplemented in IliToggleSelector, IliDbField, and IliDbToggle.

§ f_setMask()

virtual void IliFieldItf::f_setMask ( const IliInputMask msk)
virtual

Sets the input mask.

Parameters
mskThe mask.

Reimplemented in IliDbField, and IliEntryField.

§ f_setMaxLength()

virtual void IliFieldItf::f_setMaxLength ( IlShort  vmax)
virtual

Sets the maximum length allowed for the external representation of the field.

Parameters
vmaxThe maximum length.

Reimplemented in IliDbField, and IliEntryField.

§ f_setReadOnly()

virtual void IliFieldItf::f_setReadOnly ( IlBoolean  flag)
virtual

Sets the read-only property for the field.

Parameters
flagThe read-only flag.

Reimplemented in IliTableGadget, IliToggleSelector, IliDbField, IliDbToggle, IliAbstractComboBox, IliScrolledComboBox, IliDbPicture, IliEntryField, IliDbStringList, IliDbOptionMenu, and IliDbText.

§ f_setTablePropertyManagerName()

virtual void IliFieldItf::f_setTablePropertyManagerName ( const char *  name)
virtual

Sets the name of the table property manager to use.

Parameters
nameThe table property manager. If name is 0 or an empty string, the default table property manager is be used.

Reimplemented in IliTableGadget.

§ f_setValue()

virtual IlBoolean IliFieldItf::f_setValue ( const IliValue val,
IlBoolean  internal = IlFalse 
)
virtual

Sets the value of the field.

Parameters
valThe value.
internalIf IlFalse, then the external representation and the display of the field are automatically updated.
Returns
IlTrue if successful, and IlFalse otherwise.

Reimplemented in IliTableGadget, IliTableComboBox, IliToggleSelector, IliDbField, IliDbToggle, IliScrolledComboBox, IliDbPicture, IliEntryField, IliDbStringList, IliDbOptionMenu, and IliDbText.

§ f_setVisibleRowsCount()

virtual void IliFieldItf::f_setVisibleRowsCount ( IlInt  count)
virtual

Sets the number of rows to be displayed when the foreign table is displayed.

Parameters
countThe row count.

Reimplemented in IliDbField.

§ f_supportsTableProperties()

virtual IlBoolean IliFieldItf::f_supportsTableProperties ( ) const
virtual

Returns IlTrue if this gadget supports table properties.

Returns
IlTrue if this gadget supports table properties.

Reimplemented in IliDbPicture.

§ f_unsubscribe()

void IliFieldItf::f_unsubscribe ( )
protected

Should be called before the setHolder() member function of the gadget class.

Example

Here is a synopsis of a minimal class of this nature:

class CustomFieldGadget
: public IlvGadget,
public IliFieldItf
{
public:
CustomFieldGadget(IlvDisplay* dpy, const IlvRect& rect)
: IlvGadget(dpy, rect)
{
f_setGraphic(this);
}
CustomFieldGadget(IlvInputFile& is, IlvPalette* palette)
: IlvGadget(is, palette)
{
f_setGraphic(this);
f_read(is);
}
CustomFieldGadget(const CustomFieldGadget& o)
: IlvGadget(o)
{
f_set(this, o);
}
void write(IlvOutputFile& os) const
{
os.getStream() << ` `;
f_write(os);
}
void setHolder(IlvGraphicHolder* holder)
{
}
void applyReferences(IlvApplyObject f, IlAny a)
{
}
IlBoolean handleEvent(IlvEvent& event)
{
if (event.type() == IlvKeyboardFocusOut) {
}
if (event.type() == IlvKeyboardFocusIn) {
}
return ret;
}
};

§ f_useTableProperties()

virtual void IliFieldItf::f_useTableProperties ( IlBoolean  flag)
virtual

Enables/Disables the use of the table properties.

Parameters
flagIf IlTrue, the field will use table properties.

Reimplemented in IliTableGadget.

§ f_write()

void IliFieldItf::f_write ( IlvOutputFile output) const
protected

Should be called by the write() member function of the gadget class.

Parameters
outputThe output stream.

§ InputModifiedSymbol()

static IlvSymbol* IliFieldItf::InputModifiedSymbol ( )
static

Returns the name of the callback that the field gadget will invoke every time the field input-modified property changes from IlFalse to IlTrue.

Returns
The name of the callback that the field gadget will invoke every time the field input-modified property changes from IlFalse to IlTrue.

© Copyright 2018, 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.