Rhino C++ API  8.14
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CRhRdkSdkNumberEdit Class Referenceabstract

#include <RhRdkSdkNumberEdit.h>

Inheritance diagram for CRhRdkSdkNumberEdit:
CRhRdkSdkIntegerNumberEdit CRhRdkSdkRealNumberEdit

Public Member Functions

virtual int AutoRepeatDelay (void) const
 
virtual double ChangeThreshold (void) const
 
virtual int CharFromPos (const CPoint &pt) const
 
virtual bool CreateCtrl (DWORD dwStyle, const ON_4iRect &rect, CWnd *pParentWnd, UINT iID)
 
virtual bool EditByTyping (void) const
 
virtual bool EnableSpinnerWhenBlank (void) const
 
virtual void * EVF (const wchar_t *wszFunc, void *pvData)
 
virtual bool Format (const double dValue, CString &sText) const
 
virtual bool IsBlank (void) const
 
virtual bool IsFixedSpinnerDelta (void) const
 
virtual bool IsFocused (void) const
 
virtual bool IsLocked (void) const
 
virtual double LinearRollingDelta (void) const
 
virtual bool LockFrom (const CRhRdkSdkNumberEdit &srce)
 
virtual void OnBeginRollSpinner (void)
 
virtual void OnEndRollSpinner (void)
 
virtual void OnUserChangedValue (void)
 
virtual void OnValueChanged (void)
 
virtual bool Parse (const TCHAR *tsz, double &dValueOut) const
 
virtual void RemoveBounds (void)
 
virtual void RemoveFixedSpinnerDelta (void)
 
virtual bool SendChangeWhenDragging (void) const
 
virtual void SetAllowSetDuringChange (bool bAllow=true)
 
virtual void SetAutoRepeatDelay (int iDelay)
 
virtual void SetBlank (bool bBlank=true)
 
virtual void SetBounds (double dLowerBound, double dUpperBound)
 
virtual void SetCanHideCursor (bool bCanHide=true)
 
virtual void SetChangeThreshold (double dThresh)
 
virtual void SetControlKeyScaling (double d)
 
virtual void SetEditByTyping (bool bCanType)
 
virtual void SetEnableSpinnerWhenBlank (bool bEnable=true)
 
virtual void SetFixedSpinnerDelta (double dDelta)
 
virtual void SetForcedStyles (DWORD dwStyles)
 
virtual void SetKeyScaling (double dArrow=1.0, double dPage=10.0)
 
virtual void SetLimitText (int iMax)
 
virtual void SetLinearRollingDelta (double dDelta)
 
virtual bool SetLock (bool bLocked)
 
virtual void SetLowerBound (double dLowerBound)
 
virtual void SetSel (int iStartChar, int iEndChar, bool bNoScroll=false)
 
virtual void SetSendChangeWhenDragging (bool bSend=true)
 
virtual void SetShiftKeyScaling (double d)
 
virtual void SetSimpleArithmeticOn (bool bOn=true)
 
virtual void SetSpinnerVisibility (bool bVisible)
 
virtual void SetSpinnerWidth (int iWidth)
 
virtual void SetSuffixString (const TCHAR *szSuffix)
 
virtual void SetUpperBound (double dUpperBound)
 
virtual void SetUseHandCursor (bool bUseHand=true)
 
virtual bool SimpleArithmeticOn (void) const
 
virtual HCURSOR SpinDragCursor (void) const
 
virtual int SpinnerWidth (void) const
 
virtual bool UseHandCursor (void) const
 
virtual bool WantThemedSpinner (void) const
 

Static Public Member Functions

static UINT ChangedMessageNumber (void)
 

Protected Member Functions

virtual const CImpl & Impl (void) const =0
 
virtual CImpl & Impl (void)=0
 
afx_msg void OnKillfocusEdit ()
 
virtual void PreSubclassWindow ()
 

Member Function Documentation

◆ AutoRepeatDelay()

virtual int CRhRdkSdkNumberEdit::AutoRepeatDelay ( void  ) const
virtual

Get the delay, in milliseconds, before auto-repeat begins when the mouse is held down on the spinner.

◆ ChangedMessageNumber()

static UINT CRhRdkSdkNumberEdit::ChangedMessageNumber ( void  )
static

