Dialog CATDlgSpinner

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


public class CATDlgSpinner

Base class for spinner counters.
Role: The spinner allows the end user to select a numerical value among a discrete list of values, ranging from a start value to an end value. The value can be incremented or decremented by clicking the arrows. The up arrow is dedicated to incrementing while the down arrow is for decrementing. You set the start and end values as floats, while you set the step number either as an int or as a float. The step value is the difference between start and end values, divided by the number of steps. The default values ranges from 1 to 10 with 10 steps.
Use spinner whenever you propose to the end user to enter a numerical value selected from a discrete list.


Constructor and Destructor Index


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

Method Index


o GetButtonDownSensitivity()
Returns the down arrow sensitivity.
o GetButtonUpSensitivity()
Returns the up arrow sensitivity.
o GetCurrentText()
Returns the current text (for free increment spinners only).
o GetCurrentValue()
Returns the current float value.
o GetFormat()
Returns the format of the displayed value as a character string (except with double precision and free increment spinners).
o GetMinMaxStep(double&,double&,double&)
Retrieves the minimum, the maximum values and the number of steps for the range for double precision spinners.
o GetRange(float&,float&,int&)
Retrieves the minimum, the maximum values and the int number of steps for the range (except with double precision and free increment spinners).
o GetRange(float&,float&,float&)
Retrieves the minimum, the maximum values and the float number of steps for the range (except with double precision and free increment spinners).
o GetSpinnerBtnDownNotification()
Returns the event notification sent whenever the down (decrement) arrow is clicked.
o GetSpinnerBtnUpNotification()
Returns the event notification sent whenever the up (increment) arrow is clicked.
o GetSpinnerModifyNotification()
Returns the event notification sent whenever the current value is modified.
o GetValue()
Returns the current double value (for double precision spinners only).
o GetVisibleTextWidth()
Returns the number of visible characters.
o SetButtonDownSensitivity(CATULong)
Sets the down arrow button sensitivity.
o SetButtonUpSensitivity(CATULong)
Sets the up arrow button sensitivity.
o SetCurrentText(CATUnicodeString&,int)
Sets the current text (for free increment spinners only).
o SetCurrentValue(float,int)
Sets the current float value.
o SetFormat(char*)
Sets the format of the displayed value as a character string (except with double precision and free increment spinners).
o SetMinMaxStep(double,double,double,int)
Sets the minimum, the maximum values and the number of steps for the range for double precision spinners.
o SetRange(float,float,int,int)
Sets the minimum, the maximum values and the int number of steps for the range (except with double precision and free increment spinners).
o SetRange(float,float,float,int)
Sets the minimum, the maximum values and the float number of steps for the range (except with double precision and free increment spinners).
o SetValue(double,int)
Sets the current double value (for double precision spinners only).
o SetVisibleTextWidth(int)
Sets the number of visible characters.

Constructor and Destructor


o CATDlgSpinner
public CATDlgSpinner( iParent,
const iObjectName,
iStyle=NULL)
Constructs a CATDlgSpinner.
Parameters:
iParent
The parent of the spinner.
iObjectName
The name of the spinner.
iStyle
The style of the spinner. Styles can be concatenated using the "|" character. The style can be :
NULL
: for the default spinner (if no value is passed) ; the spinner field can not be edited.
CATDlgSpnEntry
: the spinner field can be edited. If the user keys in a value out of the spinner range, this value is not accepted and the previous valid value is used instead.
CATDlgSpnUserIncrement
: prevents from automatically incrementing or decrementing the displayed value when the user selects the arrows. You need to provide your own methods instead, for example to increment or decrement with a parameter different from the step.
CATDlgSpnDouble
: the entered number must be a double precision floating number.
o ~CATDlgSpinner
public virtual ~CATDlgSpinner()

Methods


