rwlogo

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
IlvHierarchicalSheet Class Reference

Gadget Class. More...

#include <ilviews/gadgets/hsheet.h>

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

Public Member Functions

 IlvHierarchicalSheet (IlvDisplay *d, const IlvRect &rect, IlUShort nbcol, IlUShort nbrow, IlvDim xgrid=IlvDefaultMatrixWidth, IlvDim ygrid=IlvDefaultMatrixHeight, IlvDim thickness=IlvDefaultGadgetThickness, IlBoolean showVSB=IlTrue, IlBoolean showHSB=IlTrue, IlvPalette *palette=0)
 Constructor. More...
 
void addItem (IlvTreeGadgetItem *parent, IlvTreeGadgetItem *item, IlInt index=-1)
 Adds the specified item to the tree hierarchy. More...
 
IlvTreeGadgetItemaddItem (IlvTreeGadgetItem *parent, const char *label, IlInt index=-1, IlvBitmap *bitmap=0, IlvBitmap *selectionBitmap=0)
 Adds an item to the tree hierarchy with the specified label. More...
 
IlBoolean areLinesVisible () const
 Indicates whether the lines connecting items to their parents are visible. More...
 
void expandItem (IlvTreeGadgetItem *item, IlBoolean expandAll=IlFalse)
 Expands the specified tree item to show its child items. More...
 
virtual void fitHeightToSize (IlUShort=0)
 Computes a new size for the rows so that they fit the height of the matrix. More...
 
IlvDim getIndent () const
 Returns the indentation value applied to the tree hierarchy. More...
 
IlUShort getItemRow (IlvTreeGadgetItem *item) const
 Returns the row where the given tree item is located. More...
 
IlUInt getItemsCount () const
 Return the total number of IlvTreeGadgetItem objects that the sheet contains. More...
 
virtual IlvPalettegetLinkPalette () const
 Returns the palette used to draw the lines connecting items to their parents. More...
 
IlvTreeGadgetItemgetRoot () const
 Returns the root item of the tree hierarchy. More...
 
virtual IlUShort getTreeColumn () const
 Returns the column in which the tree hierarchy is displayed. More...
 
IlvTreeGadgetItemgetTreeItem (IlUShort row) const
 Returns the tree item object located in the specified row. More...
 
IlUInt getVisibleItemsCount () const
 Returns the number of visible IlvTreeGadgetItem objects in the sheet. More...
 
virtual IlBoolean handleMatrixEvent (IlvEvent &)
 Handles the events sent to the matrix. More...
 
virtual IlBoolean handleResizeColumn (IlvEvent &)
 Handles resizing events applying to fixed columns. More...
 
virtual void reinitialize (IlUShort c, IlUShort r)
 Resets the matrix dimensions. More...
 
void removeAllItems ()
 Removes all the items from the tree hierarchy. More...
 
void removeItem (IlvTreeGadgetItem *item, IlBoolean destroy=IlTrue)
 Removes the specified item from the tree. More...
 
void removeRow (IlUShort r, IlBoolean destroy=IlTrue)
 Removes a row from the matrix. More...
 
void setIndent (IlvDim indent, IlBoolean redraw=IlTrue)
 Sets the indentation value to be applied to the tree hierarchy. More...
 
void setLinkPalette (IlvPalette *palette)
 Sets the palette used to draw the lines connecting items to their parents. More...
 
void showLines (IlBoolean value, IlBoolean redraw=IlTrue)
 Shows or hides the lines connecting items to their parents. More...
 
void shrinkItem (IlvTreeGadgetItem *item)
 Shrinks the specified tree item to hide its child items. More...
 
- Public Member Functions inherited from IlvSheet
 IlvSheet (IlvDisplay *display, const IlvRect &rect, IlUShort nbcol, IlUShort nbrow, IlvDim xgrid=IlvDefaultMatrixWidth, IlvDim ygrid=IlvDefaultMatrixHeight, IlvDim thickness=IlvDefaultGadgetThickness, IlBoolean showVSB=IlTrue, IlBoolean showHSB=IlTrue, IlvPalette *palette=0)
 Constructor. More...
 
