Moved all the bobbycar gui code into this library

This commit is contained in:
2021-08-20 13:16:55 +02:00
parent f4b568f055
commit ad0d90339e
47 changed files with 1876 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
#pragma once
namespace espgui {
template<typename T>
struct AccessorInterface
{
virtual T getValue() const = 0;
virtual void setValue(T value) = 0;
};
//! A special type of AccessorInterface that allows for simple variable read/write operations
//! Can be used to read and write global settings for example.
template<typename T>
struct RefAccessor : public virtual AccessorInterface<T>
{
virtual T& getRef() const = 0;
T getValue() const override { return getRef(); };
void setValue(T value) override { getRef() = value; };
};
} // namespace espgui