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 | Protected Member Functions
IlvAbstractMatrix Class Referenceabstract

Gadget class. More...

#include <ilviews/gadgets/amatrix.h>

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

Public Member Functions

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 IlUShort columns () const =0
 Returns the number of columns in the matrix. More...
 
virtual IlBoolean columnSameWidth () const =0
 Returns IlTrue if all the columns in the matrix have the same width. 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 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...
 
virtual IlvDim getColumnPosition (IlUShort col) const
 Returns the position of a column. More...
 
virtual IlvDim getColumnsDistance (IlUShort fromcol, IlUShort tocol) const
 Returns the distance between two columns. More...
 
virtual IlvDim getColumnWidth (IlUShort colno) const =0
 Returns the width of the specified column. More...
 
virtual IlvPalettegetGridPalette () const
 Returns the palette used to draw the matrix grid. More...
 
IlUShort getNbFixedColumn () const
 Returns the number of fixed columns. More...
 
IlUShort getNbFixedRow () const
 Returns the number of fixed rows. More...
 
virtual IlvDim getRowHeight (IlUShort rowno) const =0
 Returns the height of the specified row. More...
 
virtual IlvDim getRowPosition (IlUShort row) const
 Returns the position of a row. More...
 
virtual IlvDim getRowsDistance (IlUShort fromrow, IlUShort torow) const
 Returns the distance between two 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 IlBoolean handleMatrixEvent (IlvEvent &event)
 Handles the events sent to the matrix. 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 IlUShort rows () const =0
 Returns the number of rows in the matrix. More...
 
