4#include "BindUtils.hpp"
87 strLength = strlen(str);
88 if (strLength > MAX_STRING_LENGTH_TERMINAL)
90 strLength = MAX_STRING_LENGTH_TERMINAL;
92 copyAndOffset(out, &offset, &objID,
sizeof(objID));
93 copyAndOffset(out, &offset, &
x,
sizeof(
x));
94 copyAndOffset(out, &offset, &
y,
sizeof(
y));
95 copyAndOffset(out, &offset, &tag,
sizeof(tag));
96 copyAndOffset(out, &offset, &
cmdId,
sizeof(
cmdId));
100 copyAndOffset(out, &offset, &
value,
sizeof(
value));
101 copyAndOffset(out, &offset, str, strLength);
106 uint8_t objID = BIND_ID_KNOB;
The BindKnob class represents a knob UI element for use with BindCanvas.
Definition BindKnob.hpp:29
int16_t y
Y-coordinate position of the knob.
Definition BindKnob.hpp:54
void setlabel(const char *cstr)
Sets the label text for the knob.
Definition BindKnob.hpp:70
int16_t minValue
Minimum value of the knob's range.
Definition BindKnob.hpp:57
uint16_t getBytes(uint8_t *out) override
Retrieves the bytes representing the knob for synchronization.
Definition BindKnob.hpp:84
int16_t dimSize
Dimensions or size of the knob.
Definition BindKnob.hpp:56
int16_t value
Current value of the knob.
Definition BindKnob.hpp:59
int16_t maxValue
Maximum value of the knob's range.
Definition BindKnob.hpp:58
int16_t x
X-coordinate position of the knob.
Definition BindKnob.hpp:53
uint8_t cmdId
Command ID for the knob. See the notes for possible cmdId values.
Definition BindKnob.hpp:55
BindKnob(const char *cstr)
Constructs a BindKnob with a custom label.
Definition BindKnob.hpp:40
BindKnob()
Constructs a BindKnob with a default label.
Definition BindKnob.hpp:51
Definition BindView.hpp:22