rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMatrix Class Reference

Gadget class. More...

#include <ilviews/gadgets/matrix.h>

Inheritance diagram for IlvMatrix:
IlvAbstractMatrix IlvGadgetItemHolder IlvScrolledGadget IlvGadget IlvSimpleGraphic IlvGraphic IlvSheet IlvFileChooserSheet IlvHierarchicalSheet

List of all members.

Public Member Functions

 IlvMatrix (IlvDisplay *display, const IlvRect &rect, IlUShort nbcol, IlUShort nbrow, IlvDim xgrid=60, IlvDim ygrid=30, IlvDim thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
virtual void activateMatrixItem (IlUShort col, IlUShort row)
 Is called by the interactor when an item is activated.
virtual void add (IlvAbstractMatrixItem *item)
 Adds an item to the first empty cell in the matrix.
IlBoolean adjustLast (IlBoolean value)
 Specifies whether only the last column and the last row should be resized.
void allowDragDrop (IlBoolean value)
 Specifies whether the matrix should allow drag-and-drop operations.
IlBoolean allowDragDrop () const
 Indicates whether the matrix allows drag-and-drop operations.
IlBoolean allowEdit (IlBoolean value)
 Specifies whether editing should be allowed.
void allowEditOnDoubleClick (IlBoolean value)
 Indicates whether the matrix should allow item editing when a double-click event occurs.
IlBoolean allowEditOnDoubleClick () const
 Indicates whether the matrix allows item editing when a double-click event occurs.
virtual IlvGadgetItemapplyToItems (IlvApplyGadgetItem f, IlAny arg)
 Applies the specified function to all the items of the holder.
IlBoolean autoFitToSize (IlBoolean value)
 Specifies whether the automatic fitting to size mode should be on.
virtual void changeSelectionTo (IlUShort col, IlUShort row)
 Clears the current selection and selects specified cell.
IlUShort columns () const
 Returns the number of columns in the matrix.
IlBoolean columnSameWidth () const
 Returns IlTrue if all the columns in the matrix have the same width.
virtual IlvTextFieldcreateEditionField (IlUShort col, IlUShort row)
 Returns a new text field for editing an item.
virtual IlvMatrixItemEditorcreateEditor (IlUShort col, IlUShort row)
 Returns a new editor for editing an item.
virtual void deSelect ()
 Deselects all the items in the matrix.
virtual void doIt ()
 Is called by the interactor when the selection changes in the matrix.
virtual void drawBackground (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget background.
virtual void drawFrame (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget frame.
virtual void drawGadgetContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget contents.
virtual void drawItem (IlvPort *dst, IlUShort colno, IlUShort rowno, const IlvRect &itembbox, const IlvRect &clip) const
 Is called by the matrix to draw an item.
virtual void drawRelief (IlUShort col, IlUShort row, IlvPort *dst, const IlvRect &bbox, const IlvRect *clip) const
 Is called to draw an item in relief.
virtual void drawSelection (IlUShort col, IlUShort row, IlvPort *dst, const IlvRect &bbox, const IlvRect *clip) const
 Is called to draw a selected item.
virtual void editItem (IlUShort col, IlUShort row)
 Activates the editing mode for the matrix.
virtual void extendSelection (IlUShort col, IlUShort row)
 Extends the selection from the anchor to the specified cell.
virtual void fitHeightToSize (IlUShort row=0)
 Computes a new size for the rows so that they fit the height of the matrix.
void fitToSize ()
 Computes a new size for the columns and rows so that they fit the size of the matrix.
virtual void fitWidthToSize (IlUShort col=0)
 Computes a new size for the columns so that they fit the width of the matrix.
IlvDim getCardinal () const
 Returns the number of cells in the matrix.
IlvDim getColumnFittingSize (IlUShort col) const
 Returns the width of the largest item in the specified column.
IlvDim getColumnPosition (IlUShort rowno) const
 Returns the position of a column.
IlvDim getColumnsDistance (IlUShort fromcol, IlUShort tocol) const
 Returns the distance between two columns.
IlvDim getColumnWidth (IlUShort colno) const
 Returns the width of the specified column.
IlvDirection getEditDirection () const
 Returns the editing direction of the matrix.
IlvTextFieldgetEditedItem (IlUShort &col, IlUShort &row) const
 Returns the location of the item being edited.
IlvGraphicgetEditorField () const
 Returns a pointer to the editing field.
IlvOrientation getExtendedSelectionOrientation () const
 Returns the direction to which the selection will be extended.
IlBoolean getFirstSelected (IlUShort &col, IlUShort &row) const
 Returns the first selected item in the matrix.
IlvGadgetMatrixItemgetFocusItem () const
 Returns the gadget matrix item that has the focus.
IlvPalettegetGridPalette () const
 Returns the palette used to draw the matrix grid.
virtual IlvPalettegetInsensitivePalette () const
 Returns the palette used to draw an item that is not sensitive.
IlvAbstractMatrixItemgetItem (IlvDim pos) const
 Returns the matrix item located at the specified position.
IlvAbstractMatrixItemgetItem (IlUShort col, IlUShort row) const
 Returns the item located in the specified cell.
IlvPosition getItemAlignment (IlUShort col, IlUShort row) const
 Returns the alignment of an item of the matrix.
IlAny getItemData (IlUShort col, IlUShort row) const
 Returns the client data of the specified matrix item.
virtual void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the default orientation of the matrix items labels.
virtual IlvPosition getLabelPosition () const
 Returns the default position of the matrix item labels.
void getLastSelectedItem (IlUShort &col, IlUShort &row) const
 Returns the location of the last selected item in the matrix.
virtual IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item.
virtual IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items.
IlvDim getRowFittingSize (IlUShort row) const
 Returns the height of the largest item in the specified row.
IlvDim getRowHeight (IlUShort rowno) const
 Returns the height of the specified row.
IlvDim getRowPosition (IlUShort colno) const
 Returns the position of a row.
IlvDim getRowsDistance (IlUShort fromrow, IlUShort torow) const
 Returns the distance between two rows.
virtual IlvPalettegetSelectionPalette () const
 Returns the selection palette used to draw selected items.
virtual IlvPalettegetSelectionTextPalette () const
 Returns the selection palette used to draw the label of selected items.
IlUShort getSpacing () const
 Returns the spacing between two cells of the matrix.
IlvTextFieldgetTextField () const
 Returns a pointer to the editing text field.
IlvDim getXgrid () const
 Returns the default column width.
IlvDim getYgrid () const
 Returns the default row height.
virtual IlBoolean handleMatrixEvent (IlvEvent &)
 Handles the events sent to the matrix.
IlBoolean hasToolTips () const
 Indicates whether the matrix handles internal tooltips.
void hideEditorField ()
 Hides and destroys the matrix item editing field.
void hideTextField ()
 Hides and destroys the editing text field.
virtual void insertColumn (IlUShort col=0, IlUShort count=1)
 Inserts columns in the matrix.
virtual void insertRow (IlUShort row=0, IlUShort count=1)
 Inserts rows in the matrix.
virtual void internalBBox (IlvRect &rect, const IlvTransformer *t) const
 Returns the internal bounding box of the gadget.
IlBoolean isAdjustingLast () const
 Indicates whether only the last column and row are resized.
IlBoolean isAutoColumnSelect () const
 Indicates whether the automatic column selection mode is on.
IlBoolean isAutoFittingToSize () const
 Indicates whether the automatic fitting to size mode is on.
IlBoolean isAutoLineSelect () const
 Indicates whether the automatic row selection mode is on.
IlBoolean isBrowseMode () const
 Indicates whether the matrix is in browse selection mode.
IlBoolean isDirectEditionMode () const
 Indicates whether the matrix is in direct editing mode.
IlBoolean isEditAllowed () const
 Indicates whether editing is allowed.
IlBoolean isExclusive () const
 Indicates whether the selection mode is set to exclusive.
IlBoolean isItemFillingBackground (IlUShort col, IlUShort row) const
 Returns IlTrue if the specified item is filled.
IlBoolean isItemGrayed (IlUShort col, IlUShort row) const
 Indicates whether the specified item is grayed.
IlBoolean isItemReadOnly (IlUShort col, IlUShort row) const
 Indicates whether the specified matrix item is read-only.
IlBoolean isItemRelief (IlUShort col, IlUShort row) const
 Indicates whether the specified matrix item appears in relief.
IlBoolean isItemSelected (IlUShort col, IlUShort row) const
 Indicates whether the item located in the specified cell is selected.
IlBoolean isItemSensitive (IlUShort col, IlUShort row) const
 Indicates whether the specified item is sensitive.
virtual IlBoolean isShowingLabel () const
 Indicates whether the matrix item labels are displayed.
virtual IlBoolean isShowingPicture () const
 Indicates whether the matrix item pictures are displayed.
virtual void itemBBox (IlUShort col, IlUShort row, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the item located in the specified cell.
virtual IlvAbstractMatrixItempointToItem (const IlvPoint &point, IlUShort &col, IlUShort &row, const IlvTransformer *t=0) const
 Returns the item located at a specified point.
void reDrawItem (IlUShort col, IlUShort row) const
 Redraws an item of the matrix.
virtual void reinitialize (IlUShort cols, IlUShort rows)
 Resets the matrix dimensions.
virtual IlBoolean remove (IlUShort col, IlUShort row, IlBoolean destroy=IlTrue)
 Removes an item from the matrix.
virtual void removeColumn (IlUShort col, IlBoolean destroy=IlTrue)
 Removes a column from the matrix.
virtual void removeRow (IlUShort row, IlBoolean destroy=IlTrue)
 Removes a row from the matrix.
virtual void resizeColumn (IlUShort col, IlvDim size)
 Resizes a given column.
virtual void resizeRow (IlUShort row, IlvDim size)
 Resizes a given row.
IlUShort rows () const
 Returns the number of rows in the matrix.
IlBoolean rowSameHeight () const
 Returns IlTrue if all the rows in the matrix have the same height.
void sameHeight (IlBoolean value)
 Specifies whether all the rows in the matrix should have the same height.
void sameWidth (IlBoolean value)
 Specifies whether all the columns in the matrix should have the same width.
virtual void scrollBarVisibilityChanged (IlvDirection)
 Is called when an internal scroll bar is shown or hidden.
virtual void set (IlUShort col, IlUShort row, IlvAbstractMatrixItem *item)
 Adds an item to the matrix at the specified location.
void setAutoColumnSelect (IlBoolean value)
 Specifies whether the automatic column selection mode should be on.
void setAutoLineSelect (IlBoolean value)
 Specifies whether the automatic row selection mode should be on.
void setBrowseMode (IlBoolean value)
 Specifies whether the matrix should be in browse selection mode.
virtual void setColumnSelected (IlUShort col, IlBoolean selected=IlTrue)
 Selects or deselects an entire column.
void setDirectEditionMode (IlBoolean value)
 Specifies whether the matrix should be in direct editing mode.
void setEditDirection (IlvDirection direction)
 Sets the editing direction of the matrix.
void setEditedItem (IlUShort col, IlUShort row)
 Sets the item that is being edited.
void setExclusive (IlBoolean value)
 Specifies whether the selection mode should be exclusive.
void setExtendedSelectionOrientation (IlvOrientation dir)
 Sets the direction in which the selection in the matrix is extended.
void setFocus (IlUShort col, IlUShort row)
 Specifies the gadget matrix item that has the focus.
void setItemAlignment (IlUShort col, IlUShort row, IlvPosition alignment)
 Sets the alignment of a matrix item.
void setItemCallback (IlUShort col, IlUShort row, IlvMatrixItemCallback callback=0, IlAny data=0)
 Sets a callback to the specified matrix item.
void setItemData (IlUShort col, IlUShort row, IlAny data)
 Sets the client data of the specified matrix item.
void setItemFillingBackground (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified item should be filled with a background color.
void setItemGrayed (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified item should be grayed.
void setItemReadOnly (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified matrix item should be read-only.
void setItemRelief (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified matrix item should be in relief.
virtual void setItemSelected (IlUShort col, IlUShort row, IlBoolean selected=IlTrue)
 Specifies whether the item located in the specified cell should be selected.
void setItemSensitive (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Sets the specified item to sensitive.
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse, IlBoolean redraw=IlTrue)
 Sets the orientation of the matrix items labels.
void setLabelPosition (IlvPosition position, IlBoolean redraw=IlTrue)
 Sets the default position of the matrix item labels.
virtual void setRowSelected (IlUShort row, IlBoolean selected=IlTrue)
 Selects or deselects an entire row.
void setSelectionAnchor (IlUShort col, IlUShort row)
 Sets the selection anchor to the specified cell.
void setSpacing (IlUShort spacing)
 Sets the spacing between two cells of the matrix.
virtual void setXgrid (IlvDim x)
 Sets the default column width.
virtual void setYgrid (IlvDim y)
 Sets the default row height.
void showEditorField ()
 Displays the matrix item editing field.
void showLabel (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Shows or hides the matrix item labels.
void showPicture (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Shows or hides the matrix items picture.
void showTextField ()
 Displays the editing text field.
void useToolTips (IlBoolean value=IlTrue)
 Specifies whether the matrix should use internal tooltips.
virtual void validate ()
 Is called when the user validates its changes after editing a matrix item.

Static Public Member Functions

static IlSymbolActivateMatrixItemCallbackType ()
 Returns the callback type of the Activate Item callback.

Protected Member Functions

void endEdit (IlvGadgetItem *item)
 Is called after an item has been edited.
virtual void itemActivated (IlvGadgetItem *item)
 Is called when an item is activated.

Friends

class IlvDefaultMatrixLFHandler

Detailed Description

Gadget class.

Library: ilvadvgdt

The IlvMatrix class defines a rectangular grid, made up of rows and columns, which can contain many different types of objects, such as labels, graphic objects, and other gadgets.

IlvMatrixa.gif

A Matrix with different kinds of items

A matrix stores objects, called matrix items, that are defined by the following classes:

Warning:
[note] In the following member functions, column and row indexes always start at 0 unless indicated, otherwise indexes start at 1.
See also:
IlvAbstractMatrixItem, IlvSheet, IlvTable.

Constructor & Destructor Documentation

IlvMatrix::IlvMatrix ( IlvDisplay display,
const IlvRect rect,
IlUShort  nbcol,
IlUShort  nbrow,
IlvDim  xgrid = 60,
IlvDim  ygrid = 30,
IlvDim  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the class IlvMatrix. The parameters nbcol and nbrow specify the initial number of columns and rows. The parameters xgrid and ygrid indicate their initial dimensions. A matrix contains at least one row and one column.

Parameters:
display The connection to the display.
rect The size and position of the matrix.
nbcol The number of columns in the matrix.
nbrow The number of rows in the matrix.
xgrid The default column width.
ygrid The default row height.
thickness The thickness of the matrix.
palette The palette used to draw the matrix.

Member Function Documentation

virtual void IlvMatrix::activateMatrixItem ( IlUShort  col,
IlUShort  row 
) [virtual]

Is called by the interactor when an item is activated.

An item is activated when the user double-clicks it or presses the Enter key. The default behavior calls the Activate Item callback.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
See also:
ActivateMatrixItemCallbackType
static IlSymbol* IlvMatrix::ActivateMatrixItemCallbackType (  )  [static]

Returns the callback type of the Activate Item callback.

The Activate Item callback is invoked each time the user double-clicks on an item or presses the Enter key.

Returns:
The callback type of the Activate Item callback.
See also:
IlvGraphic::setCallback, activateMatrixItem
virtual void IlvMatrix::add ( IlvAbstractMatrixItem item  )  [virtual]

Adds an item to the first empty cell in the matrix.

Adds item to the first empty cell in the matrix. The first empty cell is the first cell that contains no item, starting from the top-left cell.

Parameters:
item The matrix item.
See also:
set, remove, getCardinal, getItem
IlBoolean IlvMatrix::adjustLast ( IlBoolean  value  ) 

Specifies whether only the last column and the last row should be resized.

When the automatic fitting to size mode is on and the matrix is resized, only the last column and the last row are resized if value is set to IlTrue.

Parameters:
value IlTrue if only the last column and row should be resized, and IlFalse otherwise.
See also:
autoFitToSize, isAdjustingLast, fitToSize
void IlvMatrix::allowDragDrop ( IlBoolean  value  ) 

Specifies whether the matrix should allow drag-and-drop operations.

Parameters:
value A Boolean value specifying whether the matrix should allow drag-and-drop operations for matrix items of the type IlvGadgetItemMatrixItem (IlTrue) or not (IlFalse).
See also:
allowDragDrop, IlvGadgetItemHolder::startDragItem, IlvGadgetItemMatrixItem
IlBoolean IlvMatrix::allowDragDrop (  )  const [virtual]

Indicates whether the matrix allows drag-and-drop operations.

Returns:
IlTrue if the matrix allows drag-and-drop operations for matrix items of the type IlvGadgetItemMatrixItem, and IlFalse if it does not.
See also:
allowDragDrop(IlBoolean), IlvGadgetItemHolder::startDragItem

Reimplemented from IlvGadgetItemHolder.

IlBoolean IlvMatrix::allowEdit ( IlBoolean  value  ) 

Specifies whether editing should be allowed.

Parameters:
value A Boolean value specifying whether editing should be allowed (IlTrue) or not (IlFalse).
See also:
isEditAllowed
void IlvMatrix::allowEditOnDoubleClick ( IlBoolean  value  ) 

Indicates whether the matrix should allow item editing when a double-click event occurs.

If value is set to IlFalse, an IlvDoubleClick event cancels any previous item editing request triggered by an IlvButtonDown event. This makes it possible to trigger item editing when an IlvButtonDown event takes place, and to invoke the Activate Item callback after an IlvDoubleClick event. If value is set to IlTrue, both IlvButtonDown and IlvDoubleClick events trigger item editing.

Parameters:
value A Boolean value specifying whether the matrix should allow item editing when a double-click event occurs (IlTrue) or not (IlFalse).
See also:
allowEditOnDoubleClick, activateMatrixItem
IlBoolean IlvMatrix::allowEditOnDoubleClick (  )  const

Indicates whether the matrix allows item editing when a double-click event occurs.

Returns:
IlTrue if the matrix allows item editing when a double-click event occurs and IlFalse if it does not.
See also:
allowEditOnDoubleClick(IlBoolean)
virtual IlvGadgetItem* IlvMatrix::applyToItems ( IlvApplyGadgetItem  func,
IlAny  arg 
) [virtual]

Applies the specified function to all the items of the holder.

Parameters:
func The function to be applied.
arg The argument that will be passed to the function func.
Returns:
The item that stopped the operation. See IlvApplyGadgetItem for details.
See also:
IlvApplyGadgetItem, recomputeAllItems, getItemByName.

Reimplemented from IlvGadgetItemHolder.

IlBoolean IlvMatrix::autoFitToSize ( IlBoolean  value  ) 

Specifies whether the automatic fitting to size mode should be on.

When value is set to IlTrue, the matrix cells are resized automatically when the matrix is resized. Note that this does not work if the matrix has scroll bars.

Parameters:
value A Boolean value specifying whether the automatic fitting to size mode should be set (IlTrue) or not (IlFalse).
Returns:
The parameter value.
virtual void IlvMatrix::changeSelectionTo ( IlUShort  col,
IlUShort  row 
) [virtual]

Clears the current selection and selects specified cell.

Clears the current selection, and selects the cell specified by col and row. It also sets the selection anchor to the specified cell.

This method is called by the matrix interactor when starting a multiple cell selection operation.

Parameters:
col The column index of the cell to select.
row The row index of the cell to select.
See also:
setSelectionAnchor, extendSelection

Reimplemented in IlvFileChooserSheet.

IlUShort IlvMatrix::columns (  )  const [virtual]

Returns the number of columns in the matrix.

Must be redefined in subclasses to return the number of columns in the matrix.

Returns:
The number of columns of the matrix.
See also:
rows

Implements IlvAbstractMatrix.

IlBoolean IlvMatrix::columnSameWidth (  )  const [virtual]

Returns IlTrue if all the columns in the matrix have the same width.

Must be defined in subclasses to return IlTrue if the columns of the matrix have the same width, and IlFalse if not. Drawings are optimized if IlTrue is returned.

Returns:
IlTrue if all the columns in the matrix have the same width or IlFalse otherwise.
See also:
rowSameHeight

Implements IlvAbstractMatrix.

virtual IlvTextField* IlvMatrix::createEditionField ( IlUShort  col,
IlUShort  row 
) [virtual]

Returns a new text field for editing an item.

Allows you to create your own type of text field for editing the matrix items. This method is called whenever you edit a new field.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
See also:
editItem
virtual IlvMatrixItemEditor* IlvMatrix::createEditor ( IlUShort  col,
IlUShort  row 
) [virtual]

Returns a new editor for editing an item.

Allows you to create your own type of IlvMatrixItemEditor for editing the matrix items. This method is called whenever you edit a new field. The default implementation uses an IlvMatrixItemEditorFactory if any, or uses a default editor that creates an IlvTextField to edit items.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
See also:
editItem
virtual void IlvMatrix::deSelect (  )  [virtual]

Deselects all the items in the matrix.

The matrix is not redrawn.

See also:
setItemSelected

Reimplemented in IlvFileChooserSheet.

virtual void IlvMatrix::doIt (  )  [virtual]

Is called by the interactor when the selection changes in the matrix.

The default implementation invokes the main callback of the matrix.

See also:
setItemSelected
virtual void IlvMatrix::drawBackground ( IlvPort dst,
const IlvTransformer t,
const IlvRegion clip 
) const [virtual]

Draws the gadget background.

Is called from the draw method. This method is not called if the gadget is transparent.

Parameters:
dst The destination drawing port.
t The transformer applied to the gadget.
clip The clipping area.
See also:
drawFrame, drawScrollBar, drawGadgetContents, IlvGadget::isTransparent

Reimplemented from IlvScrolledGadget.

virtual void IlvMatrix::drawFrame ( IlvPort dst,
const IlvTransformer t,
const IlvRegion clip 
) const [virtual]

Draws the gadget frame.

Is called from the draw method. This method is not called if the method IlvScrolledGadget::isShowingFrame returns IlFalse.

Parameters:
dst The destination drawing port.
t The transformer applied to the gadget.
clip The clipping area.
See also:
drawBackground, drawScrollBar, drawGadgetContents

Reimplemented from IlvScrolledGadget.

Reimplemented in IlvSheet.

virtual void IlvMatrix::drawGadgetContents ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const [virtual]

Draws the gadget contents.

Is called from the draw method. The default implementation does nothing.

Parameters:
dst The destination drawing port.
t The transformer applied to the gadget.
clip The clipping area.
See also:
drawBackground, drawScrollBar, drawFrame

Reimplemented from IlvAbstractMatrix.

Reimplemented in IlvSheet.

virtual void IlvMatrix::drawItem ( IlvPort dst,
IlUShort  colno,
IlUShort  rowno,
const IlvRect itembbox,
const IlvRect clip 
) const [virtual]

Is called by the matrix to draw an item.

This method does nothing and should be redefined in subclasses to draw items.

Parameters:
dst The destination drawing port.
colno The column of the item to be drawn. If the item extends over several columns, colno specifies the left location of the item.
rowno The row of the item to be drawn. If the item extends over several rows, rowno specifies the top location of the item.
itembbox The rectangle inside which the item should be drawn. If the item extends over several cells, itembbox is the bounding box of the cells contained by the item.
clip The clipping area.

Reimplemented from IlvAbstractMatrix.

Reimplemented in IlvSheet.

virtual void IlvMatrix::drawRelief ( IlUShort  col,
IlUShort  row,
IlvPort dst,
const IlvRect bbox,
const IlvRect clip 
) const [virtual]

Is called to draw an item in relief.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
dst The destination drawing port.
bbox The bounding box of the item.
clip The clipping area.
See also:
setItemRelief
virtual void IlvMatrix::drawSelection ( IlUShort  col,
IlUShort  row,
IlvPort dst,
const IlvRect bbox,
const IlvRect clip 
) const [virtual]

Is called to draw a selected item.

The default implementation draws a filled rectangle behind the item. This method is called only if the item does not handle selection drawing.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
dst The destination drawing port.
bbox The bounding box of the item.
clip The clipping area.
See also:
setItemSelected, IlvAbstractMatrixItem::handleSelectionDrawing
virtual void IlvMatrix::editItem ( IlUShort  col,
IlUShort  row 
) [virtual]

Activates the editing mode for the matrix.

Is called when the user attempts to edit the item located in the cell specifies by col and row.

Parameters:
col The index of the column containing the item to be edited.
row The index of the row containing the item to be edited.
See also:
setEditedItem, validate
void IlvMatrix::endEdit ( IlvGadgetItem item  )  [protected, virtual]

Is called after an item has been edited.

The default implementation calls the End Edit callback.

Parameters:
item The edited gadget item.
See also:
startEdit, abortEdit, EndEditItemCallbackType

Reimplemented from IlvGadgetItemHolder.

virtual void IlvMatrix::extendSelection ( IlUShort  col,
IlUShort  row 
) [virtual]

Extends the selection from the anchor to the specified cell.

Extends the current matrix selection from the selection anchor to the cell specified by col and row. The way the selection is extended depends on the matrix selection policy.

Parameters:
col The column index of the cell to select.
row The row index of the cell to select.
See also:
setSelectionAnchor, changeSelectionTo
virtual void IlvMatrix::fitHeightToSize ( IlUShort  row = 0  )  [virtual]

Computes a new size for the rows so that they fit the height of the matrix.

Rows located before the row specified by row are not modified.

Parameters:
row The starting row.
See also:
fitToSize, fitWidthToSize

Reimplemented in IlvHierarchicalSheet.

void IlvMatrix::fitToSize (  ) 

Computes a new size for the columns and rows so that they fit the size of the matrix.

See also:
autoFitToSize, fitWidthToSize, fitHeightToSize
virtual void IlvMatrix::fitWidthToSize ( IlUShort  col = 0  )  [virtual]

Computes a new size for the columns so that they fit the width of the matrix.

Columns located before the column specified by col are not modified.

Parameters:
col The starting column.
See also:
fitToSize, fitHeightToSize
IlvDim IlvMatrix::getCardinal (  )  const

Returns the number of cells in the matrix.

Returns:
The number of cells in the matrix.
See also:
insertRow, insertColumn, removeRow, removeColumn, set
IlvDim IlvMatrix::getColumnFittingSize ( IlUShort  col  )  const

Returns the width of the largest item in the specified column.

Parameters:
col The column index.
Returns:
The width of the largest item in the column specified by col.
See also:
getRowFittingSize
IlvDim IlvMatrix::getColumnPosition ( IlUShort  col  )  const [virtual]

Returns the position of a column.

Returns:
The distance between the left side of the column specified by col and the left side of the first column. When col is equal to 0, it returns 0.
Parameters:
col The column index.
See also:
getRowPosition, getColumnWidth

Reimplemented from IlvAbstractMatrix.

IlvDim IlvMatrix::getColumnsDistance ( IlUShort  fromcol,
IlUShort  tocol 
) const [virtual]

Returns the distance between two columns.

Computes the distance between the columns fromcol and tocol. It is implemented as the sum of getColumnWidth(i) from fromcol to tocol -1. You can override this member function in a subclass to accelerate computing. Note that it is already optimized if the columns have the same width.

Parameters:
fromcol The starting column.
tocol The ending column.
Returns:
The distance in pixels between the columns fromcol and tocol.
See also:
getRowsDistance, getRowHeight

Reimplemented from IlvAbstractMatrix.

IlvDim IlvMatrix::getColumnWidth ( IlUShort  colno  )  const [virtual]

Returns the width of the specified column.

Must be redefined by subclasses to return the width of the column of index colno. The column numbering starts at 0. This member function must be redefined even if all the columns have the same width, in which case the IlvAbstractMatrix uses getColumnWidth(0). The code of this member function must be as efficient as possible to optimize the drawing.

Parameters:
colno The column index.
Returns:
The width of the column of index colno.
See also:
getRowHeight, columnSameWidth

Implements IlvAbstractMatrix.

IlvDirection IlvMatrix::getEditDirection (  )  const

Returns the editing direction of the matrix.

The editing direction is the direction in which the selection moves in the matrix when the user validates an item.

Returns:
The editing direction. The default value is IlvBadPosition. In this case, the selection does not move when an item is validated.
See also:
setEditDirection, validate
IlvTextField* IlvMatrix::getEditedItem ( IlUShort col,
IlUShort row 
) const

Returns the location of the item being edited.

Uses col and row to return the location of the matrix item that is currently being edited.

Returns:
The text field used to edit the item. Note that when the edited item is a gadget item, or when the editor is not a text field the member function returns 0.
See also:
setEditedItem, editItem, isEditAllowed
IlvGraphic* IlvMatrix::getEditorField (  )  const

Returns a pointer to the editing field.

Returns:
A pointer to the editing field object used for editing. Note that in the case of a gadget item editing, or if the matrix is not editing any item, 0 is returned.
See also:
showEditorField, hideEditorField, editItem
IlvOrientation IlvMatrix::getExtendedSelectionOrientation (  )  const

Returns the direction to which the selection will be extended.

Returns:
The direction in which the selection will be extended. The default direction is IlvHorizontal, meaning that when the selection is extended it is extended along a row. Other possible directions are IlvVertical (column extension) and IlvBadPosition (square extension).
See also:
setExtendedSelectionOrientation
IlBoolean IlvMatrix::getFirstSelected ( IlUShort col,
IlUShort row 
) const

Returns the first selected item in the matrix.

Uses col and row to return the location of the first selected item in the matrix, starting from the top-left cell.

Returns:
IlFalse if there is no selected item in the matrix and IlTrue otherwise.
See also:
setItemSelected
IlvGadgetMatrixItem* IlvMatrix::getFocusItem (  )  const

Returns the gadget matrix item that has the focus.

Returns:
The matrix item that has the focus or 0 if no item has the focus.
See also:
setFocus(IlUShort, IlUShort)
IlvPalette* IlvMatrix::getGridPalette (  )  const [virtual]

Returns the palette used to draw the matrix grid.

You must override this member function to modify the way the grid is drawn.

Returns:
The palette used to draw the matrix grid.
See also:
showGrid

Reimplemented from IlvAbstractMatrix.

virtual IlvPalette* IlvMatrix::getInsensitivePalette (  )  const [virtual]

Returns the palette used to draw an item that is not sensitive.

Returns:
The palette used to draw an item that is not sensitive.

Implements IlvGadgetItemHolder.

IlvAbstractMatrixItem* IlvMatrix::getItem ( IlvDim  pos  )  const

Returns the matrix item located at the specified position.

Parameters:
pos The position of the item in the matrix. Matrix items are numbered from left to right, and from top to bottom.
Returns:
The matrix item located at the specified position.
See also:
getItem(IlUShort, IlUShort), set, add, removeItem
IlvAbstractMatrixItem* IlvMatrix::getItem ( IlUShort  col,
IlUShort  row 
) const

Returns the item located in the specified cell.

Parameters:
col The column index.
row The row index.
Returns:
The item located in the cell specified by col and row or 0 if there is no item.
See also:
set, add, removeItem
IlvPosition IlvMatrix::getItemAlignment ( IlUShort  col,
IlUShort  row 
) const

Returns the alignment of an item of the matrix.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
Returns:
The alignment of the item located in the cell specified by col and row.
See also:
setItemAlignment
IlAny IlvMatrix::getItemData ( IlUShort  col,
IlUShort  row 
) const

Returns the client data of the specified matrix item.

Returns:
The client data of the matrix item located in the cell specified by col and row.
Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
See also:
setItemData
virtual void IlvMatrix::getLabelOrientation ( IlvOrientation orientation,
IlBoolean flip 
) const [virtual]

Returns the default orientation of the matrix items labels.

Parameters:
orientation The orientation of the labels.
flip A Boolean value specifying whether the labels are drawn from top to bottom (IlTrue), or from bottom to top (IlFalse).
See also:
setLabelOrientation

Reimplemented from IlvGadgetItemHolder.

virtual IlvPosition IlvMatrix::getLabelPosition (  )  const [virtual]

Returns the default position of the matrix item labels.

Returns:
The default position of the labels of the matrix items of the type IlvGadgetItemMatrixItem, relative to their picture.
See also:
IlvGadgetItemMatrixItem, setLabelPosition

Reimplemented from IlvGadgetItemHolder.

void IlvMatrix::getLastSelectedItem ( IlUShort col,
IlUShort row 
) const

Returns the location of the last selected item in the matrix.

The last selected item is set by the calling the method IlvMatrix::setItemSelected with the parameter selected set to IlTrue.

Parameters:
col The returned column of the last selected item.
row The returned row of the last selected item.
See also:
setItemSelected
virtual IlvPalette* IlvMatrix::getNormalTextPalette (  )  const [virtual]

Returns the default palette used to draw an item.

Returns:
The default palette used to draw an item.

Implements IlvGadgetItemHolder.

virtual IlvPalette* IlvMatrix::getOpaquePalette (  )  const [virtual]

Returns the opaque palette used to draw opaque items.

Returns:
The opaque palette used to draw opaque items.

Reimplemented from IlvGadgetItemHolder.

IlvDim IlvMatrix::getRowFittingSize ( IlUShort  row  )  const

Returns the height of the largest item in the specified row.

Parameters:
row The row index.
Returns:
The height of the largest item in the row specified by row.
See also:
getColumnFittingSize
IlvDim IlvMatrix::getRowHeight ( IlUShort  rowno  )  const [virtual]

Returns the height of the specified row.

Must be redefined in subclasses to return the height of the row of index rowno. The row numbering starts at 0. This member function must be redefined even if all the rows have the same height, in which case the IlvAbstractMatrix uses getRowHeight(0). The code of this member function must be as efficient as possible to optimize the drawing.

Parameters:
rowno The row index.
Returns:
The height of the row of index rowno.
See also:
getColumnWidth, rowSameHeight

Implements IlvAbstractMatrix.

IlvDim IlvMatrix::getRowPosition ( IlUShort  row  )  const [virtual]

Returns the position of a row.

Returns:
The distance between the upper side of the row specified by row and the upper side of the first row. When row is equal to 0, it returns 0.
Parameters:
row The row index.
See also:
getColumnPosition, getRowHeight

Reimplemented from IlvAbstractMatrix.

IlvDim IlvMatrix::getRowsDistance ( IlUShort  fromrow,
IlUShort  torow 
) const [virtual]

Returns the distance between two rows.

Computes the distance between the rows fromrow and torow. It is implemented as the sum of getRowHeight(i) from fromrow to torow -1. You can override this member function in a subclass to accelerate computing. Note that it is already optimized if the rows have the same height.

Parameters:
fromrow The starting row.
torow The ending row.
Returns:
The distance in pixels between the rows fromrow and torow.
See also:
getColumnsDistance, getColumnWidth

Reimplemented from IlvAbstractMatrix.

virtual IlvPalette* IlvMatrix::getSelectionPalette (  )  const [virtual]

Returns the selection palette used to draw selected items.

Returns:
The selection palette used to draw selected items.

Implements IlvGadgetItemHolder.

virtual IlvPalette* IlvMatrix::getSelectionTextPalette (  )  const [virtual]

Returns the selection palette used to draw the label of selected items.

Returns:
The selection palette used to draw the label of selected items.

Implements IlvGadgetItemHolder.

IlUShort IlvMatrix::getSpacing (  )  const

Returns the spacing between two cells of the matrix.

Returns:
The spacing between two cells of the matrix.
See also:
setSpacing
IlvTextField* IlvMatrix::getTextField (  )  const

Returns a pointer to the editing text field.

This method is obsolete. Use getEditorField.

See also:
getEditorField.
IlvDim IlvMatrix::getXgrid (  )  const

Returns the default column width.

Returns:
The default column width.
See also:
setXgrid, getYgrid
IlvDim IlvMatrix::getYgrid (  )  const

Returns the default row height.

Returns:
The default row height.
See also:
setYgrid, getXgrid
virtual IlBoolean IlvMatrix::handleMatrixEvent ( IlvEvent event  )  [virtual]

Handles the events sent to the matrix.

Is called by the member function handleEvent to handle an event applying to the matrix. Scroll bar events are handled by the method IlvScrolledGadget::handleScrollBarsEvent. The default implementation does nothing and must be redefined if necessary.

Parameters:
event The event.
Returns:
IlTrue if the matrix used the events, or IlFalse otherwise.
See also:
IlvGadget::handleEvent, IlvScrolledGadget::handleScrollBarsEvent

Reimplemented from IlvAbstractMatrix.

Reimplemented in IlvFileChooserSheet, IlvHierarchicalSheet, and IlvSheet.

IlBoolean IlvMatrix::hasToolTips (  )  const [virtual]

Indicates whether the matrix handles internal tooltips.

Returns:
IlTrue if the matrix handles internal tooltips, and IlFalse if it does not.
See also:
useToolTips, IlvToolTip

Reimplemented from IlvGadgetItemHolder.

void IlvMatrix::hideEditorField (  ) 

Hides and destroys the matrix item editing field.

See also:
showEditorField
void IlvMatrix::hideTextField (  ) 

Hides and destroys the editing text field.

This method is obsolete. Use hideEditor.

See also:
hideEditor.
virtual void IlvMatrix::insertColumn ( IlUShort  col = 0,
IlUShort  count = 1 
) [virtual]

Inserts columns in the matrix.

Parameters:
col The column before which the new columns will be added. If col is greater than the number of columns in the matrix, the new columns are added at the end of the matrix.
count The number of columns to be inserted.
See also:
removeColumn, insertRow, reinitialize

Reimplemented in IlvFileChooserSheet.

virtual void IlvMatrix::insertRow ( IlUShort  row = 0,
IlUShort  count = 1 
) [virtual]

Inserts rows in the matrix.

Parameters:
row The row before which the new rows will be added. If row is greater that the number of rows in the matrix, the new rows are added at the end of the matrix.
count The number of rows to be inserted.
See also:
removeRow, insertColumn, reinitialize

Reimplemented in IlvFileChooserSheet.

virtual void IlvMatrix::internalBBox ( IlvRect bbox,
const IlvTransformer t 
) const [virtual]

Returns the internal bounding box of the gadget.

Puts in bbox the internal bounding box of the scrolled gadget computed with the transformer t. The internal bounding box is used to draw the frame and to compute the scrollable area. If you want to change the internal bounding box, you can override this member function in a subclass.

Parameters:
bbox The returned internal bounding box.
t The transformer applied to the gadget.
See also:
visibleBBox, scrollBarBBox

Reimplemented from IlvScrolledGadget.

IlBoolean IlvMatrix::isAdjustingLast (  )  const

Indicates whether only the last column and row are resized.

Returns:
IlTrue if only the last column and row are resized when the matrix is resized and IlFalse (the default) otherwise.
See also:
autoFitToSize, adjustLast, fitToSize
IlBoolean IlvMatrix::isAutoColumnSelect (  )  const

Indicates whether the automatic column selection mode is on.

Returns:
IlTrue if the automatic column selection mode is on and IlFalse otherwise.
See also:
setAutoColumnSelect, isAutoLineSelect
IlBoolean IlvMatrix::isAutoFittingToSize (  )  const

Indicates whether the automatic fitting to size mode is on.

Returns:
IlTrue if the automatic fitting to size mode is on, and IlFalse (the default) otherwise.
See also:
autoFitToSize, fitToSize
IlBoolean IlvMatrix::isAutoLineSelect (  )  const

Indicates whether the automatic row selection mode is on.

Returns:
IlTrue if the automatic row selection mode is on and IlFalse otherwise.
See also:
setAutoLineSelect, isAutoColumnSelect
IlBoolean IlvMatrix::isBrowseMode (  )  const

Indicates whether the matrix is in browse selection mode.

Returns:
IlTrue if the matrix is in browse selection mode.
See also:
setBrowseMode, isExclusive
IlBoolean IlvMatrix::isDirectEditionMode (  )  const

Indicates whether the matrix is in direct editing mode.

Returns:
IlTrue if the matrix is in direct editing mode and IlFalse otherwise.
IlBoolean IlvMatrix::isEditAllowed (  )  const

Indicates whether editing is allowed.

Returns:
IlTrue if editing is allowed, and IlFalse otherwise.
See also:
allowEdit, editItem
IlBoolean IlvMatrix::isExclusive (  )  const

Indicates whether the selection mode is set to exclusive.

When the selection mode is set to exclusive, the user cannot select more than one item at a time.

Returns:
IlTrue if only one item can be selected at a time, and IlFalse otherwise.
See also:
setExclusive, isBrowseMode
IlBoolean IlvMatrix::isItemFillingBackground ( IlUShort  col,
IlUShort  row 
) const

Returns IlTrue if the specified item is filled.

Applies only to filled matrix items.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
Returns:
IlTrue if the matrix item specified by col and row uses its palette for the text foreground (text color and font), and for the item background.
See also:
IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvFilledLabelMatrixItem, setItemFillingBackground
IlBoolean IlvMatrix::isItemGrayed ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the specified item is grayed.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
Returns:
IlTrue if the item located in the cell specified by col and row is grayed.
See also:
setItemGrayed, isItemSensitive
IlBoolean IlvMatrix::isItemReadOnly ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the specified matrix item is read-only.

Read-only items can be selected, but cannot be edited.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
Returns:
IlTrue if the matrix item located in the cell specified by col and row is read-only, and IlFalse otherwise.
See also:
setItemReadOnly
IlBoolean IlvMatrix::isItemRelief ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the specified matrix item appears in relief.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
Returns:
IlTrue if the matrix item located in the cell specified by col and row appears in relief and IlFalse otherwise.
See also:
setItemRelief, drawRelief
IlBoolean IlvMatrix::isItemSelected ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the item located in the specified cell is selected.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
Returns:
A Boolean value indicating whether the item located in the cell specified by col and row is selected (IlTrue) or not (IlFalse).
See also:
setItemSelected
IlBoolean IlvMatrix::isItemSensitive ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the specified item is sensitive.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
Returns:
IlTrue if the item located in the cell specified by col and row is sensitive and IlFalse otherwise.
See also:
setItemSensitive, isItemGrayed
virtual IlBoolean IlvMatrix::isShowingLabel (  )  const [virtual]

Indicates whether the matrix item labels are displayed.

Returns:
IlTrue if the labels of the matrix items of the type IlvGadgetItemMatrixItem are displayed and IlFalse otherwise.
See also:
IlvGadgetItemMatrixItem, showLabel

Reimplemented from IlvGadgetItemHolder.

virtual IlBoolean IlvMatrix::isShowingPicture (  )  const [virtual]

Indicates whether the matrix item pictures are displayed.

Returns:
IlTrue if the pictures of the matrix items of the type IlvGadgetItemMatrixItem are displayed and IlFalse otherwise.
See also:
IlvGadgetItemMatrixItem, showPicture

Reimplemented from IlvGadgetItemHolder.

virtual void IlvMatrix::itemActivated ( IlvGadgetItem item  )  [protected, virtual]

Is called when an item is activated.

The default implementation calls the Activate callback.

Parameters:
item The activated gadget item.
See also:
IlvGadgetItem::activate

Reimplemented from IlvGadgetItemHolder.

virtual void IlvMatrix::itemBBox ( IlUShort  col,
IlUShort  row,
IlvRect bbox,
const IlvTransformer t = 0 
) const [virtual]

Returns the bounding box of the item located in the specified cell.

Uses bbox to return the bounding box of the item located in the matrix cell specified by col and row, when the matrix is displayed with the transformer t.

Parameters:
col The index of of the column containing the item.
row The index of the row containing the item.
bbox The returned bounding box.
t The transformer applied to the matrix.

Reimplemented in IlvSheet.

virtual IlvAbstractMatrixItem* IlvMatrix::pointToItem ( const IlvPoint point,
IlUShort col,
IlUShort row,
const IlvTransformer t = 0 
) const [virtual]

Returns the item located at a specified point.

Uses col and row to return the position of the item specified by point, when the matrix is displayed with the transformer t. Then the item is returned or 0 if there is no such item.

Parameters:
point The position where the item is located.
col The index of the column that contains the item.
row The index of the row that contains the item.
t The transformer applied to the matrix.
See also:
IlvAbstractMatrix::pointToPosition
void IlvMatrix::reDrawItem ( IlUShort  col,
IlUShort  row 
) const

Redraws an item of the matrix.

Parameters:
col The index of the column that contains the item to be redrawn.
row The index of the row that contains the item to be redrawn.
See also:
IlvAbstractMatrix::drawItem, drawSelection
virtual void IlvMatrix::reinitialize ( IlUShort  cols,
IlUShort  rows 
) [virtual]

Resets the matrix dimensions.

The items that are in the removed columns and rows are destroyed.

Parameters:
cols The new number of columns.
rows The new number of rows.
See also:
removeColumn, removeRow

Reimplemented in IlvHierarchicalSheet.

virtual IlBoolean IlvMatrix::remove ( IlUShort  col,
IlUShort  row,
IlBoolean  destroy = IlTrue 
) [virtual]

Removes an item from the matrix.

Removes the item located in the matrix cell specified by col and row.

Parameters:
col The index of the column containing the item to be removed.
row The index of the row containing the item to be removed.
destroy A Boolean value specifying whether the removed item should be deleted.
Returns:
IlTrue if the operation was successful, and IlFalse if there is no item at the specified location.
See also:
add, set, getCardinal, getItem

Reimplemented in IlvFileChooserSheet.

virtual void IlvMatrix::removeColumn ( IlUShort  col,
IlBoolean  destroy = IlTrue 
) [virtual]

Removes a column from the matrix.

Parameters:
col The index of the column to be removed.
destroy A Boolean value specifying whether the items that this column contains are deleted.
See also:
insertColumn, removeRow

Reimplemented in IlvFileChooserSheet.

virtual void IlvMatrix::removeRow ( IlUShort  row,
IlBoolean  destroy = IlTrue 
) [virtual]

Removes a row from the matrix.

Parameters:
row The index of the row to be removed.
destroy A Boolean value specifying whether the items that this row contains are deleted.
See also:
insertRow, removeColumn

Reimplemented in IlvFileChooserSheet, and IlvHierarchicalSheet.

virtual void IlvMatrix::resizeColumn ( IlUShort  col,
IlvDim  size 
) [virtual]

Resizes a given column.

Sets the width of the column col -1 to size. When col is equal to 0, this member function does nothing.

Parameters:
col The column index.
size The new size of the column.
See also:
resizeRow, getColumnWidth
virtual void IlvMatrix::resizeRow ( IlUShort  row,
IlvDim  size 
) [virtual]

Resizes a given row.

Sets the height of the row row -1 to size. When row is equal to 0, this member function does nothing.

Parameters:
row The row index.
size The new size of the row.
See also:
resizeColumn, getRowHeight
IlUShort IlvMatrix::rows (  )  const [virtual]

Returns the number of rows in the matrix.

Must be redefined in subclasses to return the number of rows in the matrix.

Returns:
The number of rows of the matrix.
See also:
columns

Implements IlvAbstractMatrix.

IlBoolean IlvMatrix::rowSameHeight (  )  const [virtual]

Returns IlTrue if all the rows in the matrix have the same height.

Must be redefined in subclasses to return IlTrue if the rows in the matrix have the same height and IlFalse if not. Drawings are optimized if IlTrue is returned.

Returns:
IlTrue if all the rows in the matrix have the same height or IlFalse otherwise.
See also:
columnSameWidth

Implements IlvAbstractMatrix.

void IlvMatrix::sameHeight ( IlBoolean  value  ) 

Specifies whether all the rows in the matrix should have the same height.

To give all the rows the same height, you must call this method with value set to IlTrue before invoking IlvMatrix::setYgrid.

Parameters:
value A Boolean value specifying whether all the rows have the same height (IlTrue).
See also:
setYgrid, sameWidth
void IlvMatrix::sameWidth ( IlBoolean  value  ) 

Specifies whether all the columns in the matrix should have the same width.

To give all the columns the same width, you must call this method with value set to IlTrue before invoking IlvMatrix::setXgrid.

Parameters:
value A Boolean value specifying whether all the columns have the same width (IlTrue).
See also:
setXgrid, sameHeight
virtual void IlvMatrix::scrollBarVisibilityChanged ( IlvDirection  direction  )  [virtual]

Is called when an internal scroll bar is shown or hidden.

Is called by handleEvent each time the internal scroll bar specified by direction is shown or hidden. The default implementation invokes the Scroll Bar Visibility Changed callback.

Parameters:
direction The direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also:
ScrollBarVisibilitySymbol

Reimplemented from IlvScrolledGadget.

virtual void IlvMatrix::set ( IlUShort  col,
IlUShort  row,
IlvAbstractMatrixItem item 
) [virtual]

Adds an item to the matrix at the specified location.

Adds item to the matrix at the location specified by col and row. If there is already a matrix item at this location, this item is deleted before item is inserted.

Parameters:
col The index of the column where item is inserted.
row The index of the row where item is inserted.
item The matrix item to be inserted.
See also:
add, remove, getCardinal, getItem

Reimplemented in IlvFileChooserSheet.

void IlvMatrix::setAutoColumnSelect ( IlBoolean  value  ) 

Specifies whether the automatic column selection mode should be on.

If value is set to IlTrue, each time an item is selected in a column, the entire column is selected.

Parameters:
value A Boolean value specifying whether the automatic column selection mode should be on (IlTrue) or not (IlFalse).
See also:
isAutoColumnSelect, setAutoLineSelect
void IlvMatrix::setAutoLineSelect ( IlBoolean  value  ) 

Specifies whether the automatic row selection mode should be on.

If value is set to IlTrue, each time an item is selected in a row, the entire row is selected.

Parameters:
value A Boolean value specifying whether the automatic row selection mode should be on (IlTrue) or not (IlFalse).
See also:
isAutoLineSelect, setAutoColumnSelect
void IlvMatrix::setBrowseMode ( IlBoolean  value  ) 

Specifies whether the matrix should be in browse selection mode.

In this mode, the user can add an item to the selection (non exclusive) simply by clicking on the item or by dragging the mouse. When the matrix is not in browse selection mode, clicking on an item deselects all other items before selecting the clicked item. In this case the user must use the Control key to add an item to the selection.

Parameters:
value A Boolean value specifying whether the matrix should be in browse selection mode (IlTrue) or not (IlFalse).
See also:
isBrowseMode, setExclusive
virtual void IlvMatrix::setColumnSelected ( IlUShort  col,
IlBoolean  selected = IlTrue 
) [virtual]

Selects or deselects an entire column.

Sets the selection state of col to selected. The column is not redrawn.

Parameters:
col The column index.
selected A Boolean value specifying whether the column should be selected (IlTrue) or not (IlFalse).
See also:
setRowSelected, setItemSelected, IlvAbstractMatrix::invalidateColumn

Reimplemented in IlvFileChooserSheet.

void IlvMatrix::setDirectEditionMode ( IlBoolean  value  ) 

Specifies whether the matrix should be in direct editing mode.

If value is IlFalse, the use must click a matrix item to edit it or press the F2 key. If value is IlTrue, the user can edit the last selected item by simply entering new text: The matrix will automatically switch to editing mode.

Parameters:
value A Boolean value specifying whether the matrix should be in direct editing mode (IlTrue) or not (IlFalse).
See also:
isDirectEditionMode
void IlvMatrix::setEditDirection ( IlvDirection  direction  ) 

Sets the editing direction of the matrix.

For more information, see getEditDirection.

Parameters:
direction The new editing direction.
See also:
getEditDirection, validate
void IlvMatrix::setEditedItem ( IlUShort  col,
IlUShort  row 
)

Sets the item that is being edited.

The item located in the cell specified by col and row becomes the current editable item, if editing is allowed in the matrix. Note that calling this method does not edit the item. Use the IlvMatrix::editItem method instead.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
See also:
isEditAllowed, getEditedItem, editItem
void IlvMatrix::setExclusive ( IlBoolean  value  ) 

Specifies whether the selection mode should be exclusive.

When the selection mode is set to exclusive, the user cannot select more than one item at a time.

Parameters:
value A Boolean value specifying whether the selection mode is exclusive (IlTrue) or not (IlFalse).
See also:
isExclusive, setBrowseMode
void IlvMatrix::setExtendedSelectionOrientation ( IlvOrientation  dir  ) 

Sets the direction in which the selection in the matrix is extended.

This member function works only if the browse selection mode is not activated.

Parameters:
dir The new direction. Valid values are IlvHorizontal, IlvVertical, or IlvBadPosition.
See also:
getExtendedSelectionOrientation
void IlvMatrix::setFocus ( IlUShort  col,
IlUShort  row 
)

Specifies the gadget matrix item that has the focus.

If the item located in the cell specified by col and row is not of the class IlvGadgetMatrixItem, this method does nothing.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
See also:
getFocusItem
void IlvMatrix::setItemAlignment ( IlUShort  col,
IlUShort  row,
IlvPosition  alignment 
)

Sets the alignment of a matrix item.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
alignment The new item alignment. Valid values are: IlvLeft, IlvCenter, and IlvRight.
See also:
getItemAlignment
void IlvMatrix::setItemCallback ( IlUShort  col,
IlUShort  row,
IlvMatrixItemCallback  callback = 0,
IlAny  data = 0 
)

Sets a callback to the specified matrix item.

The callback is invoked by the interactor with the matrix as its first parameter, the item location and the specified user data. If there is no item in the cell specified by col and row, this member function does nothing. By default, a matrix invokes an item callback once the item has been edited.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
callback The item callback.
data The data of the item callback.
See also:
getItemCallback, IlvMatrixItemCallback
void IlvMatrix::setItemData ( IlUShort  col,
IlUShort  row,
IlAny  data 
)

Sets the client data of the specified matrix item.

This client data is the value that is sent to the item callback, if any. Therefore, it replaces the value set by IlvMatrix::setItemCallback.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
data The new item data.
See also:
getItemData, setItemCallback
void IlvMatrix::setItemFillingBackground ( IlUShort  col,
IlUShort  row,
IlBoolean  value = IlTrue 
)

Specifies whether the specified item should be filled with a background color.

Applies only to filled matrix items.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
value A Boolean value specifying whether the item should be filled with a background color (IlTrue) or not (IlFalse).
See also:
IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvFilledLabelMatrixItem, isItemFillingBackground
void IlvMatrix::setItemGrayed ( IlUShort  col,
IlUShort  row,
IlBoolean  value = IlTrue 
)

Specifies whether the specified item should be grayed.

If value is set to IlFalse, the item is set to its original color. Note that this member function has no effect if the item is sensitive. This method is automatically called with value set to IlTrue when IlvMatrix::setItemSensitive is called with IlFalse as its parameter, which results in an item that is grayed and nonsensitive. However, if you want the item to be nonsensitive but keep its original color, you must first call IlvMatrix::setItemSensitive with IlFalse as the parameter, and then setItemGrayed with value set to IlFalse.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
value A Boolean value specifying whether the specified item should be grayed (IlTrue) or not.
See also:
isItemGrayed, setItemSensitive
void IlvMatrix::setItemReadOnly ( IlUShort  col,
IlUShort  row,
IlBoolean  value = IlTrue 
)

Specifies whether the specified matrix item should be read-only.

Read-only items can be selected, but cannot be edited. This method has no effect on IlvGraphicMatrixItem objects.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
value A Boolean value specifying whether the item should be read-only (IlTrue) or not (IlFalse).
See also:
isItemReadOnly
void IlvMatrix::setItemRelief ( IlUShort  col,
IlUShort  row,
IlBoolean  value = IlTrue 
)

Specifies whether the specified matrix item should be in relief.

If value is set to IlTrue, the item is drawn with a relief rectangle around it, making it look like a button. When the the item is selected, the relief is inverted, as if the item was a pushed button.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
value A Boolean value specifying whether the item should be in relief (IlTrue) or not (IlFalse).
See also:
isItemRelief, drawRelief
virtual void IlvMatrix::setItemSelected ( IlUShort  col,
IlUShort  row,
IlBoolean  selected = IlTrue 
) [virtual]

Specifies whether the item located in the specified cell should be selected.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
selected A Boolean value specifying whether the item located in the cell specified by col and row should be selected (IlTrue) or not (IlFalse).
See also:
isItemSelected, setRowSelected, setColumnSelected

Reimplemented in IlvFileChooserSheet.

void IlvMatrix::setItemSensitive ( IlUShort  col,
IlUShort  row,
IlBoolean  value = IlTrue 
)

Sets the specified item to sensitive.

If value is set to IlFalse, the item label appears dimmed and the item cannot be selected. If you want the item to appear dimmed, use the IlvMatrix::setItemGrayed method.

Parameters:
col The index of the column containing the item.
row The index of the row containing the item.
value A Boolean value specifying whether the item located in the cell specified by col and row should be sensitive (IlTrue) or not (IlFalse).
See also:
isItemSensitive, setItemGrayed
void IlvMatrix::setLabelOrientation ( IlvOrientation  orientation,
IlBoolean  flip = IlFalse,
IlBoolean  redraw = IlTrue 
)

Sets the orientation of the matrix items labels.

This setting applies only to matrix items of the class IlvGadgetItemMatrixItem.

Parameters:
orientation The orientation of the labels. Valid values are: IlvHorizontal and IlvVertical.
flip A Boolean value specifying whether the labels are drawn from top to bottom, or bottom to top.
redraw A Boolean value specifying whether the gadget should be redrawn.
See also:
getLabelOrientation, IlvGadgetItemMatrixItem
void IlvMatrix::setLabelPosition ( IlvPosition  position,
IlBoolean  redraw = IlTrue 
)

Sets the default position of the matrix item labels.

This setting is used to compute the geometry of each matrix item of the class IlvGadgetItemMatrixItem. For more information, see the member function IlvGadgetItem::setLabelPosition.

Parameters:
position The position of the labels of matrix items of the class IlvGadgetItemMatrixItem, relative to their picture.
redraw A Boolean value specifying whether the gadget should be redrawn.
See also:
getLabelPosition, IlvGadgetItem::setLabelPosition
virtual void IlvMatrix::setRowSelected ( IlUShort  row,
IlBoolean  selected = IlTrue 
) [virtual]

Selects or deselects an entire row.

Sets the selection state of row to selected. The row is not redrawn.

Parameters:
row The row index.
selected A Boolean value specifying whether the row should be selected (IlTrue) or not (IlFalse).
See also:
setColumnSelected, setItemSelected, IlvAbstractMatrix::invalidateRow

Reimplemented in IlvFileChooserSheet.

void IlvMatrix::setSelectionAnchor ( IlUShort  col,
IlUShort  row 
)

Sets the selection anchor to the specified cell.

Sets the selection anchor to the cell specified by col and row. The selection anchor is used by the matrix interactor to locate the first selected cell during a multiple cell selection operation.

Parameters:
col The column index of the cell to select.
row The row index of the cell to select.
See also:
changeSelectionTo, extendSelection
void IlvMatrix::setSpacing ( IlUShort  spacing  ) 

Sets the spacing between two cells of the matrix.

Parameters:
spacing The spacing between two cells of the matrix.
See also:
getSpacing
virtual void IlvMatrix::setXgrid ( IlvDim  x  )  [virtual]

Sets the default column width.

Sets the column width to x, if all the columns have the same dimensions.

Parameters:
x The new default column width.
See also:
setYgrid, sameWidth
virtual void IlvMatrix::setYgrid ( IlvDim  y  )  [virtual]

Sets the default row height.

Sets the row height to y, if all the rows have the same dimensions.

Parameters:
y The new default row height.
See also:
setXgrid, sameHeight
void IlvMatrix::showEditorField (  ) 

Displays the matrix item editing field.

Displays a matrix item editor at the location of the current editable item set by a call to setEditedItem. IlvMatrix::showEditorField creates the editor by using the editor factory set by calling setEditorFactory.

See also:
setEditorFactory, IlvMatrixItemEditorFactory, IlvMatrixItemEditor.
void IlvMatrix::showLabel ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Shows or hides the matrix item labels.

Parameters:
value A Boolean value specifying whether the matrix should show the the labels of the matrix items of the type IlvGadgetItemMatrixItem (IlTrue) or not (IlFalse).
redraw A Boolean value specifying whether the gadget should be redrawn.
See also:
isShowingLabel, IlvGadgetItemMatrixItem, IlvGadgetItem::showLabel
void IlvMatrix::showPicture ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Shows or hides the matrix items picture.

Parameters:
value A Boolean value specifying whether the matrix should show the pictures of the matrix items of the type IlvGadgetItemMatrixItem (IlTrue) or not (IlFalse).
redraw A Boolean value specifying whether the gadget should be redrawn.
See also:
isShowingPicture, IlvGadgetItemMatrixItem, IlvGadgetItem::showPicture
void IlvMatrix::showTextField (  ) 

Displays the editing text field.

This method is obsolete. Use showEditor.

See also:
showEditor.
void IlvMatrix::useToolTips ( IlBoolean  value = IlTrue  ) 

Specifies whether the matrix should use internal tooltips.

Internal tooltips are tooltips set to matrix items of the type IlvGraphicMatrixItem. Internal tooltips are also displayed for matrix items of the class IlvGadgetItemMatrixItem when the items are not fully visible.

Parameters:
value A Boolean value specifying whether the matrix should display internal tooltips (IlTrue) or not (IlFalse).
See also:
hasToolTips, IlvToolTip
virtual void IlvMatrix::validate (  )  [virtual]

Is called when the user validates its changes after editing a matrix item.

An IlvLabelMatrixItem is automatically created and inserted in the matrix if there is no matrix item where the user clicks. The matrix item label is replaced with the content of the editing field.

See also:
editItem, getEditorField, getEditedItem

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