Accessors for class IlvMatrix

Properties

Methods

Description

The IlvMatrix class displays any number of graphic objects in a rectangular grid.
A matrix stores several objects, called matrix items. Matrix items are described in the following classes:

TypeNameDescriptionNotes
Voidadd(IlvAbstractMatrixItem item)Adds item to the first free location in the matrix. This location is the left-most and top-most empty cell.
BooleanadjustLastWhen a matrix is being resized and adjustLast is set to true, tit adjusts the width of the last column to fit the whole width of the matrix.
BooleanallowEditionSpecifies whether editing is allowed (true) or not (false).
BooleanautoColumnSelectionSets the matrix so that automatic column selection is possible (true).
Returns true if the matrix has automatic column selection set.
BooleanautoFitToSizeSets the automatic resizing flag. The default value is false.
Returns true if the cells of the matrix are automatically resized when the size of the matrix is modified. Otherwise, it returns false.
BooleanautoLineSelectionReturns true if the matrix has automatic line selection set.
Sets the matrix so that automatic line selection is possible, if it is true.
BooleanbrowseSelectSets the matrix so that it is 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.
Returns true if the matrix is in browse selection mode.
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 press the Control key when clicking to add an item to the selection.
UIntcolumnPosition(UInt col)Returns the distance between the left side of the column col and the left side of the first column. When col is equal to 0, it returns 0.
UIntcolumnSize(UInt col)Returns the width of the column col.
VoiddeSelect()Deselects all the items in the matrix.
BooleandirectEditionSets the edit mode to direct editing mode (true).
Returns true if the matrix is in direct editing mode. If a matrix is not in direct editing mode, you must click on a matrix item to edit it. However with direct editing mode, an item can be edited at any time after the user has clicked on it.
BooleandragdropSpecifies whether drag-and-drop operations are allowed for the matrix.
BooleaneditOnDoubleClickReturns true if the matrix allows item editing on a double-click event.
UInteditedColumnUInt editedColumn
UInteditedRowGet the location of the matrix item (row or column) that is currently being edited.
DirectioneditionDirectionSets or returns the editing direction for the matrix.
The editing direction is the direction to which the selection moves in the matrix, when you validate an item.
BooleanexclusiveSets the exclusive state of the matrix.
Returns true if the matrix is exclusive, that is, when you cannot select more than one item at a time.
DirectionextendedSelectionOrientationSets the direction to which a selection in the matrix is extended. The default value is IlvHorizontal, meaning that the selection is extended along a line. Other possible extension directions are IlvVertical (column extension) and IlvBadPosition (square extension).
Returns the direction to which the selection will be extended.
VoidfitToSize()Computes a new size for the columns and rows so that they fit the size of the matrix.
IlvAbstractMatrixItemgetItem(UInt col, UInt row)Returns the item located at col, row in the matrix, or NULL if there is no such item.
DirectiongetItemAlignment(UInt col, UInt row)Returns the alignment of the item located at col, row in the matrix.
ColorgridColorGets or sets the color of the grid.
BooleanhasTooltipsSpecifies whether the matrix uses tooltips (true) or not (false).
VoidhideTextField()Hides the editing text field, if there is one.
VoidinsertColumn(UInt col, UInt count)Inserts the number of columns specified by count before column col. If col exceeds the number of columns, the new columns are added to the end of the matrix.
VoidinsertRow(UInt row, UInt count)Inserts the number of rows specified by count before row row. If row exceeds the number of rows, the new rows are added to the end of the matrix.
BooleanisItemFillingBackground(UInt col, UInt row)Returns true if the filled matrix item, specified by col and row, is using its palette for the text foreground (text color and font), and for the item background. This method does not apply to matrix items that are not filled.
BooleanisItemGrayed(UInt col, UInt row)Returns true if the item at the position specified by col and row is gray.
BooleanisItemReadOnly(UInt col, UInt row)Returns the read-only state of the item located at col, row in the matrix.
BooleanisItemRelief(UInt col, UInt row)Returns a Boolean value that indicates whether the item located at col, row in the matrix is displayed with a relief effect.
BooleanisItemSelected(UInt col, UInt row)Returns true if the item located at col, row in the matrix is selected, and false otherwise.
BooleanisItemSensitive(UInt col, UInt row)Returns true if the item located at col, row in the matrix is sensitive, and false otherwise.
IlvRectitemBBox(UInt col, UInt row)Returns the bounding box of the item located at col, row in this matrix.
DirectionlabelPositionSets or returns the default position of the matrix item labels (IlvGadgetItemMatrixItem object only) relative to their picture.
Voidreinitialize(UInt col, UInt row)Sets the matrix dimensions to col and row. The items that are in the removed columns and rows are destroyed.
Booleanremove(UInt col, UInt row, Boolean destroy)Removes the item located at col, row in the matrix. The item is deleted if destroy is omitted or set to true. This method returns true if the operation is successful, and false if there is no item at the location specified.
VoidremoveColumn(UInt col, Boolean destroy)Removes the column col. The items that this column contains are deleted if destroy is omitted or set to true.
VoidremoveRow(UInt row, Boolean destroy)Removes the row row. The items that this row contains are deleted if destroy is omitted or set to true. Note that a matrix always has at least one row and one column. Therefore, if row is the last row in the matrix, it will not be removed.
VoidresizeColumn(UInt col, UInt size)Sets the width of the column col-1 to size. When col is equal to 0, this function does nothing.
VoidresizeRow(UInt row, UInt size)Sets the height of the row row-1 to size. When row is equal to 0, this function does nothing.
UIntrowPosition(UInt row)Returns the distance between the top border of the row row and the top border of the first row. When row is equal to 0, it returns 0.
UIntrowSize(UInt row)Returns the height of the row row.
VoidselectColumn(UInt col, Boolean select)Sets the selection state of the entire column col to select.
VoidselectItem(UInt col, UInt row, Boolean select)Sets the selection state of the item located at col, row in the matrix to select.
VoidselectRow(UInt row, Boolean select)Sets the selection state of the entire row row to select.
Voidset(UInt col, UInt row, IlvAbstractMatrixItem item)Adds item to the matrix at the location specified by col, row. If there is a matrix item at this location, this item is deleted before item is inserted.
VoidsetEditedItem(UInt col, UInt row)Sets the item at the location specified by col and row as the current editable item. See the allowEdition property.
VoidsetFocus(UInt column, UInt row, IlvGadgetMatrixItem gadItem)Sets the gadget matrix item that has the focus to gadItem . The parameter col and row specify the location of the item in the matrix.
VoidsetItemAlignment(UInt col, UInt row, Direction align)Sets the alignment of the item located at col, row in the matrix to align.
VoidsetItemFillingBackground(UInt col, UInt row, Boolean filling)Sets the matrix item specified by col and row so that it only uses its palette for the foreground of the text (text color and font), and for the item background. This method applies only to filled matrix items.
VoidsetItemGrayed(UInt col, UInt row, Boolean grayed)Sets the item at the position specified by col and row to grayed, if grayed is true. If grayed is false, the item is set to its original color.
This method is automatically called with grayed set to true when the IlvMatrix::setItemSensitive method is called with false, resulting in an item that is grayed and insensitive. However if you require an item that is insensitive and not gray, you must first call the IlvMatrix::setItemSensitive method with false, and then the setItemGrayed method with grayed set to false.
VoidsetItemReadOnly(UInt col, UInt row, Boolean readOnly)Sets the item located at col, row in the matrix to readOnly. If readOnly is true, IlvLabelMatrixItem objects can be selected but not edited. There is no effect on IlvGadgetMatrixItem objects.
VoidsetItemRelief(UInt col, UInt row, Boolean relief)Sets the item located at col, row in the matrix to relief.
VoidsetItemSensitive(UInt col, UInt row, Boolean sensitive)Sets the item located at col, row in the matrix to sensitive. If sensitive is set to false, IlvLabelMatrixItem objects are shown dimmed.
BooleanshowLabelSpecifies whether the labels associated with the matrix items (IlvGadgetItemMatrixItem object only) are displayed (true) or not (false).
BooleanshowPictureSpecifies whether the pictures associated with the matrix items (IlvGadgetItemMatrixItem object only) are displayed (true) or not (false).
VoidshowTextField()Pops up the associated text field at the location of the current editable item.
UIntspacingSets or gets the spacing between two cells.
ObjecttextFieldReturns the IlvTextField object used for editing.
UIntXgridSets or gets the width of the columns, if they have the same dimensions.
UIntYgridSets or gets the height of the rows, if they have the same dimensions.