Get the registered message number that will be sent when the user changes the value in the edit box.

Returns
The message number to use in your ON_REGISTERED_MESSAGE handler. Example usage:
const UINT uEditChangedMsg = CRhRdkSdkNumberEdit::ChangedMessageNumber();
...
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
ON_REGISTERED_MESSAGE(uEditChangedMsg, OnEditChanged)
END_MESSAGE_MAP()
...
LRESULT CMyDialog::OnEditChanged(WPARAM wParam, LPARAM lParam)
{
// wParam is the control id.
CWnd* pWnd = GetDlgItem(wParam);
...
// lParam is a pointer to the control.
CRhRdkSdkNumberEdit* pEdit = reinterpret_cast<CRhRdkSdkNumberEdit*>(lParam);
...
return 1;
}
...

◆ ChangeThreshold()

virtual double CRhRdkSdkNumberEdit::ChangeThreshold ( void  ) const
virtual

Get the threshold used for detecting a change.

◆ CharFromPos()

virtual int CRhRdkSdkNumberEdit::CharFromPos ( const CPoint &  pt) const
virtual

◆ CreateCtrl()

virtual bool CRhRdkSdkNumberEdit::CreateCtrl ( DWORD  dwStyle,
const ON_4iRect rect,
CWnd *  pParentWnd,
UINT  iID 
)
virtual

Create the control dynamically.

Returns
true if successful, else false.

◆ EditByTyping()

virtual bool CRhRdkSdkNumberEdit::EditByTyping ( void  ) const
virtual
Returns
true if user can edit the number by typing.

◆ EnableSpinnerWhenBlank()

virtual bool CRhRdkSdkNumberEdit::EnableSpinnerWhenBlank ( void  ) const
virtual
Returns
true if spinners are enabled when blank, else false.

◆ EVF()

virtual void* CRhRdkSdkNumberEdit::EVF ( const wchar_t *  wszFunc,
void *  pvData 
)
virtual

Emergency virtual function for future expansion.

Reimplemented in CRhRdkSdkIntegerNumberEdit, and CRhRdkSdkRealNumberEdit.

◆ Format()

virtual bool CRhRdkSdkNumberEdit::Format ( const double  dValue,
CString &  sText 
) const
virtual

Override this to change the formatting procedure and return true. If this returns false then default formatting used.

◆ Impl() [1/2]

virtual const CImpl& CRhRdkSdkNumberEdit::Impl ( void  ) const
protectedpure virtual

◆ Impl() [2/2]

virtual CImpl& CRhRdkSdkNumberEdit::Impl ( void  )
protectedpure virtual

◆ IsBlank()

virtual bool CRhRdkSdkNumberEdit::IsBlank ( void  ) const
virtual
Returns
true if display is blank, else false.

◆ IsFixedSpinnerDelta()

virtual bool CRhRdkSdkNumberEdit::IsFixedSpinnerDelta ( void  ) const
virtual
Returns
true if using a fixed spinner delta, false if using automatic delta.

◆ IsFocused()

virtual bool CRhRdkSdkNumberEdit::IsFocused ( void  ) const
virtual
Returns
true if the inner edit box is focused, else false.

◆ IsLocked()

virtual bool CRhRdkSdkNumberEdit::IsLocked ( void  ) const
virtual

For use with a button that locks edit controls together.

Returns
true if edit control is considered locked to one or more others.
Note
This class does not implement any actual locking, just the m_dLockedValue variable.

◆ LinearRollingDelta()

virtual double CRhRdkSdkNumberEdit::LinearRollingDelta ( void  ) const
virtual
Returns
Amount of linear rolling. If zero, acceleration is used instead (default).

◆ LockFrom()

virtual bool CRhRdkSdkNumberEdit::LockFrom ( const CRhRdkSdkNumberEdit srce)
virtual

Lock this control's value from another one.

Returns
true if locking was performed, else false.

◆ OnBeginRollSpinner()

virtual void CRhRdkSdkNumberEdit::OnBeginRollSpinner ( void  )
virtual

Called when the user starts dragging a spinner or holds down the left mouse button so that the spinner starts to auto-repeat.

◆ OnEndRollSpinner()

