rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvSheet Class Reference

Matrix class. More...

#include <ilviews/gadgets/sheet.h>

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

List of all members.

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.

Detailed Description

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.

IlvSheeta.gif

- IlvSheet -

See also:
IlvHierarchicalSheet.

Constructor & Destructor Documentation

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.

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

Member Function Documentation

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.

Parameters:
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.
See also:
internalBBox, scrollBarBBox

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.

Parameters:
dst The destination drawing port.
t The transformer applied to the gadget.
clip The clipping area.
See also:
drawBackground, drawScrollBar, drawGadgetContents

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.

Parameters:
dst The destination drawing port.
t The transformer applied to the gadget.
clip The clipping area.
See also:
drawBackground, drawScrollBar, drawFrame

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.

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

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

Reimplemented from IlvMatrix.

Reimplemented in IlvFileChooserSheet, and IlvHierarchicalSheet.

virtual IlBoolean IlvSheet::handleResizeColumn ( IlvEvent event  )  [virtual]

Handles resizing events applying to fixed columns.

Handles the specified event and calls the IlvMatrix::resizeRow member function.

Parameters:
event The event to handle.
See also:
IlvMatrix::resizeRow, handleResizeRow.

Reimplemented in IlvHierarchicalSheet.

virtual IlBoolean IlvSheet::handleResizeRow ( IlvEvent event  )  [virtual]

Handles resizing events applying to fixed rows.

Handles the specified event and calls the IlvMatrix::resizeColumn member function.

Parameters:
event The event to handle.
See also:
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.

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

virtual void IlvSheet::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:
colno The new first column.
rowno The new first row.
See also:
scrollToRow, scrollToColumn, ensureVisible

Reimplemented from IlvAbstractMatrix.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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