Audacity 3.2.0
|
#include <SpinControl.h>
Public Types | |
using | ValueType = double |
Public Member Functions | |
SpinControl (wxWindow *parent, wxWindowID winid=wxID_ANY, ValueType value=0.0, ValueType min=0.0f, ValueType max=100.0, ValueType step=1.0, bool allowFractional=false, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, const TranslatableString &name={}) | |
void | SetValue (double value) |
double | GetValue () const |
void | SetMinValue (double value) |
double | GetMinValue () const |
void | SetMaxValue (double value) |
double | GetMaxValue () const |
void | SetStep (double step) |
double | GetStep () const |
void | SetFractionalAllowed (bool allow) |
bool | GetFractionalAllowed () |
void | SetName (const TranslatableString &name) |
Private Member Functions | |
void | UpdatePrefs () override |
void | CreateUI () |
void | SetupControls () |
void | CommitTextControlValue () |
void | OnCharHook (wxKeyEvent &evt) |
void | SetValue (double value, bool silent) |
void | DoSteps (double direction) |
void | NotifyValueChanged () |
Private Member Functions inherited from PrefsListener | |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
virtual void | UpdateSelectedPrefs (int id) |
Private Attributes | |
ValueType | mValue { std::numeric_limits<ValueType>::quiet_NaN() } |
ValueType | mMinValue { -std::numeric_limits<ValueType>::infinity() } |
ValueType | mMaxValue { std::numeric_limits<ValueType>::infinity() } |
ValueType | mStep |
int | mPrecision { 2 } |
bool | mFractionalAllowed |
wxTextCtrl * | mTextControl { nullptr } |
wxButton * | mUpButton { nullptr } |
wxButton * | mDownButton { nullptr } |
Additional Inherited Members | |
Static Private Member Functions inherited from PrefsListener | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
Definition at line 29 of file SpinControl.h.
using SpinControl::ValueType = double |
Definition at line 34 of file SpinControl.h.
SpinControl::SpinControl | ( | wxWindow * | parent, |
wxWindowID | winid = wxID_ANY , |
||
ValueType | value = 0.0 , |
||
ValueType | min = 0.0f , |
||
ValueType | max = 100.0 , |
||
ValueType | step = 1.0 , |
||
bool | allowFractional = false , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
const TranslatableString & | name = {} |
||
) |
Definition at line 63 of file SpinControl.cpp.
References CreateUI(), min(), name, SetMaxValue(), SetMinValue(), SetName(), SetupControls(), and SetValue().
|
private |
Definition at line 311 of file SpinControl.cpp.
References mTextControl, and SetValue().
Referenced by CreateUI(), and OnCharHook().
|
private |
Definition at line 161 of file SpinControl.cpp.
References CommitTextControlValue(), DoSteps(), mDownButton, mTextControl, mUpButton, OnCharHook(), and safenew.
Referenced by SpinControl().
|
private |
Definition at line 353 of file SpinControl.cpp.
References mStep, mValue, and SetValue().
Referenced by CreateUI(), and OnCharHook().
bool SpinControl::GetFractionalAllowed | ( | ) |
Definition at line 139 of file SpinControl.cpp.
References mFractionalAllowed.
double SpinControl::GetMaxValue | ( | ) | const |
double SpinControl::GetMinValue | ( | ) | const |
double SpinControl::GetStep | ( | ) | const |
double SpinControl::GetValue | ( | ) | const |
Definition at line 90 of file SpinControl.cpp.
References mValue.
Referenced by ShuttleGuiBase::DoTieSpinControl().
|
private |
Definition at line 358 of file SpinControl.cpp.
Referenced by SetValue().
|
private |
Definition at line 320 of file SpinControl.cpp.
References CommitTextControlValue(), and DoSteps().
Referenced by CreateUI().
void SpinControl::SetFractionalAllowed | ( | bool | allow | ) |
Definition at line 130 of file SpinControl.cpp.
References mFractionalAllowed, and SetupControls().
void SpinControl::SetMaxValue | ( | double | value | ) |
Definition at line 107 of file SpinControl.cpp.
References mMaxValue, mMinValue, mValue, SetupControls(), and SetValue().
Referenced by SpinControl().
void SpinControl::SetMinValue | ( | double | value | ) |
Definition at line 95 of file SpinControl.cpp.
References min(), mMaxValue, mMinValue, mValue, SetupControls(), and SetValue().
Referenced by SpinControl().
void SpinControl::SetName | ( | const TranslatableString & | name | ) |
Definition at line 144 of file SpinControl.cpp.
References mTextControl, name, and safenew.
Referenced by SpinControl().
void SpinControl::SetStep | ( | double | step | ) |
Definition at line 119 of file SpinControl.cpp.
References mStep, and SetupControls().
|
private |
Definition at line 288 of file SpinControl.cpp.
References mFractionalAllowed, mMaxValue, mMinValue, mPrecision, and mTextControl.
Referenced by SetFractionalAllowed(), SetMaxValue(), SetMinValue(), SetStep(), and SpinControl().
void SpinControl::SetValue | ( | double | value | ) |
Definition at line 85 of file SpinControl.cpp.
References SetValue().
Referenced by CommitTextControlValue(), DoSteps(), ShuttleGuiBase::DoTieSpinControl(), SetMaxValue(), SetMinValue(), SetValue(), and SpinControl().
|
private |
Definition at line 338 of file SpinControl.cpp.
References mMaxValue, mMinValue, mTextControl, mValue, and NotifyValueChanged().
|
overrideprivatevirtual |
|
private |
Definition at line 86 of file SpinControl.h.
Referenced by CreateUI().
|
private |
Definition at line 79 of file SpinControl.h.
Referenced by GetFractionalAllowed(), SetFractionalAllowed(), and SetupControls().
Definition at line 75 of file SpinControl.h.
Referenced by GetMaxValue(), SetMaxValue(), SetMinValue(), SetupControls(), and SetValue().
Definition at line 74 of file SpinControl.h.
Referenced by GetMinValue(), SetMaxValue(), SetMinValue(), SetupControls(), and SetValue().
|
private |
Definition at line 77 of file SpinControl.h.
Referenced by SetupControls().
|
private |
Definition at line 76 of file SpinControl.h.
|
private |
Definition at line 81 of file SpinControl.h.
Referenced by CommitTextControlValue(), CreateUI(), SetName(), SetupControls(), and SetValue().
|
private |
Definition at line 85 of file SpinControl.h.
Referenced by CreateUI().
Definition at line 73 of file SpinControl.h.
Referenced by DoSteps(), GetValue(), SetMaxValue(), SetMinValue(), and SetValue().