virtual void CRhRdkSdkNumberEdit::OnEndRollSpinner ( void  )
virtual

Called when the left mouse button is released if OnBeginDragSpinner() has been called.

◆ OnKillfocusEdit()

afx_msg void CRhRdkSdkNumberEdit::OnKillfocusEdit ( )
protected

◆ OnUserChangedValue()

virtual void CRhRdkSdkNumberEdit::OnUserChangedValue ( void  )
virtual

Called after the user has changed the value in the edit box and focus has been lost. The default implementation sends the registered message ChangedMessageNumber().

◆ OnValueChanged()

virtual void CRhRdkSdkNumberEdit::OnValueChanged ( void  )
virtual

Called after the value in the edit box has updated for any reason. This is always called and cannot be disabled. It is designed for updating simple UI items immediately. If you override this method, do not use it for anything time-consuming.

◆ Parse()

virtual bool CRhRdkSdkNumberEdit::Parse ( const TCHAR *  tsz,
double &  dValueOut 
) const
virtual

Override this to parse the input string into a double and return true. If this returns false then default parsing is used.

◆ PreSubclassWindow()

virtual void CRhRdkSdkNumberEdit::PreSubclassWindow ( )
protectedvirtual

◆ RemoveBounds()

virtual void CRhRdkSdkNumberEdit::RemoveBounds ( void  )
virtual

Remove bounds; sets control as boundless.

◆ RemoveFixedSpinnerDelta()

virtual void CRhRdkSdkNumberEdit::RemoveFixedSpinnerDelta ( void  )
virtual

Removes fixed spinner delta. Same as SetFixedSpinnerDelta(0.0).

◆ SendChangeWhenDragging()

virtual bool CRhRdkSdkNumberEdit::SendChangeWhenDragging ( void  ) const
virtual
Returns
true if change notifications will be sent during spinner dragging.

◆ SetAllowSetDuringChange()

virtual void CRhRdkSdkNumberEdit::SetAllowSetDuringChange ( bool  bAllow = true)
virtual

This disables the 'Buggy UI' check – for UIs that NEED to set the value from the change notification.

◆ SetAutoRepeatDelay()

virtual void CRhRdkSdkNumberEdit::SetAutoRepeatDelay ( int  iDelay)
virtual

Set the delay, in milliseconds, before auto-repeat begins when the mouse is held down on the spinner.

◆ SetBlank()

virtual void CRhRdkSdkNumberEdit::SetBlank ( bool  bBlank = true)
virtual

Set or clear display as blank. Useful for 'varies'.

◆ SetBounds()

virtual void CRhRdkSdkNumberEdit::SetBounds ( double  dLowerBound,
double  dUpperBound 
)
virtual

Set both bounds.

◆ SetCanHideCursor()

virtual void CRhRdkSdkNumberEdit::SetCanHideCursor ( bool  bCanHide = true)
virtual

Enable or disable hiding of mouse cursor when dragging a spinner.

◆ SetChangeThreshold()

virtual void CRhRdkSdkNumberEdit::SetChangeThreshold ( double  dThresh)
virtual

Set the threshold used for detecting a change. Default is 1e-6.

◆ SetControlKeyScaling()

virtual void CRhRdkSdkNumberEdit::SetControlKeyScaling ( double  d)
virtual

Set the scaling to be applied to all deltas used for arrow keys, page keys or spinners when the control key is down.

◆ SetEditByTyping()

virtual void CRhRdkSdkNumberEdit::SetEditByTyping ( bool  bCanType)
virtual

Enable or disable editing the number by typing. If disabled, the user can't type into the control. The default is true.

◆ SetEnableSpinnerWhenBlank()

virtual void CRhRdkSdkNumberEdit::SetEnableSpinnerWhenBlank ( bool  bEnable = true)
virtual

Set or clear spinners enabled when blank. The default is false.

◆ SetFixedSpinnerDelta()

virtual void CRhRdkSdkNumberEdit::SetFixedSpinnerDelta ( double  dDelta)
virtual

Set fixed spinner delta. Pass zero to use automatic delta.

◆ SetForcedStyles()

virtual void CRhRdkSdkNumberEdit::SetForcedStyles ( DWORD  dwStyles)
virtual

Call from subclass constructor to force window styles that are not specified in the dialog.

