31 double Calculate(int32_t offset,
double speedScale,
double startValue)
const
33 double result = startValue + offset * speedScale *
stepPerPixel;
34 if (std::isnan(result))
return 0.0;
49 float Calculate(int32_t offset,
double speedScale,
float startValue)
const
51 double result = double(startValue) + offset * speedScale *
stepPerPixel;
52 if (std::isnan(result))
return 0.0f;
53 return float(std::clamp(result,
double(
minVal),
double(
maxVal)));
66 uint64_t
Calculate(int32_t offset,
double speedScale, uint64_t startValue)
const
68 double result = double(startValue) + offset * speedScale *
stepPerPixel;
69 return uint64_t(std::clamp(result,
double(
minVal),
double(
maxVal)));
82 uint32_t
Calculate(int32_t offset,
double speedScale, uint32_t startValue)
const
84 double result = double(startValue) + offset * speedScale *
stepPerPixel;
85 return uint32_t(std::clamp(result,
double(
minVal),
double(
maxVal)));
98 uint16_t
Calculate(int32_t offset,
double speedScale, uint16_t startValue)
const
100 double result = double(startValue) + offset * speedScale *
stepPerPixel;
101 return uint16_t(std::clamp(result,
double(
minVal),
double(
maxVal)));
114 uint8_t
Calculate(int32_t offset,
double speedScale, uint8_t startValue)
const
116 double result = double(startValue) + offset * speedScale *
stepPerPixel;
117 return uint8_t(std::clamp(result,
double(
minVal),
double(
maxVal)));
130 int64_t
Calculate(int32_t offset,
double speedScale, int64_t startValue)
const
132 double result = double(startValue) + offset * speedScale *
stepPerPixel;
133 return int64_t(std::clamp(result,
double(
minVal),
double(
maxVal)));
146 int32_t
Calculate(int32_t offset,
double speedScale, int32_t startValue)
const
148 double result = double(startValue) + offset * speedScale *
stepPerPixel;
149 return int32_t(std::clamp(result,
double(
minVal),
double(
maxVal)));
162 int16_t
Calculate(int32_t offset,
double speedScale, int16_t startValue)
const
164 double result = double(startValue) + offset * speedScale *
stepPerPixel;
165 return int16_t(std::clamp(result,
double(
minVal),
double(
maxVal)));
178 int8_t
Calculate(int32_t offset,
double speedScale, int8_t startValue)
const
180 double result = double(startValue) + offset * speedScale *
stepPerPixel;
181 return int8_t(std::clamp(result,
double(
minVal),
double(
maxVal)));
Definition gui_logging.h:24
double Calculate(int32_t offset, double speedScale, double startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:31
double minVal
lowest allowed value
Definition gui_numeric_field_config.h:26
double maxVal
highest allowed value
Definition gui_numeric_field_config.h:27
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:25
float Calculate(int32_t offset, double speedScale, float startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:49
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:43
float minVal
lowest allowed value
Definition gui_numeric_field_config.h:44
float maxVal
highest allowed value
Definition gui_numeric_field_config.h:45
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:157
int16_t Calculate(int32_t offset, double speedScale, int16_t startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:162
int16_t minVal
lowest allowed value
Definition gui_numeric_field_config.h:158
int16_t maxVal
highest allowed value
Definition gui_numeric_field_config.h:159
int32_t minVal
lowest allowed value
Definition gui_numeric_field_config.h:142
int32_t maxVal
highest allowed value
Definition gui_numeric_field_config.h:143
int32_t Calculate(int32_t offset, double speedScale, int32_t startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:146
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:141
int64_t minVal
lowest allowed value
Definition gui_numeric_field_config.h:126
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:125
int64_t maxVal
highest allowed value
Definition gui_numeric_field_config.h:127
int64_t Calculate(int32_t offset, double speedScale, int64_t startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:130
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:173
int8_t maxVal
highest allowed value
Definition gui_numeric_field_config.h:175
int8_t Calculate(int32_t offset, double speedScale, int8_t startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:178
int8_t minVal
lowest allowed value
Definition gui_numeric_field_config.h:174
uint16_t minVal
lowest allowed value
Definition gui_numeric_field_config.h:94
uint16_t maxVal
highest allowed value
Definition gui_numeric_field_config.h:95
uint16_t Calculate(int32_t offset, double speedScale, uint16_t startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:98
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:93
uint32_t maxVal
highest allowed value
Definition gui_numeric_field_config.h:79
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:77
uint32_t Calculate(int32_t offset, double speedScale, uint32_t startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:82
uint32_t minVal
lowest allowed value
Definition gui_numeric_field_config.h:78
uint64_t maxVal
highest allowed value
Definition gui_numeric_field_config.h:63
uint64_t Calculate(int32_t offset, double speedScale, uint64_t startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:66
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:61
uint64_t minVal
lowest allowed value
Definition gui_numeric_field_config.h:62
uint8_t minVal
lowest allowed value
Definition gui_numeric_field_config.h:110
uint8_t Calculate(int32_t offset, double speedScale, uint8_t startValue) const
The value after dragging offset pixels from startValue; speedScale is the modifier factor (Ctrl 0....
Definition gui_numeric_field_config.h:114
double stepPerPixel
value change per pixel dragged
Definition gui_numeric_field_config.h:109
uint8_t maxVal
highest allowed value
Definition gui_numeric_field_config.h:111
Drag speed and range of a numeric Field, specialized per value type.
Definition gui_numeric_field_config.h:19