rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvFilledLabelMatrixItem Class Reference

Matrix item class. More...

#include <ilviews/gadgets/matrix.h>

Inheritance diagram for IlvFilledLabelMatrixItem:
IlvLabelMatrixItem IlvAbstractMatrixItem

List of all members.

Public Member Functions

 IlvFilledLabelMatrixItem (const char *label, IlvPalette *palette, IlvPalette *invpal, IlBoolean copy=IlTrue)
 Constructor.
 IlvFilledLabelMatrixItem (IlvMatrix *matrix, const char *label, IlBoolean copy=IlTrue)
 Constructor.
 IlvFilledLabelMatrixItem (IlvPalette *palette, const char *label, IlBoolean copy=IlTrue)
 Constructor.
virtual IlvAbstractMatrixItemcopy () 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.
IlvPalettegetInvertedPalette () const
 Returns the palette used to display this matrix item when it is selected.
virtual const char * getLabel () const
 Returns the label that identifies this matrix item.
IlvPalettegetPalette () const
 Returns the palette used to display this matrix item.
virtual void minimumSize (const IlvMatrix *, IlvDim &w, IlvDim &h) const
 Returns the preferred size of the item.
virtual void setBackground (IlvColor *color)
 Sets the background color of this matrix item.
virtual void setFont (IlvFont *)
 Sets the font of this matrix item.
virtual void setForeground (IlvColor *color)
 Sets the foreground color of this matrix item.
virtual void setLabel (const char *, IlBoolean copy=IlTrue)
 Sets the label of the matrix item.
virtual void setPalette (IlvPalette *palette)
 Sets the palette of this matrix item.
virtual void write (IlvOutputFile &) const
 Writes an object description to a file.

Static Public Member Functions

static IlvAbstractMatrixItemreadItem (IlvInputFile &, IlvDisplay *)
 Reads an object description from a file.

Detailed Description

Matrix item class.

Library: ilvadvgdt

Use this class to define a matrix item as a label with a filled background.

See also:
IlvMatrix, IlvPalette.

Constructor & Destructor Documentation

IlvFilledLabelMatrixItem::IlvFilledLabelMatrixItem ( IlvPalette palette,
const char *  label,
IlBoolean  copy = IlTrue 
)

Constructor.

Initializes a new instance of the class IlvFilledLabelMatrixItem.

Parameters:
palette The matrix item palette.
label The matrix item label.
copy A Boolean value specifying 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 IlvFilledLabelMatrixItem.
IlvFilledLabelMatrixItem::IlvFilledLabelMatrixItem ( IlvMatrix matrix,
const char *  label,
IlBoolean  copy = IlTrue 
)

Constructor.

Initializes a new instance of the class IlvFilledLabelMatrixItem.

Parameters:
matrix The matrix to which the item belongs. This parameter is used to compute the matrix item palette.
label The matrix item label.
copy A Boolean value specifying 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 IlvFilledLabelMatrixItem.
IlvFilledLabelMatrixItem::IlvFilledLabelMatrixItem ( const char *  label,
IlvPalette palette,
IlvPalette invpal,
IlBoolean  copy = IlTrue 
)

Constructor.

Initializes a new instance of the class IlvFilledLabelMatrixItem.

Parameters:
label The matrix item label.
palette The matrix item palette.
invpal The 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.
copy A Boolean value specifying 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 IlvFilledLabelMatrixItem.

Member Function Documentation

virtual IlvAbstractMatrixItem* IlvFilledLabelMatrixItem::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 IlvLabelMatrixItem.

virtual void IlvFilledLabelMatrixItem::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:
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.
See also:
IlvAbstractMatrix::drawItem, drawLabel

Reimplemented from IlvAbstractMatrixItem.

IlvPalette* IlvFilledLabelMatrixItem::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
virtual const char* IlvFilledLabelMatrixItem::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 IlvLabelMatrixItem.

IlvPalette* IlvFilledLabelMatrixItem::getPalette (  )  const

Returns the palette used to display this matrix item.

Returns:
The palette used to display this matrix item.
See also:
getInvertedPalette
virtual void IlvFilledLabelMatrixItem::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:
matrix The matrix to which the item belongs.
width The returned preferred width of the item.
height The returned preferred height of the item.
See also:
IlvMatrix::getColumnFittingSize, IlvMatrix::getRowFittingSize

Reimplemented from IlvAbstractMatrixItem.

static IlvAbstractMatrixItem* IlvFilledLabelMatrixItem::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);
 }
Parameters:
file The file to be read from.
display The display used to create the object.
See also:
DeclareMatrixItemInfoRO, DeclareMatrixItemInfo, IlvPredefinedMatrixItemIOMembers.
Warning:
[note] The readItem method is not capitalized like other static methods so that it is consistent with the write method.

Reimplemented from IlvLabelMatrixItem.

virtual void IlvFilledLabelMatrixItem::setBackground ( IlvColor color  )  [virtual]

Sets the background color of this matrix item.

The default implementation does nothing.

Parameters:
color The new background color.
See also:
setPalette, setForeground, setFont, IlvFilledLabelMatrixItem, IlvFilledIntMatrixItem, IlvFilledFloatMatrixItem, IlvFilledDoubleMatrixItem

Reimplemented from IlvAbstractMatrixItem.

virtual void IlvFilledLabelMatrixItem::setFont ( IlvFont font  )  [virtual]

Sets the font of this matrix item.

The default implementation does nothing.

Parameters:
font The new font.
See also:
setPalette, setForeground, setBackground, IlvFilledLabelMatrixItem, IlvFilledIntMatrixItem, IlvFilledFloatMatrixItem, IlvFilledDoubleMatrixItem

Reimplemented from IlvAbstractMatrixItem.

virtual void IlvFilledLabelMatrixItem::setForeground ( IlvColor color  )  [virtual]

Sets the foreground color of this matrix item.

The default implementation does nothing.

Parameters:
color The new foreground color.
See also:
setPalette, setBackground, setFont, IlvFilledLabelMatrixItem, IlvFilledIntMatrixItem, IlvFilledFloatMatrixItem, IlvFilledDoubleMatrixItem

Reimplemented from IlvAbstractMatrixItem.

virtual void IlvFilledLabelMatrixItem::setLabel ( const char *  label,
IlBoolean  copy = IlTrue 
) [virtual]

Sets the label of the matrix item.

Parameters:
label The label of the matrix item.
copy A Boolean value specifying 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 IlvLabelMatrixItem.

virtual void IlvFilledLabelMatrixItem::setPalette ( IlvPalette palette  )  [virtual]

Sets the palette of this matrix item.

The default implementation does nothing.

Parameters:
palette The new palette.
See also:
setBackground, setForeground, setFont, IlvFilledLabelMatrixItem, IlvFilledIntMatrixItem, IlvFilledFloatMatrixItem, IlvFilledDoubleMatrixItem

Reimplemented from IlvAbstractMatrixItem.

virtual void IlvFilledLabelMatrixItem::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:
file The name of the file to be written to.
See also:
DeclareMatrixItemInfoRO, DeclareMatrixItemInfo, IlvPredefinedMatrixItemIOMembers.

Reimplemented from IlvLabelMatrixItem.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.