14#include <AUI/Traits/values.h>
15#include <AUI/Util/ADataBinding.h>
17#include "AAbstractTextField.h"
18#include "AViewContainer.h"
31 ANumberPickerField(::
ANumberPicker& picker) : mPicker(picker) {}
33 virtual ~ANumberPickerField() =
default;
35 void onKeyRepeat(AInput::Key key)
override;
49 void setValue(int64_t v);
51 int64_t getValue()
const;
53 void setSuffix(
const AString& suffix);
55 [[nodiscard]]
const AString&
text()
const noexcept {
return mTextField->text(); }
61 void changeBy(int64_t v);
63 [[nodiscard]] int64_t getMin()
const {
return mMin; }
65 [[nodiscard]] int64_t getMax()
const {
return mMax; }
67 void setMin(int64_t min);
69 void setMax(int64_t max);
84 template<
typename Num>
91 static auto getSetter() {
return &ANumberPicker::setValue; }
94 template<aui::arithmetic UnderlyingType, auto min, auto max>
requires
95 aui::convertible_to<
decltype(min), UnderlyingType> && aui::convertible_to<
decltype(max), UnderlyingType>
105 static auto getSetter() {
return &ANumberPicker::setValue; }
137template<aui::arithmetic UnderlyingType, auto min, auto max>
requires
138aui::convertible_to<
decltype(min), UnderlyingType> && aui::convertible_to<
decltype(max), UnderlyingType>
Text field implementation.
Definition: AAbstractTextField.h:26
A text field for numbers with increase/decrease buttons.
Definition: ANumberPicker.h:24
emits valueChanging
Number is changing.
Definition: ANumberPicker.h:80
emits< int64_t > valueChanged
Number changed.
Definition: ANumberPicker.h:75
Represents a Unicode character string.
Definition: AString.h:37
A view that represents a set of views.
Definition: AViewContainerBase.h:68
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
Definition: ADataBinding.h:24
Definition: ANumberPicker.h:85
Definition: ANumberPicker.h:96
Clamps the possible values for a number to the specified range: [min;max].
Definition: values.h:452