rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliEntryField Class Reference

Gadget class. More...

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

Inheritance diagram for IliEntryField:
IlvTextField IliFieldItf IlvGadget IlvSimpleGraphic IlvGraphic IliAbstractComboBox IliDialogComboBox IliTableComboBox

List of all members.

Public Member Functions

 IliEntryField (IlvDisplay *display, const IlvPoint &at, const char *label, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes a new IliEntryField instance.
 IliEntryField (IlvDisplay *display, const char *label, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes a new IliEntryField instance.
 IliEntryField (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes a new IliEntryField instance.
virtual IlBoolean f_externalToInternal ()
 Updates the internal value of a field according to its current external representation.
virtual IlvAlignment f_getAlignment () const
 Returns the text alignment of the field.
virtual const IliFormatf_getFormat () const
 Returns the format used to derive the external representation of the field from its internal value.
virtual const IliInputMaskf_getMask () const
 Returns the input mask used to edit values in the field.
virtual IlShort f_getMaxLength () const
 Returns the maximum length allowed for the external representation of the field.
virtual const IliValuef_getValue (IlBoolean internalP=IlFalse) const
 Returns the value of the field.
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_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.
virtual void f_setFormat (const IliFormat &)
 Sets the format used to derive the external representation of the field from its internal value.
virtual void f_setInputModified (IlBoolean f)
 Sets the input-modified attribute of the field.
virtual void f_setMask (const IliInputMask &)
 Sets the input mask.
virtual void f_setMaxLength (IlShort)
 Sets the maximum length allowed for the external representation of the field.
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.

Protected Member Functions

const char * formatValue (IliString &dest, const IliValue &val)
 Returns a character string which contains the formatted value.
void setLabelSilently (const char *label)
 Sets a new label and launches the drawing of the new label.
virtual void valueToLabel (const IliValue &value)
 Sets the value to the label of the entry field.

Detailed Description

Gadget class.

Library: dbgadget

The IliEntryField class defines a text field gadget that can be connected to a data source.


Constructor & Destructor Documentation

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

Initializes a new IliEntryField instance.

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

Initializes a new IliEntryField instance.

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

Initializes a new IliEntryField instance.

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

Member Function Documentation

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

Reimplemented in IliTableComboBox.

virtual IlvAlignment IliEntryField::f_getAlignment (  )  const [virtual]

Returns the text alignment of the field.

Returns:
The alignment.

Reimplemented from IliFieldItf.

virtual const IliFormat& IliEntryField::f_getFormat (  )  const [virtual]

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

Returns:
The format.

Reimplemented from IliFieldItf.

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

virtual IlShort IliEntryField::f_getMaxLength (  )  const [virtual]

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

Returns:
The maximum.

Reimplemented from IliFieldItf.

virtual const IliValue& IliEntryField::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 IliEntryField::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 IliTableComboBox.

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

Returns IlTrue if the field is read-only.

Returns:
IlTrue if the field is read-only.

Reimplemented from IliFieldItf.

Reimplemented in IliAbstractComboBox.

virtual void IliEntryField::f_setAlignment ( IlvAlignment  align  )  [virtual]

Sets the text alignment of the field.

Parameters:
align The alignment.

Reimplemented from IliFieldItf.

virtual void IliEntryField::f_setFormat ( const IliFormat fmt  )  [virtual]

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

Parameters:
fmt The format.

Reimplemented from IliFieldItf.

virtual void IliEntryField::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:
flag The input-modified attribute.

Reimplemented from IliFieldItf.

virtual void IliEntryField::f_setMask ( const IliInputMask msk  )  [virtual]

Sets the input mask.

Parameters:
msk The mask.

Reimplemented from IliFieldItf.

virtual void IliEntryField::f_setMaxLength ( IlShort  vmax  )  [virtual]

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

Parameters:
vmax The maximum length.

Reimplemented from IliFieldItf.

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

Sets the read-only property for the field.

Parameters:
flag The read-only flag.

Reimplemented from IliFieldItf.

Reimplemented in IliAbstractComboBox.

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

Reimplemented in IliTableComboBox.

const char* IliEntryField::formatValue ( IliString dest,
const IliValue val 
) [protected]

Returns a character string which contains the formatted value.

Parameters:
dest The string which contains the formatted value.
val The value.
Returns:
A character string which contains the formatted value.
void IliEntryField::setLabelSilently ( const char *  label  )  [protected]

Sets a new label and launches the drawing of the new label.

Parameters:
label The label.
virtual void IliEntryField::valueToLabel ( const IliValue value  )  [protected, virtual]

Sets the value to the label of the entry field.

However if a format is defined the function formatValue is called to format the value. If there is no format but there is a mask, the value is formatted with the mask.

At the end the function setLabelSilently is called to set the value to the label and to launch the drawing of the label.

Parameters:
value The value.

Reimplemented in IliTableComboBox.

 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.