Gadget class. More...
#include <ilviews/gadgets/matrix.h>
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 IlvGadgetItem * | applyToItems (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 IlvTextField * | createEditionField (IlUShort col, IlUShort row) |
Returns a new text field for editing an item. More... | |
virtual IlvMatrixItemEditor * | createEditor (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... | |
IlvTextField * | getEditedItem (IlUShort &col, IlUShort &row) const |
Returns the location of the item being edited. More... | |
IlvGraphic * | getEditorField () 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... | |
IlvGadgetMatrixItem * | getFocusItem () const |
Returns the gadget matrix item that has the focus. More... | |
IlvPalette * | getGridPalette () const |
Returns the palette used to draw the matrix grid. More... | |
virtual const IlvPalette * | getInsensitivePalette () const |
Returns the palette used to draw an item that is not sensitive. More... | |
IlvAbstractMatrixItem * | getItem (IlUShort col, IlUShort row) const |
Returns the item located in the specified cell. More... | |
IlvAbstractMatrixItem * | getItem (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 IlvPalette * | getNormalTextPalette () const |
Returns the default palette used to draw an item. More... | |
virtual const IlvPalette * | getOpaquePalette () 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 IlvPalette * | getSelectionPalette () const |
Returns the selection palette used to draw selected items. More... | |
virtual const IlvPalette * | getSelectionTextPalette () 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... | |
IlvTextField * | getTextField () 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 IlvAbstractMatrixItem * | pointToItem (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... | |
IlvScrollBar * | getHorizontalScrollBar () 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... | |
IlvScrollBar * | getScrollBar (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... | |
IlvScrollBar * | getVerticalScrollBar () 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 IlvGadgetItem * | createItem (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... | |
IlvGadgetItem * | getCallbackItem () const |
Returns the item that triggered a callback. More... | |
IlvGadgetItem * | getDragDropTarget () const |
Returns the target item of a drag-and-drop operation. More... | |
IlvGraphic * | getDraggedImage () const |
Returns the graphic object used to draw the ghost image during a drag-and-drop operation. More... | |
IlvGadgetItem * | getDraggedItem () const |
Returns the item that is being dragged during a drag-and-drop operation. More... | |
IlvGadgetItem * | getEditedItem () const |
Returns the item that is being edited. More... | |
virtual const IlvPalette * | getHighlightTextPalette () const |
Returns the highlight palette used to draw the label of highlighted items. More... | |
virtual IlvGadgetItem * | getItemByName (const char *name) const |
Returns the item whose name is specified. More... | |
IlvGadgetItem * | getToolTipItem () 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 IlSymbol * | ActivateMatrixItemCallbackType () |
Returns the callback type of the Activate Item callback. More... | |
Static Public Member Functions inherited from IlvScrolledGadget | |
static IlSymbol * | ScrollBarMovedSymbol () |
Returns the callback type for the Scroll Bar Moved callback. More... | |
static IlSymbol * | ScrollBarVisibilitySymbol () |
Returns the callback type for the Scroll Bar Visibility Changed callback. More... | |
Static Public Member Functions inherited from IlvGadgetItemHolder | |
static IlSymbol * | AbortDragItemCallbackType () |
Returns the callback type of the Abort Drag callback. More... | |
static IlSymbol * | AbortEditItemCallbackType () |
Returns the callback type of the Abort Edit callback. More... | |
static IlSymbol * | ActivateCallbackType () |
Returns the callback type of the Activate callback. More... | |
static IlSymbol * | DragItemCallbackType () |
Returns the callback type of the Drag Item callback. More... | |
static IlSymbol * | EndDragItemCallbackType () |
Returns the callback type of the End Drag callback. More... | |
static IlSymbol * | EndEditItemCallbackType () |
Returns the callback type of the End Edit callback. More... | |
static IlSymbol * | StartDragItemCallbackType () |
Returns the callback type of the Start Drag callback. More... | |
static IlSymbol * | StartEditItemCallbackType () |
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 IlvScrollBar * | createScrollBar (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 |
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:
IlvAbstractMatrixItem
IlvLabelMatrixItem
IlvFilledLabelMatrixItem
IlvBitmapMatrixItem
IlvIntMatrixItem
IlvFilledIntMatrixItem
IlvFloatMatrixItem
IlvFilledFloatMatrixItem
IlvDoubleMatrixItem
IlvFilledDoubleMatrixItem
IlvGraphicMatrixItem
IlvGadgetMatrixItem
IlvGadgetItemMatrixItem
IlvMatrix
class, the first column and the first row are located at the index 0
, unless stated otherwise. IlvAbstractMatrixItem
, IlvSheet
, IlvTable
.[1]: The accessor is equivalent to the foreground color of the grid palette.
getGridPalette()->getForeground()
; setGridPalette(display->getPalette(getGridPalette()->getBackground(), colorValue, getGridPalette()->getPattern(), ...));
Graphic property | CSS property | Type |
---|---|---|
Background color | background-color | Color |
Text color | color | Color |
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.
display | The connection to the display. |
rect | The size and position of the matrix. |
nbcol | The number of columns in the matrix. |
nbrow | The number of rows in the matrix. |
xgrid | The default column width. |
ygrid | The default row height. |
thickness | The thickness of the matrix. |
palette | The palette used to draw the matrix. |
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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
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.
|
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.
item | The matrix item. |
set()
, remove()
, getCardinal()
, getItem()
. 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
.
value | IlTrue if only the last column and row should be resized, and IlFalse otherwise. |
autoFitToSize()
, isAdjustingLast()
, fitToSize()
.
|
virtual |
Indicates whether the matrix allows drag-and-drop operations.
IlTrue
if the matrix allows drag-and-drop operations for matrix items of the type IlvGadgetItemMatrixItem
, and IlFalse
if it does not. Reimplemented from IlvGadgetItemHolder.
void IlvMatrix::allowDragDrop | ( | IlBoolean | value | ) |
Specifies whether the matrix should allow drag-and-drop operations.
value | Specifies whether the matrix should allow drag-and-drop operations for matrix items of the type IlvGadgetItemMatrixItem (IlTrue ) or not (IlFalse ). |
Specifies whether editing should be allowed.
value | Specifies whether editing should be allowed (IlTrue ) or not (IlFalse ). |
isEditAllowed()
. IlBoolean IlvMatrix::allowEditOnDoubleClick | ( | ) | const |
Indicates whether the matrix allows item editing when a double-click event occurs.
IlTrue
if the matrix allows item editing when a double-click event occurs and IlFalse
if it does not. 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.
value | Specifies whether the matrix should allow item editing when a double-click event occurs (IlTrue ) or not (IlFalse ). |
allowEditOnDoubleClick()
, activateMatrixItem()
.
|
virtual |
Applies the specified function to all the items of the holder.
func | The function to be applied. |
arg | The argument that will be passed to the function func. |
IlvApplyGadgetItem
, recomputeAllItems()
, getItemByName()
. Reimplemented from IlvGadgetItemHolder.
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.
value | Specifies whether the automatic fitting to size mode should be set (IlTrue ) or not (IlFalse ). |
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.
col | The column index of the cell to select. |
row | The row index of the cell to select. |
setSelectionAnchor()
, extendSelection()
. Reimplemented in IlvFileChooserSheet.
|
virtual |
Returns the number of columns in the matrix.
Must be redefined in subclasses to return the number of columns in the matrix.
rows()
. Implements IlvAbstractMatrix.
|
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.
IlTrue
if all the columns in the matrix have the same width or IlFalse
otherwise. rowSameHeight()
. Implements IlvAbstractMatrix.
|
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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
editItem()
.
|
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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
editItem()
.
|
virtual |
Deselects all the items in the matrix.
The matrix is not redrawn.
setItemSelected()
. Reimplemented in IlvFileChooserSheet.
|
virtual |
Is called by the interactor when the selection changes in the matrix.
The default implementation invokes the main callback of the matrix.
setItemSelected()
.
|
virtual |
Draws the gadget background.
Is called from the draw()
method. This method is not called if the gadget is transparent.
dst | The destination drawing port. |
t | The transformer applied to the gadget. |
clip | The clipping area. |
Reimplemented from IlvScrolledGadget.
|
virtual |
Draws the gadget frame.
Is called from the draw()
method. This method is not called if the method isShowingFrame()
returns IlFalse
.
dst | The destination drawing port. |
t | The transformer applied to the gadget. |
clip | The clipping area. |
drawBackground()
, drawScrollBar()
, drawGadgetContents()
. Reimplemented from IlvScrolledGadget.
Reimplemented in IlvSheet.
|
virtual |
Draws the gadget contents.
Is called from the draw()
method. The default implementation does nothing.
dst | The destination drawing port. |
t | The transformer applied to the gadget. |
clip | The clipping area. |
drawBackground()
, drawScrollBar()
, drawFrame()
. Reimplemented from IlvAbstractMatrix.
Reimplemented in IlvSheet.
|
virtual |
Is called by the matrix to draw an item.
This method does nothing and should be redefined in subclasses to draw items.
dst | The destination drawing port. |
colno | The column of the item to be drawn. If the item extends over several columns, colno specifies the left location of the item. |
rowno | The row of the item to be drawn. If the item extends over several rows, rowno specifies the top location of the item. |
itembbox | The rectangle inside which the item should be drawn. If the item extends over several cells, itembbox is the bounding box of the cells contained by the item. |
clip | The clipping area. |
Reimplemented from IlvAbstractMatrix.
Reimplemented in IlvSheet.
|
virtual |
Is called to draw an item in relief.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
dst | The destination drawing port. |
bbox | The bounding box of the item. |
clip | The clipping area. |
setItemRelief()
.
|
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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
dst | The destination drawing port. |
bbox | The bounding box of the item. |
clip | The clipping area. |
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.
col | The index of the column containing the item to be edited. |
row | The index of the row containing the item to be edited. |
setEditedItem()
, validate()
.
|
protectedvirtual |
Is called after an item has been edited.
The default implementation calls the End Edit callback.
item | The edited gadget item. |
startEdit()
, abortEdit()
, EndEditItemCallbackType()
. Reimplemented from IlvGadgetItemHolder.
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.
col | The column index of the cell to select. |
row | The row index of the cell to select. |
setSelectionAnchor()
, changeSelectionTo()
.
|
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.
row | The starting row. |
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.
autoFitToSize()
, fitWidthToSize()
, fitHeightToSize()
.
|
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.
col | The starting column. |
fitToSize()
, fitHeightToSize()
. IlvDim IlvMatrix::getCardinal | ( | ) | const |
Returns the number of cells in the matrix.
insertRow()
, insertColumn()
, removeRow()
, removeColumn()
, set()
. Returns the width of the largest item in the specified column.
col | The column index. |
getRowFittingSize()
. Returns the position of a column.
0
, it returns 0
. col | The column index. |
getRowPosition()
, getColumnWidth()
. Reimplemented from IlvAbstractMatrix.
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.
fromcol | The starting column. |
tocol | The ending column. |
getRowsDistance()
, getRowHeight()
. Reimplemented from IlvAbstractMatrix.
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.
colno | The column index. |
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.
IlvBadPosition
. In this case, the selection does not move when an item is validated. 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.
0
. setEditedItem()
, editItem()
, isEditAllowed()
. IlvGraphic* IlvMatrix::getEditorField | ( | ) | const |
Returns a pointer to the editing field.
0
is returned. showEditorField()
, hideEditorField()
, editItem()
. IlvOrientation IlvMatrix::getExtendedSelectionOrientation | ( | ) | const |
Returns the direction to which the selection will be extended.
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). setExtendedSelectionOrientation()
. 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.
IlFalse
if there is no selected item in the matrix and IlTrue
otherwise. setItemSelected()
. IlvGadgetMatrixItem* IlvMatrix::getFocusItem | ( | ) | const |
Returns the gadget matrix item that has the focus.
0
if no item has the focus. setFocus(IlUShort, IlUShort)
.
|
virtual |
Returns the palette used to draw the matrix grid.
You must override this member function to modify the way the grid is drawn.
showGrid()
. Reimplemented from IlvAbstractMatrix.
|
virtual |
Returns the palette used to draw an item that is not sensitive.
Implements IlvGadgetItemHolder.
IlvAbstractMatrixItem* IlvMatrix::getItem | ( | IlUShort | col, |
IlUShort | row | ||
) | const |
IlvAbstractMatrixItem* IlvMatrix::getItem | ( | IlvDim | pos | ) | const |
Returns the matrix item located at the specified position.
pos | The position of the item in the matrix. Matrix items are numbered from left to right, and from top to bottom. |
Returns the alignment of an item of the matrix.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
setItemAlignment()
. Returns the client data of the specified matrix item.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
setItemData()
.
|
virtual |
Returns the default orientation of the matrix items labels.
orientation | The orientation of the labels. |
flip | Specifies whether the labels are drawn from top to bottom (IlTrue ), or from bottom to top (IlFalse ). |
setLabelOrientation()
. Reimplemented from IlvGadgetItemHolder.
|
virtual |
Returns the default position of the matrix item labels.
IlvGadgetItemMatrixItem
, relative to their picture. IlvGadgetItemMatrixItem
, setLabelPosition()
. Reimplemented from IlvGadgetItemHolder.
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
.
col | The returned column of the last selected item. |
row | The returned row of the last selected item. |
setItemSelected()
.
|
virtual |
Returns the default palette used to draw an item.
Implements IlvGadgetItemHolder.
|
virtual |
Returns the opaque palette used to draw opaque items.
Reimplemented from IlvGadgetItemHolder.
Returns the height of the largest item in the specified row.
row | The row index. |
getColumnFittingSize()
. 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.
rowno | The row index. |
getColumnWidth()
, rowSameHeight()
. Implements IlvAbstractMatrix.
Returns the position of a row.
0
, it returns 0
. row | The row index. |
getColumnPosition()
, getRowHeight()
. Reimplemented from IlvAbstractMatrix.
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.
fromrow | The starting row. |
torow | The ending row. |
getColumnsDistance()
, getColumnWidth()
. Reimplemented from IlvAbstractMatrix.
|
virtual |
Returns the selection palette used to draw selected items.
Implements IlvGadgetItemHolder.
|
virtual |
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.
setSpacing()
. IlvTextField* IlvMatrix::getTextField | ( | ) | const |
Returns a pointer to the editing text field.
This method is obsolete. Use getEditorField()
.
getEditorField()
. IlvDim IlvMatrix::getXgrid | ( | ) | const |
IlvDim IlvMatrix::getYgrid | ( | ) | const |
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.
event | The event. |
IlTrue
if the matrix used the event, or IlFalse
otherwise. Reimplemented from IlvAbstractMatrix.
Reimplemented in IlvSheet, IlvHierarchicalSheet, and IlvFileChooserSheet.
|
virtual |
Indicates whether the matrix handles internal tooltips.
IlTrue
if the matrix handles internal tooltips, and IlFalse
if it does not. useToolTips()
, IlvToolTip
. Reimplemented from IlvGadgetItemHolder.
void IlvMatrix::hideEditorField | ( | ) |
Hides and destroys the matrix item editing field.
showEditorField()
. void IlvMatrix::hideTextField | ( | ) |
Hides and destroys the editing text field.
This method is obsolete. Use hideEditor()
.
hideEditor()
. Inserts columns in the matrix.
col | The column before which the new columns will be added. If col is greater than the number of columns in the matrix, the new columns are added at the end of the matrix. |
count | The number of columns to be inserted. |
removeColumn()
, insertRow()
, reinitialize()
. Reimplemented in IlvFileChooserSheet.
Inserts rows in the matrix.
row | The row before which the new rows will be added. If row is greater that the number of rows in the matrix, the new rows are added at the end of the matrix. |
count | The number of rows to be inserted. |
removeRow()
, insertColumn()
, reinitialize()
. Reimplemented in IlvFileChooserSheet.
|
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.
bbox | The returned internal bounding box. |
t | The transformer applied to the gadget. |
visibleBBox()
, scrollBarBBox()
. Reimplemented from IlvScrolledGadget.
IlBoolean IlvMatrix::isAdjustingLast | ( | ) | const |
Indicates whether only the last column and row are resized.
IlTrue
if only the last column and row are resized when the matrix is resized and IlFalse
(the default) otherwise. autoFitToSize()
, adjustLast()
, fitToSize()
. IlBoolean IlvMatrix::isAutoColumnSelect | ( | ) | const |
Indicates whether the automatic column selection mode is on.
IlTrue
if the automatic column selection mode is on and IlFalse
otherwise. setAutoColumnSelect()
, isAutoLineSelect()
. IlBoolean IlvMatrix::isAutoFittingToSize | ( | ) | const |
Indicates whether the automatic fitting to size mode is on.
IlTrue
if the automatic fitting to size mode is on, and IlFalse
(the default) otherwise. autoFitToSize()
, fitToSize()
. IlBoolean IlvMatrix::isAutoLineSelect | ( | ) | const |
Indicates whether the automatic row selection mode is on.
IlTrue
if the automatic row selection mode is on and IlFalse
otherwise. setAutoLineSelect()
, isAutoColumnSelect()
. IlBoolean IlvMatrix::isBrowseMode | ( | ) | const |
Indicates whether the matrix is in browse selection mode.
IlTrue
if the matrix is in browse selection mode. setBrowseMode()
, isExclusive()
. IlBoolean IlvMatrix::isDirectEditionMode | ( | ) | const |
Indicates whether the matrix is in direct editing mode.
IlTrue
if the matrix is in direct editing mode and IlFalse
otherwise. IlBoolean IlvMatrix::isEditAllowed | ( | ) | const |
Indicates whether editing is allowed.
IlTrue
if editing is allowed, and IlFalse
otherwise. 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.
IlTrue
if only one item can be selected at a time, and IlFalse
otherwise. setExclusive()
, isBrowseMode()
. Returns IlTrue
if the specified item is filled.
Applies only to filled matrix items.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
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. Indicates whether the specified item is grayed.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
IlTrue
if the item located in the cell specified by col and row is grayed. setItemGrayed()
, isItemSensitive()
. Indicates whether the specified matrix item is read-only.
Read-only items can be selected, but cannot be edited.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
IlTrue
if the matrix item located in the cell specified by col and row is read-only, and IlFalse
otherwise. setItemReadOnly()
. Indicates whether the specified matrix item appears in relief.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
IlTrue
if the matrix item located in the cell specified by col and row appears in relief and IlFalse
otherwise. setItemRelief()
, drawRelief()
. Indicates whether the item located in the specified cell is selected.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
IlTrue
) or not (IlFalse
). setItemSelected()
. Indicates whether the specified item is sensitive.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
IlTrue
if the item located in the cell specified by col and row is sensitive and IlFalse
otherwise. setItemSensitive()
, isItemGrayed()
.
|
virtual |
Indicates whether the matrix item labels are displayed.
IlTrue
if the labels of the matrix items of the type IlvGadgetItemMatrixItem
are displayed and IlFalse
otherwise. IlvGadgetItemMatrixItem
, showLabel()
. Reimplemented from IlvGadgetItemHolder.
|
virtual |
Indicates whether the matrix item pictures are displayed.
IlTrue
if the pictures of the matrix items of the type IlvGadgetItemMatrixItem
are displayed and IlFalse
otherwise. IlvGadgetItemMatrixItem
, showPicture()
. Reimplemented from IlvGadgetItemHolder.
|
protectedvirtual |
Is called when an item is activated.
The default implementation calls the Activate callback.
item | The activated gadget item. |
IlvGadgetItem::activate()
. Reimplemented from IlvGadgetItemHolder.
|
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.
col | The index of of the column containing the item. |
row | The index of the row containing the item. |
bbox | The returned bounding box. |
t | The transformer applied to the matrix. |
Reimplemented in IlvSheet.
|
virtual |
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.
point | The position where the item is located. |
col | The index of the column that contains the item. |
row | The index of the row that contains the item. |
t | The transformer applied to the matrix. |
IlvAbstractMatrix::pointToPosition()
. Redraws an item of the matrix.
col | The index of the column that contains the item to be redrawn. |
row | The index of the row that contains the item to be redrawn. |
IlvAbstractMatrix::drawItem()
, drawSelection()
. Resets the matrix dimensions.
The items that are in the removed columns and rows are destroyed.
cols | The new number of columns. |
rows | The new number of rows. |
removeColumn()
, removeRow()
. Reimplemented in IlvHierarchicalSheet.
|
virtual |
Removes an item from the matrix.
Removes the item located in the matrix cell specified by col and row.
col | The index of the column containing the item to be removed. |
row | The index of the row containing the item to be removed. |
destroy | Specifies whether the removed item should be deleted. |
IlTrue
if the operation was successful, and IlFalse
if there is no item at the specified location. add()
, set()
, getCardinal()
, getItem()
. Reimplemented in IlvFileChooserSheet.
Removes a column from the matrix.
col | The index of the column to be removed. |
destroy | Specifies whether the items that this column contains are deleted. |
insertColumn()
, removeRow()
. Reimplemented in IlvFileChooserSheet.
Removes a row from the matrix.
row | The index of the row to be removed. |
destroy | Specifies whether the items that this row contains are deleted. |
insertRow()
, removeColumn()
. Reimplemented in IlvFileChooserSheet, and IlvHierarchicalSheet.
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.
col | The column index. |
size | The new size of the column. |
resizeRow()
, getColumnWidth()
. 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.
row | The row index. |
size | The new size of the row. |
resizeColumn()
, getRowHeight()
.
|
virtual |
Returns the number of rows in the matrix.
Must be redefined in subclasses to return the number of rows in the matrix.
columns()
. Implements IlvAbstractMatrix.
|
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.
IlTrue
if all the rows in the matrix have the same height or IlFalse
otherwise. 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()
.
value | Specifies whether all the rows have the same height (IlTrue ). |
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()
.
value | Specifies whether all the columns have the same width (IlTrue ). |
setXgrid()
, sameHeight()
.
|
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.
direction | The direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical . |
ScrollBarVisibilitySymbol()
. Reimplemented from IlvScrolledGadget.
|
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.
col | The index of the column where item is inserted. |
row | The index of the row where item is inserted. |
item | The matrix item to be inserted. |
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.
value | Specifies whether the automatic column selection mode should be on (IlTrue ) or not (IlFalse ). |
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.
value | Specifies whether the automatic row selection mode should be on (IlTrue ) or not (IlFalse ). |
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.
value | Specifies whether the matrix should be in browse selection mode (IlTrue ) or not (IlFalse ). |
isBrowseMode()
, setExclusive()
. Selects or deselects an entire column.
Sets the selection state of col to selected. The column is not redrawn.
col | The column index. |
selected | Specifies whether the column should be selected (IlTrue ) or not (IlFalse ). |
Reimplemented in IlvFileChooserSheet.
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.
value | Specifies whether the matrix should be in direct editing mode (IlTrue ) or not (IlFalse ). |
isDirectEditionMode()
. void IlvMatrix::setEditDirection | ( | IlvDirection | direction | ) |
Sets the editing direction of the matrix.
For more information, see getEditDirection()
.
direction | The new editing direction. |
getEditDirection()
, validate()
. 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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
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.
value | Specifies whether the selection mode is exclusive (IlTrue ) or not (IlFalse ). |
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.
dir | The new direction. Valid values are IlvHorizontal , IlvVertical , or IlvBadPosition . |
getExtendedSelectionOrientation()
. 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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
getFocusItem()
. void IlvMatrix::setGridPalette | ( | IlvPalette * | palette | ) |
Sets the palette used to draw the matrix grid.
palette | The palette to use. |
getGridPalette()
, showGrid()
Sets the alignment of a matrix item.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
alignment | The new item alignment. Valid values are: IlvLeft , IlvCenter , and IlvRight . |
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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
callback | The item callback. |
data | The data of the item callback. |
getItemCallback()
, IlvMatrixItemCallback()
. 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()
.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
data | The new item data. |
getItemData()
, setItemCallback()
. Specifies whether the specified item should be filled with a background color.
Applies only to filled matrix items.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
value | Specifies whether the item should be filled with a background color (IlTrue ) or not (IlFalse ). |
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
.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
value | Specifies whether the specified item should be grayed (IlTrue ) or not. |
isItemGrayed()
, setItemSensitive()
. 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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
value | Specifies whether the item should be read-only (IlTrue ) or not (IlFalse ). |
isItemReadOnly()
. 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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
value | Specifies whether the item should be in relief (IlTrue ) or not (IlFalse ). |
isItemRelief()
, drawRelief()
.
|
virtual |
Specifies whether the item located in the specified cell should be selected.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
selected | Specifies whether the item located in the cell specified by col and row should be selected (IlTrue ) or not (IlFalse ). |
isItemSelected()
, setRowSelected()
, setColumnSelected()
. Reimplemented in IlvFileChooserSheet.
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.
col | The index of the column containing the item. |
row | The index of the row containing the item. |
value | Specifies whether the item located in the cell specified by col and row should be sensitive (IlTrue ) or not (IlFalse ). |
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
.
orientation | The orientation of the labels. Valid values are: IlvHorizontal and IlvVertical . |
flip | Specifies whether the labels are drawn from top to bottom, or bottom to top. |
redraw | Specifies whether the gadget should be redrawn. |
getLabelOrientation()
, IlvGadgetItemMatrixItem
. 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()
.
position | The position of the labels of matrix items of the class IlvGadgetItemMatrixItem , relative to their picture. |
redraw | Specifies whether the gadget should be redrawn. |
Selects or deselects an entire row.
Sets the selection state of row to selected. The row is not redrawn.
row | The row index. |
selected | Specifies whether the row should be selected (IlTrue ) or not (IlFalse ). |
Reimplemented in IlvFileChooserSheet.
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.
col | The column index of the cell to select. |
row | The row index of the cell to select. |
changeSelectionTo()
, extendSelection()
. void IlvMatrix::setSpacing | ( | IlUShort | spacing | ) |
Sets the spacing between two cells of the matrix.
spacing | The spacing between two cells of the matrix. |
getSpacing()
.
|
virtual |
Sets the default column width.
Sets the column width to x, if all the columns have the same dimensions.
x | The new default column width. |
setYgrid()
, sameWidth()
.
|
virtual |
Sets the default row height.
Sets the row height to y, if all the rows have the same dimensions.
y | The new default row height. |
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()
.
setEditorFactory()
, IlvMatrixItemEditorFactory
, IlvMatrixItemEditor
. Shows or hides the matrix item labels.
value | Specifies whether the matrix should show the the labels of the matrix items of the type IlvGadgetItemMatrixItem (IlTrue ) or not (IlFalse ). |
redraw | Specifies whether the gadget should be redrawn. |
Shows or hides the matrix items picture.
value | Specifies whether the matrix should show the pictures of the matrix items of the type IlvGadgetItemMatrixItem (IlTrue ) or not (IlFalse ). |
redraw | Specifies whether the gadget should be redrawn. |
void IlvMatrix::showTextField | ( | ) |
Displays the editing text field.
This method is obsolete. Use showEditor()
.
showEditor()
. 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.
value | Specifies whether the matrix should display internal tooltips (IlTrue ) or not (IlFalse ). |
hasToolTips()
, IlvToolTip
.
|
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.
editItem()
, getEditorField()
, getEditedItem()