#pragma once /* ============================================================================== Copyright 2022 Nicolas Chambert This program is free software : you can redistribute itand /or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program.If not, see < http://www.gnu.org/licenses/>. ============================================================================== */ /* ============================================================================== Gestion du nombre de temps par mesure. ============================================================================== */ #include // Surcharge les boutons pour un rond plein ou vide struct RoundCBLookAndFeel : public juce::LookAndFeel_V4 { void drawToggleButton(juce::Graphics& g, juce::ToggleButton& button, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override; void drawTickBox(juce::Graphics& g, juce::Component& component, float x, float y, float w, float h, bool ticked, bool isEnabled, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override; }; // Panneau d'affichage de la mesure en cours struct MesurePanel : public juce::Component { explicit MesurePanel(juce::Colour c); ~MesurePanel(); // Méthode de surcharge JUCE void paint(juce::Graphics& g) override; void resized() override; // méthodes internes void update(int nb, int cur); // composants graphiques juce::Colour backgroundColour; juce::OwnedArray buttons; std::unique_ptr lef; };