Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Matrix item class. More...
#include <ilviews/gadgets/matrix.h>
Public Member Functions | |
virtual IlvAbstractMatrixItem * | copy () const |
Copies this object. More... | |
virtual void | draw (const IlvMatrix *matrix, IlUShort col, IlUShort row, IlvPort *dst, const IlvRect &bbox, const IlvRect *clip) const |
Is called to draw the matrix item. More... | |
void | drawLabel (const char *label, const IlvMatrix *matrix, IlUShort col, IlUShort row, IlvPort *dst, const IlvRect &bbox, const IlvRect *clip=0) const |
Is called to draw the label of the matrix item. More... | |
virtual const char * | getLabel () const |
Returns the label that identifies this matrix item. More... | |
virtual IlBoolean | handleSelectionDrawing () const |
Indicates whether the selection drawing is handled by the matrix item. More... | |
virtual void | minimumSize (const IlvMatrix *matrix, IlvDim &width, IlvDim &height) const |
Returns the preferred size of the item. More... | |
virtual void | setBackground (IlvColor *color) |
Sets the background color of this matrix item. More... | |
virtual void | setFont (IlvFont *font) |
Sets the font of this matrix item. More... | |
virtual void | setForeground (IlvColor *color) |
Sets the foreground color of this matrix item. More... | |
virtual void | setLabel (const char *label, IlBoolean copy=IlTrue) |
Sets the label of the matrix item. More... | |
virtual void | setPalette (IlvPalette *palette) |
Sets the palette of this matrix item. More... | |
virtual void | write (IlvOutputFile &file) const |
Writes an object description to a file. More... | |
Static Public Member Functions | |
static IlvAbstractMatrixItem * | readItem (IlvInputFile &file, IlvDisplay *display) |
Reads an object description from a file. More... | |
Friends | |
class | IlvMatrix |
Matrix item class.
Library: ilvadvgdt
The objects stored in a matrix are called matrix items. To handle these objects, the IlvMatrix
class uses the IlvAbstractMatrixItem
class, which encapsulates the matrix item parameters and behavior. Most of the member functions of this class are virtual. Each item stored and displayed in a matrix must be an instance of a subclass of IlvAbstractMatrixItem
. The default implementations of the setPalette
, setBackground
, setForeground
, setFont
, and setLabel
member functions in this abstract class, do nothing. Items may have specific client data. This data is managed at the IlvMatrix
level by the member function IlvMatrix::getItemData
and IlvMatrix::setItemData
.
|
virtual |
Copies this object.
Allocates and returns a copy of this object.
IlvPredefinedMatrixItemIOMembers
. Reimplemented in IlvGadgetItemMatrixItem, IlvGadgetMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvDoubleMatrixItem, IlvFloatMatrixItem, IlvFilledIntMatrixItem, IlvIntMatrixItem, IlvBitmapMatrixItem, IlvFilledLabelMatrixItem, and IlvLabelMatrixItem.
|
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 in IlvGadgetItemMatrixItem, IlvGadgetMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvBitmapMatrixItem, and IlvFilledLabelMatrixItem.
void IlvAbstractMatrixItem::drawLabel | ( | const char * | label, |
const IlvMatrix * | matrix, | ||
IlUShort | col, | ||
IlUShort | row, | ||
IlvPort * | dst, | ||
const IlvRect & | bbox, | ||
const IlvRect * | clip = 0 |
||
) | const |
Is called to draw the label of the matrix item.
label | The label to be drawn. |
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
, draw
|
virtual |
Returns the label that identifies this matrix item.
setLabel
Reimplemented in IlvGadgetItemMatrixItem, IlvGadgetMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvDoubleMatrixItem, IlvFloatMatrixItem, IlvFilledIntMatrixItem, IlvIntMatrixItem, IlvBitmapMatrixItem, IlvFilledLabelMatrixItem, and IlvLabelMatrixItem.
|
virtual |
Indicates whether the selection drawing is handled by the matrix item.
IlTrue
if the selection drawing is handled by the matrix item and not by the matrix to which it belongs. In this case, the member function IlvMatrix::drawSelection
is not called. The default implementation returns IlFalse
. IlvMatrix::drawSelection
Reimplemented in IlvGadgetItemMatrixItem, and IlvGraphicMatrixItem.
|
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 in IlvGadgetItemMatrixItem, IlvGadgetMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvBitmapMatrixItem, and IlvFilledLabelMatrixItem.
|
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 :
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.
|
virtual |
Sets the background color of this matrix item.
The default implementation does nothing.
color | The new background color. |
setPalette
, setForeground
, setFont
, IlvFilledLabelMatrixItem
, IlvFilledIntMatrixItem
, IlvFilledFloatMatrixItem
, IlvFilledDoubleMatrixItem
Reimplemented in IlvGadgetItemMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvBitmapMatrixItem, and IlvFilledLabelMatrixItem.
|
virtual |
Sets the font of this matrix item.
The default implementation does nothing.
font | The new font. |
setPalette
, setForeground
, setBackground
, IlvFilledLabelMatrixItem
, IlvFilledIntMatrixItem
, IlvFilledFloatMatrixItem
, IlvFilledDoubleMatrixItem
Reimplemented in IlvGadgetItemMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, and IlvFilledLabelMatrixItem.
|
virtual |
Sets the foreground color of this matrix item.
The default implementation does nothing.
color | The new foreground color. |
setPalette
, setBackground
, setFont
, IlvFilledLabelMatrixItem
, IlvFilledIntMatrixItem
, IlvFilledFloatMatrixItem
, IlvFilledDoubleMatrixItem
Reimplemented in IlvGadgetItemMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvBitmapMatrixItem, and IlvFilledLabelMatrixItem.
|
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 in IlvGadgetItemMatrixItem, IlvGadgetMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvDoubleMatrixItem, IlvFloatMatrixItem, IlvFilledIntMatrixItem, IlvIntMatrixItem, IlvBitmapMatrixItem, IlvFilledLabelMatrixItem, and IlvLabelMatrixItem.
|
virtual |
Sets the palette of this matrix item.
The default implementation does nothing.
palette | The new palette. |
setBackground
, setForeground
, setFont
, IlvFilledLabelMatrixItem
, IlvFilledIntMatrixItem
, IlvFilledFloatMatrixItem
, IlvFilledDoubleMatrixItem
Reimplemented in IlvGadgetItemMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvBitmapMatrixItem, and IlvFilledLabelMatrixItem.
|
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 in IlvGadgetItemMatrixItem, IlvGadgetMatrixItem, IlvGraphicMatrixItem, IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvDoubleMatrixItem, IlvFloatMatrixItem, IlvFilledIntMatrixItem, IlvIntMatrixItem, IlvBitmapMatrixItem, IlvFilledLabelMatrixItem, and IlvLabelMatrixItem.
© 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.