fsh::stk
fantastic spatial holophonic synthesis toolkit
Loading...
Searching...
No Matches
ComponentPanel.h
1/***************************************************************************************************
2 ██████ █████ █████ █████
3 ███░░███ ░░███ ░░███ ░░███
4 ░███ ░░░ █████ ░███████ ██ ██ █████ ███████ ░███ █████
5 ███████ ███░░ ░███░░███ ░░ ░░ ███░░ ░░░███░ ░███░░███
6 ░░░███░ ░░█████ ░███ ░███ ░░█████ ░███ ░██████░
7 ░███ ░░░░███ ░███ ░███ ░░░░███ ░███ ███ ░███░░███
8 █████ ██████ ████ █████ ██ ██ ██████ ░░█████ ████ █████
9 ░░░░░ ░░░░░░ ░░░░ ░░░░░ ░░ ░░ ░░░░░░ ░░░░░ ░░░░ ░░░░░
10
11 fantastic spatial holophonic synthesis tool kit
12
13 copyright (c) fabian hummel
14 www.github.com/fshstk
15 www.fshstk.com
16
17 this file is part of the fantastic spatial holophonic synthesis toolkit (fsh::stk)
18 fsh::stk is free software: it is provided under the terms of the gnu general public license v3.0
19 www.gnu.org/licenses/gpl-3.0
20***************************************************************************************************/
21
22#pragma once
23#include "Fonts.h"
24#include <juce_gui_basics/juce_gui_basics.h>
25
26namespace fsh::gui
27{
31class ComponentPanel : public juce::Component
32{
33public:
35 enum class Orientation
36 {
39 };
40
42 struct Params
43 {
44 juce::String label;
45 juce::Colour foreground;
46 juce::Colour background;
48 };
49
51 ComponentPanel(const Params&, std::vector<juce::Component*>);
52
53private:
54 void paint(juce::Graphics&) override;
55 void resized() override;
56
57 Params _params;
58 std::vector<juce::Component*> _components;
59 Fonts::Instance _fonts;
60};
61} // namespace fsh::gui
A panel for the dynamic layout of multiple components.
Definition ComponentPanel.h:32
ComponentPanel(const Params &, std::vector< juce::Component * >)
Constructor.
Definition ComponentPanel.cpp:26
Orientation
Orientation of the panel.
Definition ComponentPanel.h:36
@ Horizontal
Horizontal orientation.
Parameters for the ComponentPanel.
Definition ComponentPanel.h:43
juce::Colour foreground
The color of the label.
Definition ComponentPanel.h:45
juce::String label
The label to be displayed.
Definition ComponentPanel.h:44
Orientation orientation
The orientation of the panel.
Definition ComponentPanel.h:47
juce::Colour background
The color of the background.
Definition ComponentPanel.h:46
juce::SharedResourcePointer< Fonts > Instance
Add this as a member to your component/editor class to access the fonts.
Definition Fonts.h:58