Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget Class. More...
#include <ilviews/gadgets/hsheet.h>
Public Member Functions | |
IlvHierarchicalSheet (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... | |
void | addItem (IlvTreeGadgetItem *parent, IlvTreeGadgetItem *item, IlInt index=-1) |
Adds the specified item to the tree hierarchy. More... | |
IlvTreeGadgetItem * | 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. 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 IlvPalette * | getLinkPalette () const |
Returns the palette used to draw the lines connecting items to their parents. More... | |
IlvTreeGadgetItem * | getRoot () 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... | |
IlvTreeGadgetItem * | getTreeItem (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 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 | 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) 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 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 IlvPalette * | getNormalTextPalette () const |
Returns the default palette used to draw an item. More... | |
virtual 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 IlvPalette * | getSelectionPalette () const |
Returns the selection palette used to draw selected items. More... | |
virtual 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... | |
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 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 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... | |
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 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 * | ExpandCallbackType () |
Returns the type of the Expand callback. More... | |
static IlSymbol * | ShrinkCallbackType () |
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... | |
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
.
IlvSheet
, IlvTreeGadget
, IlvTreeGadgetItem
.This class support the following CSS properties:
Graphic property | CSS propery | Type |
---|---|---|
Background color | background-color | Color |
Text color | color | Color |
IlvHierarchicalSheet::IlvHierarchicalSheet | ( | 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.
Initializes a new instance of the IlvHierarchicalSheet
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 cell width. |
ygrid | The default cell height. |
thickness | The thickness of the matrix. |
showVSB | A Boolean value specifying whether the vertical scroll bar should be shown or hidden. |
showHSB | A Boolean value specifying whether the horizontal scroll bar should be shown or hidden. |
palette | The palette used by the sheet. |
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.
parent | The parent of the added item. If parent is 0 , the new item is added to the root item. |
item | The item to be added. |
index | The 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. |
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.
parent | The parent of the added item. If parent is 0 , the new item is added to the root item. |
label | The label of the item to be added. |
index | The 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. |
bitmap | The sensitive bitmap associated with the added item. The bitmap is locked. |
selectionBitmap | The selection bitmap associated with the added item. The bitmap is locked. |
IlBoolean IlvHierarchicalSheet::areLinesVisible | ( | ) | const |
Indicates whether the lines connecting items to their parents are visible.
IlTrue
if the lines connecting items to their parents are visible and IlFalse
otherwise. showLines()
.
|
protectedvirtual |
Is called when an item is expanded.
The default implementation calls the Expand callback of the item.
item | The item that has been expanded. |
ExpandCallbackType
, shrink()
.
|
static |
Returns the type of the Expand callback.
The Expand callback is invoked when an item is expanded.
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.
item | The item to be expanded. |
expandAll | A Boolean value specifying whether item should be expanded recursively. In this case, the expand() method is called for all the expanded items. |
shrinkItem()
, expand()
.
|
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 from IlvMatrix.
IlvDim IlvHierarchicalSheet::getIndent | ( | ) | const |
Returns the indentation value applied to the tree hierarchy.
setIndent()
. IlUShort IlvHierarchicalSheet::getItemRow | ( | IlvTreeGadgetItem * | item | ) | const |
Returns the row where the given tree item is located.
item | The tree item. |
IlUInt IlvHierarchicalSheet::getItemsCount | ( | ) | const |
Return the total number of IlvTreeGadgetItem
objects that the sheet contains.
IlvTreeGadgetItem
objects that the sheet contains, not including the root item. addItem()
.
|
virtual |
Returns the palette used to draw the lines connecting items to their parents.
setLinkPalette()
. IlvTreeGadgetItem* IlvHierarchicalSheet::getRoot | ( | ) | const |
Returns the root item of the tree hierarchy.
This item must never be removed nor deleted.
|
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.
IlvTreeGadgetItem* IlvHierarchicalSheet::getTreeItem | ( | IlUShort | row | ) | const |
Returns the tree item object located in the specified row.
row | The row index. |
IlvTreeGadgetItem
object associated with row. The method returns 0
if this item is not found. getItemRow()
. IlUInt IlvHierarchicalSheet::getVisibleItemsCount | ( | ) | const |
Returns the number of visible IlvTreeGadgetItem
objects in the sheet.
IlvTreeGadgetItem
objects in the sheet. An item is visible when all its parents are expanded. expandItem()
, shrinkItem()
. 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 IlvSheet.
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 from IlvSheet.
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 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.
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.
item | The item to be removed. |
destroy | A 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. |
addItem()
, removeAllItems()
. 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 from IlvMatrix.
Sets the indentation value to be applied to the tree hierarchy.
indent | The indentation value to use. |
redraw | A Boolean value specifying whether the sheet should be redrawn. |
getIndent()
. void IlvHierarchicalSheet::setLinkPalette | ( | IlvPalette * | palette | ) |
Sets the palette used to draw the lines connecting items to their parents.
palette | The palette used to draw the connecting lines. The previous palette is unlocked, and the new one is locked. |
getLinkPalette()
. Shows or hides the lines connecting items to their parents.
value | A Boolean value specifying whether the lines connecting items to their parent should be shown (IlTrue ) or hidden (IlFalse ). |
redraw | A Boolean value specifying whether the sheet should be redrawn. |
areLinesVisible()
.
|
protectedvirtual |
Is called when an item is shrunk.
The default implementation calls the Shrink callback of the item.
item | The item that has been shrunk. |
ShrinkCallbackType
, expand()
.
|
static |
Returns the type of the Shrink callback.
The Shrink callback is invoked when an item is shrunk.
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.
item | The item to be shrunk. |
expandItem()
, shrink()
. © Copyright 2015, 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.