All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

Dialog Class CATDlgSpinner

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---System.CATEventSubscriber
        |
        +---System.CATCommand
          |
          +---Dialog.CATDialog
            |
            +---Dialog.CATDlgControl
              |
              +---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&,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 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 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,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 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 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(CATDialog* iParent,
const CATString& iObjectName,
CATDlgStyle 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 CATULong 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 CATULong 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 const CATUnicodeString & GetCurrentText()
Returns the current text (for free increment spinners only).
o GetCurrentValue
public float GetCurrentValue()
Returns the current float value.
o GetFormat
public char* GetFormat()
Returns the format of the displayed value as a character string (except with double precision and free increment spinners).
o GetMinMaxStep
public void GetMinMaxStep(double& oMin,
double& oMax,
double& oStepCount)
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 void GetRange(float& oMin,
float& oMax,
float& 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 GetRange
public void GetRange(float& oMin,
float& oMax,
int& 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 GetSpinnerBtnDownNotification
public CATNotification * GetSpinnerBtnDownNotification()const
Returns the event notification sent whenever the down (decrement) arrow is clicked. It is available with CATDlgSpnUserIncrement style only.
o GetSpinnerBtnUpNotification
public CATNotification * GetSpinnerBtnUpNotification()const
Returns the event notification sent whenever the up (increment) arrow is clicked. It is available with CATDlgSpnUserIncrement style only.
o GetSpinnerModifyNotification
public CATNotification * GetSpinnerModifyNotification()const
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 double GetValue()
Returns the current double value (for double precision spinners only).
o GetVisibleTextWidth
public int GetVisibleTextWidth()
Returns the number of visible characters.
o SetButtonDownSensitivity
public void SetButtonDownSensitivity(CATULong 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 void SetButtonUpSensitivity(CATULong 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 void SetCurrentText( const CATUnicodeString& iText,
int 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 float SetCurrentValue(float iValue,
int 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 void SetFormat(char* 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 void SetMinMaxStep(double iMin,
double iMax,
double iStep,
int 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 void SetRange(float iMin,
float iMax,
float iStepCount= 10.f,
int 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 SetRange
public void SetRange(float iMin,
float iMax,
int iStepCount= 10,
int 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 SetValue
public void SetValue(double iValue,
int 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 void SetVisibleTextWidth(int 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 © 2003, Dassault Systèmes. All rights reserved.