fsh::stk
fantastic spatial holophonic synthesis toolkit
Loading...
Searching...
No Matches
Trigger.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{
36class Trigger : public juce::Button
37{
38public:
40 struct Params
41 {
42 juce::CharPointer_UTF8 glyph;
43 juce::Colour color;
44 juce::Colour highlightColor;
45 };
46
48 explicit Trigger(const Params&);
49
50private:
51 void paintButton(juce::Graphics&, bool isMouseOver, bool isDown) override;
52 Params _params;
53 Fonts::Instance _fonts;
54};
55} // namespace fsh::gui
Custom button component that displays a FontAwesome icon and fires a function on click.
Definition Trigger.h:37
Trigger(const Params &)
Constructor.
Definition Trigger.cpp:31
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 Trigger component.
Definition Trigger.h:41
juce::Colour highlightColor
The color of the glyph when pressed.
Definition Trigger.h:44
juce::Colour color
The color of the glyph when not selected.
Definition Trigger.h:43
juce::CharPointer_UTF8 glyph
The FontAwesome glyph to display.
Definition Trigger.h:42