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

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IliDbNavigator Class Reference

Field gadget class. More...

#include <ilviews/dataccess/gadgets/dbnavig.h>

Inheritance diagram for IliDbNavigator:
IliGadgetSet IliFieldItf IlvGadget IlvSimpleGraphic IlvStylable IlvGraphic IlvValueInterface

Public Member Functions

 IliDbNavigator (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes a navigator gadget. More...
 
void addButton (const char *name, IlvGraphicCallback cb, const char *tooltip=0, IlInt width=1)
 Adds a button at the end of the navigator. More...
 
virtual void adjustButtonsSize ()
 Computes the position and the width for each button. More...
 
IlBoolean areNavigationButtonsShown () const
 Returns IlTrue if the navigation buttons are shown. More...
 
IlBoolean areValidationButtonsShown () const
 Returns IlTrue if the Validate and Cancel buttons are shown. More...
 
void cancel ()
 Cancels the data source in regular mode and cancels query mode in query mode.
 
void clear ()
 Clears the data source table.
 
void deleteRow ()
 Deletes the current row of the data source. More...
 
void gotoFirst ()
 Changes the current row of the data source to the first row.
 
void gotoLast ()
 Changes the current row of the data source to the last row.
 
void gotoNext ()
 Changes the current row of the data source to the next row.
 
void gotoPrevious ()
 Changes the current row of the data source to the previous row.
 
IlBoolean isClearButtonShown () const
 Returns IlTrue if the Clear button is shown. More...
 
IlBoolean isConfirmOnDeleteRequired () const
 Returns IlTrue if a confirmation dialog box is required. More...
 
IlBoolean isDeleteButtonShown () const
 Returns IlTrue if the DeleteRow button is shown. More...
 
IlBoolean isInsertButtonShown () const
 Returns IlTrue if the StartInsert button is shown. More...
 
IlBoolean isPositionTextShown () const
 Returns IlTrue if the Position text field is shown. More...
 
IlBoolean isQueryModeButtonShown () const
 Returns IlTrue if the QueryMode button is shown. More...
 
IlBoolean isRowsCountTextShown () const
 Returns IlTrue if the RowsCount text field is shown. More...
 
IlBoolean isSelectButtonShown () const
 Returns IlTrue if the Select button is shown. More...
 
virtual void objectReceivedEvent (IlvGadget *)
 Called when a gadget received an event. More...
 
void queryMode ()
 Switches to query mode. More...
 
void removeButtons (IlBoolean gadgets=IlFalse)
 Deletes the definition of the user buttons. More...
 
void requireConfirmOnDelete (IlBoolean flag)
 Specifies whether the deleteRow() member function uses a confirmation dialog box. More...
 
void select ()
 Selects the data source table.
 
void showClearButton (IlBoolean flag)
 Shows/Hides the Clear button. More...
 
void showDeleteButton (IlBoolean flag)
 Shows/Hides the DeleteRow button. More...
 
void showInsertButton (IlBoolean flag)
 Shows/Hides the StartInsert button. More...
 
void showNavigationButtons (IlBoolean flag)
 Shows/Hides the navigation buttons. More...
 
void showPositionText (IlBoolean flag)
 Shows/Hides the Position text field. More...
 
void showQueryModeButton (IlBoolean flag)
 Shows/Hides the QueryMode button. More...
 
void showRowsCountText (IlBoolean flag)
 Shows/Hides the RowsCount text field. More...
 
void showSelectButton (IlBoolean flag)
 Shows/Hides the Select button if flag. More...
 
void showValidationButtons (IlBoolean flag)
 Shows/hides the Validate and Cancel buttons. More...
 
void startInsert ()
 Changes the current row of the data source to the insert row.
 
void validate ()
 Validates the data source in regular mode and applies the query in query mode.
 
- Public Member Functions inherited from IliGadgetSet
 IliGadgetSet (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes an empty gadget set. More...
 
virtual void addObject (IlvGadget *obj, IlBoolean visible=IlTrue)
 Adds a gadget to the gadget set. More...
 
void disableToolTip ()
 Disables tooltip display.
 
void enableToolTip ()
 Enables tooltip display. More...
 
IlUInt getCardinal () const
 Returns the number of gadgets in the gadget set. More...
 
IlvGadgetgetFocusObject () const
 Returns the focus gadget of the gadget set or 0 if no focus gadget is defined. More...
 
IlInt getIndex (IlvGadget *g) const
 Returns the position of a gadget in the gadget set. More...
 
IlvGadgetgetObject (IlUInt index) const
 Returns a gadget. More...
 
IlvGadgetgetObject (const char *name) const
 Returns a gadget. More...
 
IlBoolean isObjectSensitive (IlvGadget *obj) const
 Returns IlTrue if gadget is sensitive to user interaction. More...
 
IlBoolean isVisible (const IlvGadget *) const
 Returns IlTrue if the gadget parameter belongs to the gadget set and if it is visible. More...
 
virtual void removeObject (IlvGadget *obj, IlBoolean deleteIt=IlTrue)
 Removes a gadget from the gadget set. More...
 
virtual IlBoolean setFocusObject (IlvGadget *obj)
 Sets the focus gadget. More...
 
void setObjectSensitive (IlvGadget *obj, IlBoolean active)
 Enables/disables user interaction. More...
 
void setVisible (IlvGadget *obj, IlBoolean visible)
 Shows/Hides a gadget. More...
 
- Public Member Functions inherited from IliFieldItf
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from IliFieldItf
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 inherited from IliFieldItf
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 gadget class.

Library: dbgadget

An IliDbNavigator gadget contains a set of buttons that can be used to act on the data source that the gadget is connected to. The data source is specified by one of the following member functions: IliFieldItf::f_setDataSourceName() or IliFieldItf::f_setDataSource().

The gadget contains the following buttons:

The two read-only text fields are:

See also
IliDataSource.

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 inherits the accessors of its superclasses IliGadgetSet and IliFieldItf, and adds the following ones:

Data accessors

Name Type Equivalent methods
clearButtonShown Boolean isClearButtonShown(), showClearButton()
confirmDeletes Boolean isConfirmOnDeleteRequired(), requireConfirmOnDelete()
deleteButtonShownBoolean isDeleteButtonShown(), showDeleteButton()
insertButtonShownBoolean isInsertButtonShown(), showInsertButton()
navigationButtonsShown Boolean areNavigationButtonsShown(), showNavigationButtons()
positionTextShownBoolean isPositionTextShown(), showPositionText()
queryModeButtonShown Boolean isQueryModeButtonShown(), showQueryModeButton()
rowsCountTextShown Boolean isRowsCountTextShown(), showRowsCountText()
selectButtonShown Boolean isSelectButtonShown(), showSelectButton()
validationButtonsShown Boolean areValidationButtonsShown(), showValidationButtons()

Method accessors

Name Return type Equivalent methods
getObject(String name) IlvGadget getObject(name)

Constructor & Destructor Documentation

IliDbNavigator::IliDbNavigator ( IlvDisplay display,
const IlvRect rect,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Initializes a navigator gadget.

Parameters
displayThe display.
rectThe location.
thicknessThe border thickness.
paletteThe palette.

Member Function Documentation

void IliDbNavigator::addButton ( const char *  name,
IlvGraphicCallback  cb,
const char *  tooltip = 0,
IlInt  width = 1 
)

Adds a button at the end of the navigator.

The function adjustButtonsSize() must be called after this one.

Parameters
nameThe button label.
cbThe callback which is called when the user clicks the button. The IlvGraphic object of the callback is the button and the IlAny user argument is this object (IliDbNavigator).
tooltipThe tooltip text displayed when the cursor mouse is above the button.
widthThe button width. The unit for the width is the width of the navigator buttons. For example, if you want a button that is two times larger than the standard buttons of the navigator, the value is 2.
virtual void IliDbNavigator::adjustButtonsSize ( )
virtual

Computes the position and the width for each button.

This function must be called after the function calls for addButton() and removeButtons().

IlBoolean IliDbNavigator::areNavigationButtonsShown ( ) const

Returns IlTrue if the navigation buttons are shown.

Initially, this property is set to IlTrue.

Returns
IlTrue if the navigation buttons are shown.
IlBoolean IliDbNavigator::areValidationButtonsShown ( ) const

Returns IlTrue if the Validate and Cancel buttons are shown.

Initially, this property is set to IlTrue.

Returns
IlTrue if the Validate and Cancel buttons are shown.
void IliDbNavigator::deleteRow ( )

Deletes the current row of the data source.

If the "confirm on delete" property is set to IlTrue, a dialog box is used to request confirmation from the user before deletion.

IlBoolean IliDbNavigator::isClearButtonShown ( ) const

Returns IlTrue if the Clear button is shown.

Initially, this property is set to IlTrue.

Returns
IlTrue if the Clear button is shown.
IlBoolean IliDbNavigator::isConfirmOnDeleteRequired ( ) const

Returns IlTrue if a confirmation dialog box is required.

Initially, this property is set to IlTrue.

Returns
IlTrue if a confirmation dialog box is to be used whenever the deleteRow() member function is called.
IlBoolean IliDbNavigator::isDeleteButtonShown ( ) const

Returns IlTrue if the DeleteRow button is shown.

Initially, this property is set to IlTrue.

Returns
IlTrue if the DeleteRow button is shown.
IlBoolean IliDbNavigator::isInsertButtonShown ( ) const

Returns IlTrue if the StartInsert button is shown.

Initially, this property is set to IlTrue.

Returns
IlTrue if the StartInsert button is shown.
IlBoolean IliDbNavigator::isPositionTextShown ( ) const

Returns IlTrue if the Position text field is shown.

Returns
IlTrue if the Position text field is shown.
IlBoolean IliDbNavigator::isQueryModeButtonShown ( ) const

Returns IlTrue if the QueryMode button is shown.

Initially, this property is set to IlFalse.

Returns
IlTrue if the QueryMode button is shown.
IlBoolean IliDbNavigator::isRowsCountTextShown ( ) const

Returns IlTrue if the RowsCount text field is shown.

Returns
IlTrue if the RowsCount text field is shown.
IlBoolean IliDbNavigator::isSelectButtonShown ( ) const

Returns IlTrue if the Select button is shown.

Initially, this property is set to IlTrue.

Returns
IlTrue if the Select button is shown.
virtual void IliDbNavigator::objectReceivedEvent ( IlvGadget obj)
virtual

Called when a gadget received an event.

The callbacks of the gadget are called before this function. For example, if the gadget is a button, the callback of the button is called before this function. By default this function do nothing. In the IliDbNavigator class, this function calls the main callback.

Parameters
objThe gadget.

Reimplemented from IliGadgetSet.

void IliDbNavigator::queryMode ( )

Switches to query mode.

Note that while in query mode, the validate() and cancel() member functions behave differently than when in regular mode.

void IliDbNavigator::removeButtons ( IlBoolean  gadgets = IlFalse)

Deletes the definition of the user buttons.

The function adjustButtonsSize() must be called after this one.

Parameters
gadgetsIf IlTrue, the buttons are removed from the navigator.
void IliDbNavigator::requireConfirmOnDelete ( IlBoolean  flag)

Specifies whether the deleteRow() member function uses a confirmation dialog box.

Parameters
flagIf IlTrue, a confirmation is required.
void IliDbNavigator::showClearButton ( IlBoolean  flag)

Shows/Hides the Clear button.

Parameters
flagIf IlTrue, shows the Clear button.
void IliDbNavigator::showDeleteButton ( IlBoolean  flag)

Shows/Hides the DeleteRow button.

Parameters
flagIf IlTrue, shows the DeleteRow button.
void IliDbNavigator::showInsertButton ( IlBoolean  flag)

Shows/Hides the StartInsert button.

Parameters
flagIf IlTrue, shows the StartInsert button.
void IliDbNavigator::showNavigationButtons ( IlBoolean  flag)

Shows/Hides the navigation buttons.

Parameters
flagIf IlTrue, shows the navigation buttons.
void IliDbNavigator::showPositionText ( IlBoolean  flag)

Shows/Hides the Position text field.

Parameters
flagIf IlTrue, shows the Position text field.
void IliDbNavigator::showQueryModeButton ( IlBoolean  flag)

Shows/Hides the QueryMode button.

Parameters
flagIf IlTrue, shows the QueryMode button.
void IliDbNavigator::showRowsCountText ( IlBoolean  flag)

Shows/Hides the RowsCount text field.

Parameters
flagIf IlTrue, shows the RowsCount text field.
void IliDbNavigator::showSelectButton ( IlBoolean  flag)

Shows/Hides the Select button if flag.

Parameters
flagIf IlTrue, shows the Select button.
void IliDbNavigator::showValidationButtons ( IlBoolean  flag)

Shows/hides the Validate and Cancel buttons.

Parameters
flagIf IlTrue, shows the Validate and Cancel buttons.

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