SPAOP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ComponentWithFocusPoint.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Martin Hansen
3  *
4  * This file is part of SPAOP (Spatial Audio Object Positioner).
5  *
6  * SPAOP is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * SPAOP is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with SPAOP. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef COMPONENTWITHFOCUSPOINT_H_INCLUDED
21 #define COMPONENTWITHFOCUSPOINT_H_INCLUDED
22 
23 #include "JuceHeader.h"
24 
25 namespace wonderjuce {
26 
32 class ComponentWithFocusPoint : public Component
33 {
34 public:
36  ComponentWithFocusPoint(const String& componentName = String::empty):
37  Component(componentName)
38  {}
39 
42 
50  virtual Point<float> getFocusPoint() = 0;
51 
57  virtual float getFocusPointX() = 0;
58 
64  virtual float getFocusPointY() = 0;
65 
66  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentWithFocusPoint)
67 };
68 
69 }
70 
71 #endif // COMPONENTWITHFOCUSPOINT_H_INCLUDED
An abstract class extending juce::Component, adding methods to query a "focus point".
Definition: ComponentWithFocusPoint.h:32
virtual ~ComponentWithFocusPoint()
Destructor.
Definition: ComponentWithFocusPoint.h:41
virtual Point< float > getFocusPoint()=0
Returns the "focus point", the point where this component shall be auto-centered (for example...
virtual float getFocusPointY()=0
Returns the y-coordinate of the "focus point".
virtual float getFocusPointX()=0
Returns the x-coordinate of the "focus point".
ComponentWithFocusPoint(const String &componentName=String::empty)
Constructor.
Definition: ComponentWithFocusPoint.h:36