gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

mqGui.h (1278B)


      1 #pragma once
      2 
      3 #include <cpp-terminal/base.hpp>
      4 #include <cpp-terminal/window.hpp>
      5 #undef B0	// added on macOS via termios.h, collides with DSP Register::B0
      6 
      7 #include "mqGuiBase.h"
      8 
      9 #include "mqLib/buttons.h"
     10 #include "mqLib/leds.h"
     11 
     12 namespace mqLib
     13 {
     14 	class MicroQ;
     15 }
     16 
     17 namespace mqConsoleLib
     18 {
     19 	class Gui : public GuiBase
     20 	{
     21 	public:
     22 		explicit Gui(mqLib::MicroQ& _mq);
     23 
     24 		void render();
     25 
     26 	private:
     27 		void renderAboveLCD(int x, int y);
     28 		void renderLCD(int x, int y);
     29 		void renderBelowLCD(int x, int y);
     30 		void renderAlphaAndPlay(int x, int y);
     31 		void renderMultimodePeek(int x, int y);
     32 		void renderCursorBlock(int x, int y);
     33 		void renderVerticalLedsAndButtons(int x, int y);
     34 		void renderMatrixLEDs(int x, int y);
     35 		void renderMatrixText(int x, int y);
     36 		void renderRightEncoders(int x, int y);
     37 		void renderHelp(int x, int y);
     38 		void renderDebug(int x, int y);
     39 
     40 		void renderLED(mqLib::Leds::Led _led, int x, int y);
     41 		void renderLED(bool _on, int x, int y);
     42 		void renderButton(mqLib::Buttons::ButtonType _button, int x, int y);
     43 		void renderEncoder(mqLib::Buttons::Encoders _encoder, int x, int y);
     44 		void renderLabel(int x, int y, const std::string& _text, bool _rightAlign = false, Term::fg _color = Term::fg::gray);
     45 
     46 		mqLib::MicroQ& m_mq;
     47 		Term::Window m_win;
     48 	};
     49 }