rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvSlider Class Reference

Gadget class. More...

#include <ilviews/gadgets/slider.h>

Inheritance diagram for IlvSlider:
IlvGadget IlvSimpleGraphic IlvGraphic

List of all members.

Public Member Functions

 IlvSlider (IlvDisplay *display, const IlvPoint &p, IlvDim size, IlvOrientation orientation=IlvLeft, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
 IlvSlider (IlvDisplay *display, const IlvRect &rect, IlvOrientation orientation=IlvLeft, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
IlInt getMax () const
 Returns the maximum value of the slider.
IlInt getMin () const
 Returns the minimum value of the slider.
IlvOrientation getOrientation () const
 Returns the slider orientation.
IlInt getPageIncrement () const
 Returns the page increment value of the slider.
IlvDim getSliderSize () const
 Returns the slider size.
IlvOrientation getThumbOrientation () const
 Returns the orientation of the slider thumb.
IlInt getValue () const
 Returns the current value of the slider.
void getValues (IlInt &min, IlInt &max, IlInt &value, IlvDim &sSize) const
 Returns all the parameters of the slider.
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.
void setOrientation (IlvOrientation p)
 Sets the slider orientation.
void setPageIncrement (IlInt value)
 Sets the page increment value of the slider.
void setThumbOrientation (IlvOrientation orientation)
 Sets the orientation of the slider thumb.
void setValue (IlInt value, IlBoolean redraw=IlFalse)
 Sets the slider value.
void setValues (IlInt min, IlInt max, IlInt value)
 Sets the minimum, maximum, and current values for the slider.
void setValues (IlInt min, IlInt max, IlInt value, IlvDim size)
 Sets the minimum, maximum, and current values of the slider.
virtual void valueChanged ()
 Is called whenever the user changes the value of the slider.

Friends

class IlvDefaultSliderLFHandler

Detailed Description

Gadget class.

Library: ilvgadgt

The IlvSlider class displays a rectangle containing a slider box that indicates a value.

IlvSlidera.gif

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

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

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:
point The point where the slider is located.
t The 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:
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.

Parameters:
value The 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:
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.
void IlvSlider::setValue ( IlInt  value,
IlBoolean  redraw = IlFalse 
)

Sets the slider value.

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

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

Parameters:
min The minimum slider value.
max The maximum slider value.
value The current slider value.
See also:
getValues
void IlvSlider::setValues ( IlInt  min,
IlInt  max,
IlInt  value,
IlvDim  size 
)

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

Parameters:
min The minimum slider value.
max The maximum slider value.
value The current slider value.
size The slider size.
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.

 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.