Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Matrix class. More...
#include <ilviews/gadgets/sheet.h>
Public Member Functions | |
IlvSheet (IlvDisplay *display, const IlvRect &rect, IlUShort nbcol, IlUShort nbrow, IlvDim xgrid=60, IlvDim ygrid=30, IlvDim thickness=IlvDefaultGadgetThickness, IlBoolean showVSB=IlTrue, IlBoolean showHSB=IlTrue, IlvPalette *palette=0) | |
Constructor. | |
void | computeBBox (IlvRect &rect, IlvRect &v, IlvRect &h, const IlvTransformer *t=0) const |
Computes the bounding boxes of the elements that compose the gadget. | |
virtual void | drawFrame (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws the gadget frame. | |
virtual void | drawGadgetContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws the gadget contents. | |
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. | |
virtual IlBoolean | handleMatrixEvent (IlvEvent &) |
Handles the events sent to the matrix. | |
virtual IlBoolean | handleResizeColumn (IlvEvent &event) |
Handles resizing events applying to fixed columns. | |
virtual IlBoolean | handleResizeRow (IlvEvent &event) |
Handles resizing events applying to fixed rows. | |
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. | |
virtual void | scrollTo (IlUShort, IlUShort) |
Changes the first visible column and row. |
Matrix class.
Library: ilvadvgdt
The IlvSheet
class is a special kind of IlvMatrix
that surrounds fixed rows and columns with a relief border to distinguish them from other cells. This class lets you resize rows and columns by using drag and drop.
- IlvSheet -
IlvHierarchicalSheet
. IlvSheet::IlvSheet | ( | IlvDisplay * | display, | |
const IlvRect & | rect, | |||
IlUShort | nbcol, | |||
IlUShort | nbrow, | |||
IlvDim | xgrid = 60 , |
|||
IlvDim | ygrid = 30 , |
|||
IlvDim | thickness = IlvDefaultGadgetThickness , |
|||
IlBoolean | showVSB = IlTrue , |
|||
IlBoolean | showHSB = IlTrue , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the IlvSheet
class.
display | The connection to the display. | |
rect | The size and position of the sheet. | |
nbcol | The number of columns in the sheet. | |
nbrow | The number of rows in the sheet. | |
xgrid | The default column width. | |
ygrid | The default row height. | |
thickness | The thickness of the matrix. | |
showVSB | A Boolean value specifying whether the vertical scroll bar should be shown (IlTrue ) or hidden (IlFalse ). | |
showHSB | A Boolean value specifying whether the horizontal scroll bar should be shown (IlTrue ) or hidden (IlFalse ). | |
palette | The palette used to draw the sheet. |
void IlvSheet::computeBBox | ( | IlvRect & | ibox, | |
IlvRect & | vs, | |||
IlvRect & | hs, | |||
const IlvTransformer * | t = 0 | |||
) | const |
Computes the bounding boxes of the elements that compose the gadget.
ibox | The returned internal bounding box of the gadget. | |
vs | The returned internal vertical scroll bar bounding box of the gadget. | |
hs | The returned internal horizontal scroll bar bounding box of the gadget. | |
t | The transformer applied to the gadget. |
Reimplemented from IlvScrolledGadget.
virtual void IlvSheet::drawFrame | ( | IlvPort * | dst, | |
const IlvTransformer * | t = 0 , |
|||
const IlvRegion * | clip = 0 | |||
) | const [virtual] |
Draws the gadget frame.
Is called from the draw
method. This method is not called if the method IlvScrolledGadget::isShowingFrame
returns IlFalse
.
dst | The destination drawing port. | |
t | The transformer applied to the gadget. | |
clip | The clipping area. |
Reimplemented from IlvMatrix.
virtual void IlvSheet::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.
dst | The destination drawing port. | |
t | The transformer applied to the gadget. | |
clip | The clipping area. |
Reimplemented from IlvMatrix.
virtual void IlvSheet::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.
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 IlvMatrix.
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 events, or IlFalse
otherwise. Reimplemented from IlvMatrix.
Reimplemented in IlvFileChooserSheet, and IlvHierarchicalSheet.
Handles resizing events applying to fixed columns.
Handles the specified event and calls the IlvMatrix::resizeRow
member function.
event | The event to handle. |
IlvMatrix::resizeRow
, handleResizeRow
. Reimplemented in IlvHierarchicalSheet.
Handles resizing events applying to fixed rows.
Handles the specified event and calls the IlvMatrix::resizeColumn
member function.
event | The event to handle. |
IlvMatrix::resizeColumn
, handleResizeColumn
. virtual void IlvSheet::itemBBox | ( | IlUShort | col, | |
IlUShort | row, | |||
IlvRect & | bbox, | |||
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Returns the bounding box of the item located in the specified cell.
Uses bbox
to return the bounding box of the item located in the matrix cell specified by col and row, when the matrix is displayed with the transformer t.
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 from IlvMatrix.
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.
colno | The new first column. | |
rowno | The new first row. |
Reimplemented from IlvAbstractMatrix.
© 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.