mqFrontPanel.h (1137B)
1 #pragma once 2 3 #include "mqLib/buttons.h" 4 #include "mqLib/leds.h" 5 6 #include "mqLcdBase.h" 7 8 #include "juce_gui_basics/juce_gui_basics.h" 9 10 namespace mqJucePlugin 11 { 12 class Controller; 13 class Editor; 14 15 class FrontPanel 16 { 17 public: 18 explicit FrontPanel(const Editor& _editor, Controller& _controller); 19 ~FrontPanel(); 20 21 void processSysex(const std::vector<uint8_t>& _msg) const; 22 23 private: 24 void processLCDUpdate(const std::vector<uint8_t>& _msg) const; 25 void processLCDCGRamUpdate(const std::vector<uint8_t>& _msg) const; 26 void processLedUpdate(const std::vector<uint8_t>& _msg) const; 27 28 void onButtonStateChanged(uint32_t _index) const; 29 void onEncoderValueChanged(uint32_t _index); 30 31 std::array<juce::Button*, static_cast<uint32_t>(mqLib::Leds::Led::Count)> m_leds{}; 32 std::array<juce::Button*, static_cast<uint32_t>(mqLib::Buttons::ButtonType::Count)> m_buttons{}; 33 std::array<juce::Slider*, static_cast<uint32_t>(mqLib::Buttons::Encoders::Count)> m_encoders{}; 34 std::array<float, static_cast<uint32_t>(mqLib::Buttons::Encoders::Count)> m_encoderValues{}; 35 36 Controller& m_controller; 37 std::unique_ptr<MqLcdBase> m_lcd; 38 }; 39 }