rwlogo

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Friends
IlvSlider Class Reference

Gadget class. More...

#include <ilviews/gadgets/slider.h>

Inheritance diagram for IlvSlider:
IlvGadget IlvSimpleGraphic IlvStyleable IlvGraphic

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
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Parameters
displayThe connection to the display.
rectThe size and position of the slider.
orientationThe orientation of the slider. Valid values are: IlvLeft, IlvRight, IlvTop, and IlvBottom.
thicknessThe thickness of the slider.
paletteThe 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.

Parameters
displayThe connection to the display.
pointThe position of the slider.
sizeThe size of the slider.
orientationThe orientation of the slider. Valid values are: IlvLeft, IlvRight, IlvTop, and IlvBottom.
thicknessThe thickness of the slider.
paletteThe palette used to draw the slider.

Member Function Documentation

IlInt IlvSlider::getMax ( ) const

Returns the maximum value of the slider.

Returns
The maximum value of the slider.
See Also
setValues, getMin
IlInt IlvSlider::getMin ( ) const

Returns the minimum value of the slider.

Returns
The minimum value of the slider.
See Also
setValues, getMax
IlvOrientation IlvSlider::getOrientation ( ) const

Returns the slider orientation.

Returns
The slider orientation.
IlInt IlvSlider::getPageIncrement ( ) const

Returns the page increment value of the slider.

Returns
The page increment value of the slider.
See Also
setPageIncrement
IlvDim IlvSlider::getSliderSize ( ) const

Returns the slider size.

Returns
The slider size.
See Also
setValues
IlvOrientation IlvSlider::getThumbOrientation ( ) const

Returns the orientation of the slider thumb.

Returns
The orientation of the slider thumb.
See Also
IlvSlider::setThumbOrientation
IlInt IlvSlider::getValue ( ) const

Returns the current value of the slider.

Returns
The current slider value.
See Also
setValue
void IlvSlider::getValues ( IlInt min,
IlInt max,
IlInt value,
IlvDim sSize 
) const

Returns all the parameters of the slider.

Returns
All the parameters of this slider.
See Also
setValues
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.

Parameters
pointThe point where the slider is located.
tThe transformer applied to this object.
Returns
The value stored in this object when the slider is located at point and drawn with the transformer t.
void IlvSlider::setOrientation ( IlvOrientation  p)

Sets the slider orientation.

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

Parameters
valueThe new page increment value.
See Also
getPageIncrement
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.

Parameters
directionThe new thumb orientation. The valid values are: IlvTop, IlvBottom, or both, for an horizontal slider, and IlvLeft, IlvRight, or both, for a vertical slider.
void IlvSlider::setValue ( IlInt  value,
IlBoolean  redraw = IlFalse 
)

Sets the slider value.

Parameters
valueThe new slider value.
redrawA Boolean value specifying whether the slider should be redrawn.
See Also
getValue
void IlvSlider::setValues ( IlInt  min,
IlInt  max,
IlInt  value,
IlvDim  size 
)

Sets the minimum, maximum, and current values of the slider.

Parameters
minThe minimum slider value.
maxThe maximum slider value.
valueThe current slider value.
sizeThe slider size.
See Also
getValues
void IlvSlider::setValues ( IlInt  min,
IlInt  max,
IlInt  value 
)

Sets the minimum, maximum, and current values for the slider.

Parameters
minThe minimum slider value.
maxThe maximum slider value.
valueThe current slider value.
See Also
getValues
virtual void IlvSlider::valueChanged ( )
virtual

Is called whenever the user changes the value of the slider.

The default implementation calls the Main callback of the slider.


© Copyright 2014, 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.