◆ SetKeyScaling()

virtual void CRhRdkSdkNumberEdit::SetKeyScaling ( double  dArrow = 1.0,
double  dPage = 10.0 
)
virtual

Set the scaling for the amount to change by when the user presses arrow or page keys.

◆ SetLimitText()

virtual void CRhRdkSdkNumberEdit::SetLimitText ( int  iMax)
virtual

◆ SetLinearRollingDelta()

virtual void CRhRdkSdkNumberEdit::SetLinearRollingDelta ( double  dDelta)
virtual

Set amount of linear rolling. If zero, acceleration is used instead (default).

◆ SetLock()

virtual bool CRhRdkSdkNumberEdit::SetLock ( bool  bLocked)
virtual

For use with a button that locks edit controls together. Call this when the lock button state changes.

◆ SetLowerBound()

virtual void CRhRdkSdkNumberEdit::SetLowerBound ( double  dLowerBound)
virtual

Set lower bound only.

◆ SetSel()

virtual void CRhRdkSdkNumberEdit::SetSel ( int  iStartChar,
int  iEndChar,
bool  bNoScroll = false 
)
virtual

Set the selection in the edit box.

◆ SetSendChangeWhenDragging()

virtual void CRhRdkSdkNumberEdit::SetSendChangeWhenDragging ( bool  bSend = true)
virtual

Enable or disable sending of change notifications during spinner dragging.

◆ SetShiftKeyScaling()

virtual void CRhRdkSdkNumberEdit::SetShiftKeyScaling ( double  d)
virtual

Set the scaling to be applied to all deltas used for arrow keys, page keys or spinners when the shift key is down.

◆ SetSimpleArithmeticOn()

virtual void CRhRdkSdkNumberEdit::SetSimpleArithmeticOn ( bool  bOn = true)
virtual

Enable or disable simple arithmetic.

◆ SetSpinnerVisibility()

virtual void CRhRdkSdkNumberEdit::SetSpinnerVisibility ( bool  bVisible)
virtual

Show or hide the spinner.

◆ SetSpinnerWidth()

virtual void CRhRdkSdkNumberEdit::SetSpinnerWidth ( int  iWidth)
virtual

Set spinner width in pixels.

◆ SetSuffixString()

virtual void CRhRdkSdkNumberEdit::SetSuffixString ( const TCHAR *  szSuffix)
virtual

Set suffix to use when not percentile. Suffix is displayed after the number.

◆ SetUpperBound()

virtual void CRhRdkSdkNumberEdit::SetUpperBound ( double  dUpperBound)
virtual

Set upper bound only.

◆ SetUseHandCursor()

virtual void CRhRdkSdkNumberEdit::SetUseHandCursor ( bool  bUseHand = true)
virtual

Enable or disable use of hand cursor when mouse is over a spinner. The default is false.

◆ SimpleArithmeticOn()

virtual bool CRhRdkSdkNumberEdit::SimpleArithmeticOn ( void  ) const
virtual
Returns
true if simple arithmetic is allowed, else false. Simple arithmetic allows the displayed value to be modified by using +=, -=, *=, /= operators. For example, if the control shows 25 and the user enters +=2 <RETURN>, the control will show 27. If the user then enters -=18 <RETURN>, the display will show 9.

◆ SpinDragCursor()

virtual HCURSOR CRhRdkSdkNumberEdit::SpinDragCursor ( void  ) const
virtual

Override this to return a special cursor to use when dragging the spinners.

◆ SpinnerWidth()

virtual int CRhRdkSdkNumberEdit::SpinnerWidth ( void  ) const
virtual
Returns
spinner width in pixels.

◆ UseHandCursor()

virtual bool CRhRdkSdkNumberEdit::UseHandCursor ( void  ) const
virtual
Returns
true if using hand cursor when mouse is over a spinner.

◆ WantThemedSpinner()

virtual bool CRhRdkSdkNumberEdit::WantThemedSpinner ( void  ) const
virtual

Override this to specify if the spinner should be themed. The default implementation returns true.

CRhRdkSdkNumberEdit
Definition: RhRdkSdkNumberEdit.h:19
CRhRdkSdkNumberEdit::ChangedMessageNumber
static UINT ChangedMessageNumber(void)