rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliDbToggle Class Reference

Field gadget class. More...

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

Inheritance diagram for IliDbToggle:
IlvToggle IliFieldItf IlvGadget IlvSimpleGraphic IlvGraphic IliSimpleToggle

List of all members.

Public Member Functions

 IliDbToggle (IlvDisplay *display, const IlvPoint &at, IlvBitmap *bitmap, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 This constructor initializes a new IliDbToggle instance.
 IliDbToggle (IlvDisplay *display, IlvBitmap *bitmap, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 This constructor initializes a new IliDbToggle instance.
 IliDbToggle (IlvDisplay *display, const IlvPoint &at, const char *label, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 This constructor initializes a new IliDbToggle instance.
 IliDbToggle (IlvDisplay *display, const char *label, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 This constructor initializes a new IliDbToggle instance.
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.
virtual IlBoolean f_externalToInternal ()
 Updates the internal value of a field according to its current external representation.
virtual const char * f_getLabel () const
 Returns the label displayed by the field gadget.
virtual const IliValuef_getValue (IlBoolean internalP=IlFalse) const
 Returns the value of the field.
virtual IlBoolean f_hasLabel () const
 Returns IlTrue if the field gadget can display a label.
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_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.
virtual void f_setForeignTable (IliTable *, IlBoolean owner=IlFalse)
 Sets the foreign table of the field.
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.
virtual void f_setLabel (const char *)
 Sets the label of the field gadget.
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.
virtual IlBoolean is3StatesMode () const
 Returns IlTrue if the IliDbToggle handles the NULL value in addition to the two Boolean values.
virtual void set3StatesMode (IlBoolean)
 Enables/disables the handling of NULL values.

Detailed Description

Field gadget class.

Library: dbgadget

The IliDbToggle class defines toggle gadgets that can be connected to a data source. A IliDbToggle gadget inherits the following properties from the IliFieldItf class:

See also:
IliFieldItf.

Constructor & Destructor Documentation

IliDbToggle::IliDbToggle ( IlvDisplay display,
const char *  label,
const IlvRect rect,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

This constructor initializes a new IliDbToggle instance.

Parameters:
display The display.
label The label.
rect The location.
thickness The border thickness.
palette The palette.
IliDbToggle::IliDbToggle ( IlvDisplay display,
const IlvPoint at,
const char *  label,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

This constructor initializes a new IliDbToggle instance.

Parameters:
display The display.
at The position.
label The label.
thickness The border thickness.
palette The palette.
IliDbToggle::IliDbToggle ( IlvDisplay display,
IlvBitmap bitmap,
const IlvRect rect,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

This constructor initializes a new IliDbToggle instance.

Parameters:
display The display.
bitmap The bitmap.
rect The location.
thickness The border thickness.
palette The palette.
IliDbToggle::IliDbToggle ( IlvDisplay display,
const IlvPoint at,
IlvBitmap bitmap,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

This constructor initializes a new IliDbToggle instance.

Parameters:
display The display.
at The position.
bitmap The bitmap.
thickness The border thickness.
palette The palette.

Member Function Documentation

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

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

virtual const char* IliDbToggle::f_getLabel (  )  const [virtual]

Returns the label displayed by the field gadget.

Returns:
The label.

Reimplemented from IliFieldItf.

virtual const IliValue& IliDbToggle::f_getValue ( IlBoolean  internal = IlFalse  )  const [virtual]

Returns the value of the field.

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

Reimplemented from IliFieldItf.

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

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

Reimplemented in IliSimpleToggle.

virtual IlBoolean IliDbToggle::f_isReadOnly (  )  const [virtual]

Returns IlTrue if the field is read-only.

Returns:
IlTrue if the field is read-only.

Reimplemented from IliFieldItf.

virtual void IliDbToggle::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:
name The column name.

Reimplemented from IliFieldItf.

virtual void IliDbToggle::f_setForeignTable ( IliTable tbl,
IlBoolean  owner = IlFalse 
) [virtual]

Sets the foreign table of the field.

Parameters:
tbl The table.
owner Determines whether the field will own the table.

Reimplemented from IliFieldItf.

virtual void IliDbToggle::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:
name The column name.

Reimplemented from IliFieldItf.

virtual void IliDbToggle::f_setLabel ( const char *  label  )  [virtual]

Sets the label of the field gadget.

Parameters:
label The label.

Reimplemented from IliFieldItf.

virtual void IliDbToggle::f_setReadOnly ( IlBoolean  flag  )  [virtual]

Sets the read-only property for the field.

Parameters:
flag The read-only flag.

Reimplemented from IliFieldItf.

virtual IlBoolean IliDbToggle::f_setValue ( const IliValue val,
IlBoolean  internal = IlFalse 
) [virtual]

Sets the value of the field.

Parameters:
val The value.
internal If IlFalse, then the external representation and the display of the field are automatically updated.
Returns:
IlTrue if successful, and IlFalse otherwise.

Reimplemented from IliFieldItf.

virtual IlBoolean IliDbToggle::is3StatesMode (  )  const [virtual]

Returns IlTrue if the IliDbToggle handles the NULL value in addition to the two Boolean values.

Note that the 3-states mode is only effective when the marker of the IliDbToggle has a check-box look (see IlvToggle::setRadio).

Returns:
IlTrue if the IliDbToggle handles the NULL value in addition to the two Boolean values, 0 and 1. By default this property is IlTrue.
virtual void IliDbToggle::set3StatesMode ( IlBoolean   )  [virtual]

Enables/disables the handling of NULL values.

Parameters:
flag If IlTrue, enables the handling of NULL values.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

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