Views
Gadgets Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
IlvMatrix Class Reference

Gadget class. More...

#include <ilviews/gadgets/matrix.h>

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

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. More...
 
virtual void activateMatrixItem (IlUShort col, IlUShort row)
 Is called by the interactor when an item is activated. More...
 
virtual void add (IlvAbstractMatrixItem *item)
 Adds an item to the first empty cell in the matrix. More...
 
IlBoolean adjustLast (IlBoolean value)
 Specifies whether only the last column and the last row should be resized. More...
 
IlBoolean allowDragDrop () const
 Indicates whether the matrix allows drag-and-drop operations. More...
 
void allowDragDrop (IlBoolean value)
 Specifies whether the matrix should allow drag-and-drop operations. More...
 
IlBoolean allowEdit (IlBoolean value)
 Specifies whether editing should be allowed. More...
 
IlBoolean allowEditOnDoubleClick () const
 Indicates whether the matrix allows item editing when a double-click event occurs. More...
 
void allowEditOnDoubleClick (IlBoolean value)
 Indicates whether the matrix should allow item editing when a double-click event occurs. More...
 
virtual IlvGadgetItemapplyToItems (IlvApplyGadgetItem, IlAny)
 Applies the specified function to all the items of the holder. More...
 
IlBoolean autoFitToSize (IlBoolean value)
 Specifies whether the automatic fitting to size mode should be on. More...
 
virtual void changeSelectionTo (IlUShort col, IlUShort row)
 Clears the current selection and selects specified cell. More...
 
IlUShort columns () const
 Returns the number of columns in the matrix. More...
 
IlBoolean columnSameWidth () const
 Returns IlTrue if all the columns in the matrix have the same width. More...
 
virtual IlvTextFieldcreateEditionField (IlUShort col, IlUShort row)
 Returns a new text field for editing an item. More...
 
virtual IlvMatrixItemEditorcreateEditor (IlUShort col, IlUShort row)
 Returns a new editor for editing an item. More...
 
virtual void deSelect ()
 Deselects all the items in the matrix. More...
 
virtual void doIt ()
 Is called by the interactor when the selection changes in the matrix. More...
 
