From 2458054e7cb4e31ba06dad4fdaca44717417da8b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 19 Jul 2022 09:55:16 -0400 Subject: Make setting structs constructable --- src/Setting.hpp | 66 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 18 deletions(-) (limited to 'src/Setting.hpp') 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 -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 {}; -struct FontSize : Setting {}; -struct HumanNames : Setting {}; -struct JackAttached : Setting {}; -struct MessagesHeight : Setting {}; -struct MessagesVisible : Setting {}; -struct SortedPorts : Setting {}; -struct SprungLayout : Setting {}; -struct ToolbarVisible : Setting {}; -struct WindowLocation : Setting {}; -struct WindowSize : Setting {}; -struct Zoom : Setting {}; + 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 -- cgit v1.2.1