rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave 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 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 f, IlAny arg)
 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 *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget contents. More...
 
virtual void drawItem (IlvPort *dst, IlUShort colno, IlUShort rowno, const IlvRect &itembbox, const IlvRect &clip) const
 Is called by the matrix to draw an item. 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 rowno) const
 Returns the position of a column. More...
 
IlvDim getColumnsDistance (IlUShort fromcol, IlUShort tocol) const
 Returns the distance between two columns. More...
 
IlvDim getColumnWidth (IlUShort colno) 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 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 IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item. More...
 
virtual 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 rowno) const
 Returns the height of the specified row. More...
 
IlvDim getRowPosition (IlUShort colno) const
 Returns the position of a row. More...
 
IlvDim getRowsDistance (IlUShort fromrow, IlUShort torow) const
 Returns the distance between two rows. More...
 
virtual IlvPalettegetSelectionPalette () const
 Returns the selection palette used to draw selected items. More...
 
virtual 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 &rect, const IlvTransformer *t) 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 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 &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 &vbox, 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 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 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 *item)
 Is called after an item has been edited. More...
 
virtual void itemActivated (IlvGadgetItem *item)
 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:

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

Constructor & Destructor Documentation

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

Constructor.

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

Parameters
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

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
static IlSymbol* IlvMatrix::ActivateMatrixItemCallbackType ( )
static

Returns the callback type of the Activate Item callback.

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

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

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

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

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

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

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

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

void IlvMatrix::allowDragDrop ( IlBoolean  value)

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

Parameters
valueA Boolean value specifying whether the matrix should allow drag-and-drop operations for matrix items of the type IlvGadgetItemMatrixItem (IlTrue) or not (IlFalse).
See Also
allowDragDrop, IlvGadgetItemHolder::startDragItem, IlvGadgetItemMatrixItem
IlBoolean IlvMatrix::allowEdit ( IlBoolean  value)

Specifies whether editing should be allowed.

Parameters
valueA Boolean value specifying whether editing should be allowed (IlTrue) or not (IlFalse).
See Also
isEditAllowed
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)
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
valueA Boolean value specifying whether the matrix should allow item editing when a double-click event occurs (IlTrue) or not (IlFalse).
See Also
allowEditOnDoubleClick, activateMatrixItem
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 IlvApplyGadgetItem for details.
See Also
IlvApplyGadgetItem, recomputeAllItems, getItemByName.

Reimplemented from IlvGadgetItemHolder.

IlBoolean IlvMatrix::autoFitToSize ( IlBoolean  value)

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

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

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

Clears the current selection and selects specified cell.

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

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

Parameters
colThe column index of the cell to select.
rowThe row index of the cell to select.
See Also
setSelectionAnchor, extendSelection

Reimplemented in IlvFileChooserSheet.

IlUShort IlvMatrix::columns ( ) const
virtual

Returns the number of columns in the matrix.

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

Returns
The number of columns of the matrix.
See Also
rows

Implements IlvAbstractMatrix.

IlBoolean IlvMatrix::columnSameWidth ( ) const
virtual

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

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

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

Implements IlvAbstractMatrix.

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

Returns a new text field for editing an item.

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

Parameters
colThe index of the column containing the item.
rowThe index of the row containing the item.
See Also
editItem
virtual IlvMatrixItemEditor* IlvMatrix::createEditor ( IlUShort  col,
IlUShort  row 
)
virtual

Returns a new editor for editing an item.

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

Parameters
colThe index of the column containing the item.
rowThe index of the row containing the item.
See Also
editItem
virtual void IlvMatrix::deSelect ( )
virtual

Deselects all the items in the matrix.

The matrix is not redrawn.

See Also
setItemSelected

Reimplemented in IlvFileChooserSheet.

virtual void IlvMatrix::doIt ( )
virtual

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

The default implementation invokes the main callback of the matrix.

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

Draws the gadget background.

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

Parameters
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See Also
drawFrame, drawScrollBar, drawGadgetContents, IlvGadget::isTransparent

Reimplemented from IlvScrolledGadget.

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

Draws the gadget frame.

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

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

Reimplemented from IlvScrolledGadget.

Reimplemented in IlvSheet.

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

Draws the gadget contents.

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

Parameters
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See Also
drawBackground, drawScrollBar, drawFrame

Reimplemented from IlvAbstractMatrix.

Reimplemented in IlvSheet.

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

Is called by the matrix to draw an item.

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

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

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

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

void IlvMatrix::fitToSize ( )

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

See Also
autoFitToSize, fitWidthToSize, fitHeightToSize
virtual void IlvMatrix::fitWidthToSize ( IlUShort  col = 0)
virtual

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

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

Parameters
colThe starting column.
See Also
fitToSize, fitHeightToSize
IlvDim IlvMatrix::getCardinal ( ) const

Returns the number of cells in the matrix.

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

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

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

Returns the position of a column.

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

Reimplemented from IlvAbstractMatrix.

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

Returns the distance between two columns.

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

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

Reimplemented from IlvAbstractMatrix.

IlvDim IlvMatrix::getColumnWidth ( IlUShort  colno) const
virtual