virtual void drawBackground (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget background. More...
 
virtual void drawFrame (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget frame. More...
 
virtual void drawGadgetContents (IlvPort *, const IlvTransformer *=0, const IlvRegion *=0) const
 Draws the gadget contents. More...
 
virtual void drawItem (IlvPort *, IlUShort, IlUShort, const IlvRect &, const IlvRect &) const
 Is called by the matrix to draw an item. More...
 
virtual void drawRelief (IlUShort col, IlUShort row, IlvPort *dst, const IlvRect &bbox, const IlvRect *clip) const
 Is called to draw an item in relief. More...
 
virtual void drawSelection (IlUShort col, IlUShort row, IlvPort *dst, const IlvRect &bbox, const IlvRect *clip) const
 Is called to draw a selected item. More...
 
virtual void editItem (IlUShort col, IlUShort row)
 Activates the editing mode for the matrix. More...
 
virtual void extendSelection (IlUShort col, IlUShort row)
 Extends the selection from the anchor to the specified cell. More...
 
virtual void fitHeightToSize (IlUShort row=0)
 Computes a new size for the rows so that they fit the height of the matrix. More...
 
void fitToSize ()
 Computes a new size for the columns and rows so that they fit the size of the matrix. More...
 
virtual void fitWidthToSize (IlUShort col=0)
 Computes a new size for the columns so that they fit the width of the matrix. More...
 
IlvDim getCardinal () const
 Returns the number of cells in the matrix. More...
 
IlvDim getColumnFittingSize (IlUShort col) const
 Returns the width of the largest item in the specified column. More...
 
IlvDim getColumnPosition (IlUShort) const
 Returns the position of a column. More...
 
IlvDim getColumnsDistance (IlUShort, IlUShort) const
 Returns the distance between two columns. More...
 
IlvDim getColumnWidth (IlUShort) const
 Returns the width of the specified column. More...
 
IlvDirection getEditDirection () const
 Returns the editing direction of the matrix. More...
 
IlvTextFieldgetEditedItem (IlUShort &col, IlUShort &row) const
 Returns the location of the item being edited. More...
 
IlvGraphicgetEditorField () const
 Returns a pointer to the editing field. More...
 
IlvOrientation getExtendedSelectionOrientation () const
 Returns the direction to which the selection will be extended. More...
 
IlBoolean getFirstSelected (IlUShort &col, IlUShort &row) const
 Returns the first selected item in the matrix. More...
 
IlvGadgetMatrixItemgetFocusItem () const
 Returns the gadget matrix item that has the focus. More...
 
IlvPalettegetGridPalette () const
 Returns the palette used to draw the matrix grid. More...
 
virtual const IlvPalettegetInsensitivePalette () const
 Returns the palette used to draw an item that is not sensitive. More...
 
IlvAbstractMatrixItemgetItem (IlUShort col, IlUShort row) const
 Returns the item located in the specified cell. More...
 
IlvAbstractMatrixItemgetItem (IlvDim pos) const
 Returns the matrix item located at the specified position. More...
 
IlvPosition getItemAlignment (IlUShort col, IlUShort row) const
 Returns the alignment of an item of the matrix. More...
 
IlAny getItemData (IlUShort col, IlUShort row) const
 Returns the client data of the specified matrix item. More...
 
virtual void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the default orientation of the matrix items labels. More...
 
virtual IlvPosition getLabelPosition () const
 Returns the default position of the matrix item labels. More...
 
void getLastSelectedItem (IlUShort &col, IlUShort &row) const
 Returns the location of the last selected item in the matrix. More...
 
virtual const IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item. More...
 
virtual const IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items. More...
 
IlvDim getRowFittingSize (IlUShort row) const
 Returns the height of the largest item in the specified row. More...
 
IlvDim getRowHeight (IlUShort) const
 Returns the height of the specified row. More...
 
IlvDim getRowPosition (IlUShort) const
 Returns the position of a row. More...
 
IlvDim getRowsDistance (IlUShort, IlUShort) const
 Returns the distance between two rows. More...
 
virtual const IlvPalettegetSelectionPalette () const
 Returns the selection palette used to draw selected items. More...
 
virtual const IlvPalettegetSelectionTextPalette () const
 Returns the selection palette used to draw the label of selected items. More...
 
IlUShort getSpacing () const
 Returns the spacing between two cells of the matrix. More...
 
IlvTextFieldgetTextField () const
 Returns a pointer to the editing text field. More...
 
IlvDim getXgrid () const
 Returns the default column width. More...
 
IlvDim getYgrid () const
 Returns the default row height. More...
 
virtual IlBoolean handleMatrixEvent (IlvEvent &)
 Handles the events sent to the matrix. More...
 
IlBoolean hasToolTips () const
 Indicates whether the matrix handles internal tooltips. More...
 
void hideEditorField ()
 Hides and destroys the matrix item editing field. More...
 
void hideTextField ()
 Hides and destroys the editing text field. More...
 
virtual void insertColumn (IlUShort col=0, IlUShort count=1)
 Inserts columns in the matrix. More...
 
virtual void insertRow (IlUShort row=0, IlUShort count=1)
 Inserts rows in the matrix. More...
 
virtual void internalBBox (IlvRect &, const IlvTransformer *) const
 Returns the internal bounding box of the gadget. More...
 
IlBoolean isAdjustingLast () const
 Indicates whether only the last column and row are resized. More...
 
IlBoolean isAutoColumnSelect () const
 Indicates whether the automatic column selection mode is on. More...
 
IlBoolean isAutoFittingToSize () const
 Indicates whether the automatic fitting to size mode is on. More...
 
IlBoolean isAutoLineSelect () const
 Indicates whether the automatic row selection mode is on. More...
 
IlBoolean isBrowseMode () const
 Indicates whether the matrix is in browse selection mode. More...
 
IlBoolean isDirectEditionMode () const
 Indicates whether the matrix is in direct editing mode. More...
 
IlBoolean isEditAllowed () const
 Indicates whether editing is allowed. More...
 
IlBoolean isExclusive () const
 Indicates whether the selection mode is set to exclusive. More...
 
IlBoolean isItemFillingBackground (IlUShort col, IlUShort row) const
 Returns IlTrue if the specified item is filled. More...
 
IlBoolean isItemGrayed (IlUShort col, IlUShort row) const
 Indicates whether the specified item is grayed. More...
 
IlBoolean isItemReadOnly (IlUShort col, IlUShort row) const
 Indicates whether the specified matrix item is read-only. More...
 
IlBoolean isItemRelief (IlUShort col, IlUShort row) const
 Indicates whether the specified matrix item appears in relief. More...
 
IlBoolean isItemSelected (IlUShort col, IlUShort row) const
 Indicates whether the item located in the specified cell is selected. More...
 
IlBoolean isItemSensitive (IlUShort col, IlUShort row) const
 Indicates whether the specified item is sensitive. More...
 
virtual IlBoolean isShowingLabel () const
 Indicates whether the matrix item labels are displayed. More...
 
virtual IlBoolean isShowingPicture () const
 Indicates whether the matrix item pictures are displayed. More...
 
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. More...
 
virtual IlvAbstractMatrixItempointToItem (const IlvPoint &point, IlUShort &col, IlUShort &row, const IlvTransformer *t=0) const
 Returns the item located at a specified point. More...
 
void reDrawItem (IlUShort col, IlUShort row) const
 Redraws an item of the matrix. More...
 
virtual void reinitialize (IlUShort cols, IlUShort rows)
 Resets the matrix dimensions. More...
 
virtual IlBoolean remove (IlUShort col, IlUShort row, IlBoolean destroy=IlTrue)
 Removes an item from the matrix. More...
 
virtual void removeColumn (IlUShort col, IlBoolean destroy=IlTrue)
 Removes a column from the matrix. More...
 
virtual void removeRow (IlUShort row, IlBoolean destroy=IlTrue)
 Removes a row from the matrix. More...
 
virtual void resizeColumn (IlUShort col, IlvDim size)
 Resizes a given column. More...
 
virtual void resizeRow (IlUShort row, IlvDim size)
 Resizes a given row. More...
 
IlUShort rows () const
 Returns the number of rows in the matrix. More...
 
IlBoolean rowSameHeight () const
 Returns IlTrue if all the rows in the matrix have the same height. More...
 
void sameHeight (IlBoolean value)
 Specifies whether all the rows in the matrix should have the same height. More...
 
void sameWidth (IlBoolean value)
 Specifies whether all the columns in the matrix should have the same width. More...
 
virtual void scrollBarVisibilityChanged (IlvDirection)
 Is called when an internal scroll bar is shown or hidden. More...
 
virtual void set (IlUShort col, IlUShort row, IlvAbstractMatrixItem *item)
 Adds an item to the matrix at the specified location. More...
 
void setAutoColumnSelect (IlBoolean value)
 Specifies whether the automatic column selection mode should be on. More...
 
void setAutoLineSelect (IlBoolean value)
 Specifies whether the automatic row selection mode should be on. More...
 
void setBrowseMode (IlBoolean value)
 Specifies whether the matrix should be in browse selection mode. More...
 
virtual void setColumnSelected (IlUShort col, IlBoolean selected=IlTrue)
 Selects or deselects an entire column. More...
 
void setDirectEditionMode (IlBoolean value)
 Specifies whether the matrix should be in direct editing mode. More...
 
void setEditDirection (IlvDirection direction)
 Sets the editing direction of the matrix. More...
 
void setEditedItem (IlUShort col, IlUShort row)
 Sets the item that is being edited. More...
 
void setExclusive (IlBoolean value)
 Specifies whether the selection mode should be exclusive. More...
 
void setExtendedSelectionOrientation (IlvOrientation dir)
 Sets the direction in which the selection in the matrix is extended. More...
 
void setFocus (IlUShort col, IlUShort row)
 Specifies the gadget matrix item that has the focus. More...
 
void setGridPalette (IlvPalette *palette)
 Sets the palette used to draw the matrix grid. More...
 
void setItemAlignment (IlUShort col, IlUShort row, IlvPosition alignment)
 Sets the alignment of a matrix item. More...
 
void setItemCallback (IlUShort col, IlUShort row, IlvMatrixItemCallback callback=0, IlAny data=0)
 Sets a callback to the specified matrix item. More...
 
void setItemData (IlUShort col, IlUShort row, IlAny data)
 Sets the client data of the specified matrix item. More...
 
void setItemFillingBackground (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified item should be filled with a background color. More...
 
void setItemGrayed (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified item should be grayed. More...
 
void setItemReadOnly (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified matrix item should be read-only. More...
 
void setItemRelief (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified matrix item should be in relief. More...
 
virtual void setItemSelected (IlUShort col, IlUShort row, IlBoolean selected=IlTrue)
 Specifies whether the item located in the specified cell should be selected. More...
 
void setItemSensitive (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Sets the specified item to sensitive. More...
 
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse, IlBoolean redraw=IlTrue)
 Sets the orientation of the matrix items labels. More...
 
void setLabelPosition (IlvPosition position, IlBoolean redraw=IlTrue)
 Sets the default position of the matrix item labels. More...
 
virtual void setRowSelected (IlUShort row, IlBoolean selected=IlTrue)
 Selects or deselects an entire row. More...
 
void setSelectionAnchor (IlUShort col, IlUShort row)
 Sets the selection anchor to the specified cell. More...
 
void setSpacing (IlUShort spacing)
 Sets the spacing between two cells of the matrix. More...
 
virtual void setXgrid (IlvDim x)
 Sets the default column width. More...
 
virtual void setYgrid (IlvDim y)
 Sets the default row height. More...
 
void showEditorField ()
 Displays the matrix item editing field. More...
 
void showLabel (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Shows or hides the matrix item labels. More...
 
void showPicture (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Shows or hides the matrix items picture. More...
 
void showTextField ()
 Displays the editing text field. More...
 
void useToolTips (IlBoolean value=IlTrue)
 Specifies whether the matrix should use internal tooltips. More...
 
virtual void validate ()
 Is called when the user validates its changes after editing a matrix item. More...
 
- Public Member Functions inherited from IlvAbstractMatrix
IlBoolean allowCellMode () const
 Indicates whether the matrix can draw items on several continuous cells. More...
 
virtual IlBoolean cellBBox (IlUShort colno, IlUShort rowno, IlvRect &rect, const IlvTransformer *t=0) const
 Computes the bounding box of a given cell. More...
 
virtual void cellInfo (IlUShort colno, IlUShort rowno, IlUShort &startcol, IlUShort &startrow, IlUShort &nbcol, IlUShort &nbrow) const
 Returns cell information. More...
 
virtual IlBoolean columnBBox (IlUShort colno, IlvRect &rect, const IlvTransformer *t=0) const
 Computes the bounding box of a given column. More...
 
virtual void ensureVisible (IlUShort colno, IlUShort rowno, IlBoolean redraw=IlTrue)
 Scrolls the matrix to make the specified item visible. More...
 
IlUShort firstColumn () const
 Returns the index of the first visible column. More...
 
IlUShort firstRow () const
 Returns the index of the first visible row. More...
 
IlUShort getNbFixedColumn () const
 Returns the number of fixed columns. More...
 
IlUShort getNbFixedRow () const
 Returns the number of fixed rows. More...
 
virtual void getVisibleItems (IlUShort &fromcol, IlUShort &tocol, IlUShort &fromrow, IlUShort &torow, const IlvTransformer *t=0) const
 Computes the range of the items that are visible in the matrix. More...
 
virtual IlBoolean handleGadgetEvent (IlvEvent &)
 Handles the gadget events. More...
 
virtual void invalidateColumn (IlUShort colno) const
 Redraws a column. More...
 
virtual void invalidateRect (const IlvRect &rect) const
 Redraws a portion of the matrix. More...
 
virtual void invalidateRow (IlUShort rowno) const
 Redraws a row. More...
 
IlBoolean isShowingGrid () const
 Returns IlTrue if the matrix grid is displayed. More...
 
virtual IlBoolean pointToPosition (const IlvPoint &point, IlUShort &colno, IlUShort &rowno, const IlvTransformer *t=0) const
 Returns the location of the item located at the specified point. More...
 
virtual IlBoolean rowBBox (IlUShort rowno, IlvRect &rect, const IlvTransformer *t=0) const
 Computes the bounding box of the specified row. More...
 
virtual void scrollBarBBox (IlvDirection dir, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the specified internal scroll bar. More...
 
virtual void scrollBarHasMoved (IlvDirection pos)
 Is called when an internal scroll bar has moved. More...
 
virtual void scrollTo (IlUShort colno, IlUShort rowno)
 Changes the first visible column and row. More...
 
void scrollToColumn (IlUShort colno)
 Changes the first visible column. More...
 
void scrollToRow (IlUShort rowno)
 Changes the first visible row. More...
 
void setNbFixedColumn (IlUShort count)
 Sets the number of fixed rows. More...
 
void setNbFixedRow (IlUShort count)
 Sets the number of fixed rows. More...
 
IlBoolean showGrid (IlBoolean value)
 Specifies whether the matrix grid should be displayed. More...
 
- Public Member Functions inherited from IlvScrolledGadget
 IlvScrolledGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor. More...
 
virtual void adjustScrollBars (IlBoolean redraw=IlFalse)
 Recomputes the scroll bars. More...
 
void computeBBox (IlvRect &ibox, IlvRect &vbox, IlvRect &vs, IlvRect &hs, const IlvTransformer *t=0) const
 Computes the bounding boxes of the elements that compose the gadget. More...
 
void computeBBox (IlvRect &ibox, IlvRect &vs, IlvRect &hs, const IlvTransformer *t=0) const
 Computes the bounding boxes of the elements that compose the gadget. More...
 
virtual void drawScrollBar (IlvPort *dst, IlvDirection direction, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the specified internal scroll bar. More...
 
void fitToRect (const IlvRect &rect)
 Resizes the object so that the scrollable area fits the specified rectangle. More...
 
IlUShort getBottomMargin () const
 Returns the bottom margin. More...
 
IlvScrollBargetHorizontalScrollBar () const
 Returns a pointer to the internal horizontal scroll bar. More...
 
IlUShort getLeftMargin () const
 Returns the left margin. More...
 
IlUShort getRightMargin () const
 Returns the right margin. More...
 
IlvScrollBargetScrollBar (IlvDirection direction) const
 Returns a pointer to the specified internal scroll bar. More...
 
void getScrollBarShowAsNeeded (IlBoolean &vert, IlBoolean &hor) const
 Returns the scroll bar mode of the internal scroll bars. More...
 
IlUShort getTopMargin () const
 Returns the top margin. More...
 
IlvScrollBargetVerticalScrollBar () const
 Returns a pointer to the internal vertical scroll bar. More...
 
virtual IlBoolean handleScrollBarsEvent (IlvEvent &event)
 Handles the internal scroll bars event. More...
 
void hideScrollBar (IlvDirection direction, IlBoolean redraw=IlTrue)
 Hides the specified internal scroll bar. More...
 
void moveScrollBar (IlvDirection direction, IlvPosition where, IlBoolean redraw=IlTrue)
 Moves the specified internal scroll bar to a new position. More...
 
virtual void scrollableSize (IlvDim &width, IlvDim &height) const
 Returns the size of the scrollable area of the gadget. More...
 
void scrollBarShowAsNeeded (IlBoolean vertical, IlBoolean horizontal, IlBoolean redraw=IlTrue)
 Sets the scroll bar mode of the internal scroll bars. More...
 
void setBottomMargin (IlUShort margin)
 Sets the bottom margin. More...
 
void setLeftMargin (IlUShort margin)
 Sets the left margin. More...
 
void setMargin (IlUShort val)
 Sets the left, right, top, and bottom margins. More...
 
void setRightMargin (IlUShort margin)
 Sets the right margin. More...
 
void setTopMargin (IlUShort margin)
 Sets the top margin. More...
 
void showScrollBar (IlvDirection direction, IlBoolean redraw=IlTrue)
 Shows the specified internal scroll bar. More...
 
virtual void visibleBBox (IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the visible bounding box of the gadget. More...
 
IlvPosition whereIsScrollBar (IlvDirection direction) const
 Returns the location of the specified internal scroll bar. More...
 
- Public Member Functions inherited from IlvGadgetItemHolder
virtual IlvGadgetItemcreateItem (const char *label, IlvGraphic *graphic=0, IlvBitmap *bitmap=0, IlvBitmap *selbitmap=0, IlBoolean copy=IlTrue) const
 Returns a new gadget item. More...
 
virtual void drawGadgetItem (const IlvGadgetItem *item, IlvPort *port, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws a specific gadget item. More...
 
IlvGadgetItemgetCallbackItem () const
 Returns the item that triggered a callback. More...
 
IlvGadgetItemgetDragDropTarget () const
 Returns the target item of a drag-and-drop operation. More...
 
IlvGraphicgetDraggedImage () const
 Returns the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
IlvGadgetItemgetDraggedItem () const
 Returns the item that is being dragged during a drag-and-drop operation. More...
 
IlvGadgetItemgetEditedItem () const
 Returns the item that is being edited. More...
 
virtual const IlvPalettegetHighlightTextPalette () const
 Returns the highlight palette used to draw the label of highlighted items. More...
 
virtual IlvGadgetItemgetItemByName (const char *name) const
 Returns the item whose name is specified. More...
 
IlvGadgetItemgetToolTipItem () const
 Returns the item that is displaying a tooltip. More...
 
virtual void initReDrawItems ()
 Begins a redraw session. More...
 
virtual void recomputeAllItems ()
 Recomputes the size of all the items managed by the holder. More...
 
virtual void reDrawItems ()
 Ends a redraw session. More...
 
void setDragDropTarget (IlvGadgetItem *item)
 Sets the target item of a drag-and-drop operation. More...
 
void setDraggedImage (IlvGraphic *graphic)
 Sets the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
void setDraggedItem (IlvGadgetItem *item)
 Sets the dragged item. More...
 

Static Public Member Functions

static IlSymbolActivateMatrixItemCallbackType ()
 Returns the callback type of the Activate Item callback. More...
 
- Static Public Member Functions inherited from IlvScrolledGadget
static IlSymbolScrollBarMovedSymbol ()
 Returns the callback type for the Scroll Bar Moved callback. More...
 
static IlSymbolScrollBarVisibilitySymbol ()
 Returns the callback type for the Scroll Bar Visibility Changed callback. More...
 
- Static Public Member Functions inherited from IlvGadgetItemHolder
static IlSymbolAbortDragItemCallbackType ()
 Returns the callback type of the Abort Drag callback. More...
 
static IlSymbolAbortEditItemCallbackType ()
 Returns the callback type of the Abort Edit callback. More...
 
static IlSymbolActivateCallbackType ()
 Returns the callback type of the Activate callback. More...
 
static IlSymbolDragItemCallbackType ()
 Returns the callback type of the Drag Item callback. More...
 
static IlSymbolEndDragItemCallbackType ()
 Returns the callback type of the End Drag callback. More...
 
static IlSymbolEndEditItemCallbackType ()
 Returns the callback type of the End Edit callback. More...
 
static IlSymbolStartDragItemCallbackType ()
 Returns the callback type of the Start Drag callback. More...
 
static IlSymbolStartEditItemCallbackType ()
 Returns the callback type of the Start Edit callback. More...
 

Protected Member Functions

void endEdit (IlvGadgetItem *)
 Is called after an item has been edited. More...
 
virtual void itemActivated (IlvGadgetItem *)
 Is called when an item is activated. More...
 
- Protected Member Functions inherited from IlvAbstractMatrix
 IlvAbstractMatrix (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor. More...
 
virtual void adjustFromScrollBar (const IlvScrollBar *sb, IlvDirection dir)
 Is called to adjust the gadget to the scroll bars values. More...
 
virtual void adjustScrollBarValue (IlvScrollBar *sb, IlvDirection dir)
 Is called to adjust the scroll bar values. More...
 
virtual IlvScrollBarcreateScrollBar (const IlvRect &r, IlvDirection dir, IlUShort t, IlvPalette *p)
 Returns a new instance of the IlvScrollBar class. More...
 
- Protected Member Functions inherited from IlvScrolledGadget
IlvDim getLimitHeightValue () const
 Returns the limit value for the vertical scrolling. More...
 
IlvDim getLimitWidthValue () const
 Returns the limit value for the horizontal scrolling. More...
 
IlvDim getScrollableHeight () const
 Returns the height of the scrollable area. More...
 
IlvDim getScrollableWidth () const
 Returns the width of the scrollable area. More...
 
void setLimitHeightValue (IlvDim value)
 Sets the limit value for the vertical scrolling. More...
 
void setLimitWidthValue (IlvDim value)
 Sets the limit value for the horizontal scrolling. More...
 
void setScrollableHeight (IlvDim height)
 Sets the height of the scrollable area. More...
 
void setScrollableWidth (IlvDim width)
 Sets the width of the scrollable area. More...
 
- Protected Member Functions inherited from IlvGadgetItemHolder
virtual void abortDragItem ()
 Is called when a drag-and-drop operation is aborted. More...
 
virtual void abortEdit (IlvGadgetItem *item)
 Is called when the editing of the specified item is aborted. More...
 
virtual void drawDraggedImage (const IlvPoint &point, const IlvTransformer *t)
 Is called to draw the ghost image during a drag-and-drop operation. More...
 
virtual void endDragItem (const IlvPoint &point)
 Is called when a drag-and-drop operation is finished. More...
 
virtual void itemDeSelected (IlvGadgetItem *item)
 Is called when an item is deselected. More...
 
virtual void itemDragged (const IlvPoint &point)
 Is called each time the user moves the mouse during a drag-and-drop operation. More...
 
virtual void itemHighlighted (IlvGadgetItem *item)
 Is called when an item is highlighted or unhighlighted. More...
 
virtual void itemSelected (IlvGadgetItem *item)
 Is called when an item is selected. More...
 
virtual void startDragItem (IlvGadgetItem *item)
 Is called when a drag-and-drop operation begins. More...
 
virtual void startEdit (IlvGadgetItem *item)
 Is called when an item is edited. More...
 

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.

A Matrix with different kinds of items

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

Note
In the member functions of the IlvMatrix class, the first column and the first row are located at the index 0, unless stated otherwise.
See also
IlvAbstractMatrixItem, IlvSheet, IlvTable.

Accessors\nAccessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods <tt>IlvValueInterface::queryValue()</tt>, <tt>IlvValueInterface::queryValues()</tt>, <tt>IlvValueInterface::changeValue()</tt>, <tt>IlvValueInterface::changeValues()</tt>.\n\n\nThis class inherits the accessors of its superclass \c IlvAbstractMatrix and adds the following ones:

Data accessors

Name Type Equivalent methods
adjustLast Boolean isAdjustingLast(), adjustLast()
spacing UInt getSpacing(), setSpacing()
exclusive Boolean isExclusive(), setExclusive()
autoFitToSize Boolean isAutoFittingToSize(), autoFitToSize()
allowEdition Boolean isEditAllowed(), allowEdit()
editedColumn UInt getEditedItem()
editedRow UInt getEditedItem()
browseSelect Boolean isBrowseMode(), setBrowseMode()
editionDirection Direction getEditDirection(), setEditDirection()
extendedSelectionOrientation Direction getExtendedSelectionOrientation(), setExtendedSelectionOrientation()
autoLineSelection Boolean isAutoLineSelect(), setAutoLineSelect()
autoColumnSelection Boolean isAutoColumnSelect(), setAutoColumnSelect()
directEdition Boolean isDirectEditionMode(), setDirectEditionMode()
editOnDoubleClick Boolean allowEditOnDoubleClick() const, allowEditOnDoubleClick(IlBoolean)
textField Object getTextField()
hasToolTips Boolean hasToolTips(), useToolTips()
showLabel Boolean isShowingLabel(), showLabel()
showPicture Boolean isShowingPicture(), showPicture()
labelPosition Direction getLabelPosition(), setLabelPosition()
labelOrientation Direction getLabelOrientation(), setLabelOrientation()
flipLabel Boolean getLabelOrientation(), setLabelOrientation()
dragdrop Boolean allowDragDrop() const, allowDragDrop(IlBoolean)
Xgrid UInt getXgrid(), setXgrid()
Ygrid UInt getYgrid(), setYgrid()
gridColor Color getGridPalette(), setGridPalette(). See [1] below

[1]: The accessor is equivalent to the foreground color of the grid palette.

Method accessors

Name Return type Equivalent methods
set(UInt column, UInt row, IlvAbstractMatrixItem item) Void set(IlUShort column, IlUShort row, IlvAbstractMatrixItem* item)
add(IlvAbstractMatrixItem item) Void add(IlvAbstractMatrixItem* item)
remove(UInt col, UInt row, Boolean destroy) Boolean remove(IlUShort col, IlUShort row, IlBoolean destroy)
itemBBox(UInt col, UInt row) Object itemBBox(IlUShort col, IlUShort row, IlvRect& return, const IlvTransformer*) const
deSelect() Void deSelect()
columnPosition(UInt col) UInt getColumnPosition(IlUShort col) const
rowPosition(UInt row) UInt getRowPosition(IlUShort row) const
columnSize(UInt col) UInt getColumnWidth(IlUShort col) const
rowSize(UInt row) UInt getRowHeight(IlUShort row) const
resizeColumn(UInt col, UInt size) Void resizeColumn(IlUShort col, IlvDim size)
resizeRow(UInt row, UInt size) Void resizeRow(IlUShort row, IlvDim size)
selectColumn(UInt col, Boolean select) Void setColumnSelected(IlUShort col, IlBoolean select)
selectRow(UInt row, Boolean select) Void setRowSelected(IlUShort row, IlBoolean select)
selectItem(UInt col, UInt row, Boolean select) Void setItemSelected(IlUShort col, IlUShort row, IlBoolean select)
isItemSelected(UInt col, UInt row) Boolean isItemSelected(IlUShort col, IlUShort row) const)
getItem(UInt col, UInt row) Object getItem(IlUShort col, IlUShort row) const
getItemAlignment(UInt col, UInt row) Direction getItemAlignment(IlUShort col, IlUShort row) const
setItemAlignment(UInt col, UInt row, Direction align) Void setItemAlignment(IlUShort col, IlUShort row, IlvPosition align)
isItemSensitive(UInt col, UInt row) Boolean isItemSensitive(IlUShort col, IlUShort row) const
setItemSensitive(UInt col, UInt row, Boolean sensitive) Void setItemSensitive(IlUShort col, IlUShort row, IlBoolean sensitive)
isItemGrayed(UInt col, UInt row) Boolean isItemGrayed(IlUShort col, IlUShort row) const
setItemGrayed(UInt col, UInt row, Boolean grayed) Void setItemGrayed(IlUShort col, IlUShort row, IlBoolean grayed)
isItemFillingBackground(UInt col, UInt row) Boolean isItemFillingBackground(IlUShort col, IlUShort row) const
setItemFillingBackground(UInt col, UInt row, Boolean filling) Void setItemFillingBackground(IlUShort col, IlUShort row, IlBoolean filling)
isItemReadOnly(UInt col, UInt row) Boolean isItemReadOnly(IlUShort col, IlUShort row) const
setItemReadOnly(UInt col, UInt row, Boolean readOnly) Void setItemReadOnly(IlUShort col, IlUShort row, IlBoolean readOnly)
isItemRelief(UInt col, UInt row) Boolean isItemRelief(IlUShort col, IlUShort row) const
setItemRelief(UInt col, UInt row, Boolean relief) Void setItemRelief(IlUShort col, IlUShort row, IlBoolean relief)
fitToSize() Void fitToSize()
insertColumn(UInt col, UInt count) Void insertColumn(IlUShort col, IlUShort count)
insertRow(UInt row, UInt count) Void insertRow(IlUShort row, IlUShort count)
removeColumn(UInt col, Boolean destroy) Void removeColumn(IlUShort col, IlBoolean destroy)
removeRow(UInt row, Boolean destroy) Void removeRow(IlUShort row, IlBoolean destroy)
reinitialize(UInt col, UInt row) Void reinitialize(IlUShort col, IlUShort row)
setEditedItem(UInt col, UInt row) Void setEditedItem(IlUShort col, IlUShort row)
showTextField() Void showTextField()
hideTextField() Void hideTextField()
setFocus(UInt col, UInt row) Void setFocus(IlUShort col, IlUShort row)

Styling\nThis class supports the following CSS properties:

Graphic property CSS property Type
Background color background-color Color
Text color color Color

Constructor & Destructor Documentation

◆ IlvMatrix()

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
displayThe connection to the display.
rectThe size and position of the matrix.
nbcolThe number of columns in the matrix.
nbrowThe number of rows in the matrix.
xgridThe default column width.
ygridThe default row height.
thicknessThe thickness of the matrix.
paletteThe palette used to draw the matrix.

Member Function Documentation

◆ activateMatrixItem()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
See also
ActivateMatrixItemCallbackType.

◆ 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().

◆ add()

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
itemThe matrix item.
See also
set(), remove(), getCardinal(), getItem().

◆ adjustLast()

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
valueIlTrue if only the last column and row should be resized, and IlFalse otherwise.
See also
autoFitToSize(), isAdjustingLast(), fitToSize().

◆ allowDragDrop() [1/2]

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.

◆ allowDragDrop() [2/2]

void IlvMatrix::allowDragDrop ( IlBoolean  value)

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

Parameters
valueSpecifies 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.

◆ allowEdit()

IlBoolean IlvMatrix::allowEdit ( IlBoolean  value)

Specifies whether editing should be allowed.

Parameters
valueSpecifies whether editing should be allowed (IlTrue) or not (IlFalse).
See also
isEditAllowed().

◆ allowEditOnDoubleClick() [1/2]

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

◆ allowEditOnDoubleClick() [2/2]

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
valueSpecifies whether the matrix should allow item editing when a double-click event occurs (IlTrue) or not (IlFalse).
See also
allowEditOnDoubleClick(), activateMatrixItem().

◆ applyToItems()

virtual IlvGadgetItem* IlvMatrix::applyToItems ( IlvApplyGadgetItem  func,
IlAny  arg 
)
virtual

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

Parameters
funcThe function to be applied.
argThe argument that will be passed to the function func.
Returns
The item that stopped the operation.
See also
IlvApplyGadgetItem, recomputeAllItems(), getItemByName().

Reimplemented from IlvGadgetItemHolder.

◆ autoFitToSize()

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
valueSpecifies whether the automatic fitting to size mode should be set (IlTrue) or not (IlFalse).
Returns
The parameter value.

◆ changeSelectionTo()

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
colThe column index of the cell to select.
rowThe row index of the cell to select.
See also
setSelectionAnchor(), extendSelection().

Reimplemented in IlvFileChooserSheet.

◆ columns()

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.

◆ columnSameWidth()

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.

◆ createEditionField()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
See also
editItem().

◆ createEditor()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
See also
editItem().

◆ deSelect()

virtual void IlvMatrix::deSelect ( )
virtual

Deselects all the items in the matrix.

The matrix is not redrawn.

See also
setItemSelected().

Reimplemented in IlvFileChooserSheet.

◆ doIt()

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().

◆ drawBackground()

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
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawFrame(), drawScrollBar(), drawGadgetContents(), IlvGadget::isTransparent().

Reimplemented from IlvScrolledGadget.

◆ drawFrame()

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 isShowingFrame() returns IlFalse.

Parameters
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawBackground(), drawScrollBar(), drawGadgetContents().

Reimplemented from IlvScrolledGadget.

Reimplemented in IlvSheet.

◆ drawGadgetContents()

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
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawBackground(), drawScrollBar(), drawFrame().

Reimplemented from IlvAbstractMatrix.

Reimplemented in IlvSheet.

◆ drawItem()

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
dstThe destination drawing port.
colnoThe column of the item to be drawn. If the item extends over several columns, colno specifies the left location of the item.
rownoThe row of the item to be drawn. If the item extends over several rows, rowno specifies the top location of the item.
itembboxThe 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.
clipThe clipping area.

Reimplemented from IlvAbstractMatrix.

Reimplemented in IlvSheet.

◆ drawRelief()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
dstThe destination drawing port.
bboxThe bounding box of the item.
clipThe clipping area.
See also
setItemRelief().

◆ drawSelection()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
dstThe destination drawing port.
bboxThe bounding box of the item.
clipThe clipping area.
See also
setItemSelected(), IlvAbstractMatrixItem::handleSelectionDrawing().

◆ editItem()

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
colThe index of the column containing the item to be edited.
rowThe index of the row containing the item to be edited.
See also
setEditedItem(), validate().

◆ endEdit()

void IlvMatrix::endEdit ( IlvGadgetItem item)
protectedvirtual

Is called after an item has been edited.

The default implementation calls the End Edit callback.

Parameters
itemThe edited gadget item.
See also
startEdit(), abortEdit(), EndEditItemCallbackType().

Reimplemented from IlvGadgetItemHolder.

◆ extendSelection()

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
colThe column index of the cell to select.
rowThe row index of the cell to select.
See also
setSelectionAnchor(), changeSelectionTo().

◆ fitHeightToSize()

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
rowThe starting row.
See also
fitToSize(), fitWidthToSize().

Reimplemented in IlvHierarchicalSheet.

◆ fitToSize()

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().

◆ fitWidthToSize()

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
colThe starting column.
See also
fitToSize(), fitHeightToSize().

◆ getCardinal()

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().

◆ getColumnFittingSize()

IlvDim IlvMatrix::getColumnFittingSize ( IlUShort  col) const

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

Parameters
colThe column index.
Returns
The width of the largest item in the column specified by col.
See also
getRowFittingSize().

◆ getColumnPosition()

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
colThe column index.
See also
getRowPosition(), getColumnWidth().

Reimplemented from IlvAbstractMatrix.

◆ getColumnsDistance()

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
fromcolThe starting column.
tocolThe ending column.
Returns
The distance in pixels between the columns fromcol and tocol.
See also
getRowsDistance(), getRowHeight().

Reimplemented from IlvAbstractMatrix.

◆ getColumnWidth()

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
colnoThe column index.
Returns
The width of the column of index colno.
See also
getRowHeight(), columnSameWidth().

Implements IlvAbstractMatrix.

◆ getEditDirection()

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().

◆ getEditedItem()

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().

◆ getEditorField()

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().

◆ getExtendedSelectionOrientation()

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().

◆ getFirstSelected()

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().

◆ getFocusItem()

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

◆ getGridPalette()

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.

◆ getInsensitivePalette()

virtual const 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.

◆ getItem() [1/2]

IlvAbstractMatrixItem* IlvMatrix::getItem ( IlUShort  col,
IlUShort  row 
) const

Returns the item located in the specified cell.

Parameters
colThe column index.
rowThe 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().

◆ getItem() [2/2]

IlvAbstractMatrixItem* IlvMatrix::getItem ( IlvDim  pos) const

Returns the matrix item located at the specified position.

Parameters
posThe 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().

◆ getItemAlignment()

IlvPosition IlvMatrix::getItemAlignment ( IlUShort  col,
IlUShort  row 
) const

Returns the alignment of an item of the matrix.

Parameters
colThe index of the column containing the item.
rowThe 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().

◆ getItemData()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
See also
setItemData().

◆ getLabelOrientation()

virtual void IlvMatrix::getLabelOrientation ( IlvOrientation &  orientation,
IlBoolean flip 
) const
virtual

Returns the default orientation of the matrix items labels.

Parameters
orientationThe orientation of the labels.
flipSpecifies whether the labels are drawn from top to bottom (IlTrue), or from bottom to top (IlFalse).
See also
setLabelOrientation().

Reimplemented from IlvGadgetItemHolder.

◆ getLabelPosition()

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.

◆ getLastSelectedItem()

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
colThe returned column of the last selected item.
rowThe returned row of the last selected item.
See also
setItemSelected().

◆ getNormalTextPalette()

virtual const 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.

◆ getOpaquePalette()

virtual const 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.

◆ getRowFittingSize()

IlvDim IlvMatrix::getRowFittingSize ( IlUShort  row) const

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

Parameters
rowThe row index.
Returns
The height of the largest item in the row specified by row.
See also
getColumnFittingSize().

◆ getRowHeight()

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
rownoThe row index.
Returns
The height of the row of index rowno.
See also
getColumnWidth(), rowSameHeight().

Implements IlvAbstractMatrix.

◆ getRowPosition()

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
rowThe row index.
See also
getColumnPosition(), getRowHeight().

Reimplemented from IlvAbstractMatrix.

◆ getRowsDistance()

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
fromrowThe starting row.
torowThe ending row.
Returns
The distance in pixels between the rows fromrow and torow.
See also
getColumnsDistance(), getColumnWidth().

Reimplemented from IlvAbstractMatrix.

◆ getSelectionPalette()

virtual const 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.

◆ getSelectionTextPalette()

virtual const 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.

◆ getSpacing()

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().

◆ getTextField()

IlvTextField* IlvMatrix::getTextField ( ) const

Returns a pointer to the editing text field.

This method is obsolete. Use getEditorField().

See also
getEditorField().

◆ getXgrid()

IlvDim IlvMatrix::getXgrid ( ) const

Returns the default column width.

Returns
The default column width.
See also
setXgrid(), getYgrid().

◆ getYgrid()

IlvDim IlvMatrix::getYgrid ( ) const

Returns the default row height.

Returns
The default row height.
See also
setYgrid(), getXgrid().

◆ handleMatrixEvent()

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
eventThe event.
Returns
IlTrue if the matrix used the event, or IlFalse otherwise.
See also
IlvGadget::handleEvent, IlvScrolledGadget::handleScrollBarsEvent.

Reimplemented from IlvAbstractMatrix.

Reimplemented in IlvSheet, IlvHierarchicalSheet, and IlvFileChooserSheet.

◆ hasToolTips()

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.

◆ hideEditorField()

void IlvMatrix::hideEditorField ( )

Hides and destroys the matrix item editing field.

See also
showEditorField().

◆ hideTextField()

void IlvMatrix::hideTextField ( )

Hides and destroys the editing text field.

This method is obsolete. Use hideEditor().

See also
hideEditor().

◆ insertColumn()

virtual void IlvMatrix::insertColumn ( IlUShort  col = 0,
IlUShort  count = 1 
)
virtual

Inserts columns in the matrix.

Parameters
colThe 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.
countThe number of columns to be inserted.
See also
removeColumn(), insertRow(), reinitialize().

Reimplemented in IlvFileChooserSheet.

◆ insertRow()

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

Inserts rows in the matrix.

Parameters
rowThe 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.
countThe number of rows to be inserted.
See also
removeRow(), insertColumn(), reinitialize().

Reimplemented in IlvFileChooserSheet.

◆ internalBBox()

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
bboxThe returned internal bounding box.
tThe transformer applied to the gadget.
See also
visibleBBox(), scrollBarBBox().

Reimplemented from IlvScrolledGadget.

◆ isAdjustingLast()

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().

◆ isAutoColumnSelect()

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().

◆ isAutoFittingToSize()

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().

◆ isAutoLineSelect()

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().

◆ isBrowseMode()

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().

◆ isDirectEditionMode()

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.

◆ isEditAllowed()

IlBoolean IlvMatrix::isEditAllowed ( ) const

Indicates whether editing is allowed.

Returns
IlTrue if editing is allowed, and IlFalse otherwise.
See also
allowEdit(), editItem().

◆ isExclusive()

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().

◆ isItemFillingBackground()

IlBoolean IlvMatrix::isItemFillingBackground ( IlUShort  col,
IlUShort  row 
) const

Returns IlTrue if the specified item is filled.

Applies only to filled matrix items.

Parameters
colThe index of the column containing the item.
rowThe 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().

◆ isItemGrayed()

IlBoolean IlvMatrix::isItemGrayed ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the specified item is grayed.

Parameters
colThe index of the column containing the item.
rowThe 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().

◆ isItemReadOnly()

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
colThe index of the column containing the item.
rowThe 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().

◆ isItemRelief()

IlBoolean IlvMatrix::isItemRelief ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the specified matrix item appears in relief.

Parameters
colThe index of the column containing the item.
rowThe 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().

◆ isItemSelected()

IlBoolean IlvMatrix::isItemSelected ( IlUShort  col,
IlUShort  row 
) const

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

Parameters
colThe index of the column containing the item.
rowThe index of the row containing the item.
Returns
Indicates whether the item located in the cell specified by col and row is selected (IlTrue) or not (IlFalse).
See also
setItemSelected().

◆ isItemSensitive()

IlBoolean IlvMatrix::isItemSensitive ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the specified item is sensitive.

Parameters
colThe index of the column containing the item.
rowThe 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().

◆ isShowingLabel()

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.

◆ isShowingPicture()

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.

◆ itemActivated()

virtual void IlvMatrix::itemActivated ( IlvGadgetItem item)
protectedvirtual

Is called when an item is activated.

The default implementation calls the Activate callback.

Parameters
itemThe activated gadget item.
See also
IlvGadgetItem::activate().

Reimplemented from IlvGadgetItemHolder.

◆ itemBBox()

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
colThe index of of the column containing the item.
rowThe index of the row containing the item.
bboxThe returned bounding box.
tThe transformer applied to the matrix.

Reimplemented in IlvSheet.

◆ pointToItem()

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
pointThe position where the item is located.
colThe index of the column that contains the item.
rowThe index of the row that contains the item.
tThe transformer applied to the matrix.
See also
IlvAbstractMatrix::pointToPosition().

◆ reDrawItem()

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

Redraws an item of the matrix.

Parameters
colThe index of the column that contains the item to be redrawn.
rowThe index of the row that contains the item to be redrawn.
See also
IlvAbstractMatrix::drawItem(), drawSelection().

◆ reinitialize()

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
colsThe new number of columns.
rowsThe new number of rows.
See also
removeColumn(), removeRow().

Reimplemented in IlvHierarchicalSheet.

◆ remove()

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
colThe index of the column containing the item to be removed.
rowThe index of the row containing the item to be removed.
destroySpecifies 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.

◆ removeColumn()

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

Removes a column from the matrix.

Parameters
colThe index of the column to be removed.
destroySpecifies whether the items that this column contains are deleted.
See also
insertColumn(), removeRow().

Reimplemented in IlvFileChooserSheet.

◆ removeRow()

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

Removes a row from the matrix.

Parameters
rowThe index of the row to be removed.
destroySpecifies whether the items that this row contains are deleted.
See also
insertRow(), removeColumn().

Reimplemented in IlvFileChooserSheet, and IlvHierarchicalSheet.

◆ resizeColumn()

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
colThe column index.
sizeThe new size of the column.
See also
resizeRow(), getColumnWidth().

◆ resizeRow()

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
rowThe row index.
sizeThe new size of the row.
See also
resizeColumn(), getRowHeight().

◆ rows()

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.

◆ rowSameHeight()

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.

◆ sameHeight()

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
valueSpecifies whether all the rows have the same height (IlTrue).
See also
setYgrid(), sameWidth().

◆ 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
valueSpecifies whether all the columns have the same width (IlTrue).
See also
setXgrid(), sameHeight().

◆ scrollBarVisibilityChanged()

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
directionThe direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also
ScrollBarVisibilitySymbol().

Reimplemented from IlvScrolledGadget.

◆ set()

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
colThe index of the column where item is inserted.
rowThe index of the row where item is inserted.
itemThe matrix item to be inserted.
See also
add(), remove(), getCardinal(), getItem().

Reimplemented in IlvFileChooserSheet.

◆ setAutoColumnSelect()

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
valueSpecifies whether the automatic column selection mode should be on (IlTrue) or not (IlFalse).
See also
isAutoColumnSelect(), setAutoLineSelect().

◆ 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
valueSpecifies whether the automatic row selection mode should be on (IlTrue) or not (IlFalse).
See also
isAutoLineSelect(), setAutoColumnSelect().

◆ setBrowseMode()

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
valueSpecifies whether the matrix should be in browse selection mode (IlTrue) or not (IlFalse).
See also
isBrowseMode(), setExclusive().

◆ setColumnSelected()

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
colThe column index.
selectedSpecifies whether the column should be selected (IlTrue) or not (IlFalse).
See also
setRowSelected(), setItemSelected(), IlvAbstractMatrix::invalidateColumn().

Reimplemented in IlvFileChooserSheet.

◆ setDirectEditionMode()

void IlvMatrix::setDirectEditionMode ( IlBoolean  value)

Specifies whether the matrix should be in direct editing mode.

If value is IlFalse, the user 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
valueSpecifies whether the matrix should be in direct editing mode (IlTrue) or not (IlFalse).
See also
isDirectEditionMode().

◆ setEditDirection()

void IlvMatrix::setEditDirection ( IlvDirection  direction)

Sets the editing direction of the matrix.

For more information, see getEditDirection().

Parameters
directionThe new editing direction.
See also
getEditDirection(), validate().

◆ setEditedItem()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
See also
isEditAllowed(), getEditedItem(), editItem().

◆ setExclusive()

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
valueSpecifies whether the selection mode is exclusive (IlTrue) or not (IlFalse).
See also
isExclusive(), setBrowseMode().

◆ setExtendedSelectionOrientation()

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
dirThe new direction. Valid values are IlvHorizontal, IlvVertical, or IlvBadPosition.
See also
getExtendedSelectionOrientation().

◆ setFocus()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
See also
getFocusItem().

◆ setGridPalette()

void IlvMatrix::setGridPalette ( IlvPalette palette)

Sets the palette used to draw the matrix grid.

Parameters
paletteThe palette to use.
See also
getGridPalette(), showGrid()

◆ setItemAlignment()

void IlvMatrix::setItemAlignment ( IlUShort  col,
IlUShort  row,
IlvPosition  alignment 
)

Sets the alignment of a matrix item.

Parameters
colThe index of the column containing the item.
rowThe index of the row containing the item.
alignmentThe new item alignment. Valid values are: IlvLeft, IlvCenter, and IlvRight.
See also
getItemAlignment().

◆ setItemCallback()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
callbackThe item callback.
dataThe data of the item callback.
See also
getItemCallback(), IlvMatrixItemCallback().

◆ setItemData()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
dataThe new item data.
See also
getItemData(), setItemCallback().

◆ setItemFillingBackground()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
valueSpecifies whether the item should be filled with a background color (IlTrue) or not (IlFalse).
See also
IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvFilledLabelMatrixItem, isItemFillingBackground().

◆ setItemGrayed()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
valueSpecifies whether the specified item should be grayed (IlTrue) or not.
See also
isItemGrayed(), setItemSensitive().

◆ setItemReadOnly()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
valueSpecifies whether the item should be read-only (IlTrue) or not (IlFalse).
See also
isItemReadOnly().

◆ setItemRelief()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
valueSpecifies whether the item should be in relief (IlTrue) or not (IlFalse).
See also
isItemRelief(), drawRelief().

◆ setItemSelected()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
selectedSpecifies 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.

◆ setItemSensitive()

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
colThe index of the column containing the item.
rowThe index of the row containing the item.
valueSpecifies whether the item located in the cell specified by col and row should be sensitive (IlTrue) or not (IlFalse).
See also
isItemSensitive(), setItemGrayed().

◆ setLabelOrientation()

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
orientationThe orientation of the labels. Valid values are: IlvHorizontal and IlvVertical.
flipSpecifies whether the labels are drawn from top to bottom, or bottom to top.
redrawSpecifies whether the gadget should be redrawn.
See also
getLabelOrientation(), IlvGadgetItemMatrixItem.

◆ setLabelPosition()

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
positionThe position of the labels of matrix items of the class IlvGadgetItemMatrixItem, relative to their picture.
redrawSpecifies whether the gadget should be redrawn.
See also
getLabelPosition(), IlvGadgetItem::setLabelPosition().

◆ setRowSelected()

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
rowThe row index.
selectedSpecifies whether the row should be selected (IlTrue) or not (IlFalse).
See also
setColumnSelected(), setItemSelected(), IlvAbstractMatrix::invalidateRow().

Reimplemented in IlvFileChooserSheet.

◆ setSelectionAnchor()

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
colThe column index of the cell to select.
rowThe row index of the cell to select.
See also
changeSelectionTo(), extendSelection().

◆ setSpacing()

void IlvMatrix::setSpacing ( IlUShort  spacing)

Sets the spacing between two cells of the matrix.

Parameters
spacingThe spacing between two cells of the matrix.
See also
getSpacing().

◆ setXgrid()

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
xThe new default column width.
See also
setYgrid(), sameWidth().

◆ setYgrid()

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
yThe new default row height.
See also
setXgrid(), sameHeight().

◆ showEditorField()

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.

◆ showLabel()

void IlvMatrix::showLabel ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Shows or hides the matrix item labels.

Parameters
valueSpecifies whether the matrix should show the the labels of the matrix items of the type IlvGadgetItemMatrixItem (IlTrue) or not (IlFalse).
redrawSpecifies whether the gadget should be redrawn.
See also
isShowingLabel(), IlvGadgetItemMatrixItem, IlvGadgetItem::showLabel().

◆ showPicture()

void IlvMatrix::showPicture ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Shows or hides the matrix items picture.

Parameters
valueSpecifies whether the matrix should show the pictures of the matrix items of the type IlvGadgetItemMatrixItem (IlTrue) or not (IlFalse).
redrawSpecifies whether the gadget should be redrawn.
See also
isShowingPicture(), IlvGadgetItemMatrixItem, IlvGadgetItem::showPicture().

◆ showTextField()

void IlvMatrix::showTextField ( )

Displays the editing text field.

This method is obsolete. Use showEditor().

See also
showEditor().

◆ useToolTips()

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
valueSpecifies whether the matrix should display internal tooltips (IlTrue) or not (IlFalse).
See also
hasToolTips(), IlvToolTip.

◆ validate()

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()