virtual IlBoolean rowSameHeight () const =0
 Returns IlTrue if all the rows in the matrix have the same height. 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 drawBackground (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget background. More...
 
virtual void drawFrame (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget frame. 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...
 
virtual void internalBBox (IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the internal bounding box of the gadget. 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...
 
virtual void scrollBarVisibilityChanged (IlvDirection direction)
 Is called when an internal scroll bar is shown or hidden. 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...
 

Protected Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from IlvScrolledGadget
static IlSymbolScrollBarMovedSymbol ()
 Returns the callback type for the Scroll Bar Moved callback. More...
 
static IlSymbolScrollBarVisibilitySymbol ()
 Returns the callback type for the Scroll Bar Visibility Changed callback. More...
 

Detailed Description

Gadget class.

Library: ilvadvgdt

This gadget class is an abstract class that can draw any object in a rectangular grid. This class is designed to be subclassed. IlvAbstractMatrix does not contain any values. When subclassing the IlvAbstractMatrix class, you must specify the number of rows and columns, the height of each row, the width of each column, whether you want to draw a grid around items, and how items are to be drawn in the grid. The IlvAbstractMatrix class can also draw items that extend over several adjacent cells. Scroll bars can be attached to a matrix. You can also set a number of fixed columns and fixed rows.

See Also
IlvMatrix, IlvSheet, IlvHierarchicalSheet

Constructor & Destructor Documentation

IlvAbstractMatrix::IlvAbstractMatrix ( IlvDisplay display,
const IlvRect rect,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)
protected

Constructor.

This constructor initializes a new empty instance of IlvAbstractMatrix.

Parameters
displayThe connection to the display.
rectThe size of the matrix.
thicknessThe thickness of the matrix.
paletteThe palette used by the matrix.

Member Function Documentation

virtual void IlvAbstractMatrix::adjustFromScrollBar ( const IlvScrollBar scrollbar,
IlvDirection  direction 
)
protectedvirtual

Is called to adjust the gadget to the scroll bars values.

Is called each time the scroll bar scrollbar of direction direction moves. If you want to detect these events, you must redefine this member function in a subclass. The default implementation does nothing.

Parameters
scrollbarThe scroll bar object.
directionThe direction of the scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See Also
adjustScrollBarValue

Reimplemented from IlvScrolledGadget.

virtual void IlvAbstractMatrix::adjustScrollBarValue ( IlvScrollBar scrollbar,
IlvDirection  direction 
)
protectedvirtual

Is called to adjust the scroll bar values.

Is called by the member function IlvScrolledGadget::adjustScrollBars to adjust the values of the scroll bar scrollbar of direction direction. This member function must modify the scrollbar values to match the gadget scrolling mode. If you want to detect these events, you must redefine this member function in a subclass. The default implementation does nothing.

Parameters
scrollbarThe scroll bar object.
directionThe direction of the scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See Also
adjustFromScrollBar

Reimplemented from IlvScrolledGadget.

IlBoolean IlvAbstractMatrix::allowCellMode ( ) const

Indicates whether the matrix can draw items on several continuous cells.

The default value is IlFalse. Subclasses may set this flag differently in their constructors.

Returns
An internal flag _allowCellMode specifying whether the IlvAbstractMatrix can draws items on several continuous rows or columns (IlTrue) or not (IlFalse).
See Also
cellInfo
virtual IlBoolean IlvAbstractMatrix::cellBBox ( IlUShort  colno,
IlUShort  rowno,
IlvRect rect,
const IlvTransformer t = 0 
) const
virtual

Computes the bounding box of a given cell.

Computes in rect the bounding box of the item located at colno and rowno when the matrix is drawn with the transformer t. If the item extends over several cells, the global bounding box of the cell is returned.

Parameters
colnoThe column index.
rownoThe row index.
rectThe cell bounding box.
tThe transformer applied to the matrix.
Returns
IlTrue if the item is visible (even partially) and IlFalse otherwise.
See Also
rowBBox, columnBBox, cellInfo
virtual void IlvAbstractMatrix::cellInfo ( IlUShort  colno,
IlUShort  rowno,
IlUShort startcol,
IlUShort startrow,
IlUShort nbcol,
IlUShort nbrow 
) const
virtual

Returns cell information.

If IlvAbstractMatrix::allowCellMode returns IlTrue, the matrix can draw items on several cells A cell is the intersection of a row and a column. Overloading this member function allows you to draw an item over multiple cells. In this method rowno and colno represent a cell. Given this position, you must return the starting position of the item (top-left position) in startrow and startcol and the number of rows and columns of the item that contains this cell in nbrow and nbcol. For example, if you want to have an item positioned at 10,10 that extends over five rows and five columns, write:

if ((colno >= 10) && (colno < 15) &&
(rowno >= 10) && (rowno < 15)) {
startcol = 10;
startrow = 10;
nbcol = 5;
nbrow = 5;
} else
startcol, startrow,
nbcol, nbrow)
Warning
[note] This feature works only if you have set the internal flag _allowCellMode to IlTrue in your constructor. Furthermore, you should not have overlapping items.
Parameters
colnoThe column index.
rownoThe row index.
startcolThe returned starting column.
startrowThe returned starting row.
nbcolThe returned number of columns.
nbrowThe returned number of rows.
See Also
allowCellMode
virtual IlBoolean IlvAbstractMatrix::columnBBox ( IlUShort  colno,
IlvRect rect,
const IlvTransformer t = 0 
) const
virtual

Computes the bounding box of a given column.

Computes in rect the bounding box of the column specified by colno when the matrix is drawn with the transformer t.

Parameters
colnoThe column index.
rectThe column bounding box.
tThe transformer applied to the matrix.
Returns
IlTrue if the column is visible (even partially) and IlFalse otherwise.
See Also
rowBBox
virtual IlUShort IlvAbstractMatrix::columns ( ) const
pure 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

Implemented in IlvMatrix.

virtual IlBoolean IlvAbstractMatrix::columnSameWidth ( ) const
pure 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

Implemented in IlvMatrix.

virtual IlvScrollBar* IlvAbstractMatrix::createScrollBar ( const IlvRect rect,
IlvDirection  direction,
IlUShort  thickness,
IlvPalette palette 
)
protectedvirtual

Returns a new instance of the IlvScrollBar class.

Is called by the member function IlvScrolledGadget::showScrollBar to create a new scroll bar. If you want to create your own scroll bars, you can override this member function in a subclass.

Parameters
rectThe bounding box of the scroll bar to be created.
directionThe direction of the scroll bar to be created. Valid values are: IlvHorizontal and IlvVertical.
thicknessThe thickness of the scroll bar to create.
paletteThe palette of the scroll bar to create.
See Also
IlvScrollBar

Reimplemented from IlvScrolledGadget.

virtual void IlvAbstractMatrix::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 IlvScrolledGadget.

Reimplemented in IlvMatrix, and IlvSheet.

virtual void IlvAbstractMatrix::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 in IlvMatrix, and IlvSheet.

virtual void IlvAbstractMatrix::ensureVisible ( IlUShort  colno,
IlUShort  rowno,
IlBoolean  redraw = IlTrue 
)
virtual

Scrolls the matrix to make the specified item visible.

Scrolls the matrix so that the item located at the intersection of colno and rowno becomes visible.

Parameters
colnoThe column index.
rownoThe row index.
redrawA Boolean value specifying whether the matrix should be redrawn.
See Also
scrollTo
IlUShort IlvAbstractMatrix::firstColumn ( ) const

Returns the index of the first visible column.

Returns
The index of the first visible column (with respect to scrolling).
See Also
firstRow, scrollTo
IlUShort IlvAbstractMatrix::firstRow ( ) const

Returns the index of the first visible row.

Returns
The index of the first visible row (with respect to scrolling).
See Also
firstColumn, scrollTo
virtual IlvDim IlvAbstractMatrix::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 in IlvMatrix.

virtual IlvDim IlvAbstractMatrix::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 in IlvMatrix.

virtual IlvDim IlvAbstractMatrix::getColumnWidth ( IlUShort  colno) const
pure 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

Implemented in IlvMatrix.

virtual IlvPalette* IlvAbstractMatrix::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 in IlvMatrix.

IlUShort IlvAbstractMatrix::getNbFixedColumn ( ) const

Returns the number of fixed columns.

Fixed columns are continuous columns from 0 to getNbFixedColumn()-1. They are always visible and do not scroll.

Returns
The number of fixed columns.
See Also
setNbFixedColumn
IlUShort IlvAbstractMatrix::getNbFixedRow ( ) const

Returns the number of fixed rows.

Fixed rows are continuous rows from 0 to getNbFixedRow()-1. They are always visible and do not scroll.

Returns
The number of fixed rows.
See Also
setNbFixedRow
virtual IlvDim IlvAbstractMatrix::getRowHeight ( IlUShort  rowno) const
pure 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

Implemented in IlvMatrix.

virtual IlvDim IlvAbstractMatrix::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 in IlvMatrix.

virtual IlvDim IlvAbstractMatrix::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 in IlvMatrix.

virtual void IlvAbstractMatrix::getVisibleItems ( IlUShort fromcol,
IlUShort tocol,
IlUShort fromrow,
IlUShort torow,
const IlvTransformer t = 0 
) const
virtual

Computes the range of the items that are visible in the matrix.

Fills the parameters fromcol with the first visible column, tocol with the last visible column, fromrow with the first visible row and torow with the last visible row. Only the scrollable part of the matrix is concerned with the exclusion of fixed rows and columns.

Parameters
fromcolThe first visible column.
tocolThe last visible column.
fromrowThe first visible row.
torowThe last visible row.
tThe transformer applied to the matrix.
virtual IlBoolean IlvAbstractMatrix::handleGadgetEvent ( IlvEvent event)
virtual

Handles the gadget events.

Is called by IlvScrolledGadget::handleEvent when the member function handleScrollBarsEvent returns IlFalse. Its default implementation does nothing. You can override this member function to implement your own gadget behavior.

Parameters
eventThe event.
See Also
handleScrollBarsEvent

Reimplemented from IlvScrolledGadget.

virtual IlBoolean IlvAbstractMatrix::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 in IlvMatrix, IlvFileChooserSheet, IlvHierarchicalSheet, and IlvSheet.

virtual void IlvAbstractMatrix::invalidateColumn ( IlUShort  colno) const
virtual

Redraws a column.

Parameters
colnoThe index of the column to be redrawn.
See Also
invalidateRow, invalidateRect
virtual void IlvAbstractMatrix::invalidateRect ( const IlvRect rect) const
virtual

Redraws a portion of the matrix.

Parameters
rectThe rectangle to be redrawn.
See Also
invalidateColumn, invalidateRow
virtual void IlvAbstractMatrix::invalidateRow ( IlUShort  rowno) const
virtual

Redraws a row.

Parameters
rownoThe index of the row to be redrawn.
See Also
invalidateColumn, invalidateRect
IlBoolean IlvAbstractMatrix::isShowingGrid ( ) const

Returns IlTrue if the matrix grid is displayed.

Returns
IlTrue if items in the matrix are delimited by a grid and IlFalse otherwise.
See Also
showGrid
virtual IlBoolean IlvAbstractMatrix::pointToPosition ( const IlvPoint point,
IlUShort colno,
IlUShort rowno,
const IlvTransformer t = 0 
) const
virtual

Returns the location of the item located at the specified point.

Puts in colno and rowno the location of the item that is under the point point when the matrix is displayed using the transformer t.

Parameters
pointThe point expressed in the view coordinates.
colnoThe returned column index.
rownoThe returned row index.
tThe transformer applied to the matrix.
Returns
IlTrue if there is an item at this location. Otherwise, it returns IlFalse.
virtual IlBoolean IlvAbstractMatrix::rowBBox ( IlUShort  rowno,
IlvRect rect,
const IlvTransformer t = 0 
) const
virtual

Computes the bounding box of the specified row.

Computes in rect the bounding box of the row specified by rowno when the matrix is drawn with the transformer t.

Parameters
rownoThe row index.
rectThe row bounding box.
tThe transformer applied to the matrix.
Returns
IlTrue if the row is visible (even partially) and IlFalse otherwise.
See Also
columnBBox
virtual IlUShort IlvAbstractMatrix::rows ( ) const
pure 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

Implemented in IlvMatrix.

virtual IlBoolean IlvAbstractMatrix::rowSameHeight ( ) const
pure 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

Implemented in IlvMatrix.

virtual void IlvAbstractMatrix::scrollBarBBox ( IlvDirection  direction,
IlvRect bbox,
const IlvTransformer t = 0 
) const
virtual

Returns the bounding box of the specified internal scroll bar.

Puts in bbox the bounding box of the internal scroll bar specified by direction using the transformer t. If you want to change the internal scroll bars bounding box, you can override this member function in a subclass.

Parameters
directionThe direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
bboxThe returned internal scroll bar bounding box.
tThe transformer applied to the gadget.
See Also
internalBBox, visibleBBox

Reimplemented from IlvScrolledGadget.

virtual void IlvAbstractMatrix::scrollBarHasMoved ( IlvDirection  direction)
virtual

Is called when an internal scroll bar has moved.

Is called by handleEvent each time the value of the internal scroll bar specified by direction changes. The default implementation invokes the Scroll Bar Moved callback.

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

Reimplemented from IlvScrolledGadget.

virtual void IlvAbstractMatrix::scrollTo ( IlUShort  colno,
IlUShort  rowno 
)
virtual

Changes the first visible column and row.

Scrolls the matrix so that the first visible column becomes colno and the first visible row rowno. Calling this method with a row or column that is fixed has no effect. The matrix is redrawn only if it is scrolled.

Parameters
colnoThe new first column.
rownoThe new first row.
See Also
scrollToRow, scrollToColumn, ensureVisible

Reimplemented in IlvSheet.

void IlvAbstractMatrix::scrollToColumn ( IlUShort  colno)

Changes the first visible column.

Scrolls the matrix so that the first visible column becomes colno. Calling this method with a column that is fixed has no effect.

Parameters
colnoThe new first column.
See Also
scrollTo, scrollToRow
void IlvAbstractMatrix::scrollToRow ( IlUShort  rowno)

Changes the first visible row.

Scrolls the matrix so that the first visible row becomes rowno. Calling this method with a row that is fixed has no effect.

Parameters
rownoThe new first row.
See Also
scrollTo, scrollToColumn
void IlvAbstractMatrix::setNbFixedColumn ( IlUShort  count)

Sets the number of fixed rows.

Fixed columns are continuous columns from 0 to getNbFixedColumn()-1. They are always visible and do not scroll.

Parameters
countThe new number of fixed columns.
See Also
getNbFixedColumn, setNbFixedRow
void IlvAbstractMatrix::setNbFixedRow ( IlUShort  count)

Sets the number of fixed rows.

Fixed rows are continuous rows from 0 to getNbFixedRow()-1. They are always visible and do not scroll.

Parameters
countThe new number of fixed rows.
See Also
getNbFixedRow, setNbFixedColumn
IlBoolean IlvAbstractMatrix::showGrid ( IlBoolean  value)

Specifies whether the matrix grid should be displayed.

Sets the grid display flag to v and returns the new value.

Parameters
valueThe new grid display flag.
Returns
IlTrue if the matrix grid is displayed. Otherwise, returns IlFalse.
See Also
isShowingGrid

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