Views
Gadgets Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvFilledDoubleMatrixItem Class Reference

Matrix item class. More...

#include <ilviews/gadgets/matrix.h>

Inheritance diagram for IlvFilledDoubleMatrixItem:
IlvDoubleMatrixItem IlvAbstractMatrixItem IlvValueInterface

Public Member Functions

 IlvFilledDoubleMatrixItem (IlDouble value, IlvPalette *palette, IlvPalette *invpal)
 Constructor. More...
 
 IlvFilledDoubleMatrixItem (IlvMatrix *matrix, IlDouble value)
 Constructor. More...
 
 IlvFilledDoubleMatrixItem (IlvPalette *palette, IlDouble value)
 Constructor. More...
 
virtual IlvAbstractMatrixItemcopy () const
 Copies this object. More...
 
virtual void draw (const IlvMatrix *, IlUShort, IlUShort, IlvPort *, const IlvRect &, const IlvRect *) const
 Is called to draw the matrix item. More...
 
IlvPalettegetInvertedPalette () const
 Returns the palette used to display this matrix item when it is selected. More...
 
virtual const char * getLabel () const
 Returns the label that identifies this matrix item. More...
 
IlvPalettegetPalette () const
 Returns the palette used to display this matrix item. More...
 
virtual void minimumSize (const IlvMatrix *, IlvDim &, IlvDim &) const
 Returns the preferred size of the item. More...
 
virtual void setBackground (IlvColor *)
 Sets the background color of this matrix item. More...
 
virtual void setFont (IlvFont *)
 Sets the font of this matrix item. More...
 
virtual void setForeground (IlvColor *)
 Sets the foreground color of this matrix item. More...
 
virtual void setLabel (const char *, IlBoolean copy=IlTrue)
 Sets the label of the matrix item. More...
 
virtual void setPalette (IlvPalette *)
 Sets the palette of this matrix item. More...
 
virtual void write (IlvOutputFile &) const
 Writes an object description to a file. More...
 
- Public Member Functions inherited from IlvDoubleMatrixItem
 IlvDoubleMatrixItem (IlDouble value)
 Constructor. More...
 
IlDouble getDouble () const
 Returns the double-precision floating-point value stored in the matrix item. More...
 
virtual const char * getFormat () const
 Returns the format used to display the double-precision floating-point value. More...
 
void setDouble (IlDouble value)
 Sets the double-precision floating-point value stored in the matrix item. More...
 
- Public Member Functions inherited from IlvAbstractMatrixItem
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 IlBoolean handleSelectionDrawing () const
 Indicates whether the selection drawing is handled by the matrix item.
More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvAbstractMatrixItem
static IlvAbstractMatrixItemreadItem (IlvInputFile &file, IlvDisplay *display)
 Reads an object description from a file. More...
 

Detailed Description

Matrix item class.

Library: ilvadvgdt

Use this class to define a matrix item as a double-precision floating-point value with a filled background.

See also
IlvMatrix, IlvPalette.

Constructor & Destructor Documentation

◆ IlvFilledDoubleMatrixItem() [1/3]

IlvFilledDoubleMatrixItem::IlvFilledDoubleMatrixItem ( IlvPalette palette,
IlDouble  value 
)

Constructor.

Initializes a new instance of the class IlvFilledDoubleMatrixItem.

Parameters
paletteThe matrix item palette.
valueThe double-precision floating-point value encapsulated by the item.

◆ IlvFilledDoubleMatrixItem() [2/3]

IlvFilledDoubleMatrixItem::IlvFilledDoubleMatrixItem ( IlvMatrix matrix,
IlDouble  value 
)

Constructor.

Initializes a new instance of the class IlvFilledDoubleMatrixItem.

Parameters
matrixThe matrix to which the item belongs. This parameter is used to compute the matrix item palette.
valueThe double-precision floating-point value encapsulated by the item.

◆ IlvFilledDoubleMatrixItem() [3/3]

IlvFilledDoubleMatrixItem::IlvFilledDoubleMatrixItem ( IlDouble  value,
IlvPalette palette,
IlvPalette invpal 
)

Constructor.

Initializes a new instance of the class IlvFilledDoubleMatrixItem.

Parameters
valueThe double-precision floating-point value encapsulated by the item.
paletteThe matrix item palette.
invpalThe inverted palette used by the matrix item when it is selected. When using other constructors, the inverted palette is automatically computed from the matrix item palette.

Member Function Documentation

◆ copy()

virtual IlvAbstractMatrixItem* IlvFilledDoubleMatrixItem::copy ( ) const
virtual