Returns the width of the specified column.

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

Parameters
colnoThe column index.
Returns
The width of the column of index colno.
See Also
getRowHeight, columnSameWidth

Implements IlvAbstractMatrix.

IlvDirection IlvMatrix::getEditDirection ( ) const

Returns the editing direction of the matrix.

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

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

Returns the location of the item being edited.

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

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

Returns a pointer to the editing field.

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

Returns the direction to which the selection will be extended.

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

Returns the first selected item in the matrix.

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

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

Returns the gadget matrix item that has the focus.

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

Returns the palette used to draw the matrix grid.

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

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

Reimplemented from IlvAbstractMatrix.

virtual IlvPalette* IlvMatrix::getInsensitivePalette ( ) const
virtual

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

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

Implements IlvGadgetItemHolder.

IlvAbstractMatrixItem* IlvMatrix::getItem ( 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
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
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
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
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.
flipA Boolean value specifying whether the labels are drawn from top to bottom (IlTrue), or from bottom to top (IlFalse).
See Also
setLabelOrientation

Reimplemented from IlvGadgetItemHolder.

virtual IlvPosition IlvMatrix::getLabelPosition ( ) const
virtual

Returns the default position of the matrix item labels.

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

Reimplemented from IlvGadgetItemHolder.

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

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

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

Parameters
colThe returned column of the last selected item.
rowThe returned row of the last selected item.
See Also
setItemSelected
virtual IlvPalette* IlvMatrix::getNormalTextPalette ( ) const
virtual

Returns the default palette used to draw an item.

Returns
The default palette used to draw an item.

Implements IlvGadgetItemHolder.

virtual IlvPalette* IlvMatrix::getOpaquePalette ( ) const
virtual

Returns the opaque palette used to draw opaque items.

Returns
The opaque palette used to draw opaque items.

Reimplemented from IlvGadgetItemHolder.

IlvDim IlvMatrix::getRowFittingSize ( IlUShort  row) const

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

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

Returns the height of the specified row.

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

Parameters
rownoThe row index.
Returns
The height of the row of index rowno.
See Also
getColumnWidth, rowSameHeight

Implements IlvAbstractMatrix.

IlvDim IlvMatrix::getRowPosition ( IlUShort  row) const
virtual

Returns the position of a row.

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

Reimplemented from IlvAbstractMatrix.

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

Returns the distance between two rows.

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

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

Reimplemented from IlvAbstractMatrix.

virtual IlvPalette* IlvMatrix::getSelectionPalette ( ) const
virtual

Returns the selection palette used to draw selected items.

Returns
The selection palette used to draw selected items.

Implements IlvGadgetItemHolder.

virtual IlvPalette* IlvMatrix::getSelectionTextPalette ( ) const
virtual

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

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

Implements IlvGadgetItemHolder.

IlUShort IlvMatrix::getSpacing ( ) const

Returns the spacing between two cells of the matrix.

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

Returns a pointer to the editing text field.

This method is obsolete. Use getEditorField.

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

Returns the default column width.

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

Returns the default row height.

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

Handles the events sent to the matrix.

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

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

Reimplemented from IlvAbstractMatrix.

Reimplemented in IlvFileChooserSheet, IlvHierarchicalSheet, and IlvSheet.

IlBoolean IlvMatrix::hasToolTips ( ) const
virtual

Indicates whether the matrix handles internal tooltips.

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

Reimplemented from IlvGadgetItemHolder.

void IlvMatrix::hideEditorField ( )

Hides and destroys the matrix item editing field.

See Also
showEditorField
void IlvMatrix::hideTextField ( )

Hides and destroys the editing text field.

This method is obsolete. Use hideEditor.

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

Inserts columns in the matrix.

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

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.

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.

IlBoolean IlvMatrix::isAdjustingLast ( ) const

Indicates whether only the last column and row are resized.

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

Indicates whether the automatic column selection mode is on.

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

Indicates whether the automatic fitting to size mode is on.

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

Indicates whether the automatic row selection mode is on.

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

Indicates whether the matrix is in browse selection mode.

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

Indicates whether the matrix is in direct editing mode.

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

Indicates whether editing is allowed.

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

Indicates whether the selection mode is set to exclusive.

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

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

Returns IlTrue if the specified item is filled.

Applies only to filled matrix items.

Parameters
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
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
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
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
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
A Boolean value indicating whether the item located in the cell specified by col and row is selected (IlTrue) or not (IlFalse).
See Also
setItemSelected
IlBoolean IlvMatrix::isItemSensitive ( IlUShort  col,
IlUShort  row 
) const

Indicates whether the specified item is sensitive.

Parameters
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
virtual IlBoolean IlvMatrix::isShowingLabel ( ) const
virtual

Indicates whether the matrix item labels are displayed.

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

Reimplemented from IlvGadgetItemHolder.

virtual IlBoolean IlvMatrix::isShowingPicture ( ) const
virtual

Indicates whether the matrix item pictures are displayed.

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

Reimplemented from IlvGadgetItemHolder.

virtual void IlvMatrix::itemActivated ( IlvGadgetItem item)
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.

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.

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

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.
destroyA Boolean value specifying whether the removed item should be deleted.
Returns
IlTrue if the operation was successful, and IlFalse if there is no item at the specified location.
See Also
add, set, getCardinal, getItem

Reimplemented in IlvFileChooserSheet.

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

Removes a column from the matrix.

Parameters
colThe index of the column to be removed.
destroyA Boolean value specifying whether the items that this column contains are deleted.
See Also
insertColumn, removeRow

Reimplemented in IlvFileChooserSheet.

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

Removes a row from the matrix.

Parameters
rowThe index of the row to be removed.
destroyA Boolean value specifying whether the items that this row contains are deleted.
See Also
insertRow, removeColumn

Reimplemented in IlvFileChooserSheet, and IlvHierarchicalSheet.

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

Resizes a given column.

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

Parameters
colThe column index.
sizeThe new size of the column.
See Also
resizeRow, getColumnWidth
virtual void IlvMatrix::resizeRow ( IlUShort  row,
IlvDim  size 
)
virtual

Resizes a given row.

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

Parameters
rowThe row index.
sizeThe new size of the row.
See Also
resizeColumn, getRowHeight
IlUShort IlvMatrix::rows ( ) const
virtual

Returns the number of rows in the matrix.

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

Returns
The number of rows of the matrix.
See Also
columns

Implements IlvAbstractMatrix.

IlBoolean IlvMatrix::rowSameHeight ( ) const
virtual

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

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

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

Implements IlvAbstractMatrix.

void IlvMatrix::sameHeight ( IlBoolean  value)

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

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

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

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

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

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

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

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

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

Reimplemented from IlvScrolledGadget.

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

Adds an item to the matrix at the specified location.

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

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

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
valueA Boolean value specifying whether the automatic column selection mode should be on (IlTrue) or not (IlFalse).
See Also
isAutoColumnSelect, setAutoLineSelect
void IlvMatrix::setAutoLineSelect ( IlBoolean  value)

Specifies whether the automatic row selection mode should be on.

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

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

Specifies whether the matrix should be in browse selection mode.

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

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

Selects or deselects an entire column.

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

Parameters
colThe column index.
selectedA Boolean value specifying whether the column should be selected (IlTrue) or not (IlFalse).
See Also
setRowSelected, setItemSelected, IlvAbstractMatrix::invalidateColumn

Reimplemented in IlvFileChooserSheet.

void IlvMatrix::setDirectEditionMode ( IlBoolean  value)

Specifies whether the matrix should be in direct editing mode.

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

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

Sets the editing direction of the matrix.

For more information, see getEditDirection.

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

Sets the item that is being edited.

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

Parameters
colThe index of the column containing the item.
rowThe index of the row containing the item.
See Also
isEditAllowed, getEditedItem, editItem
void IlvMatrix::setExclusive ( IlBoolean  value)

Specifies whether the selection mode should be exclusive.

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

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

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

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

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

Specifies the gadget matrix item that has the focus.

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

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

Sets the alignment of a matrix item.

Parameters
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
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
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
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.
valueA Boolean value specifying whether the item should be filled with a background color (IlTrue) or not (IlFalse).
See Also
IlvFilledDoubleMatrixItem, IlvFilledFloatMatrixItem, IlvFilledIntMatrixItem, IlvFilledLabelMatrixItem, isItemFillingBackground
void IlvMatrix::setItemGrayed ( IlUShort  col,
IlUShort  row,
IlBoolean  value = IlTrue 
)

Specifies whether the specified item should be grayed.

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

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

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

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

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

Specifies whether the specified matrix item should be in relief.

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

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

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

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

Reimplemented in IlvFileChooserSheet.

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

Sets the specified item to sensitive.

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

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

Sets the orientation of the matrix items labels.

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

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

Sets the default position of the matrix item labels.

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

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

Selects or deselects an entire row.

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

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

Reimplemented in IlvFileChooserSheet.

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

Sets the selection anchor to the specified cell.

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

Parameters
colThe column index of the cell to select.
rowThe row index of the cell to select.
See Also
changeSelectionTo, extendSelection
void IlvMatrix::setSpacing ( IlUShort  spacing)

Sets the spacing between two cells of the matrix.

Parameters
spacingThe spacing between two cells of the matrix.
See Also
getSpacing
virtual void IlvMatrix::setXgrid ( IlvDim  x)
virtual

Sets the default column width.

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

Parameters
xThe new default column width.
See Also
setYgrid, sameWidth
virtual void IlvMatrix::setYgrid ( IlvDim  y)
virtual

Sets the default row height.

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

Parameters
yThe new default row height.
See Also
setXgrid, sameHeight
void IlvMatrix::showEditorField ( )

Displays the matrix item editing field.

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

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

Shows or hides the matrix item labels.

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

Shows or hides the matrix items picture.

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

Displays the editing text field.

This method is obsolete. Use showEditor.

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

Specifies whether the matrix should use internal tooltips.

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

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

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

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

See Also
editItem, getEditorField, getEditedItem

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.