rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvScrollBar Class Reference

Gadget class. More...

#include <ilviews/gadgets/scrollb.h>

Inheritance diagram for IlvScrollBar:
IlvGadget IlvSimpleGraphic IlvGraphic

List of all members.

Public Member Functions

 IlvScrollBar (IlvDisplay *display, const IlvRect &rect, IlvOrientation orientation=IlvVertical, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
virtual void computeBBox (IlvRect &tlArrow, IlvRect &scrollingBox, IlvRect &brArrow, IlvRect &scrollerBox, const IlvTransformer *t=0) const
 Computes the bounding boxes of each component of the scroll bar.
virtual void drag ()
 Is called whenever the user moves the slider of the scroll bar.
virtual void dragged ()
 Is called when the user releases the slider of the scroll bar after dragging it.
IlInt getDecrement () const
 Returns the decrement value of the scroll bar.
IlInt getIncrement () const
 Returns the increment value of the scroll bar.
IlInt getMax () const
 Returns the maximum value of the scroll bar.
IlInt getMin () const
 Returns the minimum value of the scroll bar.
IlvOrientation getOrientation () const
 Returns the orientation of the scroll bar.
IlInt getPageDecrement () const
 Returns the page decrement of the scroll bar.
IlInt getPageIncrement () const
 Returns the page increment of the scroll bar.
IlInt getSliderSize () const
 Returns the size of the slider.
IlInt getValue () const
 Returns the value that is currently displayed by the scroll bar.
void getValues (IlInt &min, IlInt &max, IlInt &value, IlInt &sliderSize) const
 Returns the values of the scroll bar.
virtual IlInt positionToValue (const IlvPoint &point, const IlvTransformer *t=0) const
 Returns the value that is set by the scroll bar when the slider is positioned at the specified location.
void setDecrement (IlInt value)
 Sets the decrement value of the scroll bar.
void setIncrement (IlInt value)
 Sets the increment value of the scroll bar.
void setOrientation (IlvPosition orientation)
 Sets the orientation of the scroll bar.
void setPageDecrement (IlInt value)
 Sets the page decrement value of the scroll bar.
void setPageIncrement (IlInt value)
 Sets the page increment value of the scroll bar.
void setValue (IlInt value, IlBoolean redraw=IlFalse)
 Sets the current value displayed by the scroll bar.
void setValues (IlInt min, IlInt max, IlInt value, IlInt size)
 Sets the scroll bar parameters.
virtual void valueChanged ()
 Is called whenever the user changes the value of the scroll bar.

Friends

class IlvDefaultScrollBarLFHandler
class IlvScrollBarMLFHandler
class IlvScrollBarWLFHandler
class IlvStringList

Detailed Description

Gadget class.

Library: ilvgadgt

The IlvScrollBar class displays a rectangular area that contains two direction arrows, one at each end, and a slider that refers to a range. It is mainly used to scroll parts of windows.

IlvScrollBara.gif

Scroll Bars

The location of the slider can be set by dragging it inside the larger rectangular area.

See also:
IlvScrolledGadget, IlvScrolledView, IlvSlider

Constructor & Destructor Documentation

IlvScrollBar::IlvScrollBar ( IlvDisplay display,
const IlvRect rect,
IlvOrientation  orientation = IlvVertical,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the IlvScrollBar class. The initial minimum value is set to 0. The initial maximum value is set to 100. The initial current value is set to 50. The initial slider size is set to 10.

Parameters:
display The connection to the display.
rect The size and position of the scroll bar.
orientation The orientation of the scroll bar. Valid values are: IlvVertical and IlvHorizontal.
thickness The thickness of the scroll bar.
palette The palette of the scroll bar.

Member Function Documentation

virtual void IlvScrollBar::computeBBox ( IlvRect tlArrow,
IlvRect scrollingBox,
IlvRect brArrow,
IlvRect scrollerBox,
const IlvTransformer t = 0 
) const [virtual]

Computes the bounding boxes of each component of the scroll bar.

Parameters:
tlArrow The bounding box of the top (or left) arrow box.
scrollingBox The bounding box of the scrolling area.
brArrow The bounding box of the bottom (or right) arrow box.
scrollerBox The bounding box of the slider.
t The transformer applied to the bounding boxes.
virtual void IlvScrollBar::drag (  )  [virtual]

Is called whenever the user moves the slider of the scroll bar.

The default implementation calls the IlvScrollBar::valueChanged method.

See also:
valueChanged
virtual void IlvScrollBar::dragged (  )  [virtual]

Is called when the user releases the slider of the scroll bar after dragging it.

The default implementation calls the Secondary callback of the scroll bar.

See also:
drag, IlvGraphic::SCallbackSymbol
IlInt IlvScrollBar::getDecrement (  )  const

Returns the decrement value of the scroll bar.

The decrement value is subtracted from the current value of the scroll bar in the following cases: The scroll bar decrement arrow has been released, or the IlvUpKey has been pressed while the scroll bar had the keyboard focus, or the internal scroll bar timer has been triggered after the decrement arrow has been clicked on.

Returns:
The decrement value of the scroll bar.
See also:
setDecrement, getIncrement
IlInt IlvScrollBar::getIncrement (  )  const

Returns the increment value of the scroll bar.

The increment value is added to the current value of the scroll bar in the following cases: The scroll bar increment arrow has been released , or the IlvDownKey has been pressed while the scroll bar had the keyboard focus, or the internal scroll bar timer has been triggered after the increment arrow has been clicked on.

Returns:
The increment value of the scroll bar.
See also:
setIncrement, getDecrement
IlInt IlvScrollBar::getMax (  )  const

Returns the maximum value of the scroll bar.

Returns:
The maximum value of the scroll bar.
See also:
setMax, getMin
IlInt IlvScrollBar::getMin (  )  const

Returns the minimum value of the scroll bar.

Returns:
The minimum value of the scroll bar.
See also:
setMin, getMax
IlvOrientation IlvScrollBar::getOrientation (  )  const

Returns the orientation of the scroll bar.

Returns:
The orientation of the scroll bar.
See also:
setOrientation
IlInt IlvScrollBar::getPageDecrement (  )  const

Returns the page decrement of the scroll bar.

The page decrement value is subtracted from the current value of the scroll bar in the following cases: The scroll bar has been clicked in the area located above the slider, or the IlvPageUpKey has been pressed while the scroll bar had the keyboard focus.

Returns:
The page decrement of the scroll bar.
See also:
setPageDecrement, getPageIncrement
IlInt IlvScrollBar::getPageIncrement (  )  const

Returns the page increment of the scroll bar.

The page increment value is added to the current value of the scroll bar in the following cases: The scroll bar has been clicked in the area located below the slider, or the IlvPageDownKey has been pressed while the scroll bar had the keyboard focus.

Returns:
The page increment of the scroll bar.
See also:
setPageIncrement, getPageDecrement
IlInt IlvScrollBar::getSliderSize (  )  const

Returns the size of the slider.

Returns:
The size of the slider
See also:
setValues
IlInt IlvScrollBar::getValue (  )  const

Returns the value that is currently displayed by the scroll bar.

Returns:
The value that is currently displayed by the scroll bar.
See also:
setValue, getValues
void IlvScrollBar::getValues ( IlInt min,
IlInt max,
IlInt value,
IlInt sliderSize 
) const

Returns the values of the scroll bar.

Parameters:
min The returned minimum scroll bar value.
max The returned maximum scroll bar value.
value The returned scroll bar value.
size The returned slider size.
See also:
setValues, setValue
virtual IlInt IlvScrollBar::positionToValue ( const IlvPoint point,
const IlvTransformer t = 0 
) const [virtual]

Returns the value that is set by the scroll bar when the slider is positioned at the specified location.

Parameters:
point The point where the scroll bar is located.
t The transformer applied to the scroll bar.
Returns:
The value that is set by the scroll bar when the slider is positioned at the location indicated by point.
See also:
setValue
void IlvScrollBar::setDecrement ( IlInt  value  ) 

Sets the decrement value of the scroll bar.

By default the decrement value is set to the increment value (see IlvScrollBar::setIncrement).

Parameters:
value The new decrement value.
See also:
setIncrement, setPageDecrement, getDecrement
void IlvScrollBar::setIncrement ( IlInt  value  ) 

Sets the increment value of the scroll bar.

Also sets the decrement value to value. To have a decrement value different from the increment value, use the IlvScrollBar::setDecrement method.

Parameters:
value The new increment value.
See also:
setDecrement, setPageIncrement, getIncrement
void IlvScrollBar::setOrientation ( IlvPosition  orientation  ) 

Sets the orientation of the scroll bar.

Returns:
The new orientation of the scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also:
getOrientation
void IlvScrollBar::setPageDecrement ( IlInt  value  ) 

Sets the page decrement value of the scroll bar.

By default the page decrement value is set to the page increment value (see IlvScrollBar::setPageIncrement).

Parameters:
value The new page decrement value.
See also:
setPageIncrement, getPageIncrement, getPageDecrement
void IlvScrollBar::setPageIncrement ( IlInt  value  ) 

Sets the page increment value of the scroll bar.

Also sets the page decrement value to value. To have a page decrement value different from the page increment value, use the IlvScrollBar::setPageDecrement method.

Parameters:
value The new page increment value.
See also:
setPageDecrement, getPageIncrement, getPageDecrement
void IlvScrollBar::setValue ( IlInt  value,
IlBoolean  redraw = IlFalse 
)

Sets the current value displayed by the scroll bar.

If value is less than the minimum value, the scroll bar is set to the minimum value. If value is greater than the maximum value, the scroll bar is set to the maximum value.

Parameters:
value The new scroll bar value.
redraw A Boolean value specifying whether the scroll bar should be redrawn.
See also:
setValues, getValue
void IlvScrollBar::setValues ( IlInt  min,
IlInt  max,
IlInt  value,
IlInt  size 
)

Sets the scroll bar parameters.

Parameters:
min The minimum possible value.
max The maximum possible value.
value The current value.
size The slider size.
See also:
getValues
virtual void IlvScrollBar::valueChanged (  )  [virtual]

Is called whenever the user changes the value of the scroll bar.

The default implementation calls the Main callback of the scroll bar.

See also:
drag
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.