16#ifndef __AUDACITY_NUMERIC_CONVERTER__
17#define __AUDACITY_NUMERIC_CONVERTER__
44 virtual void ValueToControls();
45 virtual void ValueToControls(
double rawValue,
bool nearest =
true);
49 virtual void ControlsToValue();
64 void SetValue(
double newValue);
65 void SetMinValue(
double minValue);
67 void SetMaxValue(
double maxValue);
73 void UpdateFormatToFit(
double value);
77 void Adjust(
int steps,
int dir,
int focusedDigit);
79 void Increment(
int focusedDigit = -1);
80 void Decrement(
int focusedDigit = -1);
83 bool UpdateFormatter();
84 virtual void OnFormatUpdated(
bool resetFocus);
90 double mMinValue { 0.0 };
91 double mMaxValue { std::numeric_limits<double>::max() };
92 double mInvalidValue { -1 };
94 double mValue { mInvalidValue };
96 std::unique_ptr<NumericConverterFormatter>
109 int GetSafeFocusedDigit(
int focusedDigit)
const noexcept;
A context in which formatter operates.
An explicitly nonlocalized string, not meant for the user to see.
NumericConverter provides the advanced formatting control used in the selection bar of Audacity.
NumericConverterType mType
std::vector< wxString > mFieldValueStrings
FormatterContext mContext
std::unique_ptr< NumericConverterFormatter > mFormatter
TranslatableString mCustomFormat
Observer::Subscription mFormatUpdatedSubscription
NumericFormatID mFormatID
An object that sends messages to an open-ended list of subscribed callbacks.
A move-only handle representing a connection to a Publisher.
Holds a msgid for the translation catalog; may also bind format arguments.