Views
Gadgets Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
IlvScrolledGadget Class Reference

Gadget class. More...

#include <ilviews/gadgets/scgadget.h>

Inheritance diagram for IlvScrolledGadget:
IlvGadget IlvSimpleGraphic IlvGraphic IlvStylable IlvValueInterface IlvAbstractMatrix IlvCodeEditor IlvStringList IlvText IlvTreeGadget IlvMatrix IlvDebuggerEditor IlvFileChooserTree IlvSheet IlvFileChooserSheet IlvHierarchicalSheet

Public Member Functions

 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 &vbox, 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 &vs, IlvRect &hs, const IlvTransformer *t=0) const
 Computes the bounding boxes of the elements that compose the gadget. More...
 
virtual IlvScrollBarcreateScrollBar (const IlvRect &rect, IlvDirection direction, IlUShort thickness, IlvPalette *palette)
 Returns a new instance of the IlvScrollBar class. 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 drawGadgetContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget contents. 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 handleGadgetEvent (IlvEvent &event)
 Handles the gadget events. 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...
 
virtual void scrollBarBBox (IlvDirection direction, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the specified internal scroll bar. More...
 
virtual void scrollBarHasMoved (IlvDirection direction)
 Is called when an internal scroll bar has moved. 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...
 

Static Public Member Functions

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

Protected Member Functions

virtual void adjustFromScrollBar (const IlvScrollBar *scrollbar, IlvDirection direction)
 Is called to adjust the gadget to the scroll bars values. More...
 
virtual void adjustScrollBarValue (IlvScrollBar *scrollbar, IlvDirection direction)
 Is called to adjust the scroll bar values. More...
 
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...
 

Friends

class IlvDefaultScrolledGadgetLFHandler
 

Detailed Description

Gadget class.

Library: ilvadvgdt

The IlvScrolledGadget class is an abstract gadget class that handles scroll bars. It is the base class for the gadgets that have scroll bars.

Examples of subclasses of the IlvScrolledGadget class

See also
IlvAbstractMatrix, IlvAnnoText, IlvScrollBar, IlvStringList, IlvText, IlvTreeGadget.

Accessors\nAccessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods <tt>IlvValueInterface::queryValue()</tt>, <tt>IlvValueInterface::queryValues()</tt>, <tt>IlvValueInterface::changeValue()</tt>, <tt>IlvValueInterface::changeValues()</tt>.\n\n\nThis class inherits the accessors of its superclass \c IlvGadget and adds the following ones:

Name Type Equivalent methods
horizontalScrollbar Boolean getScrollBar(), showScrollBar(), hideScrollBar()
verticalScrollbar Boolean getScrollBar(), showScrollBar(), hideScrollBar()
horizontalScrollbarAsNeeded Boolean getScrollBarShowAsNeeded(), scrollBarShowAsNeeded()
verticalScrollbarAsNeeded Boolean getScrollBarShowAsNeeded(), scrollBarShowAsNeeded()
horizontalScrollbarPosition Direction whereIsScrollBar(), moveScrollBar()
verticalScrollbarPosition Direction whereIsScrollBar(), moveScrollBar()
leftMargin UInt getLeftMargin(), setLeftMargin()
rightMargin UInt getRightMargin(), setRightMargin()
topMargin UInt getTopMargin(), setTopMargin()
bottomMargin UInt getBottomMargin(), setBottomMargin()

Constructor & Destructor Documentation

◆ IlvScrolledGadget()

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

Constructor.

Initializes a new instance of the IlvScrolledGadget class.

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

Member Function Documentation

◆ adjustFromScrollBar()

virtual void IlvScrolledGadget::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 in IlvTreeGadget, IlvStringList, IlvCodeEditor, IlvAbstractMatrix, and IlvText.

◆ adjustScrollBars()

virtual void IlvScrolledGadget::adjustScrollBars ( IlBoolean  redraw = IlFalse)
virtual

Recomputes the scroll bars.

Sets the right values to the scroll bars.

Parameters
redrawA Boolean value specifying whether the gadget should be redrawn.

Reimplemented in IlvText.

◆ adjustScrollBarValue()

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

Is called to adjust the scroll bar values.

Is called by the member function 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 in IlvTreeGadget, IlvStringList, IlvCodeEditor, IlvAbstractMatrix, and IlvText.

◆ computeBBox() [1/2]

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

Parameters
iboxThe returned internal bounding box of the gadget.
vboxThe returned visible bounding box of the gadget.
vsThe returned internal vertical scroll bar bounding box of the gadget.
hsThe returned internal horizontal scroll bar bounding box of the gadget.
tThe transformer applied to the gadget.
See also
internalBBox(), visibleBBox(), scrollBarBBox().

◆ computeBBox() [2/2]

void IlvScrolledGadget::computeBBox ( IlvRect ibox,
IlvRect vs,
IlvRect hs,
const IlvTransformer t = 0 
) const

Computes the bounding boxes of the elements that compose the gadget.

Parameters
iboxThe returned internal bounding box of the gadget.
vsThe returned internal vertical scroll bar bounding box of the gadget.
hsThe returned internal horizontal scroll bar bounding box of the gadget.
tThe transformer applied to the gadget.
See also
internalBBox(), scrollBarBBox().

◆ createScrollBar()

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

Returns a new instance of the IlvScrollBar class.

Is called by the member function 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 in IlvAbstractMatrix.

◆ drawBackground()

virtual void IlvScrolledGadget::drawBackground ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the gadget background.

Is called from the draw() method. This method is not called if the gadget is transparent.

Parameters
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawFrame(), drawScrollBar(), drawGadgetContents(), IlvGadget::isTransparent().

Reimplemented from IlvGadget.

Reimplemented in IlvTreeGadget, IlvText, IlvStringList, and IlvMatrix.

◆ drawFrame()

virtual void IlvScrolledGadget::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 isShowingFrame() returns IlFalse.

Parameters
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawBackground(), drawScrollBar(), drawGadgetContents().

Reimplemented from IlvGadget.

Reimplemented in IlvSheet, IlvTreeGadget, IlvText, IlvStringList, and IlvMatrix.

◆ drawGadgetContents()

virtual void IlvScrolledGadget::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 in IlvTreeGadget, IlvStringList, IlvSheet, IlvCodeEditor, IlvAbstractMatrix, IlvText, and IlvMatrix.

◆ drawScrollBar()

virtual void IlvScrolledGadget::drawScrollBar ( IlvPort dst,
IlvDirection  direction,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the specified internal scroll bar.

Parameters
dstThe destination drawing port.
directionThe direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawBackground(), drawFrame(), drawGadgetContents().

◆ fitToRect()

void IlvScrolledGadget::fitToRect ( const IlvRect rect)

Resizes the object so that the scrollable area fits the specified rectangle.

Parameters
rectThe new size of the scrollable area.
See also
IlvGadget::fitToContents().

◆ getBottomMargin()

IlUShort IlvScrolledGadget::getBottomMargin ( ) const

Returns the bottom margin.

Returns
The bottom margin.
See also
setBottomMargin().

◆ getHorizontalScrollBar()

IlvScrollBar* IlvScrolledGadget::getHorizontalScrollBar ( ) const

Returns a pointer to the internal horizontal scroll bar.

Returns
A pointer to the internal horizontal scroll bar. Returns 0 if there is no horizontal scroll bar.
See also
getScrollBar(), getVerticalScrollBar().

◆ getLeftMargin()

IlUShort IlvScrolledGadget::getLeftMargin ( ) const

Returns the left margin.

Returns
The left margin.
See also
setLeftMargin().

◆ getLimitHeightValue()

IlvDim IlvScrolledGadget::getLimitHeightValue ( ) const
protected

Returns the limit value for the vertical scrolling.

Returns
The limit value for the vertical scrolling.
See also
setLimitHeightValue(), getLimitWidthValue().

◆ getLimitWidthValue()

IlvDim IlvScrolledGadget::getLimitWidthValue ( ) const
protected

Returns the limit value for the horizontal scrolling.

Returns
The limit value for the horizontal scrolling.
See also
setLimitWidthValue(), getLimitHeightValue().

◆ getRightMargin()

IlUShort IlvScrolledGadget::getRightMargin ( ) const

Returns the right margin.

Returns
The right margin.
See also
setRightMargin().

◆ getScrollableHeight()

IlvDim IlvScrolledGadget::getScrollableHeight ( ) const
protected

Returns the height of the scrollable area.

Returns
The height of the scrollable area.
See also
setScrollableHeight(), getScrollableWidth().

◆ getScrollableWidth()

IlvDim IlvScrolledGadget::getScrollableWidth ( ) const
protected

Returns the width of the scrollable area.

Returns
The width of the scrollable area.
See also
setScrollableWidth(), getScrollableHeight().

◆ getScrollBar()

IlvScrollBar* IlvScrolledGadget::getScrollBar ( IlvDirection  direction) const

Returns a pointer to the specified internal scroll bar.

Parameters
directionThe direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
Returns
A pointer to the internal scroll bar specified by direction. Returns 0 if such a scroll bar does not exist.
See also
getVerticalScrollBar(), getHorizontalScrollBar().

◆ getScrollBarShowAsNeeded()

void IlvScrolledGadget::getScrollBarShowAsNeeded ( IlBoolean vert,
IlBoolean hor 
) const

Returns the scroll bar mode of the internal scroll bars.

Parameters
vertA Boolean value specifying whether the visibility of the internal vertical scroll bar should be managed by the gadget automatically.
horA Boolean value specifying whether the visibility of the internal horizontal scroll bar should be managed by the gadget automatically.
See also
scrollBarShowAsNeeded(), showScrollBar(), hideScrollBar().

◆ getTopMargin()

IlUShort IlvScrolledGadget::getTopMargin ( ) const

Returns the top margin.

Returns
The top margin.
See also
setTopMargin().

◆ getVerticalScrollBar()

IlvScrollBar* IlvScrolledGadget::getVerticalScrollBar ( ) const

Returns a pointer to the internal vertical scroll bar.

Returns
A pointer to the internal vertical scroll bar. Returns 0 if there is no vertical scroll bar.
See also
getScrollBar(), getHorizontalScrollBar().

◆ handleGadgetEvent()

virtual IlBoolean IlvScrolledGadget::handleGadgetEvent ( IlvEvent event)
virtual

Handles the gadget events.

Is called by 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 in IlvTreeGadget, IlvStringList, IlvCodeEditor, IlvText, and IlvAbstractMatrix.

◆ handleScrollBarsEvent()

virtual IlBoolean IlvScrolledGadget::handleScrollBarsEvent ( IlvEvent event)
virtual

Handles the internal scroll bars event.

Is called from the handleEvent method. You can override this member function to implement your own scroll bar behavior.

Parameters
eventThe event.
Returns
IlFalse if the event has not been handled by the scroll bars. In this case, handleGadgetEvent() will be called.
See also
handleGadgetEvent().

Reimplemented in IlvCodeEditor.

◆ hideScrollBar()

void IlvScrolledGadget::hideScrollBar ( IlvDirection  direction,
IlBoolean  redraw = IlTrue 
)

Hides the specified internal scroll bar.

The scroll bar is deleted. Does nothing if the scroll bar mode is "as needed".

Parameters
directionThe direction for which the scroll bar should be hidden. Valid values are: IlvHorizontal and IlvVertical.
redrawA Boolean value specifying whether the gadget should be redrawn.
See also
getScrollBar(), getScrollBarShowAsNeeded(), showScrollBar(), drawScrollBar().

◆ internalBBox()

virtual void IlvScrolledGadget::internalBBox ( IlvRect bbox,
const IlvTransformer t = 0 
) const
virtual

Returns the internal bounding box of the gadget.

Puts in bbox the internal bounding box of the scrolled gadget computed with the transformer t. The internal bounding box is used to draw the frame and to compute the scrollable area. If you want to change the internal bounding box, you can override this member function in a subclass.

Parameters
bboxThe returned internal bounding box.
tThe transformer applied to the gadget.
See also
visibleBBox(), scrollBarBBox().

Reimplemented in IlvMatrix.

◆ moveScrollBar()

void IlvScrolledGadget::moveScrollBar ( IlvDirection  direction,
IlvPosition  where,
IlBoolean  redraw = IlTrue 
)

Moves the specified internal scroll bar to a new position.

Parameters
directionThe direction for which the scroll bar should be hidden. Valid values are: IlvHorizontal and IlvVertical.
whereThe new position of the internal scroll bar. Valid values are: IlvLeft and IlvRight for horizontal scroll bars, and IlvTop and IlvBottom for vertical scroll bars.
redrawA Boolean value specifying whether the gadget should be redrawn.
See also
showScrollBar(), hideScrollBar(), whereIsScrollBar(), drawScrollBar().

◆ scrollableSize()

virtual void IlvScrolledGadget::scrollableSize ( IlvDim width,
IlvDim height 
) const
virtual

Returns the size of the scrollable area of the gadget.

Puts the width and height of the scrollable area in width and height, respectively. These values are used to compute the values of the scroll bars. You can override this member function to change the scrollable area.

Reimplemented in IlvCodeEditor.

◆ scrollBarBBox()

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

◆ scrollBarHasMoved()

virtual void IlvScrolledGadget::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 in IlvText, IlvAbstractMatrix, and IlvStringList.

◆ ScrollBarMovedSymbol()

static IlSymbol* IlvScrolledGadget::ScrollBarMovedSymbol ( )
static

Returns the callback type for the Scroll Bar Moved callback.

The Scroll Bar Moved callback is invoked each time a scroll bar is moved.

Returns
The callback type for the Scroll Bar Moved callback.
See also
IlvGraphic::setCallback(), scrollBarHasMoved().

◆ scrollBarShowAsNeeded()

void IlvScrolledGadget::scrollBarShowAsNeeded ( IlBoolean  vertical,
IlBoolean  horizontal,
IlBoolean  redraw = IlTrue 
)

Sets the scroll bar mode of the internal scroll bars.

The "as needed" scroll bar mode lets the gadget manage the scroll bar visibility by showing or hiding the internal scroll bars when needed.

Parameters
verticalA Boolean value specifying whether the visibility of the internal vertical scroll bar should be managed by the gadget automatically.
horizontalA Boolean value specifying whether the visibility of the internal horizontal scroll bar should be managed by the gadget automatically.
redrawA Boolean value specifying whether the gadget should be redrawn.
See also
getScrollBarShowAsNeeded(), showScrollBar(), hideScrollBar().

◆ scrollBarVisibilityChanged()

virtual void IlvScrolledGadget::scrollBarVisibilityChanged ( IlvDirection  direction)
virtual

Is called when an internal scroll bar is shown or hidden.

Is called by handleEvent() each time the internal scroll bar specified by direction is shown or hidden. The default implementation invokes the Scroll Bar Visibility Changed callback.

Parameters
directionThe direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also
ScrollBarVisibilitySymbol().

Reimplemented in IlvText, and IlvMatrix.

◆ ScrollBarVisibilitySymbol()

static IlSymbol* IlvScrolledGadget::ScrollBarVisibilitySymbol ( )
static

Returns the callback type for the Scroll Bar Visibility Changed callback.

The Scroll Bar Visibility Changed callback is invoked each time an internal scroll bar is shown or hidden.

Returns
The callback type for the Scroll Bar Visibility Changed callback.
See also
IlvGraphic::setCallback(), scrollBarVisibilityChanged().

◆ setBottomMargin()

void IlvScrolledGadget::setBottomMargin ( IlUShort  margin)

Sets the bottom margin.

Parameters
marginThe new bottom margin.
See also
setMargin().

◆ setLeftMargin()

void IlvScrolledGadget::setLeftMargin ( IlUShort  margin)

Sets the left margin.

Parameters
marginThe new left margin.
See also
setMargin().

◆ setLimitHeightValue()

void IlvScrolledGadget::setLimitHeightValue ( IlvDim  value)
protected

Sets the limit value for the vertical scrolling.

This value is used to compute the maximum value that can have a vertical scroll bar connected to this scrolled gadget.

Parameters
valueThe new limit value for the vertical scrolling.
See also
setLimitWidthValue(), setScrollableHeight().

◆ setLimitWidthValue()

void IlvScrolledGadget::setLimitWidthValue ( IlvDim  value)
protected

Sets the limit value for the horizontal scrolling.

This value is used to compute the maximum value that can have a horizontal scroll bar connected to this scrolled gadget.

Parameters
valueThe new limit value for the horizontal scrolling.
See also
setLimitHeightValue(), setScrollableWidth().

◆ setMargin()

void IlvScrolledGadget::setMargin ( IlUShort  val)

Sets the left, right, top, and bottom margins.

Parameters
valThe new value for margins.
See also
setLeftMargin(), setRightMargin(), setTopMargin(), setBottomMargin().

◆ setRightMargin()

void IlvScrolledGadget::setRightMargin ( IlUShort  margin)

Sets the right margin.

Parameters
marginThe new right margin.
See also
setMargin().

◆ setScrollableHeight()

void IlvScrolledGadget::setScrollableHeight ( IlvDim  height)
protected

Sets the height of the scrollable area.

Call this method each time the height of the scrolled object encapsulated by this scrolled gadget changes.

Parameters
heightThe new scrollable height.
See also
setScrollableWidth(), setLimitHeightValue().

◆ setScrollableWidth()

void IlvScrolledGadget::setScrollableWidth ( IlvDim  width)
protected

Sets the width of the scrollable area.

Call this method each time the width of the scrolled object encapsulated by this scrolled gadget changes.

Parameters
widthThe new scrollable width.
See also
setScrollableHeight(), setLimitWidthValue().

◆ setTopMargin()

void IlvScrolledGadget::setTopMargin ( IlUShort  margin)

Sets the top margin.

Parameters
marginThe new top margin.
See also
setMargin().

◆ showScrollBar()

void IlvScrolledGadget::showScrollBar ( IlvDirection  direction,
IlBoolean  redraw = IlTrue 
)

Shows the specified internal scroll bar.

Does nothing if the scroll bar mode is "as needed".

Parameters
directionThe direction for which the scroll bar should be visible. Valid values are: IlvHorizontal and IlvVertical.
redrawA Boolean value specifying whether the gadget should be redrawn.
See also
getScrollBar(), getScrollBarShowAsNeeded(), hideScrollBar(), drawScrollBar().

◆ visibleBBox()

virtual void IlvScrolledGadget::visibleBBox ( IlvRect bbox,
const IlvTransformer t = 0 
) const
virtual

Returns the visible bounding box of the gadget.

Puts in bbox the visible bounding box of the scrolled gadget computed with the transformer t. The visible bounding box is used to draw the gadget contents. The default implementation computes the internal bounding box and subtracts the margins from it. If you want to change the visible bounding box, you can override this member function in a subclass.

Parameters
bboxThe returned visible bounding box.
tThe transformer applied to the gadget.
See also
internalBBox(), scrollBarBBox().

◆ whereIsScrollBar()

IlvPosition IlvScrolledGadget::whereIsScrollBar ( IlvDirection  direction) const

Returns the location of the specified internal scroll bar.

Parameters
directionThe direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
Returns
The location of the scroll bar specified by direction.
See also
moveScrollBar().