Rogue Wave Views Gadgets Package API Reference Guide |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/gadgets/scrollb.h>
Public Member Functions | |
IlvScrollBar (IlvDisplay *display, const IlvRect &rect, IlvOrientation orientation=IlvVertical, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
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. More... | |
virtual void | drag () |
Is called whenever the user moves the slider of the scroll bar. More... | |
virtual void | dragged () |
Is called when the user releases the slider of the scroll bar after dragging it. More... | |
IlInt | getDecrement () const |
Returns the decrement value of the scroll bar. More... | |
IlInt | getIncrement () const |
Returns the increment value of the scroll bar. More... | |
IlInt | getMax () const |
Returns the maximum value of the scroll bar. More... | |
IlInt | getMin () const |
Returns the minimum value of the scroll bar. More... | |
IlvOrientation | getOrientation () const |
Returns the orientation of the scroll bar. More... | |
IlInt | getPageDecrement () const |
Returns the page decrement of the scroll bar. More... | |
IlInt | getPageIncrement () const |
Returns the page increment of the scroll bar. More... | |
IlInt | getSliderSize () const |
Returns the size of the slider. More... | |
IlInt | getValue () const |
Returns the value that is currently displayed by the scroll bar. More... | |
void | getValues (IlInt &min, IlInt &max, IlInt &value, IlInt &sliderSize) const |
Returns the values of the scroll bar. More... | |
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. More... | |
void | setDecrement (IlInt value) |
Sets the decrement value of the scroll bar. More... | |
void | setIncrement (IlInt value) |
Sets the increment value of the scroll bar. More... | |
void | setOrientation (IlvPosition orientation) |
Sets the orientation of the scroll bar. More... | |
void | setPageDecrement (IlInt value) |
Sets the page decrement value of the scroll bar. More... | |
void | setPageIncrement (IlInt value) |
Sets the page increment value of the scroll bar. More... | |
void | setValue (IlInt value, IlBoolean redraw=IlFalse) |
Sets the current value displayed by the scroll bar. More... | |
void | setValues (IlInt min, IlInt max, IlInt value, IlInt size) |
Sets the scroll bar parameters. More... | |
virtual void | valueChanged () |
Is called whenever the user changes the value of the scroll bar. More... | |
Friends | |
class | IlvDefaultScrollBarLFHandler |
class | IlvStringList |
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.
Scroll Bars
The location of the slider can be set by dragging it inside the larger rectangular area.
IlvScrolledGadget
, IlvScrolledView
, IlvSlider
.Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue()
, IlvValueInterface::queryValues()
, IlvValueInterface::changeValue()
, IlvValueInterface::changeValues()
. This class inherits the accessors of its superclass IlvGadget
and adds the following ones:
Name | Type | Equivalent methods |
---|---|---|
minValue | Int | getMin() , setValues() |
maxValue | Int | getMax() , setValues() |
value | Int | getValue() , setValues() |
sliderSize | Int | getSliderSize() , setValues() |
increment | Int | getIncrement() , setIncrement() |
decrement | Int | getDecrement() , setDecrement() |
pageIncrement | Int | getPageIncrement() , setPageIncrement() |
pageDecrement | Int | getPageDecrement() , setPageDecrement() |
orientation | Direction | getOrientation() , setOrientation() |
This class supports the following CSS properties:
Graphic property | CSS property | Type |
---|---|---|
Background color | background-color | Color |
Foreground color | color | Color |
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
.
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. |
|
virtual |
Computes the bounding boxes of each component of the scroll bar.
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 |
Is called whenever the user moves the slider of the scroll bar.
The default implementation calls the valueChanged
method.
valueChanged()
.
|
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.
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.
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.
setIncrement()
, getDecrement()
. IlInt IlvScrollBar::getMax | ( | ) | const |
Returns the maximum value of the scroll bar.
setMax()
, getMin()
. IlInt IlvScrollBar::getMin | ( | ) | const |
Returns the minimum value of the scroll bar.
setMin()
, getMax()
. IlvOrientation IlvScrollBar::getOrientation | ( | ) | const |
Returns the orientation of the scroll bar.
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.
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.
setPageIncrement()
, getPageDecrement()
. IlInt IlvScrollBar::getSliderSize | ( | ) | const |
IlInt IlvScrollBar::getValue | ( | ) | const |
Returns the value that is currently displayed by the scroll bar.
setValue()
, getValues()
. Returns the values of the scroll bar.
min | The returned minimum scroll bar value. |
max | The returned maximum scroll bar value. |
value | The returned scroll bar value. |
sliderSize | The returned slider size. |
setValues()
, setValue()
.
|
virtual |
Returns the value that is set by the scroll bar when the slider is positioned at the specified location.
point | The point where the scroll bar is located. |
t | The transformer applied to the scroll bar. |
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 setIncrement()
).
value | The new decrement value. |
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 setDecrement()
method.
value | The new increment value. |
setDecrement()
, setPageIncrement()
, getIncrement()
. void IlvScrollBar::setOrientation | ( | IlvPosition | orientation | ) |
Sets the orientation of the scroll bar.
IlvHorizontal
and IlvVertical
. 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 setPageIncrement()
).
value | The new page decrement value. |
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 setPageDecrement()
method.
value | The new page increment value. |
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.
value | The new scroll bar value. |
redraw | Specifies whether the scroll bar should be redrawn. |
setValues()
, getValue()
. Sets the scroll bar parameters.
min | The minimum possible value. |
max | The maximum possible value. |
value | The current value. |
size | The slider size. |
getValues()
.
|
virtual |
Is called whenever the user changes the value of the scroll bar.
The default implementation calls the Main callback of the scroll bar.
drag()
. © Copyright 2018, 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.