Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Matrix item class. More...
#include <ilviews/gadgets/matrix.h>
Public Member Functions | |
IlvGadgetMatrixItem (IlvGadget *gadget) | |
Constructor. | |
virtual IlvAbstractMatrixItem * | copy () const |
Copies this object. | |
virtual void | draw (const IlvMatrix *, IlUShort i, IlUShort j, IlvPort *dst, const IlvRect &bbox, const IlvRect *clip) const |
Is called to draw the matrix item. | |
IlUShort | focusColumn () |
Returns the index of the column containing the matrix item. | |
IlUShort | focusRow () |
Returns the index of the row containing the matrix item. | |
IlvGadget * | getGadget () const |
Returns a pointer to the gadget stored in this matrix item. | |
virtual const char * | getLabel () const |
Returns the label that identifies this matrix item. | |
IlBoolean | hasFocus () const |
Indicates whether the gadget in the matrix item has the focus. | |
IlBoolean | isInteractive () const |
Indicates whether the gadget stored in this matrix item is active. | |
virtual void | minimumSize (const IlvMatrix *, IlvDim &w, IlvDim &h) const |
Returns the preferred size of the item. | |
void | setGadget (IlvGadget *gadget) |
Sets the gadget stored in this matrix item. | |
void | setInteractive (IlBoolean value) |
Specifies whether the gadget stored in this matrix item should be active. | |
virtual void | setLabel (const char *, IlBoolean copy=IlTrue) |
Sets the label of the matrix item. | |
virtual void | write (IlvOutputFile &) const |
Writes an object description to a file. | |
Static Public Member Functions | |
static IlvAbstractMatrixItem * | readItem (IlvInputFile &, IlvDisplay *) |
Reads an object description from a file. |
Matrix item class.
Library: ilvadvgdt
Use this class to define a matrix item as a gadget. Gadgets stored in a matrix item are active.
IlvGadgetMatrixItem::IlvGadgetMatrixItem | ( | IlvGadget * | gadget | ) |
Constructor.
Initializes a new instance of the class IlvGadgetMatrixItem
.
gadget | The gadget encapsulated by this matrix item. |
virtual IlvAbstractMatrixItem* IlvGadgetMatrixItem::copy | ( | ) | const [virtual] |
Copies this object.
Allocates and returns a copy of this object.
IlvPredefinedMatrixItemIOMembers
. Reimplemented from IlvGraphicMatrixItem.
virtual void IlvGadgetMatrixItem::draw | ( | const IlvMatrix * | matrix, | |
IlUShort | col, | |||
IlUShort | row, | |||
IlvPort * | dst, | |||
const IlvRect & | bbox, | |||
const IlvRect * | clip | |||
) | const [virtual] |
Is called to draw the matrix item.
The default implementation of the method calls IlvAbstractMatrixItem::drawLabel
.
matrix | The matrix to which the item belongs. | |
col | The column where the matrix item is located. | |
row | The row where the matrix item is located. | |
dst | The destination drawing port. | |
bbox | The bounding box of the matrix item. | |
clip | The clipping area. |
IlvAbstractMatrix::drawItem
, drawLabel
Reimplemented from IlvGraphicMatrixItem.
IlUShort IlvGadgetMatrixItem::focusColumn | ( | ) |
Returns the index of the column containing the matrix item.
This method must be called only when the item has the focus.
IlUShort IlvGadgetMatrixItem::focusRow | ( | ) |
Returns the index of the row containing the matrix item.
This method must be called only when the item has the focus.
IlvGadget* IlvGadgetMatrixItem::getGadget | ( | ) | const |
Returns a pointer to the gadget stored in this matrix item.
virtual const char* IlvGadgetMatrixItem::getLabel | ( | ) | const [virtual] |
Returns the label that identifies this matrix item.
setLabel
Reimplemented from IlvGraphicMatrixItem.
IlBoolean IlvGadgetMatrixItem::hasFocus | ( | ) | const |
Indicates whether the gadget in the matrix item has the focus.
IlTrue
if the gadget has the focus and IlFalse
otherwise. When a gadget has the focus, it receives all the keyboard events. IlBoolean IlvGadgetMatrixItem::isInteractive | ( | ) | const |
Indicates whether the gadget stored in this matrix item is active.
IlTrue
if the gadget stored in this matrix item is active. When a gadget is active, events are sent to its handleEvent
method. setInteractive
virtual void IlvGadgetMatrixItem::minimumSize | ( | const IlvMatrix * | matrix, | |
IlvDim & | width, | |||
IlvDim & | height | |||
) | const [virtual] |
Returns the preferred size of the item.
The preferred size is the size that the item must have for its content to be entirely visible. Uses width and height to return the preferred size of this item when stored in matrix. This method is called by the member functions IlvMatrix::getColumnFittingSize
and IlvMatrix::getRowFittingSize
.
matrix | The matrix to which the item belongs. | |
width | The returned preferred width of the item. | |
height | The returned preferred height of the item. |
Reimplemented from IlvGraphicMatrixItem.
static IlvAbstractMatrixItem* IlvGadgetMatrixItem::readItem | ( | IlvInputFile & | file, | |
IlvDisplay * | display | |||
) | [static] |
Reads an object description from a file.
Reads an object description from the file input. It reads the information that was saved by the member function write
to be able to create a new instance of this object. Usually, because of the availability of the constructor that expects an IlvInputFile
, readItem
should be equivalent to :
IlvAbstractMatrixItem* MyClass::readItem(IlvInputFile& file, IlvDisplay* display) { return new MyClass(file, display); }
file | The file to be read from. | |
display | The display used to create the object. |
readItem
method is not capitalized like other static methods so that it is consistent with the write
method. Reimplemented from IlvGraphicMatrixItem.
void IlvGadgetMatrixItem::setGadget | ( | IlvGadget * | gadget | ) |
Sets the gadget stored in this matrix item.
The old gadget that was stored in this matrix item is deleted.
gadget | The new gadget. |
getGadget
void IlvGadgetMatrixItem::setInteractive | ( | IlBoolean | value | ) |
Specifies whether the gadget stored in this matrix item should be active.
This method has the same function as IlvGadget::setActive
. Though in this situation the information is directly managed by the IlvGadgetMatrixItem
instance.
value | A Boolean value specifying whether the gadget stored in this matrix item should be active (IlTrue ) or not (IlFalse ). |
isInteractive
, IlvGadget::isActive
virtual void IlvGadgetMatrixItem::setLabel | ( | const char * | label, | |
IlBoolean | copy = IlTrue | |||
) | [virtual] |
Sets the label of the matrix item.
label | The label of the matrix item. | |
copy | A Boolean value specifying whether a label should be copied. If the value is IlFalse |
getLabel
Reimplemented from IlvGraphicMatrixItem.
virtual void IlvGadgetMatrixItem::write | ( | IlvOutputFile & | file | ) | const [virtual] |
Writes an object description to a file.
Writes out, in a file, the object description. This description contains all the information necessary to create an exact copy of this object by means of the member function readItem
.
file | The name of the file to be written to. |
Reimplemented from IlvGraphicMatrixItem.
© 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.