1#ifndef __BINDSEEKBAR_HPP
2#define __BINDSEEKBAR_HPP
4#include "BindUtils.hpp"
31 this->tag = tagIndex++;
54 changeCallback = callback;
57 void invokeCallback(int16_t valueIn)
59 this->value = valueIn;
60 if (changeCallback != NULL)
62 changeCallback(valueIn);
79 copyAndOffset(out, &offset, &objID,
sizeof(objID));
80 copyAndOffset(out, &offset, &
x, 2);
81 copyAndOffset(out, &offset, &
y, 2);
82 copyAndOffset(out, &offset, &tag, 2);
83 copyAndOffset(out, &offset, &
cmdId,
sizeof(
cmdId));
84 copyAndOffset(out, &offset, &
value,
sizeof(
value));
86 copyAndOffset(out, &offset, &
width,
sizeof(
width));
91 uint8_t objID = BIND_ID_SEEK_BAR;
93 static int16_t tagIndex;
94 void (*changeCallback)(int16_t) = NULL;
Represents a SeekBar object in the Bind framework.
Definition BindSeekBar.hpp:24
uint8_t cmdId
Command identifier. See the notes for possible cmdId values.
Definition BindSeekBar.hpp:36
uint16_t getBytes(uint8_t *out) override
Serialize the SeekBar data into a byte array.
Definition BindSeekBar.hpp:76
int16_t x
X-coordinate position of the SeekBar.
Definition BindSeekBar.hpp:34
int16_t width
Width of the SeekBar.
Definition BindSeekBar.hpp:39
int16_t value
Current value selected on the SeekBar.
Definition BindSeekBar.hpp:37
void setCallback(void(*callback)(int16_t))
Set the Callback function for the SeekBar.
Definition BindSeekBar.hpp:52
int16_t maxValue
Maximum value of the SeekBar.
Definition BindSeekBar.hpp:38
BindSeekBar()
Default constructor to create a BindSeekBar with default properties.
Definition BindSeekBar.hpp:30
int16_t y
Y-coordinate position of the SeekBar.
Definition BindSeekBar.hpp:35
Definition BindView.hpp:22