openshot-audio  0.1.2
juce_RelativeCoordinatePositioner.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_RELATIVECOORDINATEPOSITIONER_H_INCLUDED
26 #define JUCE_RELATIVECOORDINATEPOSITIONER_H_INCLUDED
27 
28 
29 //==============================================================================
34  public ComponentListener,
36 {
37 public:
40 
41  void componentMovedOrResized (Component&, bool, bool);
43  void componentChildrenChanged (Component& component);
44  void componentBeingDeleted (Component& component);
45  void markersChanged (MarkerList*);
46  void markerListBeingDeleted (MarkerList* markerList);
47 
48  void apply();
49 
50  bool addCoordinate (const RelativeCoordinate& coord);
51  bool addPoint (const RelativePoint& point);
52 
53  //==============================================================================
56  {
57  public:
58  ComponentScope (Component& component);
59 
60  Expression getSymbolValue (const String& symbol) const;
61  void visitRelativeScope (const String& scopeName, Visitor& visitor) const;
62  String getScopeUID() const;
63 
64  protected:
66 
67  Component* findSiblingComponent (const String& componentID) const;
68 
69  private:
71  };
72 
73 protected:
74  virtual bool registerCoordinates() = 0;
75  virtual void applyToComponentBounds() = 0;
76 
77 private:
79  friend class DependencyFinderScope;
80  Array <Component*> sourceComponents;
81  Array <MarkerList*> sourceMarkerLists;
82  bool registeredOk;
83 
84  void registerComponentListener (Component& comp);
85  void registerMarkerListListener (MarkerList* const list);
86  void unregisterListeners();
87 
89 };
90 
91 
92 #endif // JUCE_RELATIVECOORDINATEPOSITIONER_H_INCLUDED
Definition: juce_ComponentListener.h:40
Definition: juce_MarkerList.h:36
Definition: juce_RelativeCoordinate.h:70
Definition: juce_Expression.h:141
virtual void markerListBeingDeleted(MarkerList *markerList)
Definition: juce_MarkerList.cpp:149
virtual void componentParentHierarchyChanged(Component &component)
Definition: juce_ComponentListener.cpp:29
Definition: juce_Expression.h:113
Definition: juce_MarkerList.h:126
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_RelativePoint.h:35
virtual void markersChanged(MarkerList *markerList)=0
Definition: juce_Expression.h:48
virtual void componentChildrenChanged(Component &component)
Definition: juce_ComponentListener.cpp:28
Definition: juce_Component.h:2163
Definition: juce_Component.h:33
Definition: juce_RelativeCoordinatePositioner.h:33
Definition: juce_RelativeCoordinatePositioner.h:55
#define JUCE_DECLARE_NON_COPYABLE(className)
Definition: juce_PlatformDefs.h:191
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
Definition: juce_RelativeCoordinatePositioner.cpp:150
Component & component
Definition: juce_RelativeCoordinatePositioner.h:65
virtual void componentBeingDeleted(Component &component)
Definition: juce_ComponentListener.cpp:31
virtual void componentMovedOrResized(Component &component, bool wasMoved, bool wasResized)
Definition: juce_ComponentListener.cpp:25