andrewm@0: /* andrewm@0: TouchKeys: multi-touch musical keyboard control software andrewm@0: Copyright (c) 2013 Andrew McPherson andrewm@0: andrewm@0: This program is free software: you can redistribute it and/or modify andrewm@0: it under the terms of the GNU General Public License as published by andrewm@0: the Free Software Foundation, either version 3 of the License, or andrewm@0: (at your option) any later version. andrewm@0: andrewm@0: This program is distributed in the hope that it will be useful, andrewm@0: but WITHOUT ANY WARRANTY; without even the implied warranty of andrewm@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the andrewm@0: GNU General Public License for more details. andrewm@0: andrewm@0: You should have received a copy of the GNU General Public License andrewm@0: along with this program. If not, see . andrewm@0: andrewm@0: ===================================================================== andrewm@0: andrewm@0: OpenGLDisplayBase.h: virtual base class for a renderer that handles andrewm@0: arbitrary display sizes and user mouse events. andrewm@0: */ andrewm@0: andrewm@0: #ifndef touchkeys_OpenGLDisplayBase_h andrewm@0: #define touchkeys_OpenGLDisplayBase_h andrewm@0: andrewm@27: class OpenGLJuceCanvas; andrewm@27: andrewm@0: // Virtual base class that implements some basic methods that the OS-specific andrewm@0: // GUI can attach to. Specific displays are subclasses of this andrewm@0: andrewm@0: class OpenGLDisplayBase { andrewm@0: public: andrewm@0: OpenGLDisplayBase() {} andrewm@0: andrewm@0: virtual ~OpenGLDisplayBase() {} andrewm@27: andrewm@27: // Canvas reference method andrewm@27: virtual void setCanvas(OpenGLJuceCanvas *canvas) = 0; andrewm@0: andrewm@0: // Setup method for display size andrewm@0: virtual void setDisplaySize(float width, float height) = 0; andrewm@0: andrewm@0: // Drawing methods andrewm@0: virtual void render() = 0; andrewm@0: andrewm@0: // Interaction methods andrewm@0: virtual void mouseDown(float x, float y) = 0; andrewm@0: virtual void mouseDragged(float x, float y) = 0; andrewm@0: virtual void mouseUp(float x, float y) = 0; andrewm@0: virtual void rightMouseDown(float x, float y) = 0; andrewm@0: virtual void rightMouseDragged(float x, float y) = 0; andrewm@0: virtual void rightMouseUp(float x, float y) = 0; andrewm@0: }; andrewm@0: andrewm@0: #endif