openshot-audio  0.1.2
juce_RelativeCoordinate.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_RELATIVECOORDINATE_H_INCLUDED
26 #define JUCE_RELATIVECOORDINATE_H_INCLUDED
27 
28 
29 //==============================================================================
71 {
72 public:
73  //==============================================================================
76  RelativeCoordinate (const Expression& expression);
78  RelativeCoordinate& operator= (const RelativeCoordinate&);
79 
80  #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
83  #endif
84 
89  RelativeCoordinate (double absoluteDistanceFromOrigin);
90 
96  RelativeCoordinate (const String& stringVersion);
97 
100 
101  bool operator== (const RelativeCoordinate&) const noexcept;
102  bool operator!= (const RelativeCoordinate&) const noexcept;
103 
104  //==============================================================================
110  double resolve (const Expression::Scope* evaluationScope) const;
111 
115  bool references (const String& coordName, const Expression::Scope* evaluationScope) const;
116 
118  bool isRecursive (const Expression::Scope* evaluationScope) const;
119 
121  bool isDynamic() const;
122 
123  //==============================================================================
130  void moveToAbsolute (double absoluteTargetPosition, const Expression::Scope* evaluationScope);
131 
133  const Expression& getExpression() const { return term; }
134 
135 
136  //==============================================================================
140  String toString() const;
141 
142  //==============================================================================
150  struct Strings
151  {
152  static const String parent;
153  static const String left;
154  static const String right;
155  static const String top;
156  static const String bottom;
157  static const String x;
158  static const String y;
159  static const String width;
160  static const String height;
161  };
162 
164  {
165  enum Type
166  {
167  left, right, top, bottom,
168  x, y, width, height,
170  unknown
171  };
172 
173  static Type getTypeOf (const String& s) noexcept;
174  };
175 
176 private:
177  //==============================================================================
178  Expression term;
179 };
180 
181 
182 #endif // JUCE_RELATIVECOORDINATE_H_INCLUDED
static const String x
Definition: juce_RelativeCoordinate.h:157
Definition: juce_RelativeCoordinate.h:70
Definition: juce_RelativeCoordinate.h:167
#define noexcept
Definition: juce_CompilerSupport.h:141
static const String parent
Definition: juce_RelativeCoordinate.h:152
Definition: juce_RelativeCoordinate.h:168
Definition: juce_Expression.h:113
Definition: juce_String.h:43
static const String y
Definition: juce_RelativeCoordinate.h:158
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_Expression.h:48
static const String height
Definition: juce_RelativeCoordinate.h:160
const Expression & getExpression() const
Definition: juce_RelativeCoordinate.h:133
png_const_structrp png_const_inforp int png_fixed_point * width
Definition: juce_PNGLoader.cpp:2339
bool operator==(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:565
Definition: juce_RelativeCoordinate.h:169
Definition: juce_RelativeCoordinate.h:150
static const String top
Definition: juce_RelativeCoordinate.h:155
static const String left
Definition: juce_RelativeCoordinate.h:153
static const String bottom
Definition: juce_RelativeCoordinate.h:156
static const String width
Definition: juce_RelativeCoordinate.h:159
bool operator!=(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:566
Definition: juce_RelativeCoordinate.h:163
static const String right
Definition: juce_RelativeCoordinate.h:154
Type
Definition: juce_RelativeCoordinate.h:165