19#ifndef ZXWIDGET_COUNTER
20#define ZXWIDGET_COUNTER
52 int rangemin,
int rangemax,
53 bool editable =
false, uint8_t addarrows = 0,
int fastinc = 2,
54 const std::string & tooltiptext =
"",
67 int value(
void)
const noexcept {
return(value_); }
70 int minValue(
void)
const noexcept {
return(rangemin_); }
73 int maxValue(
void)
const noexcept {
return(rangemax_); }
82 const char *
className(
void)
const noexcept {
return(
"CounterWidget"); }
98 static const uint8_t kUDGs[6*8];
99 static const ID kIDSubs[NUMCHILDREN];
101 const uint8_t addarrows_;
102 const int rangemin_,rangemax_;
103 const int fastincval_;
108 ButtonWidget * wincarrow_;
109 ButtonWidget * wdecarrow_;
110 ButtonWidget * wfastincarrow_;
111 ButtonWidget * wfastdecarrow_;
112 ButtonWidget * wextrincarrow_;
113 ButtonWidget * wextrdecarrow_;
114 LineInputWidget * wvalue_;
116 CharDist valueLengthAsString(
int v)
const;
117 std::string valueAsString(
void)
const;
118 void putValue(
int v);
120 int processEvent(
const EventData & evdata, Widget * who)
override;
uint16_t CharDist
A distance meadured in screen chars.
The main namespace of the library, that spans across all the zx modules.