Copies this object.

Allocates and returns a copy of this object.

Returns
A copy of the object.
See also
IlvPredefinedMatrixItemIOMembers().

Reimplemented from IlvDoubleMatrixItem.

◆ draw()

virtual void IlvFilledDoubleMatrixItem::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.

Parameters
matrixThe matrix to which the item belongs.
colThe column where the matrix item is located.
rowThe row where the matrix item is located.
dstThe destination drawing port.
bboxThe bounding box of the matrix item.
clipThe clipping area.
See also
IlvAbstractMatrix::drawItem, drawLabel().

Reimplemented from IlvAbstractMatrixItem.

◆ getInvertedPalette()

IlvPalette* IlvFilledDoubleMatrixItem::getInvertedPalette ( ) const

Returns the palette used to display this matrix item when it is selected.

Returns
The palette used to display this matrix item when it is selected.
See also
getPalette().

◆ getLabel()

virtual const char* IlvFilledDoubleMatrixItem::getLabel ( ) const
virtual

Returns the label that identifies this matrix item.

Returns
The label that identifies this matrix item. The returned string must not be deleted or modified.
See also
setLabel().

Reimplemented from IlvDoubleMatrixItem.

◆ getPalette()

IlvPalette* IlvFilledDoubleMatrixItem::getPalette ( ) const

Returns the palette used to display this matrix item.

Returns
The palette used to display this matrix item.
See also
getInvertedPalette().

◆ minimumSize()

virtual void IlvFilledDoubleMatrixItem::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.

Parameters
matrixThe matrix to which the item belongs.
widthThe returned preferred width of the item.
heightThe returned preferred height of the item.
See also
IlvMatrix::getColumnFittingSize(), IlvMatrix::getRowFittingSize().

Reimplemented from IlvAbstractMatrixItem.

◆ setBackground()

virtual void IlvFilledDoubleMatrixItem::setBackground ( IlvColor color)
virtual

Sets the background color of this matrix item.

The default implementation does nothing.

Parameters
colorThe new background color.
See also
setPalette(), setForeground(), setFont(), IlvFilledLabelMatrixItem, IlvFilledIntMatrixItem, IlvFilledFloatMatrixItem, IlvFilledDoubleMatrixItem.

Reimplemented from IlvAbstractMatrixItem.

◆ setFont()

virtual void IlvFilledDoubleMatrixItem::setFont ( IlvFont font)
virtual

Sets the font of this matrix item.

The default implementation does nothing.

Parameters
fontThe new font.
See also
setPalette(), setForeground(), setBackground(), IlvFilledLabelMatrixItem, IlvFilledIntMatrixItem, IlvFilledFloatMatrixItem, IlvFilledDoubleMatrixItem.

Reimplemented from IlvAbstractMatrixItem.

◆ setForeground()

virtual void IlvFilledDoubleMatrixItem::setForeground ( IlvColor color)
virtual

Sets the foreground color of this matrix item.

The default implementation does nothing.

Parameters
colorThe new foreground color.
See also
setPalette(), setBackground(), setFont(), IlvFilledLabelMatrixItem, IlvFilledIntMatrixItem, IlvFilledFloatMatrixItem, IlvFilledDoubleMatrixItem.

Reimplemented from IlvAbstractMatrixItem.

◆ setLabel()

virtual void IlvFilledDoubleMatrixItem::setLabel ( const char *  label,
IlBoolean  copy = IlTrue 
)
virtual

Sets the label of the matrix item.

Parameters
labelThe label of the matrix item.
copySpecifies whether a label should be copied. If the value is IlFalse, then you must allocate some memory for the label because in any case the label characters are deleted from the memory by the IlvAbstractMatrixItem.
See also
getLabel().

Reimplemented from IlvDoubleMatrixItem.

◆ setPalette()

virtual void IlvFilledDoubleMatrixItem::setPalette ( IlvPalette palette)
virtual

Sets the palette of this matrix item.

The default implementation does nothing.

Parameters
paletteThe new palette.
See also
setBackground(), setForeground(), setFont(), IlvFilledLabelMatrixItem, IlvFilledIntMatrixItem, IlvFilledFloatMatrixItem, IlvFilledDoubleMatrixItem.

Reimplemented from IlvAbstractMatrixItem.

◆ write()

virtual void IlvFilledDoubleMatrixItem::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().

Parameters
fileThe name of the file to be written to.
See also
DeclareMatrixItemInfoRO(), DeclareMatrixItemInfo(), IlvPredefinedMatrixItemIOMembers().

Reimplemented from IlvDoubleMatrixItem.