Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/dataccess/inspect/inspgad.h>
Public Member Functions | |
IliInspectorGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
This constructor initializes an inspector gadget. | |
IliValue & | at (IlInt tag) |
Returns a property value. | |
const IliValue & | at (IlInt tag) const |
Returns a property value. | |
void | defineBooleanProp (IlInt tag, const char *label) |
Defines a Boolean property. | |
void | defineProp (IlInt tag, const char *label, const IliDatatype *type, IliFieldItf *fld, IlBoolean owner=IlFalse) |
Defines a property. | |
void | defineProp (IlInt tag, const char *label, const IliDatatype *type, const IliMapEntry *, IlBoolean owner=IlFalse) |
Defines a property. | |
void | defineProp (IlInt tag, const char *label, const IliDatatype *type, IliTable *tbl, IlBoolean owner=IlFalse) |
Defines a property. | |
void | defineProp (IlInt tag, const char *label, const IliDatatype *type) |
Defines a property. | |
virtual void | drawMarker (IlvPort *dst, IlInt rowno, IlBoolean selected, IlBoolean current, const IlvRect &bbox, const IlvRegion *clip) const |
Draws a marker. | |
virtual IliFieldItf * | getCustomEditor (IlInt, IlInt, IliFieldItf *fld) const |
Returns the field to use as an editor for a cell. | |
IlBoolean | isModified () const |
Returns IlTrue if a property value has been changed. | |
IlBoolean | isPropDefined (IlInt tag) const |
Returns IlTrue if the property identified by tag is defined. | |
void | setModified (IlBoolean f) |
Changes the modified state of the inspector gadget. | |
IlBoolean | setSelection (const IliTableSelection &) |
Attempts to set the table gadget selection. | |
void | undefineAllProps () |
Removes all properties. | |
void | undefineProp (IlInt tag) |
Removes a property. | |
Protected Member Functions | |
virtual void | drawHorzRule (IlvPort *dst, IlvPos x1, IlvPos x2, IlvPos y, IlInt rowno, IlInt colnoLeft, IlInt colnoRight, IlvPalette *palette, const IlvRegion *clip) const |
Draws a horizontal rule of the table gadget grid. | |
virtual void | drawVertRule (IlvPort *dst, IlvPos y1, IlvPos y2, IlvPos x, IlInt colno, IlInt rownoTop, IlInt rownoBot, IlvPalette *palette, const IlvRegion *clip) const |
Draws a vertical rule of the table gadget grid. |
Gadget class.
Library: dbstudio
The IliInspectorGadget class implements a property-sheet style gadget. It has a set of defineProp
member functions that are typically called at configuration time to define a set of properties. Each property is identified by an integer tag and it has a label and a type.
Then the at
member function can be used to access the values of these properties.
IliInspectorGadget::IliInspectorGadget | ( | IlvDisplay * | display, | |
const IlvRect & | rect, | |||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
This constructor initializes an inspector gadget.
display | The display. | |
rect | The location. | |
thickness | The border thickness. | |
palette | The palette. |
Returns a property value.
tag | The property identification tag. |
Returns a property value.
tag | The property identification tag. |
void IliInspectorGadget::defineBooleanProp | ( | IlInt | tag, | |
const char * | label | |||
) |
Defines a Boolean property.
The given editor gadget will be used as an editor for this property.
tag | The property identification tag. | |
label | The property label. |
void IliInspectorGadget::defineProp | ( | IlInt | tag, | |
const char * | label, | |||
const IliDatatype * | type, | |||
IliFieldItf * | fld, | |||
IlBoolean | owner = IlFalse | |||
) |
Defines a property.
The given editor gadget will be used as an editor for this property.
tag | The property identification tag. | |
label | The property label. | |
type | The property type. | |
fld | The editor. | |
owner | The editor owner, if IlTrue then the given editor will be deleted when the property is undefined (or when the inspector gadget is deleted). |
void IliInspectorGadget::defineProp | ( | IlInt | tag, | |
const char * | label, | |||
const IliDatatype * | type, | |||
const IliMapEntry * | , | |||
IlBoolean | owner = IlFalse | |||
) |
Defines a property.
An IliTableComboBox
gadget will be used as an editor for this property.
tag | The property identification tag. | |
label | The property label. | |
type | The property type. | |
tbl | The array of IliMapEntry items which contains the description of the IliTableComboBox items. The last of which must have its label member set to NULL. | |
owner | The table owner, if IlTrue then the given mapping array will be deleted (along with the labels it contains) when the property is undefined (or when the inspector gadget is deleted). |
void IliInspectorGadget::defineProp | ( | IlInt | tag, | |
const char * | label, | |||
const IliDatatype * | type, | |||
IliTable * | tbl, | |||
IlBoolean | owner = IlFalse | |||
) |
Defines a property.
An IliTableComboBox
gadget will be used as an editor for this property. It will have its foreign table set to the value of the mapping parameter which should have two columns: the first column serves as a "value column"
and the second as a "display column"
. Note that the data type of the first column should match the type
parameter.
tag | The property identification tag. | |
label | The property label. | |
type | The property type. | |
tbl | The foreign table. | |
owner | The table owner, it must be IlFalse . |
void IliInspectorGadget::defineProp | ( | IlInt | tag, | |
const char * | label, | |||
const IliDatatype * | type | |||
) |
Defines a property.
An IliEntryField
gadget will be used as an editor for this property.
tag | The property identification tag. | |
label | The property label. | |
type | The property type. |
virtual void IliInspectorGadget::drawHorzRule | ( | IlvPort * | dst, | |
IlvPos | x1, | |||
IlvPos | x2, | |||
IlvPos | y, | |||
IlInt | rowno, | |||
IlInt | colnoLeft, | |||
IlInt | colnoRight, | |||
IlvPalette * | palette, | |||
const IlvRegion * | clip | |||
) | const [protected, virtual] |
Draws a horizontal rule of the table gadget grid.
Draws a horizontal rule of the table gadget grid in the dst
port.
dst | The port. | |
x1 | The x start position. | |
x2 | The x last position. | |
y | The y position. | |
rowno | The row position. | |
colnoLeft | The first column position. | |
colnoRight | The last column position. | |
palette | The palette. | |
clip | The region of clipping. |
Reimplemented from IliTableGadget.
virtual void IliInspectorGadget::drawMarker | ( | IlvPort * | dst, | |
IlInt | rowno, | |||
IlBoolean | selected, | |||
IlBoolean | current, | |||
const IlvRect & | bbox, | |||
const IlvRegion * | clip | |||
) | const [virtual] |
Draws a marker.
dst | The port. | |
rowno | The row position. | |
selected | If IlTrue , it is selected. | |
current | If IlTrue , it is the marker of the current row. | |
bbox | The bounding box. | |
clip | The region of clipping. |
Reimplemented from IliTableGadget.
virtual void IliInspectorGadget::drawVertRule | ( | IlvPort * | dst, | |
IlvPos | y1, | |||
IlvPos | y2, | |||
IlvPos | x, | |||
IlInt | colno, | |||
IlInt | rownoTop, | |||
IlInt | rownoBot, | |||
IlvPalette * | palette, | |||
const IlvRegion * | clip | |||
) | const [protected, virtual] |
Draws a vertical rule of the table gadget grid.
dst | The port. | |
y1 | The y start position. | |
y2 | The y last position. | |
x | The x position. | |
colno | The column position. | |
rownoTop | The first row position. | |
rownoBot | The last row position. | |
palette | The palette. | |
clip | The region of clipping. |
Reimplemented from IliTableGadget.
virtual IliFieldItf* IliInspectorGadget::getCustomEditor | ( | IlInt | rowno, | |
IlInt | colno, | |||
IliFieldItf * | fld | |||
) | const [virtual] |
Returns the field to use as an editor for a cell.
This virtual member function is called, with the fld
parameter set to the column editor, each time a new cell is entered. The default implementation returns the fld
parameter. However, it is possible to return any other editor in a subclass of IliTableGadget
.
rowno | The row position. | |
colno | The column position. | |
fld | The default editor. |
Reimplemented from IliTableGadget.
IlBoolean IliInspectorGadget::isModified | ( | ) | const |
Returns IlTrue
if a property value has been changed.
IlTrue
if a property value has been changed. Returns IlTrue
if the property identified by tag is defined.
tag | The property identification tag. |
IlTrue
if the property is defined. void IliInspectorGadget::setModified | ( | IlBoolean | f | ) |
Changes the modified
state of the inspector gadget.
f | The new state. |
IlBoolean IliInspectorGadget::setSelection | ( | const IliTableSelection & | sel | ) | [virtual] |
Attempts to set the table gadget selection.
sel | The new selection. |
IlTrue
if successful. Reimplemented from IliTableGadget.
void IliInspectorGadget::undefineProp | ( | IlInt | tag | ) |
Removes a property.
tag | The property identification tag. |
© 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.