rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliDbNavigator Class Reference

Field gadget class. More...

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

Inheritance diagram for IliDbNavigator:
IliGadgetSet IliFieldItf IlvGadget IlvSimpleGraphic IlvGraphic

List of all members.

Public Member Functions

 IliDbNavigator (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes a navigator gadget.
void addButton (const char *name, IlvGraphicCallback cb, const char *tooltip=0, IlInt width=1)
 Adds a button at the end of the navigator.
virtual void adjustButtonsSize ()
 Computes the position and the width for each button.
IlBoolean areNavigationButtonsShown () const
 Returns IlTrue if the navigation buttons are shown.
IlBoolean areValidationButtonsShown () const
 Returns IlTrue if the Validate and Cancel buttons are shown.
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.
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.
IlBoolean isConfirmOnDeleteRequired () const
 Returns IlTrue if a confirmation dialog box is required.
IlBoolean isDeleteButtonShown () const
 Returns IlTrue if the DeleteRow button is shown.
IlBoolean isInsertButtonShown () const
 Returns IlTrue if the StartInsert button is shown.
IlBoolean isPositionTextShown () const
 Returns IlTrue if the Position text field is shown.
IlBoolean isQueryModeButtonShown () const
 Returns IlTrue if the QueryMode button is shown.
IlBoolean isRowsCountTextShown () const
 Returns IlTrue if the RowsCount text field is shown.
IlBoolean isSelectButtonShown () const
 Returns IlTrue if the Select button is shown.
virtual void objectReceivedEvent (IlvGadget *obj)
 Called when a gadget received an event.
void queryMode ()
 Switches to query mode.
void removeButtons (IlBoolean gadgets=IlFalse)
 Deletes the definition of the user buttons.
void requireConfirmOnDelete (IlBoolean flag)
 Specifies whether the deleteRow member function uses a confirmation dialog box.
void select ()
 Selects the data source table.
void showClearButton (IlBoolean flag)
 Shows/Hides the Clear button.
void showDeleteButton (IlBoolean flag)
 Shows/Hides the DeleteRow button.
void showInsertButton (IlBoolean flag)
 Shows/Hides the StartInsert button.
void showNavigationButtons (IlBoolean flag)
 Shows/Hides the navigation buttons.
void showPositionText (IlBoolean flag)
 Shows/Hides the Position text field.
void showQueryModeButton (IlBoolean flag)
 Shows/Hides the QueryMode button.
void showRowsCountText (IlBoolean flag)
 Shows/Hides the RowsCount text field.
void showSelectButton (IlBoolean flag)
 Shows/Hides the Select button if flag.
void showValidationButtons (IlBoolean flag)
 Shows/hides the Validate and Cancel buttons.
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.

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

Constructor & Destructor Documentation

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

Initializes a navigator gadget.

Parameters:
display The display.
rect The location.
thickness The border thickness.
palette The 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:
name The button label.
cb The 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).
tooltip The tooltip text displayed when the cursor mouse is above the button.
width The 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:
obj The 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:
gadgets If 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:
flag If IlTrue, a confirmation is required.
void IliDbNavigator::showClearButton ( IlBoolean  flag  ) 

Shows/Hides the Clear button.

Parameters:
flag If IlTrue, shows the clear button.
void IliDbNavigator::showDeleteButton ( IlBoolean  flag  ) 

Shows/Hides the DeleteRow button.

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

Shows/Hides the StartInsert button.

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

Shows/Hides the navigation buttons.

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

Shows/Hides the Position text field.

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

Shows/Hides the QueryMode button.

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

Shows/Hides the RowsCount text field.

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

Shows/Hides the Select button if flag.

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

Shows/hides the Validate and Cancel buttons.

Parameters:
flag If IlTrue, shows the Validate and Cancel buttons.

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