summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-19 09:55:16 -0400
committerDavid Robillard <d@drobilla.net>2022-07-20 10:35:32 -0400
commit2458054e7cb4e31ba06dad4fdaca44717417da8b (patch)
tree23eb66b0ebb286e726b2dccefc22ee6c702cfa66
parent1638b75eba931ba4c0ca970eb8f8152d92e736d3 (diff)
downloadpatchage-2458054e7cb4e31ba06dad4fdaca44717417da8b.tar.gz
patchage-2458054e7cb4e31ba06dad4fdaca44717417da8b.tar.bz2
patchage-2458054e7cb4e31ba06dad4fdaca44717417da8b.zip
Make setting structs constructable
-rw-r--r--src/Setting.hpp66
1 files changed, 48 insertions, 18 deletions
diff --git a/src/Setting.hpp b/src/Setting.hpp
index f8864d0..1e1aa6f 100644
--- a/src/Setting.hpp
+++ b/src/Setting.hpp
@@ -14,28 +14,58 @@
namespace patchage {
namespace setting {
-template<class T>
-struct Setting {
- T value{};
+struct AlsaAttached {
+ bool value{};
+};
+
+struct FontSize {
+ float value{};
+};
+
+struct HumanNames {
+ bool value{};
+};
+
+struct JackAttached {
+ bool value{};
+};
+
+struct MessagesHeight {
+ int value{};
+};
+
+struct MessagesVisible {
+ bool value{};
};
struct PortColor {
PortType type{};
- uint32_t value{};
-};
-
-struct AlsaAttached : Setting<bool> {};
-struct FontSize : Setting<float> {};
-struct HumanNames : Setting<bool> {};
-struct JackAttached : Setting<bool> {};
-struct MessagesHeight : Setting<int> {};
-struct MessagesVisible : Setting<bool> {};
-struct SortedPorts : Setting<bool> {};
-struct SprungLayout : Setting<bool> {};
-struct ToolbarVisible : Setting<bool> {};
-struct WindowLocation : Setting<Coord> {};
-struct WindowSize : Setting<Coord> {};
-struct Zoom : Setting<float> {};
+ uint32_t color{};
+};
+
+struct SortedPorts {
+ bool value{};
+};
+
+struct SprungLayout {
+ bool value{};
+};
+
+struct ToolbarVisible {
+ bool value{};
+};
+
+struct WindowLocation {
+ Coord value{};
+};
+
+struct WindowSize {
+ Coord value{};
+};
+
+struct Zoom {
+ float value{};
+};
} // namespace setting