fsh::stk
fantastic spatial holophonic synthesis toolkit
Loading...
Searching...
No Matches
OptionButton.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 OptionButton : public juce::Button
32{
33public:
35 struct Params
36 {
37 juce::String text;
38 juce::Colour color;
39 juce::Colour highlightColor;
40 };
41
43 explicit OptionButton(const Params&);
44
45private:
46 void paintButton(juce::Graphics&, bool highlighted, bool down) override;
47 Params _params;
48 Fonts::Instance _fonts;
49};
50} // namespace fsh::gui
An element of the OptionPicker.
Definition OptionButton.h:32
OptionButton(const Params &)
Constructor.
Definition OptionButton.cpp:27
juce::SharedResourcePointer< Fonts > Instance
Add this as a member to your component/editor class to access the fonts.
Definition Fonts.h:58
Parameters for the OptionButton.
Definition OptionButton.h:36
juce::String text
The text to be displayed.
Definition OptionButton.h:37
juce::Colour color
The color of the button.
Definition OptionButton.h:38
juce::Colour highlightColor
The color of the button when selected.
Definition OptionButton.h:39