Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/gadgets/slider.h>
Public Member Functions | |
IlvSlider (IlvDisplay *display, const IlvRect &rect, IlvOrientation orientation=IlvLeft, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlvSlider (IlvDisplay *display, const IlvPoint &p, IlvDim size, IlvOrientation orientation=IlvLeft, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. More... | |
IlInt | getMax () const |
Returns the maximum value of the slider. More... | |
IlInt | getMin () const |
Returns the minimum value of the slider. More... | |
IlvOrientation | getOrientation () const |
Returns the slider orientation. More... | |
IlInt | getPageIncrement () const |
Returns the page increment value of the slider. More... | |
IlvDim | getSliderSize () const |
Returns the slider size. More... | |
IlvOrientation | getThumbOrientation () const |
Returns the orientation of the slider thumb. More... | |
IlInt | getValue () const |
Returns the current value of the slider. More... | |
void | getValues (IlInt &min, IlInt &max, IlInt &value, IlvDim &sSize) const |
Returns all the parameters of the slider. More... | |
IlInt | positionToValue (const IlvPoint &point, const IlvTransformer *t=0) const |
Returns the value stored in this object when the slider is located at the specified point. More... | |
void | setOrientation (IlvOrientation p) |
Sets the slider orientation. More... | |
void | setPageIncrement (IlInt value) |
Sets the page increment value of the slider. More... | |
void | setThumbOrientation (IlvOrientation orientation) |
Sets the orientation of the slider thumb. More... | |
void | setValue (IlInt value, IlBoolean redraw=IlFalse) |
Sets the slider value. More... | |
void | setValues (IlInt min, IlInt max, IlInt value, IlvDim size) |
Sets the minimum, maximum, and current values of the slider. More... | |
void | setValues (IlInt min, IlInt max, IlInt value) |
Sets the minimum, maximum, and current values for the slider. More... | |
virtual void | valueChanged () |
Is called whenever the user changes the value of the slider. More... | |
Friends | |
class | IlvDefaultSliderLFHandler |
Gadget class.
Library: ilvgadgt
The IlvSlider
class displays a rectangle containing a slider box that indicates a value.
Sliders
The slider box can be moved by dragging it along the slider area, therefore changing the current slider value.
IlvSlider::IlvSlider | ( | IlvDisplay * | display, |
const IlvRect & | rect, | ||
IlvOrientation | orientation = IlvLeft , |
||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Initializes a new instance of the IlvSlider
class. The default minimum value is set to 0
. The default maximum value is set to 100
. The default current value is set to 50
, and the default slider size is set to 10
.
display | The connection to the display. |
rect | The size and position of the slider. |
orientation | The orientation of the slider. Valid values are: IlvLeft , IlvRight , IlvTop , and IlvBottom . |
thickness | The thickness of the slider. |
palette | The palette used to draw the slider. Note: The slider cursor (or thumb) size and the orientation impact the way it is displayed. If the orientation is vertical (that is IlvLeft or IlvRight) and the width of the rectangle is too small, the thumb will not be visible. Similarily, if the orientation is horizontal (that is IlvTop or IlvBottom) and the height of the rectangle is too small, the thumb will not be visible. |
IlvSlider::IlvSlider | ( | IlvDisplay * | display, |
const IlvPoint & | p, | ||
IlvDim | size, | ||
IlvOrientation | orientation = IlvLeft , |
||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Initializes a new instance of the IlvSlider
class. The default minimum value is set to 0
. The default maximum value is set to 100
. The default current value is set to 50
, and the default slider size is set to 10
.
display | The connection to the display. |
point | The position of the slider. |
size | The size of the slider. |
orientation | The orientation of the slider. Valid values are: IlvLeft , IlvRight , IlvTop , and IlvBottom . |
thickness | The thickness of the slider. |
palette | The palette used to draw the slider. |
IlInt IlvSlider::getMax | ( | ) | const |
IlInt IlvSlider::getMin | ( | ) | const |
IlvOrientation IlvSlider::getOrientation | ( | ) | const |
Returns the slider orientation.
IlInt IlvSlider::getPageIncrement | ( | ) | const |
Returns the page increment value of the slider.
IlvDim IlvSlider::getSliderSize | ( | ) | const |
IlvOrientation IlvSlider::getThumbOrientation | ( | ) | const |
Returns the orientation of the slider thumb.
IlvSlider::setThumbOrientation
IlInt IlvSlider::getValue | ( | ) | const |
Returns all the parameters of the slider.
IlInt IlvSlider::positionToValue | ( | const IlvPoint & | point, |
const IlvTransformer * | t = 0 |
||
) | const |
Returns the value stored in this object when the slider is located at the specified point.
point | The point where the slider is located. |
t | The transformer applied to this object. |
void IlvSlider::setOrientation | ( | IlvOrientation | p | ) |
Sets the slider orientation.
orientation | The new slider orientation. Valid values are: IlvTop (the slider is oriented vertically with its minimum value at the top), IlvBottom (the slider is oriented vertically with its minimum value at the bottom), IlvLeft (the slider is oriented horizontally with its minimum value on the left), IlvRight (the slider is oriented horizontally with its minimum value on the right). IlvVertical is equivalent to IlvTop and IlvHorizontal to IlvLeft . |
void IlvSlider::setPageIncrement | ( | IlInt | value | ) |
Sets the page increment value of the slider.
The page increment value is the value added to the slider value when the user presses the PageUp key or clicks outside the slider.
value | The new page increment value. |
void IlvSlider::setThumbOrientation | ( | IlvOrientation | orientation | ) |
Sets the orientation of the slider thumb.
This value is used to compute the thumb that is drawn on the slider track. This value is only used in the Microsoft Windows 95 or ViewsX look-and-feel.
direction | The new thumb orientation. The valid values are: IlvTop , IlvBottom , or both, for an horizontal slider, and IlvLeft , IlvRight, or both, for a vertical slider. |
Sets the slider value.
value | The new slider value. |
redraw | A Boolean value specifying whether the slider should be redrawn. |
Sets the minimum, maximum, and current values of the slider.
min | The minimum slider value. |
max | The maximum slider value. |
value | The current slider value. |
size | The slider size. |
Sets the minimum, maximum, and current values for the slider.
min | The minimum slider value. |
max | The maximum slider value. |
value | The current slider value. |
|
virtual |
Is called whenever the user changes the value of the slider.
The default implementation calls the Main callback of the slider.
© 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.