annotate Source/Display/OpenGLDisplayBase.h @ 56:b4a2d2ae43cf tip

merge
author Andrew McPherson <andrewm@eecs.qmul.ac.uk>
date Fri, 23 Nov 2018 15:48:14 +0000
parents eef567a60146
children
rev   line source
andrewm@0 1 /*
andrewm@0 2 TouchKeys: multi-touch musical keyboard control software
andrewm@0 3 Copyright (c) 2013 Andrew McPherson
andrewm@0 4
andrewm@0 5 This program is free software: you can redistribute it and/or modify
andrewm@0 6 it under the terms of the GNU General Public License as published by
andrewm@0 7 the Free Software Foundation, either version 3 of the License, or
andrewm@0 8 (at your option) any later version.
andrewm@0 9
andrewm@0 10 This program is distributed in the hope that it will be useful,
andrewm@0 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
andrewm@0 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
andrewm@0 13 GNU General Public License for more details.
andrewm@0 14
andrewm@0 15 You should have received a copy of the GNU General Public License
andrewm@0 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
andrewm@0 17
andrewm@0 18 =====================================================================
andrewm@0 19
andrewm@0 20 OpenGLDisplayBase.h: virtual base class for a renderer that handles
andrewm@0 21 arbitrary display sizes and user mouse events.
andrewm@0 22 */
andrewm@0 23
andrewm@0 24 #ifndef touchkeys_OpenGLDisplayBase_h
andrewm@0 25 #define touchkeys_OpenGLDisplayBase_h
andrewm@0 26
andrewm@27 27 class OpenGLJuceCanvas;
andrewm@27 28
andrewm@0 29 // Virtual base class that implements some basic methods that the OS-specific
andrewm@0 30 // GUI can attach to. Specific displays are subclasses of this
andrewm@0 31
andrewm@0 32 class OpenGLDisplayBase {
andrewm@0 33 public:
andrewm@0 34 OpenGLDisplayBase() {}
andrewm@0 35
andrewm@0 36 virtual ~OpenGLDisplayBase() {}
andrewm@27 37
andrewm@27 38 // Canvas reference method
andrewm@27 39 virtual void setCanvas(OpenGLJuceCanvas *canvas) = 0;
andrewm@0 40
andrewm@0 41 // Setup method for display size
andrewm@0 42 virtual void setDisplaySize(float width, float height) = 0;
andrewm@0 43
andrewm@0 44 // Drawing methods
andrewm@0 45 virtual void render() = 0;
andrewm@0 46
andrewm@0 47 // Interaction methods
andrewm@0 48 virtual void mouseDown(float x, float y) = 0;
andrewm@0 49 virtual void mouseDragged(float x, float y) = 0;
andrewm@0 50 virtual void mouseUp(float x, float y) = 0;
andrewm@0 51 virtual void rightMouseDown(float x, float y) = 0;
andrewm@0 52 virtual void rightMouseDragged(float x, float y) = 0;
andrewm@0 53 virtual void rightMouseUp(float x, float y) = 0;
andrewm@0 54 };
andrewm@0 55
andrewm@0 56 #endif