virtual void drawFrame (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget frame. More...
 
virtual void drawGadgetContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget contents. More...
 
virtual void drawItem (IlvPort *dst, IlUShort colno, IlUShort rowno, const IlvRect &itembbox, const IlvRect &clip) const
 Is called by the matrix to draw an item. More...
 
virtual IlBoolean handleResizeRow (IlvEvent &event)
 Handles resizing events applying to fixed rows. 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 void scrollTo (IlUShort, IlUShort)
 Changes the first visible column and row. More...
 
- Public Member Functions inherited from IlvMatrix
 IlvMatrix (IlvDisplay *display, const IlvRect &rect, IlUShort nbcol, IlUShort nbrow, IlvDim xgrid=60, IlvDim ygrid=30, IlvDim thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor. More...
 
virtual void activateMatrixItem (IlUShort col, IlUShort row)
 Is called by the interactor when an item is activated. More...
 
virtual void add (IlvAbstractMatrixItem *item)
 Adds an item to the first empty cell in the matrix. More...
 
IlBoolean adjustLast (IlBoolean value)
 Specifies whether only the last column and the last row should be resized. More...
 
IlBoolean allowDragDrop () const
 Indicates whether the matrix allows drag-and-drop operations. More...
 
void allowDragDrop (IlBoolean value)
 Specifies whether the matrix should allow drag-and-drop operations. More...
 
IlBoolean allowEdit (IlBoolean value)
 Specifies whether editing should be allowed. More...
 
IlBoolean allowEditOnDoubleClick () const
 Indicates whether the matrix allows item editing when a double-click event occurs. More...
 
void allowEditOnDoubleClick (IlBoolean value)
 Indicates whether the matrix should allow item editing when a double-click event occurs. More...
 
virtual IlvGadgetItemapplyToItems (IlvApplyGadgetItem f, IlAny arg)
 Applies the specified function to all the items of the holder. More...
 
IlBoolean autoFitToSize (IlBoolean value)
 Specifies whether the automatic fitting to size mode should be on. More...
 
virtual void changeSelectionTo (IlUShort col, IlUShort row)
 Clears the current selection and selects specified cell. More...
 
IlUShort columns () const
 Returns the number of columns in the matrix. More...
 
IlBoolean columnSameWidth () const
 Returns IlTrue if all the columns in the matrix have the same width. More...
 
virtual IlvTextFieldcreateEditionField (IlUShort col, IlUShort row)
 Returns a new text field for editing an item. More...
 
virtual IlvMatrixItemEditorcreateEditor (IlUShort col, IlUShort row)
 Returns a new editor for editing an item. More...
 
virtual void deSelect ()
 Deselects all the items in the matrix. More...
 
virtual void doIt ()
 Is called by the interactor when the selection changes in the matrix. More...
 
virtual void drawBackground (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget background. More...
 
virtual void 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...
 
void fitToSize ()
 Computes a new size for the columns and rows so that they fit the size of the matrix. More...
 
virtual void fitWidthToSize (IlUShort col=0)
 Computes a new size for the columns so that they fit the width of the matrix. More...
 
IlvDim getCardinal () const
 Returns the number of cells in the matrix. More...
 
IlvDim getColumnFittingSize (IlUShort col) const
 Returns the width of the largest item in the specified column. More...
 
IlvDim getColumnPosition (IlUShort rowno) const
 Returns the position of a column. More...
 
IlvDim getColumnsDistance (IlUShort fromcol, IlUShort tocol) const
 Returns the distance between two columns. More...
 
IlvDim getColumnWidth (IlUShort colno) const
 Returns the width of the specified column. More...
 
IlvDirection getEditDirection () const
 Returns the editing direction of the matrix. More...
 
IlvTextFieldgetEditedItem (IlUShort &col, IlUShort &row) const
 Returns the location of the item being edited. More...
 
IlvGraphicgetEditorField () const
 Returns a pointer to the editing field. More...
 
IlvOrientation getExtendedSelectionOrientation () const
 Returns the direction to which the selection will be extended. More...
 
IlBoolean getFirstSelected (IlUShort &col, IlUShort &row) const
 Returns the first selected item in the matrix. More...
 
IlvGadgetMatrixItemgetFocusItem () const
 Returns the gadget matrix item that has the focus. More...
 
IlvPalettegetGridPalette () const
 Returns the palette used to draw the matrix grid. More...
 
virtual IlvPalettegetInsensitivePalette () const
 Returns the palette used to draw an item that is not sensitive. More...
 
IlvAbstractMatrixItemgetItem (IlUShort col, IlUShort row) const
 Returns the item located in the specified cell. More...
 
IlvAbstractMatrixItemgetItem (IlvDim pos) const
 Returns the matrix item located at the specified position. More...
 
IlvPosition getItemAlignment (IlUShort col, IlUShort row) const
 Returns the alignment of an item of the matrix. More...
 
IlAny getItemData (IlUShort col, IlUShort row) const
 Returns the client data of the specified matrix item. More...
 
virtual void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the default orientation of the matrix items labels. More...
 
virtual IlvPosition getLabelPosition () const
 Returns the default position of the matrix item labels. More...
 
void getLastSelectedItem (IlUShort &col, IlUShort &row) const
 Returns the location of the last selected item in the matrix. More...
 
virtual IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item. More...
 
virtual IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items. More...
 
IlvDim getRowFittingSize (IlUShort row) const
 Returns the height of the largest item in the specified row. More...
 
IlvDim getRowHeight (IlUShort rowno) const
 Returns the height of the specified row. More...
 
IlvDim getRowPosition (IlUShort colno) const
 Returns the position of a row. More...
 
IlvDim getRowsDistance (IlUShort fromrow, IlUShort torow) const
 Returns the distance between two rows. More...
 
virtual IlvPalettegetSelectionPalette () const
 Returns the selection palette used to draw selected items. More...
 
virtual IlvPalettegetSelectionTextPalette () const
 Returns the selection palette used to draw the label of selected items. More...
 
IlUShort getSpacing () const
 Returns the spacing between two cells of the matrix. More...
 
IlvTextFieldgetTextField () const
 Returns a pointer to the editing text field. More...
 
IlvDim getXgrid () const
 Returns the default column width. More...
 
IlvDim getYgrid () const
 Returns the default row height. More...
 
IlBoolean hasToolTips () const
 Indicates whether the matrix handles internal tooltips. More...
 
void hideEditorField ()
 Hides and destroys the matrix item editing field. More...
 
void hideTextField ()
 Hides and destroys the editing text field. More...
 
virtual void insertColumn (IlUShort col=0, IlUShort count=1)
 Inserts columns in the matrix. More...
 
virtual void insertRow (IlUShort row=0, IlUShort count=1)
 Inserts rows in the matrix. More...
 
virtual void internalBBox (IlvRect &rect, const IlvTransformer *t) const
 Returns the internal bounding box of the gadget. More...
 
IlBoolean isAdjustingLast () const
 Indicates whether only the last column and row are resized. More...
 
IlBoolean isAutoColumnSelect () const
 Indicates whether the automatic column selection mode is on. More...
 
IlBoolean isAutoFittingToSize () const
 Indicates whether the automatic fitting to size mode is on. More...
 
IlBoolean isAutoLineSelect () const
 Indicates whether the automatic row selection mode is on. More...
 
IlBoolean isBrowseMode () const
 Indicates whether the matrix is in browse selection mode. More...
 
IlBoolean isDirectEditionMode () const
 Indicates whether the matrix is in direct editing mode. More...
 
IlBoolean isEditAllowed () const
 Indicates whether editing is allowed. More...
 
IlBoolean isExclusive () const
 Indicates whether the selection mode is set to exclusive. More...
 
IlBoolean isItemFillingBackground (IlUShort col, IlUShort row) const
 Returns IlTrue if the specified item is filled. More...
 
IlBoolean isItemGrayed (IlUShort col, IlUShort row) const
 Indicates whether the specified item is grayed. More...
 
IlBoolean isItemReadOnly (IlUShort col, IlUShort row) const
 Indicates whether the specified matrix item is read-only. More...
 
IlBoolean isItemRelief (IlUShort col, IlUShort row) const
 Indicates whether the specified matrix item appears in relief. More...
 
IlBoolean isItemSelected (IlUShort col, IlUShort row) const
 Indicates whether the item located in the specified cell is selected. More...
 
IlBoolean isItemSensitive (IlUShort col, IlUShort row) const
 Indicates whether the specified item is sensitive. More...
 
virtual IlBoolean isShowingLabel () const
 Indicates whether the matrix item labels are displayed. More...
 
virtual IlBoolean isShowingPicture () const
 Indicates whether the matrix item pictures are displayed. More...
 
virtual IlvAbstractMatrixItempointToItem (const IlvPoint &point, IlUShort &col, IlUShort &row, const IlvTransformer *t=0) const
 Returns the item located at a specified point. More...
 
void reDrawItem (IlUShort col, IlUShort row) const
 Redraws an item of the matrix. More...
 
virtual 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 resizeColumn (IlUShort col, IlvDim size)
 Resizes a given column. More...
 
virtual void resizeRow (IlUShort row, IlvDim size)
 Resizes a given row. More...
 
IlUShort rows () const
 Returns the number of rows in the matrix. More...
 
IlBoolean rowSameHeight () const
 Returns IlTrue if all the rows in the matrix have the same height. More...
 
void sameHeight (IlBoolean value)
 Specifies whether all the rows in the matrix should have the same height. More...
 
void sameWidth (IlBoolean value)
 Specifies whether all the columns in the matrix should have the same width. More...
 
virtual void scrollBarVisibilityChanged (IlvDirection)
 Is called when an internal scroll bar is shown or hidden. More...
 
virtual void set (IlUShort col, IlUShort row, IlvAbstractMatrixItem *item)
 Adds an item to the matrix at the specified location. More...
 
void setAutoColumnSelect (IlBoolean value)
 Specifies whether the automatic column selection mode should be on. More...
 
void setAutoLineSelect (IlBoolean value)
 Specifies whether the automatic row selection mode should be on. More...
 
void setBrowseMode (IlBoolean value)
 Specifies whether the matrix should be in browse selection mode. More...
 
virtual void setColumnSelected (IlUShort col, IlBoolean selected=IlTrue)
 Selects or deselects an entire column. More...
 
void setDirectEditionMode (IlBoolean value)
 Specifies whether the matrix should be in direct editing mode. More...
 
void setEditDirection (IlvDirection direction)
 Sets the editing direction of the matrix. More...
 
void setEditedItem (IlUShort col, IlUShort row)
 Sets the item that is being edited. More...
 
void setExclusive (IlBoolean value)
 Specifies whether the selection mode should be exclusive. More...
 
void setExtendedSelectionOrientation (IlvOrientation dir)
 Sets the direction in which the selection in the matrix is extended. More...
 
void setFocus (IlUShort col, IlUShort row)
 Specifies the gadget matrix item that has the focus. More...
 
void setItemAlignment (IlUShort col, IlUShort row, IlvPosition alignment)
 Sets the alignment of a matrix item. More...
 
void setItemCallback (IlUShort col, IlUShort row, IlvMatrixItemCallback callback=0, IlAny data=0)
 Sets a callback to the specified matrix item. More...
 
void setItemData (IlUShort col, IlUShort row, IlAny data)
 Sets the client data of the specified matrix item. More...
 
void setItemFillingBackground (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified item should be filled with a background color. More...
 
void setItemGrayed (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified item should be grayed. More...
 
void setItemReadOnly (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified matrix item should be read-only. More...
 
void setItemRelief (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Specifies whether the specified matrix item should be in relief. More...
 
virtual void setItemSelected (IlUShort col, IlUShort row, IlBoolean selected=IlTrue)
 Specifies whether the item located in the specified cell should be selected. More...
 
void setItemSensitive (IlUShort col, IlUShort row, IlBoolean value=IlTrue)
 Sets the specified item to sensitive. More...
 
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse, IlBoolean redraw=IlTrue)
 Sets the orientation of the matrix items labels. More...
 
void setLabelPosition (IlvPosition position, IlBoolean redraw=IlTrue)
 Sets the default position of the matrix item labels. More...
 
virtual void setRowSelected (IlUShort row, IlBoolean selected=IlTrue)
 Selects or deselects an entire row. More...
 
void setSelectionAnchor (IlUShort col, IlUShort row)
 Sets the selection anchor to the specified cell. More...
 
void setSpacing (IlUShort spacing)
 Sets the spacing between two cells of the matrix. More...
 
virtual void setXgrid (IlvDim x)
 Sets the default column width. More...
 
virtual void setYgrid (IlvDim y)
 Sets the default row height. More...
 
void showEditorField ()
 Displays the matrix item editing field. More...
 
void showLabel (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Shows or hides the matrix item labels. More...
 
void showPicture (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Shows or hides the matrix items picture. More...
 
void showTextField ()
 Displays the editing text field. More...
 
void useToolTips (IlBoolean value=IlTrue)
 Specifies whether the matrix should use internal tooltips. More...
 
virtual void validate ()
 Is called when the user validates its changes after editing a matrix item. More...
 
- Public Member Functions inherited from IlvAbstractMatrix
IlBoolean allowCellMode () const
 Indicates whether the matrix can draw items on several continuous cells. More...
 
virtual IlBoolean cellBBox (IlUShort colno, IlUShort rowno, IlvRect &rect, const IlvTransformer *t=0) const
 Computes the bounding box of a given cell. More...
 
virtual void cellInfo (IlUShort colno, IlUShort rowno, IlUShort &startcol, IlUShort &startrow, IlUShort &nbcol, IlUShort &nbrow) const
 Returns cell information. More...
 
virtual IlBoolean columnBBox (IlUShort colno, IlvRect &rect, const IlvTransformer *t=0) const
 Computes the bounding box of a given column. More...
 
virtual void ensureVisible (IlUShort colno, IlUShort rowno, IlBoolean redraw=IlTrue)
 Scrolls the matrix to make the specified item visible. More...
 
IlUShort firstColumn () const
 Returns the index of the first visible column. More...
 
IlUShort firstRow () const
 Returns the index of the first visible row. More...
 
IlUShort getNbFixedColumn () const
 Returns the number of fixed columns. More...
 
IlUShort getNbFixedRow () const
 Returns the number of fixed rows. More...
 
virtual void getVisibleItems (IlUShort &fromcol, IlUShort &tocol, IlUShort &fromrow, IlUShort &torow, const IlvTransformer *t=0) const
 Computes the range of the items that are visible in the matrix. More...
 
virtual IlBoolean handleGadgetEvent (IlvEvent &)
 Handles the gadget events. More...
 
virtual void invalidateColumn (IlUShort colno) const
 Redraws a column. More...
 
virtual void invalidateRect (const IlvRect &rect) const
 Redraws a portion of the matrix. More...
 
virtual void invalidateRow (IlUShort rowno) const
 Redraws a row. More...
 
IlBoolean isShowingGrid () const
 Returns IlTrue if the matrix grid is displayed. More...
 
virtual IlBoolean pointToPosition (const IlvPoint &point, IlUShort &colno, IlUShort &rowno, const IlvTransformer *t=0) const
 Returns the location of the item located at the specified point. More...
 
virtual IlBoolean rowBBox (IlUShort rowno, IlvRect &rect, const IlvTransformer *t=0) const
 Computes the bounding box of the specified row. More...
 
virtual void scrollBarBBox (IlvDirection dir, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the specified internal scroll bar. More...
 
virtual void scrollBarHasMoved (IlvDirection pos)
 Is called when an internal scroll bar has moved. More...
 
void scrollToColumn (IlUShort colno)
 Changes the first visible column. More...
 
void scrollToRow (IlUShort rowno)
 Changes the first visible row. More...
 
void setNbFixedColumn (IlUShort count)
 Sets the number of fixed rows. More...
 
void setNbFixedRow (IlUShort count)
 Sets the number of fixed rows. More...
 
IlBoolean showGrid (IlBoolean value)
 Specifies whether the matrix grid should be displayed. More...
 
- Public Member Functions inherited from IlvScrolledGadget
 IlvScrolledGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor. More...
 
virtual void adjustScrollBars (IlBoolean redraw=IlFalse)
 Recomputes the scroll bars. More...
 
void computeBBox (IlvRect &ibox, IlvRect &vs, IlvRect &hs, const IlvTransformer *t=0) const
 Computes the bounding boxes of the elements that compose the gadget. More...
 
void computeBBox (IlvRect &ibox, IlvRect &vbox, IlvRect &vs, IlvRect &hs, const IlvTransformer *t=0) const
 Computes the bounding boxes of the elements that compose the gadget. More...
 
virtual void drawScrollBar (IlvPort *dst, IlvDirection direction, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the specified internal scroll bar. More...
 
void fitToRect (const IlvRect &rect)
 Resizes the object so that the scrollable area fits the specified rectangle. More...
 
IlUShort getBottomMargin () const
 Returns the bottom margin. More...
 
IlvScrollBargetHorizontalScrollBar () const
 Returns a pointer to the internal horizontal scroll bar. More...
 
IlUShort getLeftMargin () const
 Returns the left margin. More...
 
IlUShort getRightMargin () const
 Returns the right margin. More...
 
IlvScrollBargetScrollBar (IlvDirection direction) const
 Returns a pointer to the specified internal scroll bar. More...
 
void getScrollBarShowAsNeeded (IlBoolean &vert, IlBoolean &hor) const
 Returns the scroll bar mode of the internal scroll bars. More...
 
IlUShort getTopMargin () const
 Returns the top margin. More...
 
IlvScrollBargetVerticalScrollBar () const
 Returns a pointer to the internal vertical scroll bar. More...
 
virtual IlBoolean handleScrollBarsEvent (IlvEvent &event)
 Handles the internal scroll bars event. More...
 
void hideScrollBar (IlvDirection direction, IlBoolean redraw=IlTrue)
 Hides the specified internal scroll bar. More...
 
void moveScrollBar (IlvDirection direction, IlvPosition where, IlBoolean redraw=IlTrue)
 Moves the specified internal scroll bar to a new position. More...
 
virtual void scrollableSize (IlvDim &width, IlvDim &height) const
 Returns the size of the scrollable area of the gadget. More...
 
void scrollBarShowAsNeeded (IlBoolean vertical, IlBoolean horizontal, IlBoolean redraw=IlTrue)
 Sets the scroll bar mode of the internal scroll bars. More...
 
void setBottomMargin (IlUShort margin)
 Sets the bottom margin. More...
 
void setLeftMargin (IlUShort margin)
 Sets the left margin. More...
 
void setMargin (IlUShort val)
 Sets the left, right, top, and bottom margins. More...
 
void setRightMargin (IlUShort margin)
 Sets the right margin. More...
 
void setTopMargin (IlUShort margin)
 Sets the top margin. More...
 
void showScrollBar (IlvDirection direction, IlBoolean redraw=IlTrue)
 Shows the specified internal scroll bar. More...
 
virtual void visibleBBox (IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the visible bounding box of the gadget. More...
 
IlvPosition whereIsScrollBar (IlvDirection direction) const
 Returns the location of the specified internal scroll bar. More...
 
- Public Member Functions inherited from IlvGadgetItemHolder
virtual IlvGadgetItemcreateItem (const char *label, IlvGraphic *graphic=0, IlvBitmap *bitmap=0, IlvBitmap *selbitmap=0, IlBoolean copy=IlTrue) const
 Returns a new gadget item. More...
 
virtual void drawGadgetItem (const IlvGadgetItem *item, IlvPort *port, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws a specific gadget item. More...
 
IlvGadgetItemgetCallbackItem () const
 Returns the item that triggered a callback. More...
 
IlvGadgetItemgetDragDropTarget () const
 Returns the target item of a drag-and-drop operation. More...
 
IlvGraphicgetDraggedImage () const
 Returns the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
IlvGadgetItemgetDraggedItem () const
 Returns the item that is being dragged during a drag-and-drop operation. More...
 
IlvGadgetItemgetEditedItem () const
 Returns the item that is being edited. More...
 
virtual IlvPalettegetHighlightTextPalette () const
 Returns the highlight palette used to draw the label of highlighted items. More...
 
virtual IlvGadgetItemgetItemByName (const char *name) const
 Returns the item whose name is specified. More...
 
IlvGadgetItemgetToolTipItem () const
 Returns the item that is displaying a tooltip. More...
 
virtual void initReDrawItems ()
 Begins a redraw session. More...
 
virtual void recomputeAllItems ()
 Recomputes the size of all the items managed by the holder. More...
 
virtual void reDrawItems ()
 Ends a redraw session. More...
 
void setDragDropTarget (IlvGadgetItem *item)
 Sets the target item of a drag-and-drop operation. More...
 
void setDraggedImage (IlvGraphic *graphic)
 Sets the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
void setDraggedItem (IlvGadgetItem *item)
 Sets the dragged item. More...
 

Static Public Member Functions

static IlSymbolExpandCallbackType ()
 Returns the type of the Expand callback. More...
 
static IlSymbolShrinkCallbackType ()
 Returns the type of the Shrink callback. More...
 

Protected Member Functions

virtual void expand (IlvTreeGadgetItem *item)
 Is called when an item is expanded. More...
 
virtual void shrink (IlvTreeGadgetItem *item)
 Is called when an item is shrunk. More...
 

Detailed Description

Gadget Class.

Library: ilvadvgdt

The IlvHierarchicalSheet class implements a special sheet that handles a tree hierarchy. The tree is composed of objects of the class IlvTreeGadgetItem, and can be accessed through the same API as the IlvTreeGadget class. By default, the tree hierarchy is drawn in the first column of the sheet, but you can change this setting by overriding the member function getTreeColumn.

- IlvHierarchicalSheet -

See Also
IlvSheet, IlvTreeGadget, IlvTreeGadgetItem

Constructor & Destructor Documentation

IlvHierarchicalSheet::IlvHierarchicalSheet ( IlvDisplay d,
const IlvRect rect,
IlUShort  nbcol,
IlUShort  nbrow,
IlvDim  xgrid = IlvDefaultMatrixWidth,
IlvDim  ygrid = IlvDefaultMatrixHeight,
IlvDim  thickness = IlvDefaultGadgetThickness,
IlBoolean  showVSB = IlTrue,
IlBoolean  showHSB = IlTrue,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the IlvHierarchicalSheet class.

Parameters
displayThe connection to the display.
rectThe size and position of the sheet.
nbcolThe number of columns in the sheet.
nbrowThe number of rows in the sheet.
xgridThe default cell width.
ygridThe default cell height.
thicknessThe thickness of the matrix.
showVSBA Boolean value specifying whether the vertical scroll bar should be shown or hidden.
showHSBA Boolean value specifying whether the horizontal scroll bar should be shown or hidden.
paletteThe palette used by the sheet.

Member Function Documentation

void IlvHierarchicalSheet::addItem ( IlvTreeGadgetItem parent,
IlvTreeGadgetItem item,
IlInt  index = -1 
)

Adds the specified item to the tree hierarchy.

When a tree item is added to the sheet, the associated row is automatically created and the sheet is redrawn.

Parameters
parentThe parent of the added item. If parent is 0 , the new item is added to the root item.
itemThe item to be added.
indexThe position where the new item should be added in the list of child items. If index is -1, the item is added at the end of the list.
See Also
removeItem, addItem(IlvTreeGadgetItem*, const char*, IlInt, IlvBitmap*, IlvBitmap*)
IlvTreeGadgetItem* IlvHierarchicalSheet::addItem ( IlvTreeGadgetItem parent,
const char *  label,
IlInt  index = -1,
IlvBitmap bitmap = 0,
IlvBitmap selectionBitmap = 0 
)

Adds an item to the tree hierarchy with the specified label.

When a tree item is added to the sheet, the associated row is created automatically and the sheet is redrawn.

Parameters
parentThe parent of the added item. If parent is 0 , the new item is added to the root item.
labelThe label of the item to be added.
indexThe position where the new item should be added in the list of child items. If index is -1, the item is added at the end of the list.
bitmapThe sensitive bitmap associated with the added item. The bitmap is locked.
selectionBitmapThe selection bitmap associated with the added item. The bitmap is locked.
Returns
The created item.
See Also
removeItem, addItem(IlvTreeGadgetItem*, IlvTreeGadgetItem*, IlInt)
IlBoolean IlvHierarchicalSheet::areLinesVisible ( ) const

Indicates whether the lines connecting items to their parents are visible.

Returns
IlTrue if the lines connecting items to their parents are visible and IlFalse otherwise.
See Also
showLines
virtual void IlvHierarchicalSheet::expand ( IlvTreeGadgetItem item)
protectedvirtual

Is called when an item is expanded.

The default implementation calls the Expand callback of the item.

Parameters
itemThe item that has been expanded.
See Also
ExpandCallbackType, shrink
static IlSymbol* IlvHierarchicalSheet::ExpandCallbackType ( )
static

Returns the type of the Expand callback.

The Expand callback is invoked when an item is expanded.

Returns
The type of the Expand callback.
See Also
ShrinkCallbackType, expand
void IlvHierarchicalSheet::expandItem ( IlvTreeGadgetItem item,
IlBoolean  expandAll = IlFalse 
)

Expands the specified tree item to show its child items.

After item has been expanded, the expand method is called. The sheet is redrawn.

Parameters
itemThe item to be expanded.
expandAllA Boolean value specifying whether item should be expanded recursively. In this case, the expand method is called for all the expanded items.
See Also
shrinkItem, expand
virtual void IlvHierarchicalSheet::fitHeightToSize ( IlUShort  row = 0)
virtual

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

Rows located before the row specified by row are not modified.

Parameters
rowThe starting row.
See Also
fitToSize, fitWidthToSize

Reimplemented from IlvMatrix.

IlvDim IlvHierarchicalSheet::getIndent ( ) const

Returns the indentation value applied to the tree hierarchy.

Returns
The indentation value applied to the tree hierarchy.
See Also
setIndent
IlUShort IlvHierarchicalSheet::getItemRow ( IlvTreeGadgetItem item) const

Returns the row where the given tree item is located.

Parameters
itemThe tree item.
Returns
The row where item is located.
IlUInt IlvHierarchicalSheet::getItemsCount ( ) const

Return the total number of IlvTreeGadgetItem objects that the sheet contains.

Returns
The total number of IlvTreeGadgetItem objects that the sheet contains, not including the root item.
See Also
addItem
virtual IlvPalette* IlvHierarchicalSheet::getLinkPalette ( ) const
virtual

Returns the palette used to draw the lines connecting items to their parents.

Returns
The palette used to draw the links connecting items to their parents.
See Also
setLinkPalette
IlvTreeGadgetItem* IlvHierarchicalSheet::getRoot ( ) const

Returns the root item of the tree hierarchy.

This item must never be removed nor deleted.

Returns
The root item of the tree hierarchy.
virtual IlUShort IlvHierarchicalSheet::getTreeColumn ( ) const
virtual

Returns the column in which the tree hierarchy is displayed.

The default implementation returns 0. You can override this method if you want to display the tree into another column.

Returns
The column in which the tree hierarchy is displayed.
IlvTreeGadgetItem* IlvHierarchicalSheet::getTreeItem ( IlUShort  row) const

Returns the tree item object located in the specified row.

Parameters
rowThe row index.
Returns
The IlvTreeGadgetItem object associated with row. The method returns 0 if this item is not found.
See Also
getItemRow
IlUInt IlvHierarchicalSheet::getVisibleItemsCount ( ) const

Returns the number of visible IlvTreeGadgetItem objects in the sheet.

Returns
The number of visible IlvTreeGadgetItem objects in the sheet. An item is visible when all its parents are expanded.
See Also
expandItem, shrinkItem
virtual IlBoolean IlvHierarchicalSheet::handleMatrixEvent ( IlvEvent event)
virtual

Handles the events sent to the matrix.

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

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

Reimplemented from IlvSheet.

virtual IlBoolean IlvHierarchicalSheet::handleResizeColumn ( IlvEvent event)
virtual

Handles resizing events applying to fixed columns.

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

Parameters
eventThe event to handle.
See Also
IlvMatrix::resizeRow, handleResizeRow.

Reimplemented from IlvSheet.

virtual void IlvHierarchicalSheet::reinitialize ( IlUShort  cols,
IlUShort  rows 
)
virtual

Resets the matrix dimensions.

The items that are in the removed columns and rows are destroyed.

Parameters
colsThe new number of columns.
rowsThe new number of rows.
See Also
removeColumn, removeRow

Reimplemented from IlvMatrix.

void IlvHierarchicalSheet::removeAllItems ( )

Removes all the items from the tree hierarchy.

All associated rows are removed from the sheet. The sheet is redrawn.

See Also
removeItem, addItem
void IlvHierarchicalSheet::removeItem ( IlvTreeGadgetItem item,
IlBoolean  destroy = IlTrue 
)

Removes the specified item from the tree.

The corresponding row is also removed from the sheet, which is redrawn.

Parameters
itemThe item to be removed.
destroyA Boolean value specifying whether the removed item should be destroyed. The corresponding rows are removed from the sheet. If destroy is omitted or is IlTrue, the removed item is destroyed.
See Also
addItem, removeAllItems
void IlvHierarchicalSheet::removeRow ( IlUShort  row,
IlBoolean  destroy = IlTrue 
)
virtual

Removes a row from the matrix.

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

Reimplemented from IlvMatrix.

void IlvHierarchicalSheet::setIndent ( IlvDim  indent,
IlBoolean  redraw = IlTrue 
)

Sets the indentation value to be applied to the tree hierarchy.

Parameters
indentThe indentation value to use.
redrawA Boolean value specifying whether the sheet should be redrawn.
See Also
getIndent
void IlvHierarchicalSheet::setLinkPalette ( IlvPalette palette)

Sets the palette used to draw the lines connecting items to their parents.

Parameters
paletteThe palette used to draw the connecting lines. The previous palette is unlocked, and the new one is locked.
See Also
getLinkPalette
void IlvHierarchicalSheet::showLines ( IlBoolean  value,
IlBoolean  redraw = IlTrue 
)

Shows or hides the lines connecting items to their parents.

Parameters
valueA Boolean value specifying whether the lines connecting items to their parent should be shown (IlTrue) or hidden (IlFalse).
redrawA Boolean value specifying whether the sheet should be redrawn.
See Also
areLinesVisible
virtual void IlvHierarchicalSheet::shrink ( IlvTreeGadgetItem item)
protectedvirtual

Is called when an item is shrunk.

The default implementation calls the Shrink callback of the item.

Parameters
itemThe item that has been shrunk.
See Also
ShrinkCallbackType, expand
static IlSymbol* IlvHierarchicalSheet::ShrinkCallbackType ( )
static

Returns the type of the Shrink callback.

The Shrink callback is invoked when an item is shrunk.

Returns
The type of the Shrink callback.
See Also
ExpandCallbackType, shrink
void IlvHierarchicalSheet::shrinkItem ( IlvTreeGadgetItem item)

Shrinks the specified tree item to hide its child items.

After item has been shrunk, the shrink method is called. The sheet is redrawn.

Parameters
itemThe item to be shrunk.
See Also
expandItem, shrink

© Copyright 2014, 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.