Dialog CATDlgSlider

Usage: you must use this class as is. You should never derive it.


public class CATDlgSlider

Base class for scale control.
Role: The slider enables the end user to select a value among a discrete list of values ranging from a start value to an end value. The value can be incremented or decremented by dragging along with the mouse, or clicking in the sliding area. You set the start and end values as floats, while you set the step number as an int. The step value is the difference between start and end values, divided by the number of steps. A slider can be horizontal or vertical.
Use sliders whenever you propose to the end user to select a numerical value from a discrete list in a given range.


Constructor and Destructor Index


o CATDlgSlider(CATDialog*,CATString&,CATDlgStyle)
Constructs a CATDlgSlider.
o ~CATDlgSlider()

Method Index


o GetCurrentValue()
Returns the current float value.
o GetDecimalPoint()
Returns the number of displayed decimals.
o GetRange(float&,float&,int&)
Retrieves the minimum, the maximum values and the int number of steps for the range.
o GetSliderDragNotification()
Returns the event notification sent as long as the slider is dragged.
o GetSliderModifyNotification()
Returns the event notification sent whenever the end user clicks in the scrollable field.
o SetCurrentValue(float,int)
Sets the current float value.
o SetDecimalPoint(int)
Sets the number of displayed decimals.
o SetRange(float,float,int)
Sets the minimum, the maximum values and the int number of steps for the range.

Constructor and Destructor


o CATDlgSlider
public CATDlgSlider( iParent,
const iObjectName,
iStyle=NULL)
Constructs a CATDlgSlider.
Parameters:
iParent
The parent of the scale control.
iObjectName
The name of the scale control.
iStyle
The style of the scale control. The style can be :
CATDlgCtrHorizontal
: the slider is horizontal (this is the default),
CATDlgCtrVertical
: the slider is vertical,
CATDlgSldNoValue
: the slider doesn't display the current value.
o ~CATDlgSlider
public virtual ~CATDlgSlider()

Methods


o GetCurrentValue
public GetCurrentValue()
Returns the current float value.
o GetDecimalPoint
public GetDecimalPoint()
Returns the number of displayed decimals.
o GetRange
public GetRange( oMin,
oMax,
oStepCount)
Retrieves the minimum, the maximum values and the int number of steps for the range.
Parameters:
oMin
The returned minimum value for the range.
oMax
The returned maximum value for the range.
oStepCount
The returned number of steps for the range.
o GetSliderDragNotification
public GetSliderDragNotification()
Returns the event notification sent as long as the slider is dragged.
o GetSliderModifyNotification
public GetSliderModifyNotification()
Returns the event notification sent whenever the end user clicks in the scrollable field. If the click is right or above the slider, the value increments of one step, and decrements of one step otherwise. The end user can press the left mouse key continuously and then the current value increments or decrements accordingly as long as the left mouse key is pressed, or the start or end value is reached.
o SetCurrentValue
public SetCurrentValue( iValue,
iNotify= 1 )
Sets the current float value.
Parameters:
iValue
The value to set.
iNotify
Set this parameter to a non null value if you want the corresponding notification to be sent. Otherwise set it to 0, so no notification will be sent.
o SetDecimalPoint
public SetDecimalPoint( iDecimals)
Sets the number of displayed decimals.
Parameters:
iDecimals
The number of displayed decimals to set.
o SetRange
public SetRange( iMin,
iMax,
iStepCount= 10 )
Sets the minimum, the maximum values and the int number of steps for the range.
Parameters:
iMin
The minimum value to set for the range.
iMax
The maximum value to set for the range.
iStepCount
The number of steps to set for the range.

This object is included in the file: CATDlgSlider.h
If needed, your Imakefile.mk should include the module: DI0PANV2

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.