o GetButtonDownSensitivity
public GetButtonDownSensitivity()
Returns the down arrow sensitivity. The sensitivity can be :
CATDlgEnable
: the arrow button is sensitive to the user action.
CATDlgDisable
: the arrow button is not sensitive to the user action.
o GetButtonUpSensitivity
public GetButtonUpSensitivity()
Returns the up arrow sensitivity. The sensitivity can be :
CATDlgEnable
: the arrow button is sensitive to the user action.
CATDlgDisable
: the arrow button is not sensitive to the user action.
o GetCurrentText
public GetCurrentText()
Returns the current text (for free increment spinners only).
o GetCurrentValue
public GetCurrentValue()
Returns the current float value.
o GetFormat
public GetFormat()
Returns the format of the displayed value as a character string (except with double precision and free increment spinners).
o GetMinMaxStep
public GetMinMaxStep( oMin,
oMax,
oStep)
Retrieves the minimum, the maximum values and the number of steps for the range for double precision spinners.
Parameters:
oMin
The returned minimum value for the range.
oMax
The returned maximum value for the range.
oStepCount
The returned step value.
o GetRange
public GetRange( oMin,
oMax,
oStepCount)
Retrieves the minimum, the maximum values and the int number of steps for the range (except with double precision and free increment spinners). For double precision spinners, use GetMinMaxStep instead.
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 GetRange
public GetRange( oMin,
oMax,
oStepCount)
Retrieves the minimum, the maximum values and the float number of steps for the range (except with double precision and free increment spinners). For double precision spinners, use GetMinMaxStep instead.
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 GetSpinnerBtnDownNotification
public GetSpinnerBtnDownNotification()
Returns the event notification sent whenever the down (decrement) arrow is clicked. It is available with CATDlgSpnUserIncrement style only.
o GetSpinnerBtnUpNotification
public GetSpinnerBtnUpNotification()
Returns the event notification sent whenever the up (increment) arrow is clicked. It is available with CATDlgSpnUserIncrement style only.
o GetSpinnerModifyNotification
public GetSpinnerModifyNotification()
Returns the event notification sent whenever the current value is modified. It is sent whatever the means used to modify the value, such as arrows or field edition.
o GetValue
public GetValue()
Returns the current double value (for double precision spinners only).
o GetVisibleTextWidth
public GetVisibleTextWidth()
Returns the number of visible characters.
o SetButtonDownSensitivity
public SetButtonDownSensitivity( iState)
Sets the down arrow button sensitivity.(for free increment spinners only).
Parameters:
iState
The sensitivity to set for the down arrow button. The sensitivity can be :
CATDlgEnable
: the arrow button is sensitive to the user action.
CATDlgDisable
: the arrow button is not sensitive to the user action.
o SetButtonUpSensitivity
public SetButtonUpSensitivity( iState)
Sets the up arrow button sensitivity.(for free increment spinners only).
Parameters:
iState
The sensitivity to set for the up arrow button. The sensitivity can be :
CATDlgEnable
: the arrow button is sensitive to the user action.
CATDlgDisable
: the arrow button is not sensitive to the user action.
o SetCurrentText
public SetCurrentText( const iText,
iNotify= 1)
Sets the current text (for free increment spinners only).
Parameters:
iText
The text 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 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 SetFormat
public SetFormat( iFormat)
Sets the format of the displayed value as a character string (except with double precision and free increment spinners). Advice : use %g instead of %f.
Parameters:
iFormat
The format to set for the displayed value.
o SetMinMaxStep
public SetMinMaxStep( iMin,
iMax,
iStep,
iNotify= 1)
Sets the minimum, the maximum values and the number of steps for the range for double precision spinners.
Parameters:
iMin
The minimum value to set for the range.
iMax
The maximum value to set for the range.
iStep
The step value.
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 SetRange
public SetRange( iMin,
iMax,
iStepCount= 10,
iNotify= 1 )
Sets the minimum, the maximum values and the int number of steps for the range (except with double precision and free increment spinners). For double precision spinners, use SetMinMaxStep instead.
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.
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 SetRange
public SetRange( iMin,
iMax,
iStepCount= 10.f,
iNotify= 1 )
Sets the minimum, the maximum values and the float number of steps for the range (except with double precision and free increment spinners). For double precision spinners, use SetMinMaxStep instead.
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.
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 SetValue
public SetValue( iValue,
iNotify=1)
Sets the current double value (for double precision spinners only).
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 SetVisibleTextWidth
public SetVisibleTextWidth( iWidth)
Sets the number of visible characters.
Parameters:
iWidth
The number of visible characters to set.

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

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