score-avnd-amuencha/Amuencha/AmuenchaUi.hpp

42 lines
840 B
C++

#pragma once
#include <Amuencha/AmuenchaModel.hpp>
#include <halp/layout.hpp>
#include "SpiralDisplay.hpp"
namespace Amuencha
{
struct Analyser::ui
{
using enum halp::colors;
using enum halp::layouts;
halp_meta(name, "Amuencha")
halp_meta(layout, hbox)
halp_meta(background, dark)
struct
{
halp_meta(layout, vbox)
halp::item<&ins::min> min;
halp::item<&ins::max> max;
} controls;
halp::custom_actions_item<SpiralDisplay> spiral{.x = 0, .y = 0};
// Define the communication between UI and processor.
struct bus
{
// // Set up connections
// init(ui& self)
// {
// }
// Receive a message on the UI thread from the processing thread
static void process_message(ui& self, const processor_to_ui& msg)
{
self.spiral.set_min_max_notes(msg.min, msg.max);
}
};
};
}