diff --git a/Application_8hpp_source.html b/Application_8hpp_source.html index 985274e0..93064a5a 100644 --- a/Application_8hpp_source.html +++ b/Application_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/Application.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,111 +66,20 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Application.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_APP_HPP_INCLUDED
-
18 #define DGL_APP_HPP_INCLUDED
-
19 
-
20 #include "Base.hpp"
-
21 
-
22 START_NAMESPACE_DGL
-
23 
-
24 // -----------------------------------------------------------------------
-
25 // Forward class names
-
26 
-
27 class Window;
-
28 
-
29 // -----------------------------------------------------------------------
-
30 
-
31 /**
-
32  Base DGL Application class.
-
33 
-
34  One application instance is required for creating a window.
-
35  There's no single/global application instance in DGL, and multiple
-
36  windows can share the same app instance.
-
37 
-
38  In standalone mode an application will automatically quit its
-
39  event-loop when all its windows are closed.
-
40  */
- -
42 {
-
43 public:
-
44  /**
-
45  Constructor.
-
46  */
-
47  Application();
-
48 
-
49  /**
-
50  Destructor.
-
51  */
-
52  virtual ~Application();
-
53 
-
54  /**
-
55  Idle function.
-
56  This runs the application event-loop once.
-
57  */
-
58  void idle();
-
59 
-
60  /**
-
61  Run the application event-loop until all Windows are closed.
-
62  idle() is called at regular intervals.
-
63  @note This function is meant for standalones only, *never* call this from plugins.
-
64  */
-
65  void exec();
-
66 
-
67  /**
-
68  Quit the application.
-
69  This stops the event-loop and closes all Windows.
-
70  */
-
71  void quit();
-
72 
-
73  /**
-
74  Check if the application is about to quit.
-
75  Returning true means there's no event-loop running at the moment (or it's just about to stop).
-
76  */
-
77  bool isQuiting() const noexcept;
-
78 
-
79 private:
-
80  struct PrivateData;
-
81  PrivateData* const pData;
-
82  friend class Window;
-
83 
-
84  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Application)
-
85 };
-
86 
-
87 // -----------------------------------------------------------------------
-
88 
-
89 END_NAMESPACE_DGL
-
90 
-
91 #endif // DGL_APP_HPP_INCLUDED
- +
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_APP_HPP_INCLUDED
18 #define DGL_APP_HPP_INCLUDED
19 
20 #include "Base.hpp"
21 
22 START_NAMESPACE_DGL
23 
24 // -----------------------------------------------------------------------
25 // Forward class names
26 
27 class Window;
28 
29 // -----------------------------------------------------------------------
30 
31 /**
32  Base DGL Application class.
33 
34  One application instance is required for creating a window.
35  There's no single/global application instance in DGL, and multiple
36  windows can share the same app instance.
37 
38  In standalone mode an application will automatically quit its
39  event-loop when all its windows are closed.
40  */
42 {
43 public:
44  /**
45  Constructor.
46  */
47  Application();
48 
49  /**
50  Destructor.
51  */
52  virtual ~Application();
53 
54  /**
55  Idle function.
56  This runs the application event-loop once.
57  */
58  void idle();
59 
60  /**
61  Run the application event-loop until all Windows are closed.
62  idle() is called at regular intervals.
63  @note This function is meant for standalones only, *never* call this from plugins.
64  */
65  void exec(int idleTime = 10);
66 
67  /**
68  Quit the application.
69  This stops the event-loop and closes all Windows.
70  */
71  void quit();
72 
73  /**
74  Check if the application is about to quit.
75  Returning true means there's no event-loop running at the moment (or it's just about to stop).
76  */
77  bool isQuiting() const noexcept;
78 
79 private:
80  struct PrivateData;
81  PrivateData* const pData;
82  friend class Window;
83 
84  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Application)
85 };
86 
87 // -----------------------------------------------------------------------
88 
89 END_NAMESPACE_DGL
90 
91 #endif // DGL_APP_HPP_INCLUDED
Definition: Window.hpp:34
+
void exec(int idleTime=10)
bool isQuiting() const noexcept
virtual ~Application()
Definition: Application.hpp:41
-
diff --git a/Base64_8hpp_source.html b/Base64_8hpp_source.html index 73886aff..1dc67614 100644 --- a/Base64_8hpp_source.html +++ b/Base64_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra/Base64.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,162 +66,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Base64.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_BASE64_HPP_INCLUDED
-
18 #define DISTRHO_BASE64_HPP_INCLUDED
-
19 
-
20 #include "../DistrhoUtils.hpp"
-
21 
-
22 #include <cctype>
-
23 #include <vector>
-
24 
-
25 // -----------------------------------------------------------------------
-
26 // base64 stuff, based on http://www.adp-gmbh.ch/cpp/common/base64.html
-
27 
-
28 /*
-
29  Copyright (C) 2004-2008 René Nyffenegger
-
30 
-
31  This source code is provided 'as-is', without any express or implied
-
32  warranty. In no event will the author be held liable for any damages
-
33  arising from the use of this software.
-
34 
-
35  Permission is granted to anyone to use this software for any purpose,
-
36  including commercial applications, and to alter it and redistribute it
-
37  freely, subject to the following restrictions:
-
38 
-
39  1. The origin of this source code must not be misrepresented; you must not
-
40  claim that you wrote the original source code. If you use this source code
-
41  in a product, an acknowledgment in the product documentation would be
-
42  appreciated but is not required.
-
43 
-
44  2. Altered source versions must be plainly marked as such, and must not be
-
45  misrepresented as being the original source code.
-
46 
-
47  3. This notice may not be removed or altered from any source distribution.
-
48 
-
49  René Nyffenegger rene.nyffenegger@adp-gmbh.ch
-
50 */
-
51 
-
52 // -----------------------------------------------------------------------
-
53 // Helpers
-
54 
-
55 #ifndef DOXYGEN
-
56 namespace DistrhoBase64Helpers {
-
57 
-
58 static const char* const kBase64Chars =
-
59  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-
60  "abcdefghijklmnopqrstuvwxyz"
-
61  "0123456789+/";
-
62 
-
63 static inline
-
64 uint8_t findBase64CharIndex(const char c)
-
65 {
-
66  static const uint8_t kBase64CharsLen(static_cast<uint8_t>(std::strlen(kBase64Chars)));
-
67 
-
68  for (uint8_t i=0; i<kBase64CharsLen; ++i)
-
69  {
-
70  if (kBase64Chars[i] == c)
-
71  return i;
-
72  }
-
73 
-
74  d_stderr2("findBase64CharIndex('%c') - failed", c);
-
75  return 0;
-
76 }
-
77 
-
78 static inline
-
79 bool isBase64Char(const char c)
-
80 {
-
81  return (std::isalnum(c) || (c == '+') || (c == '/'));
-
82 }
-
83 
-
84 } // namespace DistrhoBase64Helpers
-
85 #endif
-
86 
-
87 // -----------------------------------------------------------------------
-
88 
-
89 static inline
-
90 std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string)
-
91 {
-
92  DISTRHO_SAFE_ASSERT_RETURN(base64string != nullptr, std::vector<uint8_t>());
-
93 
-
94  uint i=0, j=0;
-
95  uint charArray3[3], charArray4[4];
-
96 
-
97  std::vector<uint8_t> ret;
-
98  ret.reserve(std::strlen(base64string)*3/4 + 4);
-
99 
-
100  for (std::size_t l=0, len=std::strlen(base64string); l<len; ++l)
-
101  {
-
102  const char c = base64string[l];
-
103 
-
104  if (c == '\0' || c == '=')
-
105  break;
-
106  if (c == ' ' || c == '\n')
-
107  continue;
-
108 
-
109  DISTRHO_SAFE_ASSERT_CONTINUE(CarlaBase64Helpers::isBase64Char(c));
-
110 
-
111  charArray4[i++] = static_cast<uint>(c);
-
112 
-
113  if (i == 4)
-
114  {
-
115  for (i=0; i<4; ++i)
-
116  charArray4[i] = DistrhoBase64Helpers::findBase64CharIndex(static_cast<char>(charArray4[i]));
-
117 
-
118  charArray3[0] = (charArray4[0] << 2) + ((charArray4[1] & 0x30) >> 4);
-
119  charArray3[1] = ((charArray4[1] & 0xf) << 4) + ((charArray4[2] & 0x3c) >> 2);
-
120  charArray3[2] = ((charArray4[2] & 0x3) << 6) + charArray4[3];
-
121 
-
122  for (i=0; i<3; ++i)
-
123  ret.push_back(static_cast<uint8_t>(charArray3[i]));
-
124 
-
125  i = 0;
-
126  }
-
127  }
-
128 
-
129  if (i != 0)
-
130  {
-
131  for (j=0; j<i && j<4; ++j)
-
132  charArray4[j] = DistrhoBase64Helpers::findBase64CharIndex(static_cast<char>(charArray4[j]));
-
133 
-
134  for (j=i; j<4; ++j)
-
135  charArray4[j] = 0;
-
136 
-
137  charArray3[0] = (charArray4[0] << 2) + ((charArray4[1] & 0x30) >> 4);
-
138  charArray3[1] = ((charArray4[1] & 0xf) << 4) + ((charArray4[2] & 0x3c) >> 2);
-
139  charArray3[2] = ((charArray4[2] & 0x3) << 6) + charArray4[3];
-
140 
-
141  for (j=0; i>0 && j<i-1; j++)
-
142  ret.push_back(static_cast<uint8_t>(charArray3[j]));
-
143  }
-
144 
-
145  return ret;
-
146 }
-
147 
-
148 // -----------------------------------------------------------------------
-
149 
-
150 #endif // DISTRHO_BASE64_HPP_INCLUDED
-
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_BASE64_HPP_INCLUDED
18 #define DISTRHO_BASE64_HPP_INCLUDED
19 
20 #include "../DistrhoUtils.hpp"
21 
22 #include <cctype>
23 #include <vector>
24 
25 // -----------------------------------------------------------------------
26 // base64 stuff, based on http://www.adp-gmbh.ch/cpp/common/base64.html
27 
28 /*
29  Copyright (C) 2004-2008 René Nyffenegger
30 
31  This source code is provided 'as-is', without any express or implied
32  warranty. In no event will the author be held liable for any damages
33  arising from the use of this software.
34 
35  Permission is granted to anyone to use this software for any purpose,
36  including commercial applications, and to alter it and redistribute it
37  freely, subject to the following restrictions:
38 
39  1. The origin of this source code must not be misrepresented; you must not
40  claim that you wrote the original source code. If you use this source code
41  in a product, an acknowledgment in the product documentation would be
42  appreciated but is not required.
43 
44  2. Altered source versions must be plainly marked as such, and must not be
45  misrepresented as being the original source code.
46 
47  3. This notice may not be removed or altered from any source distribution.
48 
49  René Nyffenegger rene.nyffenegger@adp-gmbh.ch
50 */
51 
52 // -----------------------------------------------------------------------
53 // Helpers
54 
55 #ifndef DOXYGEN
56 namespace DistrhoBase64Helpers {
57 
58 static const char* const kBase64Chars =
59  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
60  "abcdefghijklmnopqrstuvwxyz"
61  "0123456789+/";
62 
63 static inline
64 uint8_t findBase64CharIndex(const char c)
65 {
66  static const uint8_t kBase64CharsLen(static_cast<uint8_t>(std::strlen(kBase64Chars)));
67 
68  for (uint8_t i=0; i<kBase64CharsLen; ++i)
69  {
70  if (kBase64Chars[i] == c)
71  return i;
72  }
73 
74  d_stderr2("findBase64CharIndex('%c') - failed", c);
75  return 0;
76 }
77 
78 static inline
79 bool isBase64Char(const char c)
80 {
81  return (std::isalnum(c) || (c == '+') || (c == '/'));
82 }
83 
84 } // namespace DistrhoBase64Helpers
85 #endif
86 
87 // -----------------------------------------------------------------------
88 
89 static inline
90 std::vector<uint8_t> d_getChunkFromBase64String(const char* const base64string)
91 {
92  DISTRHO_SAFE_ASSERT_RETURN(base64string != nullptr, std::vector<uint8_t>());
93 
94  uint i=0, j=0;
95  uint charArray3[3], charArray4[4];
96 
97  std::vector<uint8_t> ret;
98  ret.reserve(std::strlen(base64string)*3/4 + 4);
99 
100  for (std::size_t l=0, len=std::strlen(base64string); l<len; ++l)
101  {
102  const char c = base64string[l];
103 
104  if (c == '\0' || c == '=')
105  break;
106  if (c == ' ' || c == '\n')
107  continue;
108 
109  DISTRHO_SAFE_ASSERT_CONTINUE(DistrhoBase64Helpers::isBase64Char(c));
110 
111  charArray4[i++] = static_cast<uint>(c);
112 
113  if (i == 4)
114  {
115  for (i=0; i<4; ++i)
116  charArray4[i] = DistrhoBase64Helpers::findBase64CharIndex(static_cast<char>(charArray4[i]));
117 
118  charArray3[0] = (charArray4[0] << 2) + ((charArray4[1] & 0x30) >> 4);
119  charArray3[1] = ((charArray4[1] & 0xf) << 4) + ((charArray4[2] & 0x3c) >> 2);
120  charArray3[2] = ((charArray4[2] & 0x3) << 6) + charArray4[3];
121 
122  for (i=0; i<3; ++i)
123  ret.push_back(static_cast<uint8_t>(charArray3[i]));
124 
125  i = 0;
126  }
127  }
128 
129  if (i != 0)
130  {
131  for (j=0; j<i && j<4; ++j)
132  charArray4[j] = DistrhoBase64Helpers::findBase64CharIndex(static_cast<char>(charArray4[j]));
133 
134  for (j=i; j<4; ++j)
135  charArray4[j] = 0;
136 
137  charArray3[0] = (charArray4[0] << 2) + ((charArray4[1] & 0x30) >> 4);
138  charArray3[1] = ((charArray4[1] & 0xf) << 4) + ((charArray4[2] & 0x3c) >> 2);
139  charArray3[2] = ((charArray4[2] & 0x3) << 6) + charArray4[3];
140 
141  for (j=0; i>0 && j<i-1; j++)
142  ret.push_back(static_cast<uint8_t>(charArray3[j]));
143  }
144 
145  return ret;
146 }
147 
148 // -----------------------------------------------------------------------
149 
150 #endif // DISTRHO_BASE64_HPP_INCLUDED
diff --git a/Base_8hpp_source.html b/Base_8hpp_source.html index 76a34937..f104e35a 100644 --- a/Base_8hpp_source.html +++ b/Base_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/Base.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,210 +66,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Base.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_BASE_HPP_INCLUDED
-
18 #define DGL_BASE_HPP_INCLUDED
-
19 
-
20 #include "../distrho/extra/LeakDetector.hpp"
-
21 #include "../distrho/extra/ScopedPointer.hpp"
-
22 
-
23 // -----------------------------------------------------------------------
-
24 // Define namespace
-
25 
-
26 #ifndef DGL_NAMESPACE
-
27 # define DGL_NAMESPACE DGL
-
28 #endif
-
29 
-
30 #define START_NAMESPACE_DGL namespace DGL_NAMESPACE {
-
31 #define END_NAMESPACE_DGL }
-
32 #define USE_NAMESPACE_DGL using namespace DGL_NAMESPACE;
-
33 
-
34 #ifdef DISTRHO_OS_WINDOWS
-
35 // -----------------------------------------------------------------------
-
36 // Fix OpenGL includes for Windows, based on glfw code
-
37 
-
38 #ifndef APIENTRY
-
39 # define APIENTRY __stdcall
-
40 #endif // APIENTRY
-
41 
-
42 /* We need WINGDIAPI defined */
-
43 #ifndef WINGDIAPI
-
44 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__)
-
45 # define WINGDIAPI __declspec(dllimport)
-
46 # elif defined(__LCC__)
-
47 # define WINGDIAPI __stdcall
-
48 # else
-
49 # define WINGDIAPI extern
-
50 # endif
-
51 # define DGL_WINGDIAPI_DEFINED
-
52 #endif // WINGDIAPI
-
53 
-
54 /* Some <GL/glu.h> files also need CALLBACK defined */
-
55 #ifndef CALLBACK
-
56 # if defined(_MSC_VER)
-
57 # if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
-
58 # define CALLBACK __stdcall
-
59 # else
-
60 # define CALLBACK
-
61 # endif
-
62 # else
-
63 # define CALLBACK __stdcall
-
64 # endif
-
65 # define DGL_CALLBACK_DEFINED
-
66 #endif // CALLBACK
-
67 
-
68 /* Most GL/glu.h variants on Windows need wchar_t */
-
69 #include <cstddef>
-
70 
-
71 #endif // DISTRHO_OS_WINDOWS
-
72 
-
73 // -----------------------------------------------------------------------
-
74 // OpenGL includes
-
75 
-
76 #ifdef DISTRHO_OS_MAC
-
77 # include <OpenGL/gl.h>
-
78 #else
-
79 # ifndef DISTRHO_OS_WINDOWS
-
80 # define GL_GLEXT_PROTOTYPES
-
81 # endif
-
82 # include <GL/gl.h>
-
83 # include <GL/glext.h>
-
84 #endif
-
85 
-
86 // -----------------------------------------------------------------------
-
87 // Missing OpenGL defines
-
88 
-
89 #if defined(GL_BGR_EXT) && ! defined(GL_BGR)
-
90 # define GL_BGR GL_BGR_EXT
-
91 #endif
-
92 
-
93 #if defined(GL_BGRA_EXT) && ! defined(GL_BGRA)
-
94 # define GL_BGRA GL_BGRA_EXT
-
95 #endif
-
96 
-
97 #ifndef GL_CLAMP_TO_BORDER
-
98 # define GL_CLAMP_TO_BORDER 0x812D
-
99 #endif
-
100 
-
101 #ifdef DISTRHO_OS_WINDOWS
-
102 // -----------------------------------------------------------------------
-
103 // Fix OpenGL includes for Windows, based on glfw code
-
104 
-
105 #ifdef DGL_WINGDIAPI_DEFINED
-
106 # undef WINGDIAPI
-
107 # undef DGL_WINGDIAPI_DEFINED
-
108 #endif
-
109 
-
110 #ifdef DGL_CALLBACK_DEFINED
-
111 # undef CALLBACK
-
112 # undef DGL_CALLBACK_DEFINED
-
113 #endif
-
114 
-
115 #endif // DISTRHO_OS_WINDOWS
-
116 
-
117 START_NAMESPACE_DGL
-
118 
-
119 // -----------------------------------------------------------------------
-
120 // Base DGL enums
-
121 
-
122 /**
-
123  Convenience symbols for ASCII control characters.
-
124  */
-
125 enum Char {
-
126  kCharBackspace = 0x08,
-
127  kCharEscape = 0x1B,
-
128  kCharDelete = 0x7F
-
129 };
-
130 
-
131 /**
-
132  Keyboard modifier flags.
-
133  */
-
134 enum Modifier {
-
135  kModifierShift = 1 << 0, /**< Shift key */
-
136  kModifierControl = 1 << 1, /**< Control key */
-
137  kModifierAlt = 1 << 2, /**< Alt/Option key */
-
138  kModifierSuper = 1 << 3 /**< Mod4/Command/Windows key */
-
139 };
-
140 
-
141 /**
-
142  Special (non-Unicode) keyboard keys.
-
143  */
-
144 enum Key {
-
145  kKeyF1 = 1,
-
146  kKeyF2,
-
147  kKeyF3,
-
148  kKeyF4,
-
149  kKeyF5,
-
150  kKeyF6,
-
151  kKeyF7,
-
152  kKeyF8,
-
153  kKeyF9,
-
154  kKeyF10,
-
155  kKeyF11,
-
156  kKeyF12,
-
157  kKeyLeft,
-
158  kKeyUp,
-
159  kKeyRight,
-
160  kKeyDown,
-
161  kKeyPageUp,
-
162  kKeyPageDown,
-
163  kKeyHome,
-
164  kKeyEnd,
-
165  kKeyInsert,
-
166  kKeyShift,
-
167  kKeyControl,
-
168  kKeyAlt,
-
169  kKeySuper
-
170 };
-
171 
-
172 // -----------------------------------------------------------------------
-
173 // Base DGL classes
-
174 
-
175 /**
-
176  Idle callback.
-
177  */
- -
179 {
-
180 public:
-
181  virtual ~IdleCallback() {}
-
182  virtual void idleCallback() = 0;
-
183 };
-
184 
-
185 // -----------------------------------------------------------------------
-
186 
-
187 END_NAMESPACE_DGL
-
188 
-
189 #ifndef DONT_SET_USING_DGL_NAMESPACE
-
190  // If your code uses a lot of DGL classes, then this will obviously save you
-
191  // a lot of typing, but can be disabled by setting DONT_SET_USING_DGL_NAMESPACE.
-
192  using namespace DGL_NAMESPACE;
-
193 #endif
-
194 
-
195 // -----------------------------------------------------------------------
-
196 
-
197 #endif // DGL_BASE_HPP_INCLUDED
-
Definition: Base.hpp:178
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_BASE_HPP_INCLUDED
18 #define DGL_BASE_HPP_INCLUDED
19 
20 #include "../distrho/extra/LeakDetector.hpp"
21 #include "../distrho/extra/ScopedPointer.hpp"
22 
23 // -----------------------------------------------------------------------
24 // Define namespace
25 
26 #ifndef DGL_NAMESPACE
27 # define DGL_NAMESPACE DGL
28 #endif
29 
30 #define START_NAMESPACE_DGL namespace DGL_NAMESPACE {
31 #define END_NAMESPACE_DGL }
32 #define USE_NAMESPACE_DGL using namespace DGL_NAMESPACE;
33 
34 #ifdef DISTRHO_OS_WINDOWS
35 // -----------------------------------------------------------------------
36 // Fix OpenGL includes for Windows, based on glfw code
37 
38 #ifndef APIENTRY
39 # define APIENTRY __stdcall
40 #endif // APIENTRY
41 
42 /* We need WINGDIAPI defined */
43 #ifndef WINGDIAPI
44 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__POCC__)
45 # define WINGDIAPI __declspec(dllimport)
46 # elif defined(__LCC__)
47 # define WINGDIAPI __stdcall
48 # else
49 # define WINGDIAPI extern
50 # endif
51 # define DGL_WINGDIAPI_DEFINED
52 #endif // WINGDIAPI
53 
54 /* Some <GL/glu.h> files also need CALLBACK defined */
55 #ifndef CALLBACK
56 # if defined(_MSC_VER)
57 # if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
58 # define CALLBACK __stdcall
59 # else
60 # define CALLBACK
61 # endif
62 # else
63 # define CALLBACK __stdcall
64 # endif
65 # define DGL_CALLBACK_DEFINED
66 #endif // CALLBACK
67 
68 /* Most GL/glu.h variants on Windows need wchar_t */
69 #include <cstddef>
70 
71 #endif // DISTRHO_OS_WINDOWS
72 
73 // -----------------------------------------------------------------------
74 // OpenGL includes
75 
76 #ifdef DISTRHO_OS_MAC
77 # include <OpenGL/gl.h>
78 #else
79 # ifndef DISTRHO_OS_WINDOWS
80 # define GL_GLEXT_PROTOTYPES
81 # endif
82 # include <GL/gl.h>
83 # include <GL/glext.h>
84 #endif
85 
86 // -----------------------------------------------------------------------
87 // Missing OpenGL defines
88 
89 #if defined(GL_BGR_EXT) && ! defined(GL_BGR)
90 # define GL_BGR GL_BGR_EXT
91 #endif
92 
93 #if defined(GL_BGRA_EXT) && ! defined(GL_BGRA)
94 # define GL_BGRA GL_BGRA_EXT
95 #endif
96 
97 #ifndef GL_CLAMP_TO_BORDER
98 # define GL_CLAMP_TO_BORDER 0x812D
99 #endif
100 
101 #ifdef DISTRHO_OS_WINDOWS
102 // -----------------------------------------------------------------------
103 // Fix OpenGL includes for Windows, based on glfw code
104 
105 #ifdef DGL_WINGDIAPI_DEFINED
106 # undef WINGDIAPI
107 # undef DGL_WINGDIAPI_DEFINED
108 #endif
109 
110 #ifdef DGL_CALLBACK_DEFINED
111 # undef CALLBACK
112 # undef DGL_CALLBACK_DEFINED
113 #endif
114 
115 #endif // DISTRHO_OS_WINDOWS
116 
117 START_NAMESPACE_DGL
118 
119 // -----------------------------------------------------------------------
120 // Base DGL enums
121 
122 /**
123  Convenience symbols for ASCII control characters.
124  */
125 enum Char {
126  kCharBackspace = 0x08,
127  kCharEscape = 0x1B,
128  kCharDelete = 0x7F
129 };
130 
131 /**
132  Keyboard modifier flags.
133  */
134 enum Modifier {
135  kModifierShift = 1 << 0, /**< Shift key */
136  kModifierControl = 1 << 1, /**< Control key */
137  kModifierAlt = 1 << 2, /**< Alt/Option key */
138  kModifierSuper = 1 << 3 /**< Mod4/Command/Windows key */
139 };
140 
141 /**
142  Special (non-Unicode) keyboard keys.
143  */
144 enum Key {
145  kKeyF1 = 1,
146  kKeyF2,
147  kKeyF3,
148  kKeyF4,
149  kKeyF5,
150  kKeyF6,
151  kKeyF7,
152  kKeyF8,
153  kKeyF9,
154  kKeyF10,
155  kKeyF11,
156  kKeyF12,
157  kKeyLeft,
158  kKeyUp,
159  kKeyRight,
160  kKeyDown,
161  kKeyPageUp,
162  kKeyPageDown,
163  kKeyHome,
164  kKeyEnd,
165  kKeyInsert,
166  kKeyShift,
167  kKeyControl,
168  kKeyAlt,
169  kKeySuper
170 };
171 
172 // -----------------------------------------------------------------------
173 // Base DGL classes
174 
175 /**
176  Idle callback.
177  */
179 {
180 public:
181  virtual ~IdleCallback() {}
182  virtual void idleCallback() = 0;
183 };
184 
185 // -----------------------------------------------------------------------
186 
187 END_NAMESPACE_DGL
188 
189 #ifndef DONT_SET_USING_DGL_NAMESPACE
190  // If your code uses a lot of DGL classes, then this will obviously save you
191  // a lot of typing, but can be disabled by setting DONT_SET_USING_DGL_NAMESPACE.
192  using namespace DGL_NAMESPACE;
193 #endif
194 
195 // -----------------------------------------------------------------------
196 
197 #endif // DGL_BASE_HPP_INCLUDED
Definition: Base.hpp:178
+
diff --git a/Color_8hpp_source.html b/Color_8hpp_source.html index 4353c04f..c2e880b3 100644 --- a/Color_8hpp_source.html +++ b/Color_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/Color.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,117 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Color.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_COLOR_HPP_INCLUDED
-
18 #define DGL_COLOR_HPP_INCLUDED
-
19 
-
20 #include "Base.hpp"
-
21 
-
22 struct NVGcolor;
-
23 
-
24 START_NAMESPACE_DGL
-
25 
-
26 // -----------------------------------------------------------------------
-
27 
-
28 /**
-
29  A color made from red, green, blue and alpha floating-point values in [0..1] range.
-
30 */
-
31 struct Color {
-
32  /**
-
33  Direct access to the color values.
-
34  */
-
35  union {
-
36  float rgba[4];
-
37  struct { float red, green, blue, alpha; };
-
38  };
-
39 
-
40  /**
-
41  Create solid black color.
-
42  */
-
43  Color() noexcept;
-
44 
-
45  /**
-
46  Create a color from red, green, blue and alpha numeric values.
-
47  Values must be in [0..255] range.
-
48  */
-
49  Color(int red, int green, int blue, int alpha = 255) noexcept;
-
50 
-
51  /**
-
52  Create a color from red, green, blue and alpha floating-point values.
-
53  Values must in [0..1] range.
-
54  */
-
55  Color(float red, float green, float blue, float alpha = 1.0f) noexcept;
-
56 
-
57  /**
-
58  Create a color by copying another color.
-
59  */
-
60  Color(const Color& color) noexcept;
-
61  Color& operator=(const Color& color) noexcept;
-
62 
-
63  /**
-
64  Create a color by linearly interpolating two other colors.
-
65  */
-
66  Color(const Color& color1, const Color& color2, float u) noexcept;
-
67 
-
68  /**
-
69  Create a color specified by hue, saturation and lightness.
-
70  Values must in [0..1] range.
-
71  */
-
72  static Color fromHSL(float hue, float saturation, float lightness, float alpha = 1.0f);
-
73 
-
74  /**
-
75  Create a color from a HTML string like "#333" or "#112233".
-
76  */
-
77  static Color fromHTML(const char* rgb, float alpha = 1.0f);
-
78 
-
79  /**
-
80  Linearly interpolate this color against another.
-
81  */
-
82  void interpolate(const Color& other, float u) noexcept;
-
83 
-
84  /**
-
85  Check if this color matches another.
-
86  @note Comparison is forced within 8-bit color values.
-
87  */
-
88  bool isEqual(const Color& color, bool withAlpha = true) noexcept;
-
89  bool isNotEqual(const Color& color, bool withAlpha = true) noexcept;
-
90  bool operator==(const Color& color) noexcept;
-
91  bool operator!=(const Color& color) noexcept;
-
92 
-
93  /**
-
94  Fix color bounds if needed.
-
95  */
-
96  void fixBounds() noexcept;
-
97 
-
98  /**
-
99  @internal
-
100  Needed for NanoVG compatibility.
-
101  */
-
102  Color(const NVGcolor&) noexcept;
-
103  operator NVGcolor() const noexcept;
-
104 };
-
105 
-
106 // -----------------------------------------------------------------------
-
107 
-
108 END_NAMESPACE_DGL
-
109 
-
110 #endif // DGL_COLOR_HPP_INCLUDED
-
void fixBounds() noexcept
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_COLOR_HPP_INCLUDED
18 #define DGL_COLOR_HPP_INCLUDED
19 
20 #include "Base.hpp"
21 
22 struct NVGcolor;
23 
24 START_NAMESPACE_DGL
25 
26 // -----------------------------------------------------------------------
27 
28 /**
29  A color made from red, green, blue and alpha floating-point values in [0..1] range.
30 */
31 struct Color {
32  /**
33  Direct access to the color values.
34  */
35  union {
36  float rgba[4];
37  struct { float red, green, blue, alpha; };
38  };
39 
40  /**
41  Create solid black color.
42  */
43  Color() noexcept;
44 
45  /**
46  Create a color from red, green, blue and alpha numeric values.
47  Values must be in [0..255] range.
48  */
49  Color(int red, int green, int blue, int alpha = 255) noexcept;
50 
51  /**
52  Create a color from red, green, blue and alpha floating-point values.
53  Values must in [0..1] range.
54  */
55  Color(float red, float green, float blue, float alpha = 1.0f) noexcept;
56 
57  /**
58  Create a color by copying another color.
59  */
60  Color(const Color& color) noexcept;
61  Color& operator=(const Color& color) noexcept;
62 
63  /**
64  Create a color by linearly interpolating two other colors.
65  */
66  Color(const Color& color1, const Color& color2, float u) noexcept;
67 
68  /**
69  Create a color specified by hue, saturation and lightness.
70  Values must in [0..1] range.
71  */
72  static Color fromHSL(float hue, float saturation, float lightness, float alpha = 1.0f);
73 
74  /**
75  Create a color from a HTML string like "#333" or "#112233".
76  */
77  static Color fromHTML(const char* rgb, float alpha = 1.0f);
78 
79  /**
80  Linearly interpolate this color against another.
81  */
82  void interpolate(const Color& other, float u) noexcept;
83 
84  /**
85  Check if this color matches another.
86  @note Comparison is forced within 8-bit color values.
87  */
88  bool isEqual(const Color& color, bool withAlpha = true) noexcept;
89  bool isNotEqual(const Color& color, bool withAlpha = true) noexcept;
90  bool operator==(const Color& color) noexcept;
91  bool operator!=(const Color& color) noexcept;
92 
93  /**
94  Fix color bounds if needed.
95  */
96  void fixBounds() noexcept;
97 
98  /**
99  @internal
100  Needed for NanoVG compatibility.
101  */
102  Color(const NVGcolor&) noexcept;
103  operator NVGcolor() const noexcept;
104 };
105 
106 // -----------------------------------------------------------------------
107 
108 END_NAMESPACE_DGL
109 
110 #endif // DGL_COLOR_HPP_INCLUDED
void fixBounds() noexcept
Definition: Color.hpp:31
Color() noexcept
static Color fromHSL(float hue, float saturation, float lightness, float alpha=1.0f)
@@ -207,9 +76,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/DistrhoInfo_8hpp_source.html b/DistrhoInfo_8hpp_source.html index 667a0043..7fdab092 100644 --- a/DistrhoInfo_8hpp_source.html +++ b/DistrhoInfo_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/DistrhoInfo.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,582 +66,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
DistrhoInfo.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifdef DOXYGEN
-
18 
-
19 #include "src/DistrhoDefines.h"
-
20 
-
21 START_NAMESPACE_DISTRHO
-
22 
-
23 /* ------------------------------------------------------------------------------------------------------------
-
24  * Intro */
-
25 
-
26 /**
-
27  @mainpage DISTRHO %Plugin Framework
-
28 
-
29  DISTRHO %Plugin Framework (or @b DPF for short)
-
30  is a plugin framework designed to make development of new plugins an easy and enjoyable task.@n
-
31  It allows developers to create plugins with custom UIs using a simple C++ API.@n
-
32  The framework facilitates exporting various different plugin formats from the same code-base.
-
33 
-
34  DPF can build for LADSPA, DSSI, LV2 and VST2 formats.@n
-
35  A JACK/Standalone mode is also available, allowing you to quickly test plugins.
-
36 
-
37  @section Macros
-
38  You start by creating a "DistrhoPluginInfo.h" file describing the plugin via macros, see @ref PluginMacros.@n
-
39  This file is included in the main DPF code to select which features to activate for each plugin format.
-
40 
-
41  For example, a plugin (with %UI) that use states will require LV2 hosts to support Atom and Worker extensions for
-
42  message passing from the %UI to the plugin.@n
-
43  If your plugin does not make use of states, the Worker extension is not set as a required feature.
-
44 
-
45  @section Plugin
-
46  The next step is to create your plugin code by subclassing DPF's Plugin class.@n
-
47  You need to pass the number of parameters in the constructor and also the number of programs and states, if any.
-
48 
-
49  Here's an example of an audio plugin that simply mutes the host output:
-
50  @code
-
51  class MutePlugin : public Plugin
-
52  {
-
53  public:
-
54  /**
-
55  Plugin class constructor.
-
56  */
-
57  MutePlugin()
-
58  : Plugin(0, 0, 0) // 0 parameters, 0 programs and 0 states
-
59  {
-
60  }
-
61 
-
62  protected:
-
63  /* ----------------------------------------------------------------------------------------
-
64  * Information */
-
65 
-
66  /**
-
67  Get the plugin label.
-
68  This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.
-
69  */
-
70  const char* getLabel() const override
-
71  {
-
72  return "Mute";
-
73  }
-
74 
-
75  /**
-
76  Get the plugin author/maker.
-
77  */
-
78  const char* getMaker() const override
-
79  {
-
80  return "DPF";
-
81  }
-
82 
-
83  /**
-
84  Get the plugin license name (a single line of text).
-
85  For commercial plugins this should return some short copyright information.
-
86  */
-
87  const char* getLicense() const override
-
88  {
-
89  return "MIT";
-
90  }
-
91 
-
92  /**
-
93  Get the plugin version, in hexadecimal.
-
94  */
-
95  uint32_t getVersion() const override
-
96  {
-
97  return d_version(1, 0, 0);
-
98  }
-
99 
-
100  /**
-
101  Get the plugin unique Id.
-
102  This value is used by LADSPA, DSSI and VST plugin formats.
-
103  */
-
104  int64_t getUniqueId() const override
-
105  {
-
106  return d_cconst('M', 'u', 't', 'e');
-
107  }
-
108 
-
109  /* ----------------------------------------------------------------------------------------
-
110  * This example has no parameters, so skip parameter stuff */
-
111 
-
112  void initParameter(uint32_t, Parameter&) override {}
-
113  float getParameterValue(uint32_t) const override { return 0.0f; }
-
114  void setParameterValue(uint32_t, float) override {}
-
115 
-
116  /* ----------------------------------------------------------------------------------------
-
117  * Audio/MIDI Processing */
-
118 
-
119  /**
-
120  Run/process function for plugins without MIDI input.
-
121  NOTE: Some parameters might be null if there are no audio inputs or outputs.
-
122  */
-
123  void run(const float**, float** outputs, uint32_t frames) override
-
124  {
-
125  // get the left and right audio outputs
-
126  float* const outL = outputs[0];
-
127  float* const outR = outputs[1];
-
128 
-
129  // mute audio
-
130  std::memset(outL, 0, sizeof(float)*frames);
-
131  std::memset(outR, 0, sizeof(float)*frames);
-
132  }
-
133 
-
134  };
-
135  @endcode
-
136 
-
137  See the Plugin class for more information and to understand what each function does.
-
138 
-
139  @section Parameters
-
140  A plugin is nothing without parameters.@n
-
141  In DPF parameters can be inputs or outputs.@n
-
142  They have hints to describe how they behave plus a name and a symbol identifying them.@n
-
143  Parameters also have 'ranges' – a minimum, maximum and default value.
-
144 
-
145  Input parameters are "read-only": the plugin can read them but not change them.
-
146  (the exception being when changing programs, more on that below)@n
-
147  It's the host responsibility to save, restore and set input parameters.
-
148 
-
149  Output parameters can be changed at anytime by the plugin.@n
-
150  The host will simply read their values and not change them.
-
151 
-
152  Here's an example of an audio plugin that has 1 input parameter:
-
153  @code
-
154  class GainPlugin : public Plugin
-
155  {
-
156  public:
-
157  /**
-
158  Plugin class constructor.
-
159  You must set all parameter values to their defaults, matching ParameterRanges::def.
-
160  */
-
161  GainPlugin()
-
162  : Plugin(1, 0, 0), // 1 parameter, 0 programs and 0 states
-
163  fGain(1.0f)
-
164  {
-
165  }
-
166 
-
167  protected:
-
168  /* ----------------------------------------------------------------------------------------
-
169  * Information */
-
170 
-
171  const char* getLabel() const override
-
172  {
-
173  return "Gain";
-
174  }
-
175 
-
176  const char* getMaker() const override
-
177  {
-
178  return "DPF";
-
179  }
-
180 
-
181  const char* getLicense() const override
-
182  {
-
183  return "MIT";
-
184  }
-
185 
-
186  uint32_t getVersion() const override
-
187  {
-
188  return d_version(1, 0, 0);
-
189  }
-
190 
-
191  int64_t getUniqueId() const override
-
192  {
-
193  return d_cconst('G', 'a', 'i', 'n');
-
194  }
-
195 
-
196  /* ----------------------------------------------------------------------------------------
-
197  * Init */
-
198 
-
199  /**
-
200  Initialize a parameter.
-
201  This function will be called once, shortly after the plugin is created.
-
202  */
-
203  void initParameter(uint32_t index, Parameter& parameter) override
-
204  {
-
205  // we only have one parameter so we can skip checking the index
-
206 
-
207  parameter.hints = kParameterIsAutomable;
-
208  parameter.name = "Gain";
-
209  parameter.symbol = "gain";
-
210  parameter.ranges.min = 0.0f;
-
211  parameter.ranges.max = 2.0f;
-
212  parameter.ranges.def = 1.0f;
-
213  }
-
214 
-
215  /* ----------------------------------------------------------------------------------------
-
216  * Internal data */
-
217 
-
218  /**
-
219  Get the current value of a parameter.
-
220  */
-
221  float getParameterValue(uint32_t index) const override
-
222  {
-
223  // same as before, ignore index check
-
224 
-
225  return fGain;
-
226  }
-
227 
-
228  /**
-
229  Change a parameter value.
-
230  */
-
231  void setParameterValue(uint32_t index, float value) override
-
232  {
-
233  // same as before, ignore index check
-
234 
-
235  fGain = value;
-
236  }
-
237 
-
238  /* ----------------------------------------------------------------------------------------
-
239  * Audio/MIDI Processing */
-
240 
-
241  void run(const float**, float** outputs, uint32_t frames) override
-
242  {
-
243  // get the mono input and output
-
244  const float* const in = inputs[0];
-
245  /* */ float* const out = outputs[0];
-
246 
-
247  // apply gain against all samples
-
248  for (uint32_t i=0; i < frames; ++i)
-
249  out[i] = in[i] * fGain;
-
250  }
-
251 
-
252  private:
-
253  float fGain;
-
254  };
-
255  @endcode
-
256 
-
257  See the Parameter struct for more information about parameters.
-
258 
-
259  @section Programs
-
260  Programs in DPF refer to plugin-side presets (usually called "factory presets"),
-
261  an initial set of presets provided by plugin authors included in the actual plugin.
-
262 
-
263  To use programs you must first enable them by setting @ref DISTRHO_PLUGIN_WANT_PROGRAMS to 1 in your DistrhoPluginInfo.h file.@n
-
264  When enabled you'll need to override 2 new function in your plugin code,
-
265  Plugin::initProgramName(uint32_t, String&) and Plugin::loadProgram(uint32_t).
-
266 
-
267  Here's an example of a plugin with a "default" program:
-
268  @code
-
269  class PluginWithPresets : public Plugin
-
270  {
-
271  public:
-
272  PluginWithPresets()
-
273  : Plugin(2, 1, 0), // 2 parameters, 1 program and 0 states
-
274  fGainL(1.0f),
-
275  fGainR(1.0f),
-
276  {
-
277  }
-
278 
-
279  protected:
-
280  /* ----------------------------------------------------------------------------------------
-
281  * Information */
-
282 
-
283  const char* getLabel() const override
-
284  {
-
285  return "Prog";
-
286  }
-
287 
-
288  const char* getMaker() const override
-
289  {
-
290  return "DPF";
-
291  }
-
292 
-
293  const char* getLicense() const override
-
294  {
-
295  return "MIT";
-
296  }
-
297 
-
298  uint32_t getVersion() const override
-
299  {
-
300  return d_version(1, 0, 0);
-
301  }
-
302 
-
303  int64_t getUniqueId() const override
-
304  {
-
305  return d_cconst('P', 'r', 'o', 'g');
-
306  }
-
307 
-
308  /* ----------------------------------------------------------------------------------------
-
309  * Init */
-
310 
-
311  /**
-
312  Initialize a parameter.
-
313  This function will be called once, shortly after the plugin is created.
-
314  */
-
315  void initParameter(uint32_t index, Parameter& parameter) override
-
316  {
-
317  parameter.hints = kParameterIsAutomable;
-
318  parameter.ranges.min = 0.0f;
-
319  parameter.ranges.max = 2.0f;
-
320  parameter.ranges.def = 1.0f;
-
321 
-
322  switch (index)
-
323  {
-
324  case 0;
-
325  parameter.name = "Gain Right";
-
326  parameter.symbol = "gainR";
-
327  break;
-
328  case 1;
-
329  parameter.name = "Gain Left";
-
330  parameter.symbol = "gainL";
-
331  break;
-
332  }
-
333  }
-
334 
-
335  /**
-
336  Set the name of the program @a index.
-
337  This function will be called once, shortly after the plugin is created.
-
338  */
-
339  void initProgramName(uint32_t index, String& programName)
-
340  {
-
341  switch(index)
-
342  {
-
343  case 0:
-
344  programName = "Default";
-
345  break;
-
346  }
-
347  }
-
348 
-
349  /* ----------------------------------------------------------------------------------------
-
350  * Internal data */
-
351 
-
352  /**
-
353  Get the current value of a parameter.
-
354  */
-
355  float getParameterValue(uint32_t index) const override
-
356  {
-
357  switch (index)
-
358  {
-
359  case 0;
-
360  return fGainL;
-
361  case 1;
-
362  return fGainR;
-
363  }
-
364  }
-
365 
-
366  /**
-
367  Change a parameter value.
-
368  */
-
369  void setParameterValue(uint32_t index, float value) override
-
370  {
-
371  switch (index)
-
372  {
-
373  case 0;
-
374  fGainL = value;
-
375  break;
-
376  case 1;
-
377  fGainR = value;
-
378  break;
-
379  }
-
380  }
-
381 
-
382  /**
-
383  Load a program.
-
384  */
-
385  void loadProgram(uint32_t index)
-
386  {
-
387  switch(index)
-
388  {
-
389  case 0:
-
390  fGainL = 1.0f;
-
391  fGainR = 1.0f;
-
392  break;
-
393  }
-
394  }
-
395 
-
396  /* ----------------------------------------------------------------------------------------
-
397  * Audio/MIDI Processing */
-
398 
-
399  void run(const float**, float** outputs, uint32_t frames) override
-
400  {
-
401  // get the left and right audio buffers
-
402  const float* const inL = inputs[0];
-
403  const float* const inR = inputs[0];
-
404  /* */ float* const outL = outputs[0];
-
405  /* */ float* const outR = outputs[0];
-
406 
-
407  // apply gain against all samples
-
408  for (uint32_t i=0; i < frames; ++i)
-
409  {
-
410  outL[i] = inL[i] * fGainL;
-
411  outR[i] = inR[i] * fGainR;
-
412  }
-
413  }
-
414 
-
415  private:
-
416  float fGainL, fGainR;
-
417  };
-
418  @endcode
-
419 
-
420  @section States
-
421  describe them
-
422 
-
423  @section MIDI
-
424  describe them
-
425 
-
426  @section Latency
-
427  describe it
-
428 
-
429  @section Time-Position
-
430  describe it
-
431 
-
432  @section UI
-
433  describe them
-
434 */
-
435 
-
436 /* ------------------------------------------------------------------------------------------------------------
-
437  * Plugin Macros */
-
438 
-
439 /**
-
440  @defgroup PluginMacros Plugin Macros
-
441 
-
442  C Macros that describe your plugin. (defined in the "DistrhoPluginInfo.h" file)
-
443 
-
444  With these macros you can tell the host what features your plugin requires.@n
-
445  Depending on which macros you enable, new functions will be available to call and/or override.
-
446 
-
447  All values are either integer or strings.@n
-
448  For boolean-like values 1 means 'on' and 0 means 'off'.
-
449 
-
450  The values defined in this group are for documentation purposes only.@n
-
451  All macros are disabled by default.
-
452 
-
453  Only 4 macros are required, they are:
-
454  - @ref DISTRHO_PLUGIN_NAME
-
455  - @ref DISTRHO_PLUGIN_NUM_INPUTS
-
456  - @ref DISTRHO_PLUGIN_NUM_OUTPUTS
-
457  - @ref DISTRHO_PLUGIN_URI
-
458  @{
-
459  */
-
460 
-
461 /**
-
462  The plugin name.@n
-
463  This is used to identify your plugin before a Plugin instance can be created.
-
464  @note This macro is required.
-
465  */
-
466 #define DISTRHO_PLUGIN_NAME "Plugin Name"
-
467 
-
468 /**
-
469  Number of audio inputs the plugin has.
-
470  @note This macro is required.
-
471  */
-
472 #define DISTRHO_PLUGIN_NUM_INPUTS 2
-
473 
-
474 /**
-
475  Number of audio outputs the plugin has.
-
476  @note This macro is required.
-
477  */
-
478 #define DISTRHO_PLUGIN_NUM_OUTPUTS 2
-
479 
-
480 /**
-
481  The plugin URI when exporting in LV2 format.
-
482  @note This macro is required.
-
483  */
-
484 #define DISTRHO_PLUGIN_URI "urn:distrho:name"
-
485 
-
486 /**
-
487  Wherever the plugin has a custom %UI.
-
488  @see DISTRHO_UI_USE_NANOVG
-
489  @see UI
-
490  */
-
491 #define DISTRHO_PLUGIN_HAS_UI 1
-
492 
-
493 /**
-
494  Wherever the plugin processing is realtime-safe.@n
-
495  TODO - list rtsafe requirements
-
496  */
-
497 #define DISTRHO_PLUGIN_IS_RT_SAFE 1
-
498 
-
499 /**
-
500  Wherever the plugin is a synth.@n
-
501  @ref DISTRHO_PLUGIN_WANT_MIDI_INPUT is automatically enabled when this is too.
-
502  @see DISTRHO_PLUGIN_WANT_MIDI_INPUT
-
503  */
-
504 #define DISTRHO_PLUGIN_IS_SYNTH 1
-
505 
-
506 /**
-
507  Enable direct access between the %UI and plugin code.
-
508  @see UI::getPluginInstancePointer()
-
509  @note DO NOT USE THIS UNLESS STRICTLY NECESSARY!!
-
510  Try to avoid it at all costs!
-
511  */
-
512 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0
-
513 
-
514 /**
-
515  Wherever the plugin introduces latency during audio or midi processing.
-
516  @see Plugin::setLatency(uint32_t)
-
517  */
-
518 #define DISTRHO_PLUGIN_WANT_LATENCY 1
-
519 
-
520 /**
-
521  Wherever the plugin wants MIDI input.@n
-
522  This is automatically enabled if @ref DISTRHO_PLUGIN_IS_SYNTH is true.
-
523  */
-
524 #define DISTRHO_PLUGIN_WANT_MIDI_INPUT 1
-
525 
-
526 /**
-
527  Wherever the plugin wants MIDI output.
-
528  @see Plugin::writeMidiEvent(const MidiEvent&)
-
529  */
-
530 #define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 1
-
531 
-
532 /**
-
533  Wherever the plugin provides its own internal programs.
-
534  @see Plugin::initProgramName(uint32_t, String&)
-
535  @see Plugin::loadProgram(uint32_t)
-
536  */
-
537 #define DISTRHO_PLUGIN_WANT_PROGRAMS 1
-
538 
-
539 /**
-
540  Wherever the plugin uses internal non-parameter data.
-
541  @see Plugin::initState(uint32_t, String&, String&)
-
542  @see Plugin::setState(const char*, const char*)
-
543  */
-
544 #define DISTRHO_PLUGIN_WANT_STATE 1
-
545 
-
546 /**
-
547  Wherever the plugin wants time position information from the host.
-
548  @see Plugin::getTimePosition()
-
549  */
-
550 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1
-
551 
-
552 /**
-
553  Wherever the %UI uses NanoVG for drawing instead of the default raw OpenGL calls.@n
-
554  When enabled your %UI instance will subclass @ref NanoWidget instead of @ref Widget.
-
555  */
-
556 #define DISTRHO_UI_USE_NANOVG 1
-
557 
-
558 /**
-
559  The %UI URI when exporting in LV2 format.@n
-
560  By default this is set to @ref DISTRHO_PLUGIN_URI with "#UI" as suffix.
-
561  */
-
562 #define DISTRHO_UI_URI DISTRHO_PLUGIN_URI "#UI"
-
563 
-
564 /** @} */
-
565 
-
566 // -----------------------------------------------------------------------------------------------------------
-
567 
-
568 END_NAMESPACE_DISTRHO
-
569 
-
570 #endif // DOXYGEN
-
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifdef DOXYGEN
18 
19 #include "src/DistrhoDefines.h"
20 
21 START_NAMESPACE_DISTRHO
22 
23 /* ------------------------------------------------------------------------------------------------------------
24  * Intro */
25 
26 /**
27  @mainpage DISTRHO %Plugin Framework
28 
29  DISTRHO %Plugin Framework (or @b DPF for short)
30  is a plugin framework designed to make development of new plugins an easy and enjoyable task.@n
31  It allows developers to create plugins with custom UIs using a simple C++ API.@n
32  The framework facilitates exporting various different plugin formats from the same code-base.
33 
34  DPF can build for LADSPA, DSSI, LV2 and VST2 formats.@n
35  A JACK/Standalone mode is also available, allowing you to quickly test plugins.
36 
37  @section Macros
38  You start by creating a "DistrhoPluginInfo.h" file describing the plugin via macros, see @ref PluginMacros.@n
39  This file is included in the main DPF code to select which features to activate for each plugin format.
40 
41  For example, a plugin (with %UI) that use states will require LV2 hosts to support Atom and Worker extensions for
42  message passing from the %UI to the plugin.@n
43  If your plugin does not make use of states, the Worker extension is not set as a required feature.
44 
45  @section Plugin
46  The next step is to create your plugin code by subclassing DPF's Plugin class.@n
47  You need to pass the number of parameters in the constructor and also the number of programs and states, if any.
48 
49  Here's an example of an audio plugin that simply mutes the host output:
50  @code
51  class MutePlugin : public Plugin
52  {
53  public:
54  /**
55  Plugin class constructor.
56  */
57  MutePlugin()
58  : Plugin(0, 0, 0) // 0 parameters, 0 programs and 0 states
59  {
60  }
61 
62  protected:
63  /* ----------------------------------------------------------------------------------------
64  * Information */
65 
66  /**
67  Get the plugin label.
68  This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.
69  */
70  const char* getLabel() const override
71  {
72  return "Mute";
73  }
74 
75  /**
76  Get the plugin author/maker.
77  */
78  const char* getMaker() const override
79  {
80  return "DPF";
81  }
82 
83  /**
84  Get the plugin license name (a single line of text).
85  For commercial plugins this should return some short copyright information.
86  */
87  const char* getLicense() const override
88  {
89  return "MIT";
90  }
91 
92  /**
93  Get the plugin version, in hexadecimal.
94  */
95  uint32_t getVersion() const override
96  {
97  return d_version(1, 0, 0);
98  }
99 
100  /**
101  Get the plugin unique Id.
102  This value is used by LADSPA, DSSI and VST plugin formats.
103  */
104  int64_t getUniqueId() const override
105  {
106  return d_cconst('M', 'u', 't', 'e');
107  }
108 
109  /* ----------------------------------------------------------------------------------------
110  * This example has no parameters, so skip parameter stuff */
111 
112  void initParameter(uint32_t, Parameter&) override {}
113  float getParameterValue(uint32_t) const override { return 0.0f; }
114  void setParameterValue(uint32_t, float) override {}
115 
116  /* ----------------------------------------------------------------------------------------
117  * Audio/MIDI Processing */
118 
119  /**
120  Run/process function for plugins without MIDI input.
121  NOTE: Some parameters might be null if there are no audio inputs or outputs.
122  */
123  void run(const float**, float** outputs, uint32_t frames) override
124  {
125  // get the left and right audio outputs
126  float* const outL = outputs[0];
127  float* const outR = outputs[1];
128 
129  // mute audio
130  std::memset(outL, 0, sizeof(float)*frames);
131  std::memset(outR, 0, sizeof(float)*frames);
132  }
133 
134  };
135  @endcode
136 
137  See the Plugin class for more information and to understand what each function does.
138 
139  @section Parameters
140  A plugin is nothing without parameters.@n
141  In DPF parameters can be inputs or outputs.@n
142  They have hints to describe how they behave plus a name and a symbol identifying them.@n
143  Parameters also have 'ranges' – a minimum, maximum and default value.
144 
145  Input parameters are "read-only": the plugin can read them but not change them.
146  (the exception being when changing programs, more on that below)@n
147  It's the host responsibility to save, restore and set input parameters.
148 
149  Output parameters can be changed at anytime by the plugin.@n
150  The host will simply read their values and not change them.
151 
152  Here's an example of an audio plugin that has 1 input parameter:
153  @code
154  class GainPlugin : public Plugin
155  {
156  public:
157  /**
158  Plugin class constructor.
159  You must set all parameter values to their defaults, matching ParameterRanges::def.
160  */
161  GainPlugin()
162  : Plugin(1, 0, 0), // 1 parameter, 0 programs and 0 states
163  fGain(1.0f)
164  {
165  }
166 
167  protected:
168  /* ----------------------------------------------------------------------------------------
169  * Information */
170 
171  const char* getLabel() const override
172  {
173  return "Gain";
174  }
175 
176  const char* getMaker() const override
177  {
178  return "DPF";
179  }
180 
181  const char* getLicense() const override
182  {
183  return "MIT";
184  }
185 
186  uint32_t getVersion() const override
187  {
188  return d_version(1, 0, 0);
189  }
190 
191  int64_t getUniqueId() const override
192  {
193  return d_cconst('G', 'a', 'i', 'n');
194  }
195 
196  /* ----------------------------------------------------------------------------------------
197  * Init */
198 
199  /**
200  Initialize a parameter.
201  This function will be called once, shortly after the plugin is created.
202  */
203  void initParameter(uint32_t index, Parameter& parameter) override
204  {
205  // we only have one parameter so we can skip checking the index
206 
207  parameter.hints = kParameterIsAutomable;
208  parameter.name = "Gain";
209  parameter.symbol = "gain";
210  parameter.ranges.min = 0.0f;
211  parameter.ranges.max = 2.0f;
212  parameter.ranges.def = 1.0f;
213  }
214 
215  /* ----------------------------------------------------------------------------------------
216  * Internal data */
217 
218  /**
219  Get the current value of a parameter.
220  */
221  float getParameterValue(uint32_t index) const override
222  {
223  // same as before, ignore index check
224 
225  return fGain;
226  }
227 
228  /**
229  Change a parameter value.
230  */
231  void setParameterValue(uint32_t index, float value) override
232  {
233  // same as before, ignore index check
234 
235  fGain = value;
236  }
237 
238  /* ----------------------------------------------------------------------------------------
239  * Audio/MIDI Processing */
240 
241  void run(const float**, float** outputs, uint32_t frames) override
242  {
243  // get the mono input and output
244  const float* const in = inputs[0];
245  /* */ float* const out = outputs[0];
246 
247  // apply gain against all samples
248  for (uint32_t i=0; i < frames; ++i)
249  out[i] = in[i] * fGain;
250  }
251 
252  private:
253  float fGain;
254  };
255  @endcode
256 
257  See the Parameter struct for more information about parameters.
258 
259  @section Programs
260  Programs in DPF refer to plugin-side presets (usually called "factory presets"),
261  an initial set of presets provided by plugin authors included in the actual plugin.
262 
263  To use programs you must first enable them by setting @ref DISTRHO_PLUGIN_WANT_PROGRAMS to 1 in your DistrhoPluginInfo.h file.@n
264  When enabled you'll need to override 2 new function in your plugin code,
265  Plugin::initProgramName(uint32_t, String&) and Plugin::loadProgram(uint32_t).
266 
267  Here's an example of a plugin with a "default" program:
268  @code
269  class PluginWithPresets : public Plugin
270  {
271  public:
272  PluginWithPresets()
273  : Plugin(2, 1, 0), // 2 parameters, 1 program and 0 states
274  fGainL(1.0f),
275  fGainR(1.0f),
276  {
277  }
278 
279  protected:
280  /* ----------------------------------------------------------------------------------------
281  * Information */
282 
283  const char* getLabel() const override
284  {
285  return "Prog";
286  }
287 
288  const char* getMaker() const override
289  {
290  return "DPF";
291  }
292 
293  const char* getLicense() const override
294  {
295  return "MIT";
296  }
297 
298  uint32_t getVersion() const override
299  {
300  return d_version(1, 0, 0);
301  }
302 
303  int64_t getUniqueId() const override
304  {
305  return d_cconst('P', 'r', 'o', 'g');
306  }
307 
308  /* ----------------------------------------------------------------------------------------
309  * Init */
310 
311  /**
312  Initialize a parameter.
313  This function will be called once, shortly after the plugin is created.
314  */
315  void initParameter(uint32_t index, Parameter& parameter) override
316  {
317  parameter.hints = kParameterIsAutomable;
318  parameter.ranges.min = 0.0f;
319  parameter.ranges.max = 2.0f;
320  parameter.ranges.def = 1.0f;
321 
322  switch (index)
323  {
324  case 0;
325  parameter.name = "Gain Right";
326  parameter.symbol = "gainR";
327  break;
328  case 1;
329  parameter.name = "Gain Left";
330  parameter.symbol = "gainL";
331  break;
332  }
333  }
334 
335  /**
336  Set the name of the program @a index.
337  This function will be called once, shortly after the plugin is created.
338  */
339  void initProgramName(uint32_t index, String& programName)
340  {
341  switch(index)
342  {
343  case 0:
344  programName = "Default";
345  break;
346  }
347  }
348 
349  /* ----------------------------------------------------------------------------------------
350  * Internal data */
351 
352  /**
353  Get the current value of a parameter.
354  */
355  float getParameterValue(uint32_t index) const override
356  {
357  switch (index)
358  {
359  case 0;
360  return fGainL;
361  case 1;
362  return fGainR;
363  }
364  }
365 
366  /**
367  Change a parameter value.
368  */
369  void setParameterValue(uint32_t index, float value) override
370  {
371  switch (index)
372  {
373  case 0;
374  fGainL = value;
375  break;
376  case 1;
377  fGainR = value;
378  break;
379  }
380  }
381 
382  /**
383  Load a program.
384  */
385  void loadProgram(uint32_t index)
386  {
387  switch(index)
388  {
389  case 0:
390  fGainL = 1.0f;
391  fGainR = 1.0f;
392  break;
393  }
394  }
395 
396  /* ----------------------------------------------------------------------------------------
397  * Audio/MIDI Processing */
398 
399  void run(const float**, float** outputs, uint32_t frames) override
400  {
401  // get the left and right audio buffers
402  const float* const inL = inputs[0];
403  const float* const inR = inputs[0];
404  /* */ float* const outL = outputs[0];
405  /* */ float* const outR = outputs[0];
406 
407  // apply gain against all samples
408  for (uint32_t i=0; i < frames; ++i)
409  {
410  outL[i] = inL[i] * fGainL;
411  outR[i] = inR[i] * fGainR;
412  }
413  }
414 
415  private:
416  float fGainL, fGainR;
417  };
418  @endcode
419 
420  @section States
421  describe them
422 
423  @section MIDI
424  describe them
425 
426  @section Latency
427  describe it
428 
429  @section Time-Position
430  describe it
431 
432  @section UI
433  describe them
434 */
435 
436 /* ------------------------------------------------------------------------------------------------------------
437  * Plugin Macros */
438 
439 /**
440  @defgroup PluginMacros Plugin Macros
441 
442  C Macros that describe your plugin. (defined in the "DistrhoPluginInfo.h" file)
443 
444  With these macros you can tell the host what features your plugin requires.@n
445  Depending on which macros you enable, new functions will be available to call and/or override.
446 
447  All values are either integer or strings.@n
448  For boolean-like values 1 means 'on' and 0 means 'off'.
449 
450  The values defined in this group are for documentation purposes only.@n
451  All macros are disabled by default.
452 
453  Only 4 macros are required, they are:
454  - @ref DISTRHO_PLUGIN_NAME
455  - @ref DISTRHO_PLUGIN_NUM_INPUTS
456  - @ref DISTRHO_PLUGIN_NUM_OUTPUTS
457  - @ref DISTRHO_PLUGIN_URI
458  @{
459  */
460 
461 /**
462  The plugin name.@n
463  This is used to identify your plugin before a Plugin instance can be created.
464  @note This macro is required.
465  */
466 #define DISTRHO_PLUGIN_NAME "Plugin Name"
467 
468 /**
469  Number of audio inputs the plugin has.
470  @note This macro is required.
471  */
472 #define DISTRHO_PLUGIN_NUM_INPUTS 2
473 
474 /**
475  Number of audio outputs the plugin has.
476  @note This macro is required.
477  */
478 #define DISTRHO_PLUGIN_NUM_OUTPUTS 2
479 
480 /**
481  The plugin URI when exporting in LV2 format.
482  @note This macro is required.
483  */
484 #define DISTRHO_PLUGIN_URI "urn:distrho:name"
485 
486 /**
487  Wherever the plugin has a custom %UI.
488  @see DISTRHO_UI_USE_NANOVG
489  @see UI
490  */
491 #define DISTRHO_PLUGIN_HAS_UI 1
492 
493 /**
494  Wherever the plugin processing is realtime-safe.@n
495  TODO - list rtsafe requirements
496  */
497 #define DISTRHO_PLUGIN_IS_RT_SAFE 1
498 
499 /**
500  Wherever the plugin is a synth.@n
501  @ref DISTRHO_PLUGIN_WANT_MIDI_INPUT is automatically enabled when this is too.
502  @see DISTRHO_PLUGIN_WANT_MIDI_INPUT
503  */
504 #define DISTRHO_PLUGIN_IS_SYNTH 1
505 
506 /**
507  Enable direct access between the %UI and plugin code.
508  @see UI::getPluginInstancePointer()
509  @note DO NOT USE THIS UNLESS STRICTLY NECESSARY!!
510  Try to avoid it at all costs!
511  */
512 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0
513 
514 /**
515  Wherever the plugin introduces latency during audio or midi processing.
516  @see Plugin::setLatency(uint32_t)
517  */
518 #define DISTRHO_PLUGIN_WANT_LATENCY 1
519 
520 /**
521  Wherever the plugin wants MIDI input.@n
522  This is automatically enabled if @ref DISTRHO_PLUGIN_IS_SYNTH is true.
523  */
524 #define DISTRHO_PLUGIN_WANT_MIDI_INPUT 1
525 
526 /**
527  Wherever the plugin wants MIDI output.
528  @see Plugin::writeMidiEvent(const MidiEvent&)
529  */
530 #define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 1
531 
532 /**
533  Wherever the plugin provides its own internal programs.
534  @see Plugin::initProgramName(uint32_t, String&)
535  @see Plugin::loadProgram(uint32_t)
536  */
537 #define DISTRHO_PLUGIN_WANT_PROGRAMS 1
538 
539 /**
540  Wherever the plugin uses internal non-parameter data.
541  @see Plugin::initState(uint32_t, String&, String&)
542  @see Plugin::setState(const char*, const char*)
543  */
544 #define DISTRHO_PLUGIN_WANT_STATE 1
545 
546 /**
547  Wherever the plugin wants time position information from the host.
548  @see Plugin::getTimePosition()
549  */
550 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1
551 
552 /**
553  Wherever the %UI uses NanoVG for drawing instead of the default raw OpenGL calls.@n
554  When enabled your %UI instance will subclass @ref NanoWidget instead of @ref Widget.
555  */
556 #define DISTRHO_UI_USE_NANOVG 1
557 
558 /**
559  The %UI URI when exporting in LV2 format.@n
560  By default this is set to @ref DISTRHO_PLUGIN_URI with "#UI" as suffix.
561  */
562 #define DISTRHO_UI_URI DISTRHO_PLUGIN_URI "#UI"
563 
564 /** @} */
565 
566 // -----------------------------------------------------------------------------------------------------------
567 
568 END_NAMESPACE_DISTRHO
569 
570 #endif // DOXYGEN
diff --git a/DistrhoPlugin_8hpp_source.html b/DistrhoPlugin_8hpp_source.html index 1aae3279..cf0f4e1b 100644 --- a/DistrhoPlugin_8hpp_source.html +++ b/DistrhoPlugin_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/DistrhoPlugin.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,913 +66,90 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
DistrhoPlugin.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_PLUGIN_HPP_INCLUDED
-
18 #define DISTRHO_PLUGIN_HPP_INCLUDED
-
19 
-
20 #include "extra/String.hpp"
-
21 #include "extra/LeakDetector.hpp"
-
22 #include "src/DistrhoPluginChecks.h"
-
23 
-
24 START_NAMESPACE_DISTRHO
-
25 
-
26 /* ------------------------------------------------------------------------------------------------------------
-
27  * Audio Port Hints */
-
28 
-
29 /**
-
30  @defgroup AudioPortHints Audio Port Hints
-
31 
-
32  Various audio port hints.
-
33  @see AudioPort::hints
-
34  @{
-
35  */
-
36 
-
37 /**
-
38  Audio port can be used as control voltage (LV2 only).
-
39  */
-
40 static const uint32_t kAudioPortIsCV = 0x1;
-
41 
-
42 /**
-
43  Audio port should be used as sidechan (LV2 only).
-
44  */
-
45 static const uint32_t kAudioPortIsSidechain = 0x2;
-
46 
-
47 /** @} */
-
48 
-
49 /* ------------------------------------------------------------------------------------------------------------
-
50  * Parameter Hints */
-
51 
-
52 /**
-
53  @defgroup ParameterHints Parameter Hints
-
54 
-
55  Various parameter hints.
-
56  @see Parameter::hints
-
57  @{
-
58  */
-
59 
-
60 /**
-
61  Parameter is automable (real-time safe).
-
62  @see Plugin::setParameterValue(uint32_t, float)
-
63  */
-
64 static const uint32_t kParameterIsAutomable = 0x01;
-
65 
-
66 /**
-
67  Parameter value is boolean.@n
-
68  It's always at either minimum or maximum value.
-
69  */
-
70 static const uint32_t kParameterIsBoolean = 0x02;
-
71 
-
72 /**
-
73  Parameter value is integer.
-
74  */
-
75 static const uint32_t kParameterIsInteger = 0x04;
-
76 
-
77 /**
-
78  Parameter value is logarithmic.
-
79  */
-
80 static const uint32_t kParameterIsLogarithmic = 0x08;
-
81 
-
82 /**
-
83  Parameter is of output type.@n
-
84  When unset, parameter is assumed to be of input type.
-
85 
-
86  Parameter inputs are changed by the host and must not be changed by the plugin.@n
-
87  The only exception being when changing programs, see Plugin::loadProgram().@n
-
88  Outputs are changed by the plugin and never modified by the host.
-
89  */
-
90 static const uint32_t kParameterIsOutput = 0x10;
-
91 
-
92 /** @} */
-
93 
-
94 /* ------------------------------------------------------------------------------------------------------------
-
95  * Base Plugin structs */
-
96 
-
97 /**
-
98  @defgroup BasePluginStructs Base Plugin Structs
-
99  @{
-
100  */
-
101 
-
102 /**
-
103  Audio Port.
-
104  */
-
105 struct AudioPort {
-
106  /**
-
107  Hints describing this audio port.
-
108  @see AudioPortHints
-
109  */
-
110  uint32_t hints;
-
111 
-
112  /**
-
113  The name of this audio port.@n
-
114  An audio port name can contain any character, but hosts might have a hard time with non-ascii ones.@n
-
115  The name doesn't have to be unique within a plugin instance, but it's recommended.
-
116  */
- -
118 
-
119  /**
-
120  The symbol of this audio port.@n
-
121  An audio port symbol is a short restricted name used as a machine and human readable identifier.@n
-
122  The first character must be one of _, a-z or A-Z and subsequent characters can be from _, a-z, A-Z and 0-9.
-
123  @note Audio port and parameter symbols MUST be unique within a plugin instance.
-
124  */
- -
126 
-
127  /**
-
128  Default constructor for a regular audio port.
-
129  */
-
130  AudioPort() noexcept
-
131  : hints(0x0),
-
132  name(),
-
133  symbol() {}
-
134 };
-
135 
-
136 /**
-
137  Parameter designation.@n
-
138  Allows a parameter to be specially designated for a task, like bypass.
-
139 
-
140  Each designation is unique, there must be only one parameter that uses it.@n
-
141  The use of designated parameters is completely optional.
-
142 
-
143  @note Designated parameters have strict ranges.
-
144  @see ParameterRanges::adjustForDesignation()
-
145  */
- -
147  /**
-
148  Null or unset designation.
-
149  */
- -
151 
-
152  /**
-
153  Bypass designation.@n
-
154  When on (> 0.5f), it means the plugin must run in a bypassed state.
-
155  */
- -
157 };
-
158 
-
159 /**
-
160  Parameter ranges.@n
-
161  This is used to set the default, minimum and maximum values of a parameter.
-
162 
-
163  By default a parameter has 0.0 as minimum, 1.0 as maximum and 0.0 as default.@n
-
164  When changing this struct values you must ensure maximum > minimum and default is within range.
-
165  */
- -
167  /**
-
168  Default value.
-
169  */
-
170  float def;
-
171 
-
172  /**
-
173  Minimum value.
-
174  */
-
175  float min;
-
176 
-
177  /**
-
178  Maximum value.
-
179  */
-
180  float max;
-
181 
-
182  /**
-
183  Default constructor, using 0.0 as minimum, 1.0 as maximum and 0.0 as default.
-
184  */
-
185  ParameterRanges() noexcept
-
186  : def(0.0f),
-
187  min(0.0f),
-
188  max(1.0f) {}
-
189 
-
190  /**
-
191  Constructor using custom values.
-
192  */
-
193  ParameterRanges(float df, float mn, float mx) noexcept
-
194  : def(df),
-
195  min(mn),
-
196  max(mx) {}
-
197 
-
198  /**
-
199  Fix the default value within range.
-
200  */
-
201  void fixDefault() noexcept
-
202  {
-
203  fixValue(def);
-
204  }
-
205 
-
206  /**
-
207  Fix a value within range.
-
208  */
-
209  void fixValue(float& value) const noexcept
-
210  {
-
211  if (value < min)
-
212  value = min;
-
213  else if (value > max)
-
214  value = max;
-
215  }
-
216 
-
217  /**
-
218  Get a fixed value within range.
-
219  */
-
220  const float& getFixedValue(const float& value) const noexcept
-
221  {
-
222  if (value <= min)
-
223  return min;
-
224  if (value >= max)
-
225  return max;
-
226  return value;
-
227  }
-
228 
-
229  /**
-
230  Get a value normalized to 0.0<->1.0.
-
231  */
-
232  float getNormalizedValue(const float& value) const noexcept
-
233  {
-
234  const float normValue((value - min) / (max - min));
-
235 
-
236  if (normValue <= 0.0f)
-
237  return 0.0f;
-
238  if (normValue >= 1.0f)
-
239  return 1.0f;
-
240  return normValue;
-
241  }
-
242 
-
243  /**
-
244  Get a value normalized to 0.0<->1.0, fixed within range.
-
245  */
-
246  float getFixedAndNormalizedValue(const float& value) const noexcept
-
247  {
-
248  if (value <= min)
-
249  return 0.0f;
-
250  if (value >= max)
-
251  return 1.0f;
-
252 
-
253  const float normValue((value - min) / (max - min));
-
254 
-
255  if (normValue <= 0.0f)
-
256  return 0.0f;
-
257  if (normValue >= 1.0f)
-
258  return 1.0f;
-
259 
-
260  return normValue;
-
261  }
-
262 
-
263  /**
-
264  Get a proper value previously normalized to 0.0<->1.0.
-
265  */
-
266  float getUnnormalizedValue(const float& value) const noexcept
-
267  {
-
268  if (value <= 0.0f)
-
269  return min;
-
270  if (value >= 1.0f)
-
271  return max;
-
272 
-
273  return value * (max - min) + min;
-
274  }
-
275 };
-
276 
-
277 /**
-
278  Parameter.
-
279  */
-
280 struct Parameter {
-
281  /**
-
282  Hints describing this parameter.
-
283  @see ParameterHints
-
284  */
-
285  uint32_t hints;
-
286 
-
287  /**
-
288  The name of this parameter.@n
-
289  A parameter name can contain any character, but hosts might have a hard time with non-ascii ones.@n
-
290  The name doesn't have to be unique within a plugin instance, but it's recommended.
-
291  */
- -
293 
-
294  /**
-
295  The symbol of this parameter.@n
-
296  A parameter symbol is a short restricted name used as a machine and human readable identifier.@n
-
297  The first character must be one of _, a-z or A-Z and subsequent characters can be from _, a-z, A-Z and 0-9.
-
298  @note Parameter symbols MUST be unique within a plugin instance.
-
299  */
- -
301 
-
302  /**
-
303  The unit of this parameter.@n
-
304  This means something like "dB", "kHz" and "ms".@n
-
305  Can be left blank if a unit does not apply to this parameter.
-
306  */
- -
308 
-
309  /**
-
310  Ranges of this parameter.@n
-
311  The ranges describe the default, minimum and maximum values.
-
312  */
- -
314 
-
315  /**
-
316  Designation for this parameter.
-
317  */
- -
319 
-
320  /**
-
321  MIDI CC to use by default on this parameter.@n
-
322  A value of 0 or 32 (bank change) is considered invalid.@n
-
323  Must also be less or equal to 120.
-
324  @note This value is only a hint! Hosts might map it automatically or completely ignore it.
-
325  */
-
326  uint8_t midiCC;
-
327 
-
328  /**
-
329  Default constructor for a null parameter.
-
330  */
-
331  Parameter() noexcept
-
332  : hints(0x0),
-
333  name(),
-
334  symbol(),
-
335  unit(),
-
336  ranges(),
- -
338  midiCC(0) {}
-
339 
-
340  /**
-
341  Constructor using custom values.
-
342  */
-
343  Parameter(uint32_t h, const char* n, const char* s, const char* u, float def, float min, float max) noexcept
-
344  : hints(h),
-
345  name(n),
-
346  symbol(s),
-
347  unit(u),
-
348  ranges(def, min, max),
- -
350  midiCC(0) {}
-
351 
-
352  /**
-
353  Initialize a parameter for a specific designation.
-
354  */
- -
356  {
-
357  designation = d;
-
358 
-
359  switch (d)
-
360  {
- -
362  break;
- - -
365  name = "Bypass";
-
366  symbol = "dpf_bypass";
-
367  unit = "";
-
368  midiCC = 0;
-
369  ranges.def = 0.0f;
-
370  ranges.min = 0.0f;
-
371  ranges.max = 1.0f;
-
372  break;
-
373  }
-
374  }
-
375 };
-
376 
-
377 /**
-
378  MIDI event.
-
379  */
-
380 struct MidiEvent {
-
381  /**
-
382  Size of internal data.
-
383  */
-
384  static const uint32_t kDataSize = 4;
-
385 
-
386  /**
-
387  Time offset in frames.
-
388  */
-
389  uint32_t frame;
-
390 
-
391  /**
-
392  Number of bytes used.
-
393  */
-
394  uint32_t size;
-
395 
-
396  /**
-
397  MIDI data.@n
-
398  If size > kDataSize, dataExt is used (otherwise null).
-
399  */
-
400  uint8_t data[kDataSize];
-
401  const uint8_t* dataExt;
-
402 };
-
403 
-
404 /**
-
405  Time position.@n
-
406  The @a playing and @a frame values are always valid.@n
-
407  BBT values are only valid when @a bbt.valid is true.
-
408 
-
409  This struct is inspired by the JACK Transport API.
-
410  */
-
411 struct TimePosition {
-
412  /**
-
413  Wherever the host transport is playing/rolling.
-
414  */
-
415  bool playing;
-
416 
-
417  /**
-
418  Current host transport position in frames.
-
419  */
-
420  uint64_t frame;
-
421 
-
422  /**
-
423  Bar-Beat-Tick time position.
-
424  */
-
425  struct BarBeatTick {
-
426  /**
-
427  Wherever the host transport is using BBT.@n
-
428  If false you must not read from this struct.
-
429  */
-
430  bool valid;
-
431 
-
432  /**
-
433  Current bar.@n
-
434  Should always be > 0.@n
-
435  The first bar is bar '1'.
-
436  */
-
437  int32_t bar;
-
438 
-
439  /**
-
440  Current beat within bar.@n
-
441  Should always be > 0 and <= @a beatsPerBar.@n
-
442  The first beat is beat '1'.
-
443  */
-
444  int32_t beat;
-
445 
-
446  /**
-
447  Current tick within beat.@n
-
448  Should always be > 0 and <= @a ticksPerBeat.@n
-
449  The first tick is tick '0'.
-
450  */
-
451  int32_t tick;
-
452 
-
453  /**
-
454  Number of ticks that have elapsed between frame 0 and the first beat of the current measure.
-
455  */
-
456  double barStartTick;
-
457 
-
458  /**
-
459  Time signature "numerator".
-
460  */
-
461  float beatsPerBar;
-
462 
-
463  /**
-
464  Time signature "denominator".
-
465  */
-
466  float beatType;
-
467 
-
468  /**
-
469  Number of ticks within a bar.@n
-
470  Usually a moderately large integer with many denominators, such as 1920.0.
-
471  */
-
472  double ticksPerBeat;
-
473 
-
474  /**
-
475  Number of beats per minute.
-
476  */
- -
478 
-
479  /**
-
480  Default constructor for a null BBT time position.
-
481  */
-
482  BarBeatTick() noexcept
-
483  : valid(false),
-
484  bar(0),
-
485  beat(0),
-
486  tick(0),
-
487  barStartTick(0.0),
-
488  beatsPerBar(0.0f),
-
489  beatType(0.0f),
-
490  ticksPerBeat(0.0),
-
491  beatsPerMinute(0.0) {}
-
492  } bbt;
-
493 
-
494  /**
-
495  Default constructor for a time position.
-
496  */
-
497  TimePosition() noexcept
-
498  : playing(false),
-
499  frame(0),
-
500  bbt() {}
-
501 };
-
502 
-
503 /** @} */
-
504 
-
505 /* ------------------------------------------------------------------------------------------------------------
-
506  * DPF Plugin */
-
507 
-
508 /**
-
509  @defgroup MainClasses Main Classes
-
510  @{
-
511  */
-
512 
-
513 /**
-
514  DPF Plugin class from where plugin instances are created.
-
515 
-
516  The public methods (Host state) are called from the plugin to get or set host information.@n
-
517  They can be called from a plugin instance at anytime unless stated otherwise.@n
-
518  All other methods are to be implemented by the plugin and will be called by the host.
-
519 
-
520  Shortly after a plugin instance is created, the various init* functions will be called by the host.@n
-
521  Host will call activate() before run(), and deactivate() before the plugin instance is destroyed.@n
-
522  The host may call deactivate right after activate and vice-versa, but never activate/deactivate consecutively.@n
-
523  There is no limit on how many times run() is called, only that activate/deactivate will be called in between.
-
524 
-
525  The buffer size and sample rate values will remain constant between activate and deactivate.@n
-
526  Buffer size is only a hint though, the host might call run() with a higher or lower number of frames.
-
527 
-
528  Some of this class functions are only available according to some macros.
-
529 
-
530  DISTRHO_PLUGIN_WANT_PROGRAMS activates program related features.@n
-
531  When enabled you need to implement initProgramName() and loadProgram().
-
532 
-
533  DISTRHO_PLUGIN_WANT_STATE activates internal state features.@n
-
534  When enabled you need to implement initStateKey() and setState().
-
535 
-
536  The process function run() changes wherever DISTRHO_PLUGIN_WANT_MIDI_INPUT is enabled or not.@n
-
537  When enabled it provides midi input events.
-
538  */
-
539 class Plugin
-
540 {
-
541 public:
-
542  /**
-
543  Plugin class constructor.@n
-
544  You must set all parameter values to their defaults, matching ParameterRanges::def.
-
545  */
-
546  Plugin(uint32_t parameterCount, uint32_t programCount, uint32_t stateCount);
-
547 
-
548  /**
-
549  Destructor.
-
550  */
-
551  virtual ~Plugin();
-
552 
-
553  /* --------------------------------------------------------------------------------------------------------
-
554  * Host state */
-
555 
-
556  /**
-
557  Get the current buffer size that will probably be used during processing, in frames.@n
-
558  This value will remain constant between activate and deactivate.
-
559  @note This value is only a hint!@n
-
560  Hosts might call run() with a higher or lower number of frames.
-
561  @see bufferSizeChanged(uint32_t)
-
562  */
-
563  uint32_t getBufferSize() const noexcept;
-
564 
-
565  /**
-
566  Get the current sample rate that will be used during processing.@n
-
567  This value will remain constant between activate and deactivate.
-
568  @see sampleRateChanged(double)
-
569  */
-
570  double getSampleRate() const noexcept;
-
571 
-
572 #if DISTRHO_PLUGIN_WANT_TIMEPOS
-
573  /**
-
574  Get the current host transport time position.@n
-
575  This function should only be called during run().@n
-
576  You can call this during other times, but the returned position is not guaranteed to be in sync.
-
577  @note TimePosition is not supported in LADSPA and DSSI plugin formats.
-
578  */
-
579  const TimePosition& getTimePosition() const noexcept;
-
580 #endif
-
581 
-
582 #if DISTRHO_PLUGIN_WANT_LATENCY
-
583  /**
-
584  Change the plugin audio output latency to @a frames.@n
-
585  This function should only be called in the constructor, activate() and run().
-
586  @note This function is only available if DISTRHO_PLUGIN_WANT_LATENCY is enabled.
-
587  */
-
588  void setLatency(uint32_t frames) noexcept;
-
589 #endif
-
590 
-
591 #if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
-
592  /**
-
593  Write a MIDI output event.@n
-
594  This function must only be called during run().@n
-
595  Returns false when the host buffer is full, in which case do not call this again until the next run().
-
596  @note This function is not implemented yet!@n
-
597  It's here so that developers can prepare MIDI plugins in advance.@n
-
598  If you plan to use this, please report to DPF authors so it can be implemented.
-
599  */
-
600  bool writeMidiEvent(const MidiEvent& midiEvent) noexcept;
-
601 #endif
-
602 
-
603 protected:
-
604  /* --------------------------------------------------------------------------------------------------------
-
605  * Information */
-
606 
-
607  /**
-
608  Get the plugin name.@n
-
609  Returns DISTRHO_PLUGIN_NAME by default.
-
610  */
-
611  virtual const char* getName() const { return DISTRHO_PLUGIN_NAME; }
-
612 
-
613  /**
-
614  Get the plugin label.@n
-
615  This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.
-
616  */
-
617  virtual const char* getLabel() const = 0;
-
618 
-
619  /**
-
620  Get an extensive comment/description about the plugin.@n
-
621  Optional, returns nothing by default.
-
622  */
-
623  virtual const char* getDescription() const { return ""; }
-
624 
-
625  /**
-
626  Get the plugin author/maker.
-
627  */
-
628  virtual const char* getMaker() const = 0;
-
629 
-
630  /**
-
631  Get the plugin homepage.@n
-
632  Optional, returns nothing by default.
-
633  */
-
634  virtual const char* getHomePage() const { return ""; }
-
635 
-
636  /**
-
637  Get the plugin license (a single line of text or a URL).@n
-
638  For commercial plugins this should return some short copyright information.
-
639  */
-
640  virtual const char* getLicense() const = 0;
-
641 
-
642  /**
-
643  Get the plugin version, in hexadecimal.
-
644  @see d_version()
-
645  */
-
646  virtual uint32_t getVersion() const = 0;
-
647 
-
648  /**
-
649  Get the plugin unique Id.@n
-
650  This value is used by LADSPA, DSSI and VST plugin formats.
-
651  @see d_cconst()
-
652  */
-
653  virtual int64_t getUniqueId() const = 0;
-
654 
-
655  /* --------------------------------------------------------------------------------------------------------
-
656  * Init */
-
657 
-
658  /**
-
659  Initialize the audio port @a index.@n
-
660  This function will be called once, shortly after the plugin is created.
-
661  */
-
662  virtual void initAudioPort(bool input, uint32_t index, AudioPort& port);
-
663 
-
664  /**
-
665  Initialize the parameter @a index.@n
-
666  This function will be called once, shortly after the plugin is created.
-
667  */
-
668  virtual void initParameter(uint32_t index, Parameter& parameter) = 0;
-
669 
-
670 #if DISTRHO_PLUGIN_WANT_PROGRAMS
-
671  /**
-
672  Set the name of the program @a index.@n
-
673  This function will be called once, shortly after the plugin is created.@n
-
674  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.
-
675  */
-
676  virtual void initProgramName(uint32_t index, String& programName) = 0;
-
677 #endif
-
678 
-
679 #if DISTRHO_PLUGIN_WANT_STATE
-
680  /**
-
681  Set the state key and default value of @a index.@n
-
682  This function will be called once, shortly after the plugin is created.@n
-
683  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.
-
684  */
-
685  virtual void initState(uint32_t index, String& stateKey, String& defaultStateValue) = 0;
-
686 #endif
-
687 
-
688  /* --------------------------------------------------------------------------------------------------------
-
689  * Internal data */
-
690 
-
691  /**
-
692  Get the current value of a parameter.@n
-
693  The host may call this function from any context, including realtime processing.
-
694  */
-
695  virtual float getParameterValue(uint32_t index) const = 0;
-
696 
-
697  /**
-
698  Change a parameter value.@n
-
699  The host may call this function from any context, including realtime processing.@n
-
700  When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
-
701  @note This function will only be called for parameter inputs.
-
702  */
-
703  virtual void setParameterValue(uint32_t index, float value) = 0;
-
704 
-
705 #if DISTRHO_PLUGIN_WANT_PROGRAMS
-
706  /**
-
707  Load a program.@n
-
708  The host may call this function from any context, including realtime processing.@n
-
709  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.
-
710  */
-
711  virtual void loadProgram(uint32_t index) = 0;
-
712 #endif
-
713 
-
714 #if DISTRHO_PLUGIN_WANT_FULL_STATE
-
715  /**
-
716  Get the value of an internal state.@n
-
717  The host may call this function from any non-realtime context.@n
-
718  Must be implemented by your plugin class if DISTRHO_PLUGIN_WANT_FULL_STATE is enabled.
-
719  @note The use of this function breaks compatibility with the DSSI format.
-
720  */
-
721  virtual String getState(const char* key) const = 0;
-
722 #endif
-
723 
-
724 #if DISTRHO_PLUGIN_WANT_STATE
-
725  /**
-
726  Change an internal state @a key to @a value.@n
-
727  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.
-
728  */
-
729  virtual void setState(const char* key, const char* value) = 0;
-
730 #endif
-
731 
-
732  /* --------------------------------------------------------------------------------------------------------
-
733  * Audio/MIDI Processing */
-
734 
-
735  /**
-
736  Activate this plugin.
-
737  */
-
738  virtual void activate() {}
-
739 
-
740  /**
-
741  Deactivate this plugin.
-
742  */
-
743  virtual void deactivate() {}
-
744 
-
745 #if DISTRHO_PLUGIN_WANT_MIDI_INPUT
-
746  /**
-
747  Run/process function for plugins with MIDI input.
-
748  @note Some parameters might be null if there are no audio inputs/outputs or MIDI events.
-
749  */
-
750  virtual void run(const float** inputs, float** outputs, uint32_t frames,
-
751  const MidiEvent* midiEvents, uint32_t midiEventCount) = 0;
-
752 #else
-
753  /**
-
754  Run/process function for plugins without MIDI input.
-
755  @note Some parameters might be null if there are no audio inputs or outputs.
-
756  */
-
757  virtual void run(const float** inputs, float** outputs, uint32_t frames) = 0;
-
758 #endif
-
759 
-
760  /* --------------------------------------------------------------------------------------------------------
-
761  * Callbacks (optional) */
-
762 
-
763  /**
-
764  Optional callback to inform the plugin about a buffer size change.@n
-
765  This function will only be called when the plugin is deactivated.
-
766  @note This value is only a hint!@n
-
767  Hosts might call run() with a higher or lower number of frames.
-
768  @see getBufferSize()
-
769  */
-
770  virtual void bufferSizeChanged(uint32_t newBufferSize);
-
771 
-
772  /**
-
773  Optional callback to inform the plugin about a sample rate change.@n
-
774  This function will only be called when the plugin is deactivated.
-
775  @see getSampleRate()
-
776  */
-
777  virtual void sampleRateChanged(double newSampleRate);
-
778 
-
779  // -------------------------------------------------------------------------------------------------------
-
780 
-
781 private:
-
782  struct PrivateData;
-
783  PrivateData* const pData;
-
784  friend class PluginExporter;
-
785 
-
786  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Plugin)
-
787 };
-
788 
-
789 /** @} */
-
790 
-
791 /* ------------------------------------------------------------------------------------------------------------
-
792  * Create plugin, entry point */
-
793 
-
794 /**
-
795  @defgroup EntryPoints Entry Points
-
796  @{
-
797  */
-
798 
-
799 /**
-
800  TODO.
-
801  */
-
802 extern Plugin* createPlugin();
-
803 
-
804 /** @} */
-
805 
-
806 // -----------------------------------------------------------------------------------------------------------
-
807 
-
808 END_NAMESPACE_DISTRHO
-
809 
-
810 #endif // DISTRHO_PLUGIN_HPP_INCLUDED
-
float min
Definition: DistrhoPlugin.hpp:175
-
Definition: DistrhoPlugin.hpp:105
-
ParameterDesignation designation
Definition: DistrhoPlugin.hpp:318
-
virtual void activate()
Definition: DistrhoPlugin.hpp:738
-
void initDesignation(ParameterDesignation d) noexcept
Definition: DistrhoPlugin.hpp:355
-
uint8_t midiCC
Definition: DistrhoPlugin.hpp:326
-
virtual float getParameterValue(uint32_t index) const =0
-
Parameter() noexcept
Definition: DistrhoPlugin.hpp:331
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_PLUGIN_HPP_INCLUDED
18 #define DISTRHO_PLUGIN_HPP_INCLUDED
19 
20 #include "extra/String.hpp"
21 #include "extra/LeakDetector.hpp"
22 #include "src/DistrhoPluginChecks.h"
23 
24 START_NAMESPACE_DISTRHO
25 
26 /* ------------------------------------------------------------------------------------------------------------
27  * Audio Port Hints */
28 
29 /**
30  @defgroup AudioPortHints Audio Port Hints
31 
32  Various audio port hints.
33  @see AudioPort::hints
34  @{
35  */
36 
37 /**
38  Audio port can be used as control voltage (LV2 only).
39  */
40 static const uint32_t kAudioPortIsCV = 0x1;
41 
42 /**
43  Audio port should be used as sidechan (LV2 only).
44  */
45 static const uint32_t kAudioPortIsSidechain = 0x2;
46 
47 /** @} */
48 
49 /* ------------------------------------------------------------------------------------------------------------
50  * Parameter Hints */
51 
52 /**
53  @defgroup ParameterHints Parameter Hints
54 
55  Various parameter hints.
56  @see Parameter::hints
57  @{
58  */
59 
60 /**
61  Parameter is automable (real-time safe).
62  @see Plugin::setParameterValue(uint32_t, float)
63  */
64 static const uint32_t kParameterIsAutomable = 0x01;
65 
66 /**
67  Parameter value is boolean.@n
68  It's always at either minimum or maximum value.
69  */
70 static const uint32_t kParameterIsBoolean = 0x02;
71 
72 /**
73  Parameter value is integer.
74  */
75 static const uint32_t kParameterIsInteger = 0x04;
76 
77 /**
78  Parameter value is logarithmic.
79  */
80 static const uint32_t kParameterIsLogarithmic = 0x08;
81 
82 /**
83  Parameter is of output type.@n
84  When unset, parameter is assumed to be of input type.
85 
86  Parameter inputs are changed by the host and must not be changed by the plugin.@n
87  The only exception being when changing programs, see Plugin::loadProgram().@n
88  Outputs are changed by the plugin and never modified by the host.
89  */
90 static const uint32_t kParameterIsOutput = 0x10;
91 
92 /**
93  Parameter value is a trigger.@n
94  This means the value resets back to its default after each process/run call.@n
95  Cannot be used for output parameters.
96 
97  @note Only officially supported under LV2. For other formats DPF simulates the behaviour.
98 */
99 static const uint32_t kParameterIsTrigger = 0x20 | kParameterIsBoolean;
100 
101 /** @} */
102 
103 /* ------------------------------------------------------------------------------------------------------------
104  * Base Plugin structs */
105 
106 /**
107  @defgroup BasePluginStructs Base Plugin Structs
108  @{
109  */
110 
111 /**
112  Audio Port.
113  */
114 struct AudioPort {
115  /**
116  Hints describing this audio port.
117  @see AudioPortHints
118  */
119  uint32_t hints;
120 
121  /**
122  The name of this audio port.@n
123  An audio port name can contain any character, but hosts might have a hard time with non-ascii ones.@n
124  The name doesn't have to be unique within a plugin instance, but it's recommended.
125  */
127 
128  /**
129  The symbol of this audio port.@n
130  An audio port symbol is a short restricted name used as a machine and human readable identifier.@n
131  The first character must be one of _, a-z or A-Z and subsequent characters can be from _, a-z, A-Z and 0-9.
132  @note Audio port and parameter symbols MUST be unique within a plugin instance.
133  */
135 
136  /**
137  Default constructor for a regular audio port.
138  */
139  AudioPort() noexcept
140  : hints(0x0),
141  name(),
142  symbol() {}
143 };
144 
145 /**
146  Parameter designation.@n
147  Allows a parameter to be specially designated for a task, like bypass.
148 
149  Each designation is unique, there must be only one parameter that uses it.@n
150  The use of designated parameters is completely optional.
151 
152  @note Designated parameters have strict ranges.
153  @see ParameterRanges::adjustForDesignation()
154  */
156  /**
157  Null or unset designation.
158  */
160 
161  /**
162  Bypass designation.@n
163  When on (> 0.5f), it means the plugin must run in a bypassed state.
164  */
166 };
167 
168 /**
169  Parameter ranges.@n
170  This is used to set the default, minimum and maximum values of a parameter.
171 
172  By default a parameter has 0.0 as minimum, 1.0 as maximum and 0.0 as default.@n
173  When changing this struct values you must ensure maximum > minimum and default is within range.
174  */
176  /**
177  Default value.
178  */
179  float def;
180 
181  /**
182  Minimum value.
183  */
184  float min;
185 
186  /**
187  Maximum value.
188  */
189  float max;
190 
191  /**
192  Default constructor, using 0.0 as minimum, 1.0 as maximum and 0.0 as default.
193  */
194  ParameterRanges() noexcept
195  : def(0.0f),
196  min(0.0f),
197  max(1.0f) {}
198 
199  /**
200  Constructor using custom values.
201  */
202  ParameterRanges(float df, float mn, float mx) noexcept
203  : def(df),
204  min(mn),
205  max(mx) {}
206 
207  /**
208  Fix the default value within range.
209  */
210  void fixDefault() noexcept
211  {
212  fixValue(def);
213  }
214 
215  /**
216  Fix a value within range.
217  */
218  void fixValue(float& value) const noexcept
219  {
220  if (value < min)
221  value = min;
222  else if (value > max)
223  value = max;
224  }
225 
226  /**
227  Get a fixed value within range.
228  */
229  const float& getFixedValue(const float& value) const noexcept
230  {
231  if (value <= min)
232  return min;
233  if (value >= max)
234  return max;
235  return value;
236  }
237 
238  /**
239  Get a value normalized to 0.0<->1.0.
240  */
241  float getNormalizedValue(const float& value) const noexcept
242  {
243  const float normValue((value - min) / (max - min));
244 
245  if (normValue <= 0.0f)
246  return 0.0f;
247  if (normValue >= 1.0f)
248  return 1.0f;
249  return normValue;
250  }
251 
252  /**
253  Get a value normalized to 0.0<->1.0, fixed within range.
254  */
255  float getFixedAndNormalizedValue(const float& value) const noexcept
256  {
257  if (value <= min)
258  return 0.0f;
259  if (value >= max)
260  return 1.0f;
261 
262  const float normValue((value - min) / (max - min));
263 
264  if (normValue <= 0.0f)
265  return 0.0f;
266  if (normValue >= 1.0f)
267  return 1.0f;
268 
269  return normValue;
270  }
271 
272  /**
273  Get a proper value previously normalized to 0.0<->1.0.
274  */
275  float getUnnormalizedValue(const float& value) const noexcept
276  {
277  if (value <= 0.0f)
278  return min;
279  if (value >= 1.0f)
280  return max;
281 
282  return value * (max - min) + min;
283  }
284 };
285 
286 /**
287  Parameter enumeration value.@n
288  A string representation of a plugin parameter value.@n
289  Used together can be used to give meaning to parameter values, working as an enumeration.
290  */
292  /**
293  Parameter value.
294  */
295  float value;
296 
297  /**
298  String representation of this value.
299  */
301 
302  /**
303  Default constructor, using 0.0 as value and empty label.
304  */
306  : value(0.0f),
307  label() {}
308 
309  /**
310  Constructor using custom values.
311  */
312  ParameterEnumerationValue(float v, const char* l) noexcept
313  : value(v),
314  label(l) {}
315 };
316 
317 /**
318  Collection of parameter enumeration values.@n
319  Handy class to handle the lifetime and count of all enumeration values.
320  */
322  /**
323  Number of elements allocated in @values.
324  */
325  uint8_t count;
326 
327  /**
328  Wherever the host is to be restricted to only use enumeration values.
329 
330  @note This mode is only a hint! Not all hosts and plugin formats support this mode.
331  */
333 
334  /**
335  Array of @ParameterEnumerationValue items.@n
336  This pointer must be null or have been allocated on the heap with `new`.
337  */
339 
340  /**
341  Default constructor, for zero enumeration values.
342  */
344  : count(0),
345  restrictedMode(false),
346  values() {}
347 
348  /**
349  Constructor using custom values.@n
350  The pointer to @values must have been allocated on the heap with `new`.
351  */
352  ParameterEnumerationValues(uint32_t c, bool r, const ParameterEnumerationValue* v) noexcept
353  : count(c),
354  restrictedMode(r),
355  values(v) {}
356 
357  ~ParameterEnumerationValues() noexcept
358  {
359  count = 0;
360  restrictedMode = false;
361 
362  if (values != nullptr)
363  {
364  delete[] values;
365  values = nullptr;
366  }
367  }
368 };
369 
370 /**
371  Parameter.
372  */
373 struct Parameter {
374  /**
375  Hints describing this parameter.
376  @see ParameterHints
377  */
378  uint32_t hints;
379 
380  /**
381  The name of this parameter.@n
382  A parameter name can contain any character, but hosts might have a hard time with non-ascii ones.@n
383  The name doesn't have to be unique within a plugin instance, but it's recommended.
384  */
386 
387  /**
388  The symbol of this parameter.@n
389  A parameter symbol is a short restricted name used as a machine and human readable identifier.@n
390  The first character must be one of _, a-z or A-Z and subsequent characters can be from _, a-z, A-Z and 0-9.
391  @note Parameter symbols MUST be unique within a plugin instance.
392  */
394 
395  /**
396  The unit of this parameter.@n
397  This means something like "dB", "kHz" and "ms".@n
398  Can be left blank if a unit does not apply to this parameter.
399  */
401 
402  /**
403  Ranges of this parameter.@n
404  The ranges describe the default, minimum and maximum values.
405  */
407 
408  /**
409  Enumeration values.@n
410  Can be used to give meaning to parameter values, working as an enumeration.
411  */
413 
414  /**
415  Designation for this parameter.
416  */
418 
419  /**
420  MIDI CC to use by default on this parameter.@n
421  A value of 0 or 32 (bank change) is considered invalid.@n
422  Must also be less or equal to 120.
423  @note This value is only a hint! Hosts might map it automatically or completely ignore it.
424  */
425  uint8_t midiCC;
426 
427  /**
428  Default constructor for a null parameter.
429  */
430  Parameter() noexcept
431  : hints(0x0),
432  name(),
433  symbol(),
434  unit(),
435  ranges(),
436  enumValues(),
437  designation(kParameterDesignationNull),
438  midiCC(0) {}
439 
440  /**
441  Constructor using custom values.
442  */
443  Parameter(uint32_t h, const char* n, const char* s, const char* u, float def, float min, float max) noexcept
444  : hints(h),
445  name(n),
446  symbol(s),
447  unit(u),
448  ranges(def, min, max),
449  enumValues(),
450  designation(kParameterDesignationNull),
451  midiCC(0) {}
452 
453  /**
454  Initialize a parameter for a specific designation.
455  */
457  {
458  designation = d;
459 
460  switch (d)
461  {
463  break;
466  name = "Bypass";
467  symbol = "dpf_bypass";
468  unit = "";
469  midiCC = 0;
470  ranges.def = 0.0f;
471  ranges.min = 0.0f;
472  ranges.max = 1.0f;
473  break;
474  }
475  }
476 };
477 
478 /**
479  MIDI event.
480  */
481 struct MidiEvent {
482  /**
483  Size of internal data.
484  */
485  static const uint32_t kDataSize = 4;
486 
487  /**
488  Time offset in frames.
489  */
490  uint32_t frame;
491 
492  /**
493  Number of bytes used.
494  */
495  uint32_t size;
496 
497  /**
498  MIDI data.@n
499  If size > kDataSize, dataExt is used (otherwise null).
500  */
501  uint8_t data[kDataSize];
502  const uint8_t* dataExt;
503 };
504 
505 /**
506  Time position.@n
507  The @a playing and @a frame values are always valid.@n
508  BBT values are only valid when @a bbt.valid is true.
509 
510  This struct is inspired by the JACK Transport API.
511  */
512 struct TimePosition {
513  /**
514  Wherever the host transport is playing/rolling.
515  */
516  bool playing;
517 
518  /**
519  Current host transport position in frames.
520  */
521  uint64_t frame;
522 
523  /**
524  Bar-Beat-Tick time position.
525  */
526  struct BarBeatTick {
527  /**
528  Wherever the host transport is using BBT.@n
529  If false you must not read from this struct.
530  */
531  bool valid;
532 
533  /**
534  Current bar.@n
535  Should always be > 0.@n
536  The first bar is bar '1'.
537  */
538  int32_t bar;
539 
540  /**
541  Current beat within bar.@n
542  Should always be > 0 and <= @a beatsPerBar.@n
543  The first beat is beat '1'.
544  */
545  int32_t beat;
546 
547  /**
548  Current tick within beat.@n
549  Should always be > 0 and <= @a ticksPerBeat.@n
550  The first tick is tick '0'.
551  */
552  int32_t tick;
553 
554  /**
555  Number of ticks that have elapsed between frame 0 and the first beat of the current measure.
556  */
557  double barStartTick;
558 
559  /**
560  Time signature "numerator".
561  */
562  float beatsPerBar;
563 
564  /**
565  Time signature "denominator".
566  */
567  float beatType;
568 
569  /**
570  Number of ticks within a bar.@n
571  Usually a moderately large integer with many denominators, such as 1920.0.
572  */
573  double ticksPerBeat;
574 
575  /**
576  Number of beats per minute.
577  */
579 
580  /**
581  Default constructor for a null BBT time position.
582  */
583  BarBeatTick() noexcept
584  : valid(false),
585  bar(0),
586  beat(0),
587  tick(0),
588  barStartTick(0.0),
589  beatsPerBar(0.0f),
590  beatType(0.0f),
591  ticksPerBeat(0.0),
592  beatsPerMinute(0.0) {}
593  } bbt;
594 
595  /**
596  Default constructor for a time position.
597  */
598  TimePosition() noexcept
599  : playing(false),
600  frame(0),
601  bbt() {}
602 };
603 
604 /** @} */
605 
606 /* ------------------------------------------------------------------------------------------------------------
607  * DPF Plugin */
608 
609 /**
610  @defgroup MainClasses Main Classes
611  @{
612  */
613 
614 /**
615  DPF Plugin class from where plugin instances are created.
616 
617  The public methods (Host state) are called from the plugin to get or set host information.@n
618  They can be called from a plugin instance at anytime unless stated otherwise.@n
619  All other methods are to be implemented by the plugin and will be called by the host.
620 
621  Shortly after a plugin instance is created, the various init* functions will be called by the host.@n
622  Host will call activate() before run(), and deactivate() before the plugin instance is destroyed.@n
623  The host may call deactivate right after activate and vice-versa, but never activate/deactivate consecutively.@n
624  There is no limit on how many times run() is called, only that activate/deactivate will be called in between.
625 
626  The buffer size and sample rate values will remain constant between activate and deactivate.@n
627  Buffer size is only a hint though, the host might call run() with a higher or lower number of frames.
628 
629  Some of this class functions are only available according to some macros.
630 
631  DISTRHO_PLUGIN_WANT_PROGRAMS activates program related features.@n
632  When enabled you need to implement initProgramName() and loadProgram().
633 
634  DISTRHO_PLUGIN_WANT_STATE activates internal state features.@n
635  When enabled you need to implement initStateKey() and setState().
636 
637  The process function run() changes wherever DISTRHO_PLUGIN_WANT_MIDI_INPUT is enabled or not.@n
638  When enabled it provides midi input events.
639  */
640 class Plugin
641 {
642 public:
643  /**
644  Plugin class constructor.@n
645  You must set all parameter values to their defaults, matching ParameterRanges::def.
646  */
647  Plugin(uint32_t parameterCount, uint32_t programCount, uint32_t stateCount);
648 
649  /**
650  Destructor.
651  */
652  virtual ~Plugin();
653 
654  /* --------------------------------------------------------------------------------------------------------
655  * Host state */
656 
657  /**
658  Get the current buffer size that will probably be used during processing, in frames.@n
659  This value will remain constant between activate and deactivate.
660  @note This value is only a hint!@n
661  Hosts might call run() with a higher or lower number of frames.
662  @see bufferSizeChanged(uint32_t)
663  */
664  uint32_t getBufferSize() const noexcept;
665 
666  /**
667  Get the current sample rate that will be used during processing.@n
668  This value will remain constant between activate and deactivate.
669  @see sampleRateChanged(double)
670  */
671  double getSampleRate() const noexcept;
672 
673 #if DISTRHO_PLUGIN_WANT_TIMEPOS
674  /**
675  Get the current host transport time position.@n
676  This function should only be called during run().@n
677  You can call this during other times, but the returned position is not guaranteed to be in sync.
678  @note TimePosition is not supported in LADSPA and DSSI plugin formats.
679  */
680  const TimePosition& getTimePosition() const noexcept;
681 #endif
682 
683 #if DISTRHO_PLUGIN_WANT_LATENCY
684  /**
685  Change the plugin audio output latency to @a frames.@n
686  This function should only be called in the constructor, activate() and run().
687  @note This function is only available if DISTRHO_PLUGIN_WANT_LATENCY is enabled.
688  */
689  void setLatency(uint32_t frames) noexcept;
690 #endif
691 
692 #if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
693  /**
694  Write a MIDI output event.@n
695  This function must only be called during run().@n
696  Returns false when the host buffer is full, in which case do not call this again until the next run().
697  */
698  bool writeMidiEvent(const MidiEvent& midiEvent) noexcept;
699 #endif
700 
701 protected:
702  /* --------------------------------------------------------------------------------------------------------
703  * Information */
704 
705  /**
706  Get the plugin name.@n
707  Returns DISTRHO_PLUGIN_NAME by default.
708  */
709  virtual const char* getName() const { return DISTRHO_PLUGIN_NAME; }
710 
711  /**
712  Get the plugin label.@n
713  This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.
714  */
715  virtual const char* getLabel() const = 0;
716 
717  /**
718  Get an extensive comment/description about the plugin.@n
719  Optional, returns nothing by default.
720  */
721  virtual const char* getDescription() const { return ""; }
722 
723  /**
724  Get the plugin author/maker.
725  */
726  virtual const char* getMaker() const = 0;
727 
728  /**
729  Get the plugin homepage.@n
730  Optional, returns nothing by default.
731  */
732  virtual const char* getHomePage() const { return ""; }
733 
734  /**
735  Get the plugin license (a single line of text or a URL).@n
736  For commercial plugins this should return some short copyright information.
737  */
738  virtual const char* getLicense() const = 0;
739 
740  /**
741  Get the plugin version, in hexadecimal.
742  @see d_version()
743  */
744  virtual uint32_t getVersion() const = 0;
745 
746  /**
747  Get the plugin unique Id.@n
748  This value is used by LADSPA, DSSI and VST plugin formats.
749  @see d_cconst()
750  */
751  virtual int64_t getUniqueId() const = 0;
752 
753  /* --------------------------------------------------------------------------------------------------------
754  * Init */
755 
756  /**
757  Initialize the audio port @a index.@n
758  This function will be called once, shortly after the plugin is created.
759  */
760  virtual void initAudioPort(bool input, uint32_t index, AudioPort& port);
761 
762  /**
763  Initialize the parameter @a index.@n
764  This function will be called once, shortly after the plugin is created.
765  */
766  virtual void initParameter(uint32_t index, Parameter& parameter) = 0;
767 
768 #if DISTRHO_PLUGIN_WANT_PROGRAMS
769  /**
770  Set the name of the program @a index.@n
771  This function will be called once, shortly after the plugin is created.@n
772  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.
773  */
774  virtual void initProgramName(uint32_t index, String& programName) = 0;
775 #endif
776 
777 #if DISTRHO_PLUGIN_WANT_STATE
778  /**
779  Set the state key and default value of @a index.@n
780  This function will be called once, shortly after the plugin is created.@n
781  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.
782  */
783  virtual void initState(uint32_t index, String& stateKey, String& defaultStateValue) = 0;
784 #endif
785 
786  /* --------------------------------------------------------------------------------------------------------
787  * Internal data */
788 
789  /**
790  Get the current value of a parameter.@n
791  The host may call this function from any context, including realtime processing.
792  */
793  virtual float getParameterValue(uint32_t index) const = 0;
794 
795  /**
796  Change a parameter value.@n
797  The host may call this function from any context, including realtime processing.@n
798  When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
799  @note This function will only be called for parameter inputs.
800  */
801  virtual void setParameterValue(uint32_t index, float value) = 0;
802 
803 #if DISTRHO_PLUGIN_WANT_PROGRAMS
804  /**
805  Load a program.@n
806  The host may call this function from any context, including realtime processing.@n
807  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.
808  */
809  virtual void loadProgram(uint32_t index) = 0;
810 #endif
811 
812 #if DISTRHO_PLUGIN_WANT_FULL_STATE
813  /**
814  Get the value of an internal state.@n
815  The host may call this function from any non-realtime context.@n
816  Must be implemented by your plugin class if DISTRHO_PLUGIN_WANT_FULL_STATE is enabled.
817  @note The use of this function breaks compatibility with the DSSI format.
818  */
819  virtual String getState(const char* key) const = 0;
820 #endif
821 
822 #if DISTRHO_PLUGIN_WANT_STATE
823  /**
824  Change an internal state @a key to @a value.@n
825  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.
826  */
827  virtual void setState(const char* key, const char* value) = 0;
828 #endif
829 
830  /* --------------------------------------------------------------------------------------------------------
831  * Audio/MIDI Processing */
832 
833  /**
834  Activate this plugin.
835  */
836  virtual void activate() {}
837 
838  /**
839  Deactivate this plugin.
840  */
841  virtual void deactivate() {}
842 
843 #if DISTRHO_PLUGIN_WANT_MIDI_INPUT
844  /**
845  Run/process function for plugins with MIDI input.
846  @note Some parameters might be null if there are no audio inputs/outputs or MIDI events.
847  */
848  virtual void run(const float** inputs, float** outputs, uint32_t frames,
849  const MidiEvent* midiEvents, uint32_t midiEventCount) = 0;
850 #else
851  /**
852  Run/process function for plugins without MIDI input.
853  @note Some parameters might be null if there are no audio inputs or outputs.
854  */
855  virtual void run(const float** inputs, float** outputs, uint32_t frames) = 0;
856 #endif
857 
858  /* --------------------------------------------------------------------------------------------------------
859  * Callbacks (optional) */
860 
861  /**
862  Optional callback to inform the plugin about a buffer size change.@n
863  This function will only be called when the plugin is deactivated.
864  @note This value is only a hint!@n
865  Hosts might call run() with a higher or lower number of frames.
866  @see getBufferSize()
867  */
868  virtual void bufferSizeChanged(uint32_t newBufferSize);
869 
870  /**
871  Optional callback to inform the plugin about a sample rate change.@n
872  This function will only be called when the plugin is deactivated.
873  @see getSampleRate()
874  */
875  virtual void sampleRateChanged(double newSampleRate);
876 
877  // -------------------------------------------------------------------------------------------------------
878 
879 private:
880  struct PrivateData;
881  PrivateData* const pData;
882  friend class PluginExporter;
883 
884  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Plugin)
885 };
886 
887 /** @} */
888 
889 /* ------------------------------------------------------------------------------------------------------------
890  * Create plugin, entry point */
891 
892 /**
893  @defgroup EntryPoints Entry Points
894  @{
895  */
896 
897 /**
898  TODO.
899  */
900 extern Plugin* createPlugin();
901 
902 /** @} */
903 
904 // -----------------------------------------------------------------------------------------------------------
905 
906 END_NAMESPACE_DISTRHO
907 
908 #endif // DISTRHO_PLUGIN_HPP_INCLUDED
float min
Definition: DistrhoPlugin.hpp:184
+
Definition: DistrhoPlugin.hpp:114
+
ParameterDesignation designation
Definition: DistrhoPlugin.hpp:417
+
virtual void activate()
Definition: DistrhoPlugin.hpp:836
+
void initDesignation(ParameterDesignation d) noexcept
Definition: DistrhoPlugin.hpp:456
+
uint8_t midiCC
Definition: DistrhoPlugin.hpp:425
+
Parameter() noexcept
Definition: DistrhoPlugin.hpp:430
Plugin * createPlugin()
-
uint32_t frame
Definition: DistrhoPlugin.hpp:389
-
uint32_t size
Definition: DistrhoPlugin.hpp:394
-
String name
Definition: DistrhoPlugin.hpp:117
-
uint32_t getBufferSize() const noexcept
-
String symbol
Definition: DistrhoPlugin.hpp:300
-
virtual void initState(uint32_t index, String &stateKey, String &defaultStateValue)=0
-
uint8_t data[kDataSize]
Definition: DistrhoPlugin.hpp:400
-
virtual void setState(const char *key, const char *value)=0
-
String symbol
Definition: DistrhoPlugin.hpp:125
-
void fixValue(float &value) const noexcept
Definition: DistrhoPlugin.hpp:209
-
virtual void deactivate()
Definition: DistrhoPlugin.hpp:743
-
Definition: DistrhoPlugin.hpp:150
-
double ticksPerBeat
Definition: DistrhoPlugin.hpp:472
-
Definition: DistrhoPlugin.hpp:380
-
int32_t bar
Definition: DistrhoPlugin.hpp:437
-
virtual void loadProgram(uint32_t index)=0
-
virtual uint32_t getVersion() const =0
-
virtual const char * getLabel() const =0
+
uint32_t frame
Definition: DistrhoPlugin.hpp:490
+
uint32_t size
Definition: DistrhoPlugin.hpp:495
+
String name
Definition: DistrhoPlugin.hpp:126
+
String symbol
Definition: DistrhoPlugin.hpp:393
+
String symbol
Definition: DistrhoPlugin.hpp:134
+
void fixValue(float &value) const noexcept
Definition: DistrhoPlugin.hpp:218
+
ParameterEnumerationValue() noexcept
Definition: DistrhoPlugin.hpp:305
+
virtual void deactivate()
Definition: DistrhoPlugin.hpp:841
+
Definition: DistrhoPlugin.hpp:159
+
ParameterEnumerationValues(uint32_t c, bool r, const ParameterEnumerationValue *v) noexcept
Definition: DistrhoPlugin.hpp:352
+
double ticksPerBeat
Definition: DistrhoPlugin.hpp:573
+
Definition: DistrhoPlugin.hpp:481
+
int32_t bar
Definition: DistrhoPlugin.hpp:538
+
Definition: DistrhoPlugin.hpp:291
Definition: String.hpp:29
-
virtual void bufferSizeChanged(uint32_t newBufferSize)
+
ParameterEnumerationValues() noexcept
Definition: DistrhoPlugin.hpp:343
#define DISTRHO_PLUGIN_NAME
Definition: DistrhoInfo.hpp:466
-
virtual String getState(const char *key) const =0
+
Definition: DistrhoPlugin.hpp:321
static const uint32_t kAudioPortIsSidechain
Definition: DistrhoPlugin.hpp:45
-
virtual const char * getLicense() const =0
-
ParameterRanges() noexcept
Definition: DistrhoPlugin.hpp:185
-
double beatsPerMinute
Definition: DistrhoPlugin.hpp:477
-
uint32_t hints
Definition: DistrhoPlugin.hpp:285
-
virtual void run(const float **inputs, float **outputs, uint32_t frames, const MidiEvent *midiEvents, uint32_t midiEventCount)=0
-
bool writeMidiEvent(const MidiEvent &midiEvent) noexcept
-
Definition: DistrhoPlugin.hpp:539
-
Plugin(uint32_t parameterCount, uint32_t programCount, uint32_t stateCount)
-
float getUnnormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:266
-
bool playing
Definition: DistrhoPlugin.hpp:415
-
int32_t tick
Definition: DistrhoPlugin.hpp:451
-
float beatsPerBar
Definition: DistrhoPlugin.hpp:461
-
uint32_t hints
Definition: DistrhoPlugin.hpp:110
-
virtual ~Plugin()
-
TimePosition() noexcept
Definition: DistrhoPlugin.hpp:497
-
uint64_t frame
Definition: DistrhoPlugin.hpp:420
-
virtual void setParameterValue(uint32_t index, float value)=0
-
virtual const char * getMaker() const =0
-
BarBeatTick() noexcept
Definition: DistrhoPlugin.hpp:482
+
ParameterRanges() noexcept
Definition: DistrhoPlugin.hpp:194
+
double beatsPerMinute
Definition: DistrhoPlugin.hpp:578
+
uint8_t count
Definition: DistrhoPlugin.hpp:325
+
float value
Definition: DistrhoPlugin.hpp:295
+
uint32_t hints
Definition: DistrhoPlugin.hpp:378
+
Definition: DistrhoPlugin.hpp:640
+
float getUnnormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:275
+
bool playing
Definition: DistrhoPlugin.hpp:516
+
int32_t tick
Definition: DistrhoPlugin.hpp:552
+
float beatsPerBar
Definition: DistrhoPlugin.hpp:562
+
uint32_t hints
Definition: DistrhoPlugin.hpp:119
+
virtual const char * getHomePage() const
Definition: DistrhoPlugin.hpp:732
+
TimePosition() noexcept
Definition: DistrhoPlugin.hpp:598
+
ParameterEnumerationValues enumValues
Definition: DistrhoPlugin.hpp:412
+
uint64_t frame
Definition: DistrhoPlugin.hpp:521
+
BarBeatTick() noexcept
Definition: DistrhoPlugin.hpp:583
+
ParameterEnumerationValue(float v, const char *l) noexcept
Definition: DistrhoPlugin.hpp:312
static const uint32_t kParameterIsAutomable
Definition: DistrhoPlugin.hpp:64
-
float beatType
Definition: DistrhoPlugin.hpp:466
-
float getNormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:232
-
virtual const char * getDescription() const
Definition: DistrhoPlugin.hpp:623
-
float def
Definition: DistrhoPlugin.hpp:170
-
ParameterRanges(float df, float mn, float mx) noexcept
Definition: DistrhoPlugin.hpp:193
-
virtual void initProgramName(uint32_t index, String &programName)=0
-
double barStartTick
Definition: DistrhoPlugin.hpp:456
-
Parameter(uint32_t h, const char *n, const char *s, const char *u, float def, float min, float max) noexcept
Definition: DistrhoPlugin.hpp:343
-
ParameterRanges ranges
Definition: DistrhoPlugin.hpp:313
-
AudioPort() noexcept
Definition: DistrhoPlugin.hpp:130
-
int32_t beat
Definition: DistrhoPlugin.hpp:444
-
const float & getFixedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:220
-
virtual void initParameter(uint32_t index, Parameter &parameter)=0
+
float beatType
Definition: DistrhoPlugin.hpp:567
+
float getNormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:241
+
float def
Definition: DistrhoPlugin.hpp:179
+
ParameterRanges(float df, float mn, float mx) noexcept
Definition: DistrhoPlugin.hpp:202
+
double barStartTick
Definition: DistrhoPlugin.hpp:557
+
Parameter(uint32_t h, const char *n, const char *s, const char *u, float def, float min, float max) noexcept
Definition: DistrhoPlugin.hpp:443
+
ParameterRanges ranges
Definition: DistrhoPlugin.hpp:406
+
AudioPort() noexcept
Definition: DistrhoPlugin.hpp:139
+
int32_t beat
Definition: DistrhoPlugin.hpp:545
+
virtual const char * getName() const
Definition: DistrhoPlugin.hpp:709
+
const float & getFixedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:229
static const uint32_t kParameterIsBoolean
Definition: DistrhoPlugin.hpp:70
-
float max
Definition: DistrhoPlugin.hpp:180
-
Definition: DistrhoPlugin.hpp:166
-
String unit
Definition: DistrhoPlugin.hpp:307
-
virtual int64_t getUniqueId() const =0
+
float max
Definition: DistrhoPlugin.hpp:189
+
Definition: DistrhoPlugin.hpp:175
+
String label
Definition: DistrhoPlugin.hpp:300
+
virtual const char * getDescription() const
Definition: DistrhoPlugin.hpp:721
+
String unit
Definition: DistrhoPlugin.hpp:400
static const uint32_t kParameterIsInteger
Definition: DistrhoPlugin.hpp:75
-
Definition: DistrhoPlugin.hpp:156
-
Definition: DistrhoPlugin.hpp:280
+
Definition: DistrhoPlugin.hpp:165
+
Definition: DistrhoPlugin.hpp:373
static const uint32_t kAudioPortIsCV
Definition: DistrhoPlugin.hpp:40
-
bool valid
Definition: DistrhoPlugin.hpp:430
-
virtual const char * getName() const
Definition: DistrhoPlugin.hpp:611
-
static const uint32_t kDataSize
Definition: DistrhoPlugin.hpp:384
-
ParameterDesignation
Definition: DistrhoPlugin.hpp:146
-
virtual void initAudioPort(bool input, uint32_t index, AudioPort &port)
-
void fixDefault() noexcept
Definition: DistrhoPlugin.hpp:201
-
double getSampleRate() const noexcept
-
const TimePosition & getTimePosition() const noexcept
-
float getFixedAndNormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:246
-
void setLatency(uint32_t frames) noexcept
+
bool valid
Definition: DistrhoPlugin.hpp:531
+
ParameterDesignation
Definition: DistrhoPlugin.hpp:155
+
bool restrictedMode
Definition: DistrhoPlugin.hpp:332
+
const ParameterEnumerationValue * values
Definition: DistrhoPlugin.hpp:338
+
void fixDefault() noexcept
Definition: DistrhoPlugin.hpp:210
+
float getFixedAndNormalizedValue(const float &value) const noexcept
Definition: DistrhoPlugin.hpp:255
static const uint32_t kParameterIsOutput
Definition: DistrhoPlugin.hpp:90
-
Definition: DistrhoPlugin.hpp:425
-
Definition: DistrhoPlugin.hpp:411
-
String name
Definition: DistrhoPlugin.hpp:292
-
virtual void sampleRateChanged(double newSampleRate)
-
virtual const char * getHomePage() const
Definition: DistrhoPlugin.hpp:634
+
Definition: DistrhoPlugin.hpp:526
+
Definition: DistrhoPlugin.hpp:512
+
static const uint32_t kParameterIsTrigger
Definition: DistrhoPlugin.hpp:99
+
String name
Definition: DistrhoPlugin.hpp:385
static const uint32_t kParameterIsLogarithmic
Definition: DistrhoPlugin.hpp:80
diff --git a/DistrhoUI_8hpp_source.html b/DistrhoUI_8hpp_source.html index 8fdbeca1..df2024f1 100644 --- a/DistrhoUI_8hpp_source.html +++ b/DistrhoUI_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/DistrhoUI.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,250 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
DistrhoUI.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_UI_HPP_INCLUDED
-
18 #define DISTRHO_UI_HPP_INCLUDED
-
19 
-
20 #include "extra/LeakDetector.hpp"
-
21 #include "src/DistrhoPluginChecks.h"
-
22 
-
23 #ifndef HAVE_DGL
-
24 # include "extra/ExternalWindow.hpp"
-
25 typedef DISTRHO_NAMESPACE::ExternalWindow UIWidget;
-
26 #elif DISTRHO_UI_USE_NANOVG
-
27 # include "../dgl/NanoVG.hpp"
-
28 typedef DGL::NanoWidget UIWidget;
-
29 #else
-
30 # include "../dgl/Widget.hpp"
-
31 typedef DGL::Widget UIWidget;
-
32 #endif
-
33 
-
34 START_NAMESPACE_DISTRHO
-
35 
-
36 /* ------------------------------------------------------------------------------------------------------------
-
37  * DPF UI */
-
38 
-
39 /**
-
40  @addtogroup MainClasses
-
41  @{
-
42  */
-
43 
-
44 /**
-
45  DPF UI class from where UI instances are created.
-
46 
-
47  @note You must call setSize during construction,
-
48  @TODO Detailed information about this class.
-
49  */
-
50 class UI : public UIWidget
-
51 {
-
52 public:
-
53  /**
-
54  UI class constructor.
-
55  The UI should be initialized to a default state that matches the plugin side.
-
56  */
-
57  UI(uint width = 0, uint height = 0);
-
58 
-
59  /**
-
60  Destructor.
-
61  */
-
62  virtual ~UI();
-
63 
-
64  /* --------------------------------------------------------------------------------------------------------
-
65  * Host state */
-
66 
-
67  /**
-
68  Get the current sample rate used in plugin processing.
-
69  @see sampleRateChanged(double)
-
70  */
-
71  double getSampleRate() const noexcept;
-
72 
-
73  /**
-
74  editParameter.
-
75  @TODO Document this.
-
76  */
-
77  void editParameter(uint32_t index, bool started);
-
78 
-
79  /**
-
80  setParameterValue.
-
81  @TODO Document this.
-
82  */
-
83  void setParameterValue(uint32_t index, float value);
-
84 
-
85 #if DISTRHO_PLUGIN_WANT_STATE
-
86  /**
-
87  setState.
-
88  @TODO Document this.
-
89  */
-
90  void setState(const char* key, const char* value);
-
91 #endif
-
92 
-
93 #if DISTRHO_PLUGIN_IS_SYNTH
-
94  /**
-
95  sendNote.
-
96  @TODO Document this.
-
97  */
-
98  void sendNote(uint8_t channel, uint8_t note, uint8_t velocity);
-
99 #endif
-
100 
-
101 #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
-
102  /* --------------------------------------------------------------------------------------------------------
-
103  * Direct DSP access - DO NOT USE THIS UNLESS STRICTLY NECESSARY!! */
-
104 
-
105  /**
-
106  getPluginInstancePointer.
-
107  @TODO Document this.
-
108  */
-
109  void* getPluginInstancePointer() const noexcept;
-
110 #endif
-
111 
-
112 #if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
-
113  /* --------------------------------------------------------------------------------------------------------
-
114  * External UI helpers */
-
115 
-
116  /**
-
117  Get the bundle path that will be used for the next UI.
-
118  @note: This function is only valid during createUI(),
-
119  it will return null when called from anywhere else.
-
120  */
-
121  static const char* getNextBundlePath() noexcept;
-
122 
-
123 # if DISTRHO_PLUGIN_HAS_EMBED_UI
-
124  /**
-
125  Get the Window Id that will be used for the next created window.
-
126  @note: This function is only valid during createUI(),
-
127  it will return 0 when called from anywhere else.
-
128  */
-
129  static uintptr_t getNextWindowId() noexcept;
-
130 # endif
-
131 #endif
-
132 
-
133 protected:
-
134  /* --------------------------------------------------------------------------------------------------------
-
135  * DSP/Plugin Callbacks */
-
136 
-
137  /**
-
138  A parameter has changed on the plugin side.@n
-
139  This is called by the host to inform the UI about parameter changes.
-
140  */
-
141  virtual void parameterChanged(uint32_t index, float value) = 0;
-
142 
-
143 #if DISTRHO_PLUGIN_WANT_PROGRAMS
-
144  /**
-
145  A program has been loaded on the plugin side.@n
-
146  This is called by the host to inform the UI about program changes.
-
147  */
-
148  virtual void programLoaded(uint32_t index) = 0;
-
149 #endif
-
150 
-
151 #if DISTRHO_PLUGIN_WANT_STATE
-
152  /**
-
153  A state has changed on the plugin side.@n
-
154  This is called by the host to inform the UI about state changes.
-
155  */
-
156  virtual void stateChanged(const char* key, const char* value) = 0;
-
157 #endif
-
158 
-
159  /* --------------------------------------------------------------------------------------------------------
-
160  * DSP/Plugin Callbacks (optional) */
-
161 
-
162  /**
-
163  Optional callback to inform the UI about a sample rate change on the plugin side.
-
164  @see getSampleRate()
-
165  */
-
166  virtual void sampleRateChanged(double newSampleRate);
-
167 
-
168 #ifdef HAVE_DGL
-
169  /* --------------------------------------------------------------------------------------------------------
-
170  * UI Callbacks (optional) */
-
171 
-
172  /**
-
173  uiIdle.
-
174  @TODO Document this.
-
175  */
-
176  virtual void uiIdle() {}
-
177 
-
178  /**
-
179  File browser selected function.
-
180  @see Window::fileBrowserSelected(const char*)
-
181  */
-
182  virtual void uiFileBrowserSelected(const char* filename);
-
183 
-
184  /**
-
185  OpenGL window reshape function, called when parent window is resized.
-
186  You can reimplement this function for a custom OpenGL state.
-
187  @see Window::onReshape(uint,uint)
-
188  */
-
189  virtual void uiReshape(uint width, uint height);
-
190 
-
191  /* --------------------------------------------------------------------------------------------------------
-
192  * UI Resize Handling, internal */
-
193 
-
194  /**
-
195  OpenGL widget resize function, called when the widget is resized.
-
196  This is overriden here so the host knows when the UI is resized by you.
-
197  @see Widget::onResize(const ResizeEvent&)
-
198  */
-
199  void onResize(const ResizeEvent& ev) override;
-
200 #endif
-
201 
-
202  // -------------------------------------------------------------------------------------------------------
-
203 
-
204 private:
-
205  struct PrivateData;
-
206  PrivateData* const pData;
-
207  friend class UIExporter;
-
208  friend class UIExporterWindow;
-
209 
-
210 #ifdef HAVE_DGL
-
211  // these should not be used
-
212  void setAbsoluteX(int) const noexcept {}
-
213  void setAbsoluteY(int) const noexcept {}
-
214  void setAbsolutePos(int, int) const noexcept {}
-
215  void setAbsolutePos(const DGL::Point<int>&) const noexcept {}
-
216 #endif
-
217 
-
218  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UI)
-
219 };
-
220 
-
221 /** @} */
-
222 
-
223 /* ------------------------------------------------------------------------------------------------------------
-
224  * Create UI, entry point */
-
225 
-
226 /**
-
227  @addtogroup EntryPoints
-
228  @{
-
229  */
-
230 
-
231 /**
-
232  createUI.
-
233  @TODO Document this.
-
234  */
-
235 extern UI* createUI();
-
236 
-
237 /** @} */
-
238 
-
239 // -----------------------------------------------------------------------------------------------------------
-
240 
-
241 END_NAMESPACE_DISTRHO
-
242 
-
243 #endif // DISTRHO_UI_HPP_INCLUDED
-
void editParameter(uint32_t index, bool started)
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_UI_HPP_INCLUDED
18 #define DISTRHO_UI_HPP_INCLUDED
19 
20 #include "extra/LeakDetector.hpp"
21 #include "src/DistrhoPluginChecks.h"
22 
23 #ifndef HAVE_DGL
24 # include "extra/ExternalWindow.hpp"
25 typedef DISTRHO_NAMESPACE::ExternalWindow UIWidget;
26 #elif DISTRHO_UI_USE_NANOVG
27 # include "../dgl/NanoVG.hpp"
28 typedef DGL_NAMESPACE::NanoWidget UIWidget;
29 #else
30 # include "../dgl/Widget.hpp"
31 typedef DGL_NAMESPACE::Widget UIWidget;
32 #endif
33 
34 START_NAMESPACE_DISTRHO
35 
36 /* ------------------------------------------------------------------------------------------------------------
37  * DPF UI */
38 
39 /**
40  @addtogroup MainClasses
41  @{
42  */
43 
44 /**
45  DPF UI class from where UI instances are created.
46 
47  @note You must call setSize during construction,
48  @TODO Detailed information about this class.
49  */
50 class UI : public UIWidget
51 {
52 public:
53  /**
54  UI class constructor.
55  The UI should be initialized to a default state that matches the plugin side.
56  */
57  UI(uint width = 0, uint height = 0);
58 
59  /**
60  Destructor.
61  */
62  virtual ~UI();
63 
64  /* --------------------------------------------------------------------------------------------------------
65  * Host state */
66 
67  /**
68  Get the current sample rate used in plugin processing.
69  @see sampleRateChanged(double)
70  */
71  double getSampleRate() const noexcept;
72 
73  /**
74  editParameter.
75  @TODO Document this.
76  */
77  void editParameter(uint32_t index, bool started);
78 
79  /**
80  setParameterValue.
81  @TODO Document this.
82  */
83  void setParameterValue(uint32_t index, float value);
84 
85 #if DISTRHO_PLUGIN_WANT_STATE
86  /**
87  setState.
88  @TODO Document this.
89  */
90  void setState(const char* key, const char* value);
91 #endif
92 
93 #if DISTRHO_PLUGIN_WANT_MIDI_INPUT
94  /**
95  sendNote.
96  @TODO Document this.
97  @note Work in progress. Implemented for DSSI and LV2 formats.
98  */
99  void sendNote(uint8_t channel, uint8_t note, uint8_t velocity);
100 #endif
101 
102 #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
103  /* --------------------------------------------------------------------------------------------------------
104  * Direct DSP access - DO NOT USE THIS UNLESS STRICTLY NECESSARY!! */
105 
106  /**
107  getPluginInstancePointer.
108  @TODO Document this.
109  */
110  void* getPluginInstancePointer() const noexcept;
111 #endif
112 
113 #if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
114  /* --------------------------------------------------------------------------------------------------------
115  * External UI helpers */
116 
117  /**
118  Get the bundle path that will be used for the next UI.
119  @note: This function is only valid during createUI(),
120  it will return null when called from anywhere else.
121  */
122  static const char* getNextBundlePath() noexcept;
123 
124 # if DISTRHO_PLUGIN_HAS_EMBED_UI
125  /**
126  Get the Window Id that will be used for the next created window.
127  @note: This function is only valid during createUI(),
128  it will return 0 when called from anywhere else.
129  */
130  static uintptr_t getNextWindowId() noexcept;
131 # endif
132 #endif
133 
134 protected:
135  /* --------------------------------------------------------------------------------------------------------
136  * DSP/Plugin Callbacks */
137 
138  /**
139  A parameter has changed on the plugin side.@n
140  This is called by the host to inform the UI about parameter changes.
141  */
142  virtual void parameterChanged(uint32_t index, float value) = 0;
143 
144 #if DISTRHO_PLUGIN_WANT_PROGRAMS
145  /**
146  A program has been loaded on the plugin side.@n
147  This is called by the host to inform the UI about program changes.
148  */
149  virtual void programLoaded(uint32_t index) = 0;
150 #endif
151 
152 #if DISTRHO_PLUGIN_WANT_STATE
153  /**
154  A state has changed on the plugin side.@n
155  This is called by the host to inform the UI about state changes.
156  */
157  virtual void stateChanged(const char* key, const char* value) = 0;
158 #endif
159 
160  /* --------------------------------------------------------------------------------------------------------
161  * DSP/Plugin Callbacks (optional) */
162 
163  /**
164  Optional callback to inform the UI about a sample rate change on the plugin side.
165  @see getSampleRate()
166  */
167  virtual void sampleRateChanged(double newSampleRate);
168 
169 #ifdef HAVE_DGL
170  /* --------------------------------------------------------------------------------------------------------
171  * UI Callbacks (optional) */
172 
173  /**
174  uiIdle.
175  @TODO Document this.
176  */
177  virtual void uiIdle() {}
178 
179 #ifndef DGL_FILE_BROWSER_DISABLED
180  /**
181  File browser selected function.
182  @see Window::fileBrowserSelected(const char*)
183  */
184  virtual void uiFileBrowserSelected(const char* filename);
185 #endif
186 
187  /**
188  OpenGL window reshape function, called when parent window is resized.
189  You can reimplement this function for a custom OpenGL state.
190  @see Window::onReshape(uint,uint)
191  */
192  virtual void uiReshape(uint width, uint height);
193 
194  /* --------------------------------------------------------------------------------------------------------
195  * UI Resize Handling, internal */
196 
197  /**
198  OpenGL widget resize function, called when the widget is resized.
199  This is overriden here so the host knows when the UI is resized by you.
200  @see Widget::onResize(const ResizeEvent&)
201  */
202  void onResize(const ResizeEvent& ev) override;
203 #endif
204 
205  // -------------------------------------------------------------------------------------------------------
206 
207 private:
208  struct PrivateData;
209  PrivateData* const pData;
210  friend class UIExporter;
211  friend class UIExporterWindow;
212 
213 #ifdef HAVE_DGL
214  // these should not be used
215  void setAbsoluteX(int) const noexcept {}
216  void setAbsoluteY(int) const noexcept {}
217  void setAbsolutePos(int, int) const noexcept {}
218  void setAbsolutePos(const DGL_NAMESPACE::Point<int>&) const noexcept {}
219 #endif
220 
221  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UI)
222 };
223 
224 /** @} */
225 
226 /* ------------------------------------------------------------------------------------------------------------
227  * Create UI, entry point */
228 
229 /**
230  @addtogroup EntryPoints
231  @{
232  */
233 
234 /**
235  createUI.
236  @TODO Document this.
237  */
238 extern UI* createUI();
239 
240 /** @} */
241 
242 // -----------------------------------------------------------------------------------------------------------
243 
244 END_NAMESPACE_DISTRHO
245 
246 #endif // DISTRHO_UI_HPP_INCLUDED
void editParameter(uint32_t index, bool started)
virtual void parameterChanged(uint32_t index, float value)=0
static uintptr_t getNextWindowId() noexcept
void onResize(const ResizeEvent &ev) override
@@ -349,13 +85,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
virtual void uiFileBrowserSelected(const char *filename)
virtual void uiReshape(uint width, uint height)
Definition: DistrhoUI.hpp:50
-
virtual void uiIdle()
Definition: DistrhoUI.hpp:176
+
virtual void uiIdle()
Definition: DistrhoUI.hpp:177
diff --git a/DistrhoUtils_8hpp_source.html b/DistrhoUtils_8hpp_source.html index c91668c5..a32ca1d6 100644 --- a/DistrhoUtils_8hpp_source.html +++ b/DistrhoUtils_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/DistrhoUtils.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,254 +66,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
DistrhoUtils.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_UTILS_HPP_INCLUDED
-
18 #define DISTRHO_UTILS_HPP_INCLUDED
-
19 
-
20 #include "src/DistrhoDefines.h"
-
21 
-
22 #include <cstdarg>
-
23 #include <cstdio>
-
24 #include <cstdlib>
-
25 #include <cstring>
-
26 
-
27 #include <cmath>
-
28 #include <limits>
-
29 
-
30 #ifdef DISTRHO_PROPER_CPP11_SUPPORT
-
31 # include <cstdint>
-
32 #else
-
33 # include <stdint.h>
-
34 #endif
-
35 
-
36 #if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC) && ! (defined(DISTRHO_PROPER_CPP11_SUPPORT) && defined(__clang__))
-
37 namespace std {
-
38 inline float fmin(float __x, float __y)
-
39  { return __builtin_fminf(__x, __y); }
-
40 inline float fmax(float __x, float __y)
-
41  { return __builtin_fmaxf(__x, __y); }
-
42 inline float rint(float __x)
-
43  { return __builtin_rintf(__x); }
-
44 inline float round(float __x)
-
45  { return __builtin_roundf(__x); }
-
46 }
-
47 #endif
-
48 
-
49 #ifndef M_PI
-
50 # define M_PI 3.14159265358979323846
-
51 #endif
-
52 
-
53 // -----------------------------------------------------------------------
-
54 // misc functions
-
55 
-
56 /*
-
57  * Return a 64-bit number from 4 8-bit numbers.
-
58  */
-
59 static inline
-
60 int64_t d_cconst(const uint8_t a, const uint8_t b, const uint8_t c, const uint8_t d) noexcept
-
61 {
-
62  return (a << 24) | (b << 16) | (c << 8) | (d << 0);
-
63 }
-
64 
-
65 /*
-
66  * Return an hexadecimal representation of a MAJ.MIN.MICRO version number.
-
67  */
-
68 static inline
-
69 uint32_t d_version(const uint8_t major, const uint8_t minor, const uint8_t micro) noexcept
-
70 {
-
71  return uint32_t(major << 16) | uint32_t(minor << 8) | (micro << 0);
-
72 }
-
73 
-
74 /*
-
75  * Dummy function.
-
76  */
-
77 static inline
-
78 void d_pass() noexcept {}
-
79 
-
80 // -----------------------------------------------------------------------
-
81 // string print functions
-
82 
-
83 /*
-
84  * Print a string to stdout with newline (gray color).
-
85  * Does nothing if DEBUG is not defined.
-
86  */
-
87 #ifndef DEBUG
-
88 # define d_debug(...)
-
89 #else
-
90 static inline
-
91 void d_debug(const char* const fmt, ...) noexcept
-
92 {
-
93  try {
-
94  ::va_list args;
-
95  ::va_start(args, fmt);
-
96  std::fprintf(stdout, "\x1b[30;1m");
-
97  std::vfprintf(stdout, fmt, args);
-
98  std::fprintf(stdout, "\x1b[0m\n");
-
99  ::va_end(args);
-
100  } catch (...) {}
-
101 }
-
102 #endif
-
103 
-
104 /*
-
105  * Print a string to stdout with newline.
-
106  */
-
107 static inline
-
108 void d_stdout(const char* const fmt, ...) noexcept
-
109 {
-
110  try {
-
111  ::va_list args;
-
112  ::va_start(args, fmt);
-
113  std::vfprintf(stdout, fmt, args);
-
114  std::fprintf(stdout, "\n");
-
115  ::va_end(args);
-
116  } catch (...) {}
-
117 }
-
118 
-
119 /*
-
120  * Print a string to stderr with newline.
-
121  */
-
122 static inline
-
123 void d_stderr(const char* const fmt, ...) noexcept
-
124 {
-
125  try {
-
126  ::va_list args;
-
127  ::va_start(args, fmt);
-
128  std::vfprintf(stderr, fmt, args);
-
129  std::fprintf(stderr, "\n");
-
130  ::va_end(args);
-
131  } catch (...) {}
-
132 }
-
133 
-
134 /*
-
135  * Print a string to stderr with newline (red color).
-
136  */
-
137 static inline
-
138 void d_stderr2(const char* const fmt, ...) noexcept
-
139 {
-
140  try {
-
141  ::va_list args;
-
142  ::va_start(args, fmt);
-
143  std::fprintf(stderr, "\x1b[31m");
-
144  std::vfprintf(stderr, fmt, args);
-
145  std::fprintf(stderr, "\x1b[0m\n");
-
146  ::va_end(args);
-
147  } catch (...) {}
-
148 }
-
149 
-
150 /*
-
151  * Print a safe assertion error message.
-
152  */
-
153 static inline
-
154 void d_safe_assert(const char* const assertion, const char* const file, const int line) noexcept
-
155 {
-
156  d_stderr2("assertion failure: \"%s\" in file %s, line %i", assertion, file, line);
-
157 }
-
158 
-
159 /*
-
160  * Print a safe exception error message.
-
161  */
-
162 static inline
-
163 void d_safe_exception(const char* const exception, const char* const file, const int line) noexcept
-
164 {
-
165  d_stderr2("exception caught: \"%s\" in file %s, line %i", exception, file, line);
-
166 }
-
167 
-
168 // -----------------------------------------------------------------------
-
169 // math functions
-
170 
-
171 /*
-
172  * Safely compare two floating point numbers.
-
173  * Returns true if they match.
-
174  */
-
175 template<typename T>
-
176 static inline
-
177 bool d_isEqual(const T& v1, const T& v2)
-
178 {
-
179  return std::abs(v1-v2) < std::numeric_limits<T>::epsilon();
-
180 }
-
181 
-
182 /*
-
183  * Safely compare two floating point numbers.
-
184  * Returns true if they don't match.
-
185  */
-
186 template<typename T>
-
187 static inline
-
188 bool d_isNotEqual(const T& v1, const T& v2)
-
189 {
-
190  return std::abs(v1-v2) >= std::numeric_limits<T>::epsilon();
-
191 }
-
192 
-
193 /*
-
194  * Safely check if a floating point number is zero.
-
195  */
-
196 template<typename T>
-
197 static inline
-
198 bool d_isZero(const T& value)
-
199 {
-
200  return std::abs(value) < std::numeric_limits<T>::epsilon();
-
201 }
-
202 
-
203 /*
-
204  * Safely check if a floating point number is not zero.
-
205  */
-
206 template<typename T>
-
207 static inline
-
208 bool d_isNotZero(const T& value)
-
209 {
-
210  return std::abs(value) >= std::numeric_limits<T>::epsilon();
-
211 }
-
212 
-
213 /*
-
214  * Get next power of 2.
-
215  */
-
216 static inline
-
217 uint32_t d_nextPowerOf2(uint32_t size) noexcept
-
218 {
-
219  DISTRHO_SAFE_ASSERT_RETURN(size > 0, 0);
-
220 
-
221  // http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
-
222  --size;
-
223  size |= size >> 1;
-
224  size |= size >> 2;
-
225  size |= size >> 4;
-
226  size |= size >> 8;
-
227  size |= size >> 16;
-
228  return ++size;
-
229 }
-
230 
-
231 // -----------------------------------------------------------------------
-
232 
-
233 #ifndef DONT_SET_USING_DISTRHO_NAMESPACE
-
234  // If your code uses a lot of DISTRHO classes, then this will obviously save you
-
235  // a lot of typing, but can be disabled by setting DONT_SET_USING_DISTRHO_NAMESPACE.
-
236  namespace DISTRHO_NAMESPACE {}
-
237  using namespace DISTRHO_NAMESPACE;
-
238 #endif
-
239 
-
240 // -----------------------------------------------------------------------
-
241 
-
242 #endif // DISTRHO_UTILS_HPP_INCLUDED
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_UTILS_HPP_INCLUDED
18 #define DISTRHO_UTILS_HPP_INCLUDED
19 
20 #include "src/DistrhoDefines.h"
21 
22 #include <cstdarg>
23 #include <cstdio>
24 #include <cstdlib>
25 #include <cstring>
26 
27 #include <cmath>
28 #include <limits>
29 
30 #ifdef DISTRHO_PROPER_CPP11_SUPPORT
31 # include <cstdint>
32 #else
33 # include <stdint.h>
34 #endif
35 
36 #if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT)
37 namespace std {
38 inline float fmin(float __x, float __y)
39  { return __builtin_fminf(__x, __y); }
40 inline float fmax(float __x, float __y)
41  { return __builtin_fmaxf(__x, __y); }
42 inline float rint(float __x)
43  { return __builtin_rintf(__x); }
44 inline float round(float __x)
45  { return __builtin_roundf(__x); }
46 }
47 #endif
48 
49 #ifndef M_PI
50 # define M_PI 3.14159265358979323846
51 #endif
52 
53 // -----------------------------------------------------------------------
54 // misc functions
55 
56 /*
57  * Return a 64-bit number from 4 8-bit numbers.
58  */
59 static inline
60 int64_t d_cconst(const uint8_t a, const uint8_t b, const uint8_t c, const uint8_t d) noexcept
61 {
62  return (a << 24) | (b << 16) | (c << 8) | (d << 0);
63 }
64 
65 /*
66  * Return an hexadecimal representation of a MAJ.MIN.MICRO version number.
67  */
68 static inline
69 uint32_t d_version(const uint8_t major, const uint8_t minor, const uint8_t micro) noexcept
70 {
71  return uint32_t(major << 16) | uint32_t(minor << 8) | (micro << 0);
72 }
73 
74 /*
75  * Dummy function.
76  */
77 static inline
78 void d_pass() noexcept {}
79 
80 // -----------------------------------------------------------------------
81 // string print functions
82 
83 /*
84  * Print a string to stdout with newline (gray color).
85  * Does nothing if DEBUG is not defined.
86  */
87 #ifndef DEBUG
88 # define d_debug(...)
89 #else
90 static inline
91 void d_debug(const char* const fmt, ...) noexcept
92 {
93  try {
94  ::va_list args;
95  ::va_start(args, fmt);
96  std::fprintf(stdout, "\x1b[30;1m");
97  std::vfprintf(stdout, fmt, args);
98  std::fprintf(stdout, "\x1b[0m\n");
99  ::va_end(args);
100  } catch (...) {}
101 }
102 #endif
103 
104 /*
105  * Print a string to stdout with newline.
106  */
107 static inline
108 void d_stdout(const char* const fmt, ...) noexcept
109 {
110  try {
111  ::va_list args;
112  ::va_start(args, fmt);
113  std::vfprintf(stdout, fmt, args);
114  std::fprintf(stdout, "\n");
115  ::va_end(args);
116  } catch (...) {}
117 }
118 
119 /*
120  * Print a string to stderr with newline.
121  */
122 static inline
123 void d_stderr(const char* const fmt, ...) noexcept
124 {
125  try {
126  ::va_list args;
127  ::va_start(args, fmt);
128  std::vfprintf(stderr, fmt, args);
129  std::fprintf(stderr, "\n");
130  ::va_end(args);
131  } catch (...) {}
132 }
133 
134 /*
135  * Print a string to stderr with newline (red color).
136  */
137 static inline
138 void d_stderr2(const char* const fmt, ...) noexcept
139 {
140  try {
141  ::va_list args;
142  ::va_start(args, fmt);
143  std::fprintf(stderr, "\x1b[31m");
144  std::vfprintf(stderr, fmt, args);
145  std::fprintf(stderr, "\x1b[0m\n");
146  ::va_end(args);
147  } catch (...) {}
148 }
149 
150 /*
151  * Print a safe assertion error message.
152  */
153 static inline
154 void d_safe_assert(const char* const assertion, const char* const file, const int line) noexcept
155 {
156  d_stderr2("assertion failure: \"%s\" in file %s, line %i", assertion, file, line);
157 }
158 
159 /*
160  * Print a safe exception error message.
161  */
162 static inline
163 void d_safe_exception(const char* const exception, const char* const file, const int line) noexcept
164 {
165  d_stderr2("exception caught: \"%s\" in file %s, line %i", exception, file, line);
166 }
167 
168 // -----------------------------------------------------------------------
169 // math functions
170 
171 /*
172  * Safely compare two floating point numbers.
173  * Returns true if they match.
174  */
175 template<typename T>
176 static inline
177 bool d_isEqual(const T& v1, const T& v2)
178 {
179  return std::abs(v1-v2) < std::numeric_limits<T>::epsilon();
180 }
181 
182 /*
183  * Safely compare two floating point numbers.
184  * Returns true if they don't match.
185  */
186 template<typename T>
187 static inline
188 bool d_isNotEqual(const T& v1, const T& v2)
189 {
190  return std::abs(v1-v2) >= std::numeric_limits<T>::epsilon();
191 }
192 
193 /*
194  * Safely check if a floating point number is zero.
195  */
196 template<typename T>
197 static inline
198 bool d_isZero(const T& value)
199 {
200  return std::abs(value) < std::numeric_limits<T>::epsilon();
201 }
202 
203 /*
204  * Safely check if a floating point number is not zero.
205  */
206 template<typename T>
207 static inline
208 bool d_isNotZero(const T& value)
209 {
210  return std::abs(value) >= std::numeric_limits<T>::epsilon();
211 }
212 
213 /*
214  * Get next power of 2.
215  */
216 static inline
217 uint32_t d_nextPowerOf2(uint32_t size) noexcept
218 {
219  DISTRHO_SAFE_ASSERT_RETURN(size > 0, 0);
220 
221  // http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
222  --size;
223  size |= size >> 1;
224  size |= size >> 2;
225  size |= size >> 4;
226  size |= size >> 8;
227  size |= size >> 16;
228  return ++size;
229 }
230 
231 // -----------------------------------------------------------------------
232 
233 #ifndef DONT_SET_USING_DISTRHO_NAMESPACE
234  // If your code uses a lot of DISTRHO classes, then this will obviously save you
235  // a lot of typing, but can be disabled by setting DONT_SET_USING_DISTRHO_NAMESPACE.
236  namespace DISTRHO_NAMESPACE {}
237  using namespace DISTRHO_NAMESPACE;
238 #endif
239 
240 // -----------------------------------------------------------------------
241 
242 #endif // DISTRHO_UTILS_HPP_INCLUDED
Definition: DistrhoUtils.hpp:236
diff --git a/ExternalWindow_8hpp_source.html b/ExternalWindow_8hpp_source.html index 79cd8247..66a27b7d 100644 --- a/ExternalWindow_8hpp_source.html +++ b/ExternalWindow_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra/ExternalWindow.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,186 +66,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
ExternalWindow.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_EXTERNAL_WINDOW_HPP_INCLUDED
-
18 #define DISTRHO_EXTERNAL_WINDOW_HPP_INCLUDED
-
19 
-
20 #include "String.hpp"
-
21 
-
22 #ifdef DISTRHO_OS_WINDOWS
-
23 # error Unsupported platform!
-
24 #else
-
25 # include <cerrno>
-
26 # include <signal.h>
-
27 # include <sys/wait.h>
-
28 # include <unistd.h>
-
29 #endif
-
30 
-
31 START_NAMESPACE_DISTRHO
-
32 
-
33 // -----------------------------------------------------------------------
-
34 // ExternalWindow class
-
35 
- -
37 {
-
38 public:
-
39  ExternalWindow(const uint w = 1, const uint h = 1, const char* const t = "")
-
40  : width(w),
-
41  height(h),
-
42  title(t),
-
43  pid(0) {}
-
44 
-
45  virtual ~ExternalWindow()
-
46  {
-
47  terminateAndWaitForProcess();
-
48  }
-
49 
-
50  uint getWidth() const noexcept
-
51  {
-
52  return width;
-
53  }
-
54 
-
55  uint getHeight() const noexcept
-
56  {
-
57  return height;
-
58  }
-
59 
-
60  const char* getTitle() const noexcept
-
61  {
-
62  return title;
-
63  }
-
64 
-
65  void setTitle(const char* const t) noexcept
-
66  {
-
67  title = t;
-
68  }
-
69 
-
70  bool isRunning() noexcept
-
71  {
-
72  if (pid <= 0)
-
73  return false;
-
74 
-
75  const pid_t p = ::waitpid(pid, nullptr, WNOHANG);
-
76 
-
77  if (p == pid || (p == -1 && errno == ECHILD))
-
78  {
-
79  printf("NOTICE: Child process exited while idle\n");
-
80  pid = 0;
-
81  return false;
-
82  }
-
83 
-
84  return true;
-
85  }
-
86 
-
87 protected:
-
88  bool startExternalProcess(const char* args[])
-
89  {
-
90  terminateAndWaitForProcess();
-
91 
-
92  pid = vfork();
-
93 
-
94  switch (pid)
-
95  {
-
96  case 0:
-
97  execvp(args[0], (char**)args);
-
98  _exit(1);
-
99  return false;
-
100 
-
101  case -1:
-
102  printf("Could not start external ui\n");
-
103  return false;
-
104 
-
105  default:
-
106  return true;
-
107  }
-
108  }
-
109 
-
110 private:
-
111  uint width;
-
112  uint height;
-
113  String title;
-
114  pid_t pid;
-
115 
-
116  friend class UIExporter;
-
117 
-
118  void terminateAndWaitForProcess()
-
119  {
-
120  if (pid <= 0)
-
121  return;
-
122 
-
123  printf("Waiting for previous process to stop,,,\n");
-
124 
-
125  bool sendTerm = true;
-
126 
-
127  for (pid_t p;;)
-
128  {
-
129  p = ::waitpid(pid, nullptr, WNOHANG);
-
130 
-
131  switch (p)
-
132  {
-
133  case 0:
-
134  if (sendTerm)
-
135  {
-
136  sendTerm = false;
-
137  ::kill(pid, SIGTERM);
-
138  }
-
139  break;
-
140 
-
141  case -1:
-
142  if (errno == ECHILD)
-
143  {
-
144  printf("Done! (no such process)\n");
-
145  pid = 0;
-
146  return;
-
147  }
-
148  break;
-
149 
-
150  default:
-
151  if (p == pid)
-
152  {
-
153  printf("Done! (clean wait)\n");
-
154  pid = 0;
-
155  return;
-
156  }
-
157  break;
-
158  }
-
159 
-
160  // 5 msec
-
161  usleep(5*1000);
-
162  }
-
163  }
-
164 
-
165  DISTRHO_DECLARE_NON_COPY_CLASS(ExternalWindow)
-
166 };
-
167 
-
168 // -----------------------------------------------------------------------
-
169 
-
170 END_NAMESPACE_DISTRHO
-
171 
-
172 #endif // DISTRHO_EXTERNAL_WINDOW_HPP_INCLUDED
-
Definition: ExternalWindow.hpp:36
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_EXTERNAL_WINDOW_HPP_INCLUDED
18 #define DISTRHO_EXTERNAL_WINDOW_HPP_INCLUDED
19 
20 #include "String.hpp"
21 
22 #ifdef DISTRHO_OS_WINDOWS
23 # error Unsupported platform!
24 #else
25 # include <cerrno>
26 # include <signal.h>
27 # include <sys/wait.h>
28 # include <unistd.h>
29 #endif
30 
31 START_NAMESPACE_DISTRHO
32 
33 // -----------------------------------------------------------------------
34 // ExternalWindow class
35 
37 {
38 public:
39  ExternalWindow(const uint w = 1, const uint h = 1, const char* const t = "")
40  : width(w),
41  height(h),
42  title(t),
43  pid(0) {}
44 
45  virtual ~ExternalWindow()
46  {
47  terminateAndWaitForProcess();
48  }
49 
50  uint getWidth() const noexcept
51  {
52  return width;
53  }
54 
55  uint getHeight() const noexcept
56  {
57  return height;
58  }
59 
60  const char* getTitle() const noexcept
61  {
62  return title;
63  }
64 
65  void setTitle(const char* const t) noexcept
66  {
67  title = t;
68  }
69 
70  bool isRunning() noexcept
71  {
72  if (pid <= 0)
73  return false;
74 
75  const pid_t p = ::waitpid(pid, nullptr, WNOHANG);
76 
77  if (p == pid || (p == -1 && errno == ECHILD))
78  {
79  printf("NOTICE: Child process exited while idle\n");
80  pid = 0;
81  return false;
82  }
83 
84  return true;
85  }
86 
87 protected:
88  bool startExternalProcess(const char* args[])
89  {
90  terminateAndWaitForProcess();
91 
92  pid = vfork();
93 
94  switch (pid)
95  {
96  case 0:
97  execvp(args[0], (char**)args);
98  _exit(1);
99  return false;
100 
101  case -1:
102  printf("Could not start external ui\n");
103  return false;
104 
105  default:
106  return true;
107  }
108  }
109 
110 private:
111  uint width;
112  uint height;
113  String title;
114  pid_t pid;
115 
116  friend class UIExporter;
117 
118  void terminateAndWaitForProcess()
119  {
120  if (pid <= 0)
121  return;
122 
123  printf("Waiting for previous process to stop,,,\n");
124 
125  bool sendTerm = true;
126 
127  for (pid_t p;;)
128  {
129  p = ::waitpid(pid, nullptr, WNOHANG);
130 
131  switch (p)
132  {
133  case 0:
134  if (sendTerm)
135  {
136  sendTerm = false;
137  ::kill(pid, SIGTERM);
138  }
139  break;
140 
141  case -1:
142  if (errno == ECHILD)
143  {
144  printf("Done! (no such process)\n");
145  pid = 0;
146  return;
147  }
148  break;
149 
150  default:
151  if (p == pid)
152  {
153  printf("Done! (clean wait)\n");
154  pid = 0;
155  return;
156  }
157  break;
158  }
159 
160  // 5 msec
161  usleep(5*1000);
162  }
163  }
164 
165  DISTRHO_DECLARE_NON_COPY_CLASS(ExternalWindow)
166 };
167 
168 // -----------------------------------------------------------------------
169 
170 END_NAMESPACE_DISTRHO
171 
172 #endif // DISTRHO_EXTERNAL_WINDOW_HPP_INCLUDED
Definition: ExternalWindow.hpp:36
Definition: String.hpp:29
diff --git a/Geometry_8hpp_source.html b/Geometry_8hpp_source.html index 9122aed5..e3547acd 100644 --- a/Geometry_8hpp_source.html +++ b/Geometry_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/Geometry.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,806 +66,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Geometry.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_GEOMETRY_HPP_INCLUDED
-
18 #define DGL_GEOMETRY_HPP_INCLUDED
-
19 
-
20 #include "Base.hpp"
-
21 
-
22 START_NAMESPACE_DGL
-
23 
-
24 // -----------------------------------------------------------------------
-
25 // Forward class names
-
26 
-
27 template<typename> class Line;
-
28 template<typename> class Circle;
-
29 template<typename> class Triangle;
-
30 template<typename> class Rectangle;
-
31 
-
32 // -----------------------------------------------------------------------
-
33 
-
34 /**
-
35  DGL Point class.
-
36 
-
37  This class describes a single point in space, defined by an X and Y value.
-
38  */
-
39 template<typename T>
-
40 class Point
-
41 {
-
42 public:
-
43  /**
-
44  Constructor for (0, 0) point.
-
45  */
-
46  Point() noexcept;
-
47 
-
48  /**
-
49  Constructor using custom X and Y values.
-
50  */
-
51  Point(const T& x, const T& y) noexcept;
-
52 
-
53  /**
-
54  Constructor using another Point class values.
-
55  */
-
56  Point(const Point<T>& pos) noexcept;
-
57 
-
58  /**
-
59  Get X value.
-
60  */
-
61  const T& getX() const noexcept;
-
62 
-
63  /**
-
64  Get Y value.
-
65  */
-
66  const T& getY() const noexcept;
-
67 
-
68  /**
-
69  Set X value to @a x.
-
70  */
-
71  void setX(const T& x) noexcept;
-
72 
-
73  /**
-
74  Set Y value to @a y.
-
75  */
-
76  void setY(const T& y) noexcept;
-
77 
-
78  /**
-
79  Set X and Y values to @a x and @a y respectively.
-
80  */
-
81  void setPos(const T& x, const T& y) noexcept;
-
82 
-
83  /**
-
84  Set X and Y values according to @a pos.
-
85  */
-
86  void setPos(const Point<T>& pos) noexcept;
-
87 
-
88  /**
-
89  Move this point by @a x and @a y values.
-
90  */
-
91  void moveBy(const T& x, const T& y) noexcept;
-
92 
-
93  /**
-
94  Move this point by @a pos.
-
95  */
-
96  void moveBy(const Point<T>& pos) noexcept;
-
97 
-
98  /**
-
99  Return true if point is (0, 0).
-
100  */
-
101  bool isZero() const noexcept;
-
102 
-
103  /**
-
104  Return true if point is not (0, 0).
-
105  */
-
106  bool isNotZero() const noexcept;
-
107 
-
108  Point<T> operator+(const Point<T>& pos) noexcept;
-
109  Point<T> operator-(const Point<T>& pos) noexcept;
-
110  Point<T>& operator=(const Point<T>& pos) noexcept;
-
111  Point<T>& operator+=(const Point<T>& pos) noexcept;
-
112  Point<T>& operator-=(const Point<T>& pos) noexcept;
-
113  bool operator==(const Point<T>& pos) const noexcept;
-
114  bool operator!=(const Point<T>& pos) const noexcept;
-
115 
-
116 private:
-
117  T fX, fY;
-
118  template<typename> friend class Line;
-
119  template<typename> friend class Circle;
-
120  template<typename> friend class Triangle;
-
121  template<typename> friend class Rectangle;
-
122 };
-
123 
-
124 // -----------------------------------------------------------------------
-
125 
-
126 /**
-
127  DGL Size class.
-
128 
-
129  This class describes a size, defined by a width and height value.
-
130  */
-
131 template<typename T>
-
132 class Size
-
133 {
-
134 public:
-
135  /**
-
136  Constructor for null size (0x0).
-
137  */
-
138  Size() noexcept;
-
139 
-
140  /**
-
141  Constructor using custom width and height values.
-
142  */
-
143  Size(const T& width, const T& height) noexcept;
-
144 
-
145  /**
-
146  Constructor using another Size class values.
-
147  */
-
148  Size(const Size<T>& size) noexcept;
-
149 
-
150  /**
-
151  Get width.
-
152  */
-
153  const T& getWidth() const noexcept;
-
154 
-
155  /**
-
156  Get height.
-
157  */
-
158  const T& getHeight() const noexcept;
-
159 
-
160  /**
-
161  Set width.
-
162  */
-
163  void setWidth(const T& width) noexcept;
-
164 
-
165  /**
-
166  Set height.
-
167  */
-
168  void setHeight(const T& height) noexcept;
-
169 
-
170  /**
-
171  Set size to @a width and @a height.
-
172  */
-
173  void setSize(const T& width, const T& height) noexcept;
-
174 
-
175  /**
-
176  Set size.
-
177  */
-
178  void setSize(const Size<T>& size) noexcept;
-
179 
-
180  /**
-
181  Grow size by @a multiplier.
-
182  */
-
183  void growBy(double multiplier) noexcept;
-
184 
-
185  /**
-
186  Shrink size by @a divider.
-
187  */
-
188  void shrinkBy(double divider) noexcept;
-
189 
-
190  /**
-
191  Return true if size is null (0x0).
-
192  An null size is also invalid.
-
193  */
-
194  bool isNull() const noexcept;
-
195 
-
196  /**
-
197  Return true if size is not null (0x0).
-
198  A non-null size is still invalid if its width or height is negative.
-
199  */
-
200  bool isNotNull() const noexcept;
-
201 
-
202  /**
-
203  Return true if size is valid (width and height are higher than zero).
-
204  */
-
205  bool isValid() const noexcept;
-
206 
-
207  /**
-
208  Return true if size is invalid (width or height are lower or equal to zero).
-
209  An invalid size might not be null under some circumstances.
-
210  */
-
211  bool isInvalid() const noexcept;
-
212 
-
213  Size<T> operator+(const Size<T>& size) noexcept;
-
214  Size<T> operator-(const Size<T>& size) noexcept;
-
215  Size<T>& operator=(const Size<T>& size) noexcept;
-
216  Size<T>& operator+=(const Size<T>& size) noexcept;
-
217  Size<T>& operator-=(const Size<T>& size) noexcept;
-
218  Size<T>& operator*=(double m) noexcept;
-
219  Size<T>& operator/=(double d) noexcept;
-
220  bool operator==(const Size<T>& size) const noexcept;
-
221  bool operator!=(const Size<T>& size) const noexcept;
-
222 
-
223 private:
-
224  T fWidth, fHeight;
-
225  template<typename> friend class Rectangle;
-
226 };
-
227 
-
228 // -----------------------------------------------------------------------
-
229 
-
230 /**
-
231  DGL Line class.
-
232 
-
233  This class describes a line, defined by two points.
-
234  */
-
235 template<typename T>
-
236 class Line
-
237 {
-
238 public:
-
239  /**
-
240  Constructor for a null line ([0,0] to [0,0]).
-
241  */
-
242  Line() noexcept;
-
243 
-
244  /**
-
245  Constructor using custom start X, start Y, end X and end Y values.
-
246  */
-
247  Line(const T& startX, const T& startY, const T& endX, const T& endY) noexcept;
-
248 
-
249  /**
-
250  Constructor using custom start X, start Y and end pos values.
-
251  */
-
252  Line(const T& startX, const T& startY, const Point<T>& endPos) noexcept;
-
253 
-
254  /**
-
255  Constructor using custom start pos, end X and end Y values.
-
256  */
-
257  Line(const Point<T>& startPos, const T& endX, const T& endY) noexcept;
-
258 
-
259  /**
-
260  Constructor using custom start and end pos values.
-
261  */
-
262  Line(const Point<T>& startPos, const Point<T>& endPos) noexcept;
-
263 
-
264  /**
-
265  Constructor using another Line class values.
-
266  */
-
267  Line(const Line<T>& line) noexcept;
-
268 
-
269  /**
-
270  Get start X value.
-
271  */
-
272  const T& getStartX() const noexcept;
-
273 
-
274  /**
-
275  Get start Y value.
-
276  */
-
277  const T& getStartY() const noexcept;
-
278 
-
279  /**
-
280  Get end X value.
-
281  */
-
282  const T& getEndX() const noexcept;
-
283 
-
284  /**
-
285  Get end Y value.
-
286  */
-
287  const T& getEndY() const noexcept;
-
288 
-
289  /**
-
290  Get start position.
-
291  */
-
292  const Point<T>& getStartPos() const noexcept;
-
293 
-
294  /**
-
295  Get end position.
-
296  */
-
297  const Point<T>& getEndPos() const noexcept;
-
298 
-
299  /**
-
300  Set start X value to @a x.
-
301  */
-
302  void setStartX(const T& x) noexcept;
-
303 
-
304  /**
-
305  Set start Y value to @a y.
-
306  */
-
307  void setStartY(const T& y) noexcept;
-
308 
-
309  /**
-
310  Set start X and Y values to @a x and @a y respectively.
-
311  */
-
312  void setStartPos(const T& x, const T& y) noexcept;
-
313 
-
314  /**
-
315  Set start X and Y values according to @a pos.
-
316  */
-
317  void setStartPos(const Point<T>& pos) noexcept;
-
318 
-
319  /**
-
320  Set end X value to @a x.
-
321  */
-
322  void setEndX(const T& x) noexcept;
-
323 
-
324  /**
-
325  Set end Y value to @a y.
-
326  */
-
327  void setEndY(const T& y) noexcept;
-
328 
-
329  /**
-
330  Set end X and Y values to @a x and @a y respectively.
-
331  */
-
332  void setEndPos(const T& x, const T& y) noexcept;
-
333 
-
334  /**
-
335  Set end X and Y values according to @a pos.
-
336  */
-
337  void setEndPos(const Point<T>& pos) noexcept;
-
338 
-
339  /**
-
340  Move this line by @a x and @a y values.
-
341  */
-
342  void moveBy(const T& x, const T& y) noexcept;
-
343 
-
344  /**
-
345  Move this line by @a pos.
-
346  */
-
347  void moveBy(const Point<T>& pos) noexcept;
-
348 
-
349  /**
-
350  Draw this line using the current OpenGL state.
-
351  */
-
352  void draw();
-
353 
-
354  /**
-
355  Return true if line is null (start and end pos are equal).
-
356  */
-
357  bool isNull() const noexcept;
-
358 
-
359  /**
-
360  Return true if line is not null (start and end pos are different).
-
361  */
-
362  bool isNotNull() const noexcept;
-
363 
-
364  Line<T>& operator=(const Line<T>& line) noexcept;
-
365  bool operator==(const Line<T>& line) const noexcept;
-
366  bool operator!=(const Line<T>& line) const noexcept;
-
367 
-
368 private:
-
369  Point<T> fPosStart, fPosEnd;
-
370 };
-
371 
-
372 // -----------------------------------------------------------------------
-
373 
-
374 /**
-
375  DGL Circle class.
-
376 
-
377  This class describes a circle, defined by position, size and a minimum of 3 segments.
-
378 
-
379  TODO: report if circle starts at top-left, bottom-right or center.
-
380  and size grows from which point?
-
381  */
-
382 template<typename T>
-
383 class Circle
-
384 {
-
385 public:
-
386  /**
-
387  Constructor for a null circle.
-
388  */
-
389  Circle() noexcept;
-
390 
-
391  /**
-
392  Constructor using custom X, Y and size values.
-
393  */
-
394  Circle(const T& x, const T& y, const float size, const uint numSegments = 300);
-
395 
-
396  /**
-
397  Constructor using custom position and size values.
-
398  */
-
399  Circle(const Point<T>& pos, const float size, const uint numSegments = 300);
-
400 
-
401  /**
-
402  Constructor using another Circle class values.
-
403  */
-
404  Circle(const Circle<T>& cir) noexcept;
-
405 
-
406  /**
-
407  Get X value.
-
408  */
-
409  const T& getX() const noexcept;
-
410 
-
411  /**
-
412  Get Y value.
-
413  */
-
414  const T& getY() const noexcept;
-
415 
-
416  /**
-
417  Get position.
-
418  */
-
419  const Point<T>& getPos() const noexcept;
-
420 
-
421  /**
-
422  Set X value to @a x.
-
423  */
-
424  void setX(const T& x) noexcept;
-
425 
-
426  /**
-
427  Set Y value to @a y.
-
428  */
-
429  void setY(const T& y) noexcept;
-
430 
-
431  /**
-
432  Set X and Y values to @a x and @a y respectively.
-
433  */
-
434  void setPos(const T& x, const T& y) noexcept;
-
435 
-
436  /**
-
437  Set X and Y values according to @a pos.
-
438  */
-
439  void setPos(const Point<T>& pos) noexcept;
-
440 
-
441  /**
-
442  Get size.
-
443  */
-
444  float getSize() const noexcept;
-
445 
-
446  /**
-
447  Set size.
-
448  @note Must always be > 0
-
449  */
-
450  void setSize(const float size) noexcept;
-
451 
-
452  /**
-
453  Get the current number of line segments that make this circle.
-
454  */
-
455  uint getNumSegments() const noexcept;
-
456 
-
457  /**
-
458  Set the number of line segments that will make this circle.
-
459  @note Must always be >= 3
-
460  */
-
461  void setNumSegments(const uint num);
-
462 
-
463  /**
-
464  Draw this circle using the current OpenGL state.
-
465  */
-
466  void draw();
-
467 
-
468  /**
-
469  Draw lines (outline of this circle) using the current OpenGL state.
-
470  */
-
471  void drawOutline();
-
472 
-
473  Circle<T>& operator=(const Circle<T>& cir) noexcept;
-
474  bool operator==(const Circle<T>& cir) const noexcept;
-
475  bool operator!=(const Circle<T>& cir) const noexcept;
-
476 
-
477 private:
-
478  Point<T> fPos;
-
479  float fSize;
-
480  uint fNumSegments;
-
481 
-
482  // cached values
-
483  float fTheta, fCos, fSin;
-
484 
-
485  void _draw(const bool outline);
-
486 };
-
487 
-
488 // -----------------------------------------------------------------------
-
489 
-
490 /**
-
491  DGL Triangle class.
-
492 
-
493  This class describes a triangle, defined by 3 points.
-
494  */
-
495 template<typename T>
-
496 class Triangle
-
497 {
-
498 public:
-
499  /**
-
500  Constructor for a null triangle.
-
501  */
-
502  Triangle() noexcept;
-
503 
-
504  /**
-
505  Constructor using custom X and Y values.
-
506  */
-
507  Triangle(const T& x1, const T& y1, const T& x2, const T& y2, const T& x3, const T& y3) noexcept;
-
508 
-
509  /**
-
510  Constructor using custom position values.
-
511  */
-
512  Triangle(const Point<T>& pos1, const Point<T>& pos2, const Point<T>& pos3) noexcept;
-
513 
-
514  /**
-
515  Constructor using another Triangle class values.
-
516  */
-
517  Triangle(const Triangle<T>& tri) noexcept;
-
518 
-
519  /**
-
520  Draw this triangle using the current OpenGL state.
-
521  */
-
522  void draw();
-
523 
-
524  /**
-
525  Draw lines (outline of this triangle) using the current OpenGL state.
-
526  */
-
527  void drawOutline();
-
528 
-
529  /**
-
530  Return true if triangle is null (all its points are equal).
-
531  An null triangle is also invalid.
-
532  */
-
533  bool isNull() const noexcept;
-
534 
-
535  /**
-
536  Return true if triangle is not null (one its points is different from the others).
-
537  A non-null triangle is still invalid if two of its points are equal.
-
538  */
-
539  bool isNotNull() const noexcept;
-
540 
-
541  /**
-
542  Return true if triangle is valid (all its points are different).
-
543  */
-
544  bool isValid() const noexcept;
-
545 
-
546  /**
-
547  Return true if triangle is invalid (one or two of its points are equal).
-
548  An invalid triangle might not be null under some circumstances.
-
549  */
-
550  bool isInvalid() const noexcept;
-
551 
-
552  Triangle<T>& operator=(const Triangle<T>& tri) noexcept;
-
553  bool operator==(const Triangle<T>& tri) const noexcept;
-
554  bool operator!=(const Triangle<T>& tri) const noexcept;
-
555 
-
556 private:
-
557  Point<T> fPos1, fPos2, fPos3;
-
558 
-
559  void _draw(const bool outline);
-
560 };
-
561 
-
562 // -----------------------------------------------------------------------
-
563 
-
564 /**
-
565  DGL Rectangle class.
-
566 
-
567  This class describes a rectangle, defined by a starting point and a size.
-
568  */
-
569 template<typename T>
-
570 class Rectangle
-
571 {
-
572 public:
-
573  /**
-
574  Constructor for a null rectangle.
-
575  */
-
576  Rectangle() noexcept;
-
577 
-
578  /**
-
579  Constructor using custom X, Y, width and height values.
-
580  */
-
581  Rectangle(const T& x, const T& y, const T& width, const T& height) noexcept;
-
582 
-
583  /**
-
584  Constructor using custom X, Y and size values.
-
585  */
-
586  Rectangle(const T& x, const T& y, const Size<T>& size) noexcept;
-
587 
-
588  /**
-
589  Constructor using custom pos, width and height values.
-
590  */
-
591  Rectangle(const Point<T>& pos, const T& width, const T& height) noexcept;
-
592 
-
593  /**
-
594  Constructor using custom position and size.
-
595  */
-
596  Rectangle(const Point<T>& pos, const Size<T>& size) noexcept;
-
597 
-
598  /**
-
599  Constructor using another Rectangle class values.
-
600  */
-
601  Rectangle(const Rectangle<T>& rect) noexcept;
-
602 
-
603  /**
-
604  Get X value.
-
605  */
-
606  const T& getX() const noexcept;
-
607 
-
608  /**
-
609  Get Y value.
-
610  */
-
611  const T& getY() const noexcept;
-
612 
-
613  /**
-
614  Get width.
-
615  */
-
616  const T& getWidth() const noexcept;
-
617 
-
618  /**
-
619  Get height.
-
620  */
-
621  const T& getHeight() const noexcept;
-
622 
-
623  /**
-
624  Get position.
-
625  */
-
626  const Point<T>& getPos() const noexcept;
-
627 
-
628  /**
-
629  Get size.
-
630  */
-
631  const Size<T>& getSize() const noexcept;
-
632 
-
633  /**
-
634  Set X value as @a x.
-
635  */
-
636  void setX(const T& x) noexcept;
-
637 
-
638  /**
-
639  Set Y value as @a y.
-
640  */
-
641  void setY(const T& y) noexcept;
-
642 
-
643  /**
-
644  Set X and Y values as @a x and @a y respectively.
-
645  */
-
646  void setPos(const T& x, const T& y) noexcept;
-
647 
-
648  /**
-
649  Set X and Y values according to @a pos.
-
650  */
-
651  void setPos(const Point<T>& pos) noexcept;
-
652 
-
653  /**
-
654  Move this rectangle by @a x and @a y values.
-
655  */
-
656  void moveBy(const T& x, const T& y) noexcept;
-
657 
-
658  /**
-
659  Move this rectangle by @a pos.
-
660  */
-
661  void moveBy(const Point<T>& pos) noexcept;
-
662 
-
663  /**
-
664  Set width.
-
665  */
-
666  void setWidth(const T& width) noexcept;
-
667 
-
668  /**
-
669  Set height.
-
670  */
-
671  void setHeight(const T& height) noexcept;
-
672 
-
673  /**
-
674  Set size using @a width and @a height.
-
675  */
-
676  void setSize(const T& width, const T& height) noexcept;
-
677 
-
678  /**
-
679  Set size.
-
680  */
-
681  void setSize(const Size<T>& size) noexcept;
-
682 
-
683  /**
-
684  Grow size by @a multiplier.
-
685  */
-
686  void growBy(double multiplier) noexcept;
-
687 
-
688  /**
-
689  Shrink size by @a divider.
-
690  */
-
691  void shrinkBy(double divider) noexcept;
-
692 
-
693  /**
-
694  Set rectangle using @a pos and @a size.
-
695  */
-
696  void setRectangle(const Point<T>& pos, const Size<T>& size) noexcept;
-
697 
-
698  /**
-
699  Set rectangle.
-
700  */
-
701  void setRectangle(const Rectangle<T>& rect) noexcept;
-
702 
-
703  /**
-
704  Check if this rectangle contains the point defined by @a X and @a Y.
-
705  */
-
706  bool contains(const T& x, const T& y) const noexcept;
-
707 
-
708  /**
-
709  Check if this rectangle contains the point @a pos.
-
710  */
-
711  bool contains(const Point<T>& pos) const noexcept;
-
712 
-
713  /**
-
714  Check if this rectangle contains X.
-
715  */
-
716  bool containsX(const T& x) const noexcept;
-
717 
-
718  /**
-
719  Check if this rectangle contains Y.
-
720  */
-
721  bool containsY(const T& y) const noexcept;
-
722 
-
723  /**
-
724  Draw this rectangle using the current OpenGL state.
-
725  */
-
726  void draw();
-
727 
-
728  /**
-
729  Draw lines (outline of this rectangle) using the current OpenGL state.
-
730  */
-
731  void drawOutline();
-
732 
-
733  Rectangle<T>& operator=(const Rectangle<T>& rect) noexcept;
-
734  Rectangle<T>& operator*=(double m) noexcept;
-
735  Rectangle<T>& operator/=(double d) noexcept;
-
736  bool operator==(const Rectangle<T>& size) const noexcept;
-
737  bool operator!=(const Rectangle<T>& size) const noexcept;
-
738 
-
739 private:
-
740  Point<T> fPos;
-
741  Size<T> fSize;
-
742 
-
743  void _draw(const bool outline);
-
744 };
-
745 
-
746 // -----------------------------------------------------------------------
-
747 
-
748 END_NAMESPACE_DGL
-
749 
-
750 #endif // DGL_GEOMETRY_HPP_INCLUDED
-
void setStartPos(const T &x, const T &y) noexcept
-
bool isNotNull() const noexcept
-
bool isNull() const noexcept
-
void setX(const T &x) noexcept
-
bool isNotNull() const noexcept
-
const T & getEndY() const noexcept
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_GEOMETRY_HPP_INCLUDED
18 #define DGL_GEOMETRY_HPP_INCLUDED
19 
20 #include "Base.hpp"
21 
22 START_NAMESPACE_DGL
23 
24 // -----------------------------------------------------------------------
25 // Forward class names
26 
27 template<typename> class Line;
28 template<typename> class Circle;
29 template<typename> class Triangle;
30 template<typename> class Rectangle;
31 
32 // -----------------------------------------------------------------------
33 
34 /**
35  DGL Point class.
36 
37  This class describes a single point in space, defined by an X and Y value.
38  */
39 template<typename T>
40 class Point
41 {
42 public:
43  /**
44  Constructor for (0, 0) point.
45  */
46  Point() noexcept;
47 
48  /**
49  Constructor using custom X and Y values.
50  */
51  Point(const T& x, const T& y) noexcept;
52 
53  /**
54  Constructor using another Point class values.
55  */
56  Point(const Point<T>& pos) noexcept;
57 
58  /**
59  Get X value.
60  */
61  const T& getX() const noexcept;
62 
63  /**
64  Get Y value.
65  */
66  const T& getY() const noexcept;
67 
68  /**
69  Set X value to @a x.
70  */
71  void setX(const T& x) noexcept;
72 
73  /**
74  Set Y value to @a y.
75  */
76  void setY(const T& y) noexcept;
77 
78  /**
79  Set X and Y values to @a x and @a y respectively.
80  */
81  void setPos(const T& x, const T& y) noexcept;
82 
83  /**
84  Set X and Y values according to @a pos.
85  */
86  void setPos(const Point<T>& pos) noexcept;
87 
88  /**
89  Move this point by @a x and @a y values.
90  */
91  void moveBy(const T& x, const T& y) noexcept;
92 
93  /**
94  Move this point by @a pos.
95  */
96  void moveBy(const Point<T>& pos) noexcept;
97 
98  /**
99  Return true if point is (0, 0).
100  */
101  bool isZero() const noexcept;
102 
103  /**
104  Return true if point is not (0, 0).
105  */
106  bool isNotZero() const noexcept;
107 
108  Point<T> operator+(const Point<T>& pos) noexcept;
109  Point<T> operator-(const Point<T>& pos) noexcept;
110  Point<T>& operator=(const Point<T>& pos) noexcept;
111  Point<T>& operator+=(const Point<T>& pos) noexcept;
112  Point<T>& operator-=(const Point<T>& pos) noexcept;
113  bool operator==(const Point<T>& pos) const noexcept;
114  bool operator!=(const Point<T>& pos) const noexcept;
115 
116 private:
117  T fX, fY;
118  template<typename> friend class Line;
119  template<typename> friend class Circle;
120  template<typename> friend class Triangle;
121  template<typename> friend class Rectangle;
122 };
123 
124 // -----------------------------------------------------------------------
125 
126 /**
127  DGL Size class.
128 
129  This class describes a size, defined by a width and height value.
130  */
131 template<typename T>
132 class Size
133 {
134 public:
135  /**
136  Constructor for null size (0x0).
137  */
138  Size() noexcept;
139 
140  /**
141  Constructor using custom width and height values.
142  */
143  Size(const T& width, const T& height) noexcept;
144 
145  /**
146  Constructor using another Size class values.
147  */
148  Size(const Size<T>& size) noexcept;
149 
150  /**
151  Get width.
152  */
153  const T& getWidth() const noexcept;
154 
155  /**
156  Get height.
157  */
158  const T& getHeight() const noexcept;
159 
160  /**
161  Set width.
162  */
163  void setWidth(const T& width) noexcept;
164 
165  /**
166  Set height.
167  */
168  void setHeight(const T& height) noexcept;
169 
170  /**
171  Set size to @a width and @a height.
172  */
173  void setSize(const T& width, const T& height) noexcept;
174 
175  /**
176  Set size.
177  */
178  void setSize(const Size<T>& size) noexcept;
179 
180  /**
181  Grow size by @a multiplier.
182  */
183  void growBy(double multiplier) noexcept;
184 
185  /**
186  Shrink size by @a divider.
187  */
188  void shrinkBy(double divider) noexcept;
189 
190  /**
191  Return true if size is null (0x0).
192  An null size is also invalid.
193  */
194  bool isNull() const noexcept;
195 
196  /**
197  Return true if size is not null (0x0).
198  A non-null size is still invalid if its width or height is negative.
199  */
200  bool isNotNull() const noexcept;
201 
202  /**
203  Return true if size is valid (width and height are higher than zero).
204  */
205  bool isValid() const noexcept;
206 
207  /**
208  Return true if size is invalid (width or height are lower or equal to zero).
209  An invalid size might not be null under some circumstances.
210  */
211  bool isInvalid() const noexcept;
212 
213  Size<T> operator+(const Size<T>& size) noexcept;
214  Size<T> operator-(const Size<T>& size) noexcept;
215  Size<T>& operator=(const Size<T>& size) noexcept;
216  Size<T>& operator+=(const Size<T>& size) noexcept;
217  Size<T>& operator-=(const Size<T>& size) noexcept;
218  Size<T>& operator*=(double m) noexcept;
219  Size<T>& operator/=(double d) noexcept;
220  bool operator==(const Size<T>& size) const noexcept;
221  bool operator!=(const Size<T>& size) const noexcept;
222 
223 private:
224  T fWidth, fHeight;
225  template<typename> friend class Rectangle;
226 };
227 
228 // -----------------------------------------------------------------------
229 
230 /**
231  DGL Line class.
232 
233  This class describes a line, defined by two points.
234  */
235 template<typename T>
236 class Line
237 {
238 public:
239  /**
240  Constructor for a null line ([0,0] to [0,0]).
241  */
242  Line() noexcept;
243 
244  /**
245  Constructor using custom start X, start Y, end X and end Y values.
246  */
247  Line(const T& startX, const T& startY, const T& endX, const T& endY) noexcept;
248 
249  /**
250  Constructor using custom start X, start Y and end pos values.
251  */
252  Line(const T& startX, const T& startY, const Point<T>& endPos) noexcept;
253 
254  /**
255  Constructor using custom start pos, end X and end Y values.
256  */
257  Line(const Point<T>& startPos, const T& endX, const T& endY) noexcept;
258 
259  /**
260  Constructor using custom start and end pos values.
261  */
262  Line(const Point<T>& startPos, const Point<T>& endPos) noexcept;
263 
264  /**
265  Constructor using another Line class values.
266  */
267  Line(const Line<T>& line) noexcept;
268 
269  /**
270  Get start X value.
271  */
272  const T& getStartX() const noexcept;
273 
274  /**
275  Get start Y value.
276  */
277  const T& getStartY() const noexcept;
278 
279  /**
280  Get end X value.
281  */
282  const T& getEndX() const noexcept;
283 
284  /**
285  Get end Y value.
286  */
287  const T& getEndY() const noexcept;
288 
289  /**
290  Get start position.
291  */
292  const Point<T>& getStartPos() const noexcept;
293 
294  /**
295  Get end position.
296  */
297  const Point<T>& getEndPos() const noexcept;
298 
299  /**
300  Set start X value to @a x.
301  */
302  void setStartX(const T& x) noexcept;
303 
304  /**
305  Set start Y value to @a y.
306  */
307  void setStartY(const T& y) noexcept;
308 
309  /**
310  Set start X and Y values to @a x and @a y respectively.
311  */
312  void setStartPos(const T& x, const T& y) noexcept;
313 
314  /**
315  Set start X and Y values according to @a pos.
316  */
317  void setStartPos(const Point<T>& pos) noexcept;
318 
319  /**
320  Set end X value to @a x.
321  */
322  void setEndX(const T& x) noexcept;
323 
324  /**
325  Set end Y value to @a y.
326  */
327  void setEndY(const T& y) noexcept;
328 
329  /**
330  Set end X and Y values to @a x and @a y respectively.
331  */
332  void setEndPos(const T& x, const T& y) noexcept;
333 
334  /**
335  Set end X and Y values according to @a pos.
336  */
337  void setEndPos(const Point<T>& pos) noexcept;
338 
339  /**
340  Move this line by @a x and @a y values.
341  */
342  void moveBy(const T& x, const T& y) noexcept;
343 
344  /**
345  Move this line by @a pos.
346  */
347  void moveBy(const Point<T>& pos) noexcept;
348 
349  /**
350  Draw this line using the current OpenGL state.
351  */
352  void draw();
353 
354  /**
355  Return true if line is null (start and end pos are equal).
356  */
357  bool isNull() const noexcept;
358 
359  /**
360  Return true if line is not null (start and end pos are different).
361  */
362  bool isNotNull() const noexcept;
363 
364  Line<T>& operator=(const Line<T>& line) noexcept;
365  bool operator==(const Line<T>& line) const noexcept;
366  bool operator!=(const Line<T>& line) const noexcept;
367 
368 private:
369  Point<T> fPosStart, fPosEnd;
370 };
371 
372 // -----------------------------------------------------------------------
373 
374 /**
375  DGL Circle class.
376 
377  This class describes a circle, defined by position, size and a minimum of 3 segments.
378 
379  TODO: report if circle starts at top-left, bottom-right or center.
380  and size grows from which point?
381  */
382 template<typename T>
383 class Circle
384 {
385 public:
386  /**
387  Constructor for a null circle.
388  */
389  Circle() noexcept;
390 
391  /**
392  Constructor using custom X, Y and size values.
393  */
394  Circle(const T& x, const T& y, const float size, const uint numSegments = 300);
395 
396  /**
397  Constructor using custom position and size values.
398  */
399  Circle(const Point<T>& pos, const float size, const uint numSegments = 300);
400 
401  /**
402  Constructor using another Circle class values.
403  */
404  Circle(const Circle<T>& cir) noexcept;
405 
406  /**
407  Get X value.
408  */
409  const T& getX() const noexcept;
410 
411  /**
412  Get Y value.
413  */
414  const T& getY() const noexcept;
415 
416  /**
417  Get position.
418  */
419  const Point<T>& getPos() const noexcept;
420 
421  /**
422  Set X value to @a x.
423  */
424  void setX(const T& x) noexcept;
425 
426  /**
427  Set Y value to @a y.
428  */
429  void setY(const T& y) noexcept;
430 
431  /**
432  Set X and Y values to @a x and @a y respectively.
433  */
434  void setPos(const T& x, const T& y) noexcept;
435 
436  /**
437  Set X and Y values according to @a pos.
438  */
439  void setPos(const Point<T>& pos) noexcept;
440 
441  /**
442  Get size.
443  */
444  float getSize() const noexcept;
445 
446  /**
447  Set size.
448  @note Must always be > 0
449  */
450  void setSize(const float size) noexcept;
451 
452  /**
453  Get the current number of line segments that make this circle.
454  */
455  uint getNumSegments() const noexcept;
456 
457  /**
458  Set the number of line segments that will make this circle.
459  @note Must always be >= 3
460  */
461  void setNumSegments(const uint num);
462 
463  /**
464  Draw this circle using the current OpenGL state.
465  */
466  void draw();
467 
468  /**
469  Draw lines (outline of this circle) using the current OpenGL state.
470  */
471  void drawOutline();
472 
473  Circle<T>& operator=(const Circle<T>& cir) noexcept;
474  bool operator==(const Circle<T>& cir) const noexcept;
475  bool operator!=(const Circle<T>& cir) const noexcept;
476 
477 private:
478  Point<T> fPos;
479  float fSize;
480  uint fNumSegments;
481 
482  // cached values
483  float fTheta, fCos, fSin;
484 
485  void _draw(const bool outline);
486 };
487 
488 // -----------------------------------------------------------------------
489 
490 /**
491  DGL Triangle class.
492 
493  This class describes a triangle, defined by 3 points.
494  */
495 template<typename T>
496 class Triangle
497 {
498 public:
499  /**
500  Constructor for a null triangle.
501  */
502  Triangle() noexcept;
503 
504  /**
505  Constructor using custom X and Y values.
506  */
507  Triangle(const T& x1, const T& y1, const T& x2, const T& y2, const T& x3, const T& y3) noexcept;
508 
509  /**
510  Constructor using custom position values.
511  */
512  Triangle(const Point<T>& pos1, const Point<T>& pos2, const Point<T>& pos3) noexcept;
513 
514  /**
515  Constructor using another Triangle class values.
516  */
517  Triangle(const Triangle<T>& tri) noexcept;
518 
519  /**
520  Draw this triangle using the current OpenGL state.
521  */
522  void draw();
523 
524  /**
525  Draw lines (outline of this triangle) using the current OpenGL state.
526  */
527  void drawOutline();
528 
529  /**
530  Return true if triangle is null (all its points are equal).
531  An null triangle is also invalid.
532  */
533  bool isNull() const noexcept;
534 
535  /**
536  Return true if triangle is not null (one its points is different from the others).
537  A non-null triangle is still invalid if two of its points are equal.
538  */
539  bool isNotNull() const noexcept;
540 
541  /**
542  Return true if triangle is valid (all its points are different).
543  */
544  bool isValid() const noexcept;
545 
546  /**
547  Return true if triangle is invalid (one or two of its points are equal).
548  An invalid triangle might not be null under some circumstances.
549  */
550  bool isInvalid() const noexcept;
551 
552  Triangle<T>& operator=(const Triangle<T>& tri) noexcept;
553  bool operator==(const Triangle<T>& tri) const noexcept;
554  bool operator!=(const Triangle<T>& tri) const noexcept;
555 
556 private:
557  Point<T> fPos1, fPos2, fPos3;
558 
559  void _draw(const bool outline);
560 };
561 
562 // -----------------------------------------------------------------------
563 
564 /**
565  DGL Rectangle class.
566 
567  This class describes a rectangle, defined by a starting point and a size.
568  */
569 template<typename T>
570 class Rectangle
571 {
572 public:
573  /**
574  Constructor for a null rectangle.
575  */
576  Rectangle() noexcept;
577 
578  /**
579  Constructor using custom X, Y, width and height values.
580  */
581  Rectangle(const T& x, const T& y, const T& width, const T& height) noexcept;
582 
583  /**
584  Constructor using custom X, Y and size values.
585  */
586  Rectangle(const T& x, const T& y, const Size<T>& size) noexcept;
587 
588  /**
589  Constructor using custom pos, width and height values.
590  */
591  Rectangle(const Point<T>& pos, const T& width, const T& height) noexcept;
592 
593  /**
594  Constructor using custom position and size.
595  */
596  Rectangle(const Point<T>& pos, const Size<T>& size) noexcept;
597 
598  /**
599  Constructor using another Rectangle class values.
600  */
601  Rectangle(const Rectangle<T>& rect) noexcept;
602 
603  /**
604  Get X value.
605  */
606  const T& getX() const noexcept;
607 
608  /**
609  Get Y value.
610  */
611  const T& getY() const noexcept;
612 
613  /**
614  Get width.
615  */
616  const T& getWidth() const noexcept;
617 
618  /**
619  Get height.
620  */
621  const T& getHeight() const noexcept;
622 
623  /**
624  Get position.
625  */
626  const Point<T>& getPos() const noexcept;
627 
628  /**
629  Get size.
630  */
631  const Size<T>& getSize() const noexcept;
632 
633  /**
634  Set X value as @a x.
635  */
636  void setX(const T& x) noexcept;
637 
638  /**
639  Set Y value as @a y.
640  */
641  void setY(const T& y) noexcept;
642 
643  /**
644  Set X and Y values as @a x and @a y respectively.
645  */
646  void setPos(const T& x, const T& y) noexcept;
647 
648  /**
649  Set X and Y values according to @a pos.
650  */
651  void setPos(const Point<T>& pos) noexcept;
652 
653  /**
654  Move this rectangle by @a x and @a y values.
655  */
656  void moveBy(const T& x, const T& y) noexcept;
657 
658  /**
659  Move this rectangle by @a pos.
660  */
661  void moveBy(const Point<T>& pos) noexcept;
662 
663  /**
664  Set width.
665  */
666  void setWidth(const T& width) noexcept;
667 
668  /**
669  Set height.
670  */
671  void setHeight(const T& height) noexcept;
672 
673  /**
674  Set size using @a width and @a height.
675  */
676  void setSize(const T& width, const T& height) noexcept;
677 
678  /**
679  Set size.
680  */
681  void setSize(const Size<T>& size) noexcept;
682 
683  /**
684  Grow size by @a multiplier.
685  */
686  void growBy(double multiplier) noexcept;
687 
688  /**
689  Shrink size by @a divider.
690  */
691  void shrinkBy(double divider) noexcept;
692 
693  /**
694  Set rectangle using @a pos and @a size.
695  */
696  void setRectangle(const Point<T>& pos, const Size<T>& size) noexcept;
697 
698  /**
699  Set rectangle.
700  */
701  void setRectangle(const Rectangle<T>& rect) noexcept;
702 
703  /**
704  Check if this rectangle contains the point defined by @a X and @a Y.
705  */
706  bool contains(const T& x, const T& y) const noexcept;
707 
708  /**
709  Check if this rectangle contains the point @a pos.
710  */
711  bool contains(const Point<T>& pos) const noexcept;
712 
713  /**
714  Check if this rectangle contains X.
715  */
716  bool containsX(const T& x) const noexcept;
717 
718  /**
719  Check if this rectangle contains Y.
720  */
721  bool containsY(const T& y) const noexcept;
722 
723  /**
724  Draw this rectangle using the current OpenGL state.
725  */
726  void draw();
727 
728  /**
729  Draw lines (outline of this rectangle) using the current OpenGL state.
730  */
731  void drawOutline();
732 
733  Rectangle<T>& operator=(const Rectangle<T>& rect) noexcept;
734  Rectangle<T>& operator*=(double m) noexcept;
735  Rectangle<T>& operator/=(double d) noexcept;
736  bool operator==(const Rectangle<T>& size) const noexcept;
737  bool operator!=(const Rectangle<T>& size) const noexcept;
738 
739 private:
740  Point<T> fPos;
741  Size<T> fSize;
742 
743  void _draw(const bool outline);
744 };
745 
746 // -----------------------------------------------------------------------
747 
748 END_NAMESPACE_DGL
749 
750 #endif // DGL_GEOMETRY_HPP_INCLUDED
void setX(const T &x) noexcept
Definition: Geometry.hpp:27
-
bool isValid() const noexcept
-
void setStartX(const T &x) noexcept
const T & getY() const noexcept
-
void setEndPos(const T &x, const T &y) noexcept
-
void shrinkBy(double divider) noexcept
const T & getX() const noexcept
Definition: Geometry.hpp:40
-
const Point< T > & getEndPos() const noexcept
-
void setSize(const T &width, const T &height) noexcept
Definition: Geometry.hpp:132
Definition: Geometry.hpp:30
-
void setHeight(const T &height) noexcept
Point() noexcept
void setPos(const T &x, const T &y) noexcept
-
void setStartY(const T &y) noexcept
-
bool isNull() const noexcept
-
void setEndX(const T &x) noexcept
-
Line() noexcept
-
bool isInvalid() const noexcept
Definition: Geometry.hpp:28
Definition: Geometry.hpp:29
-
void draw()
void moveBy(const T &x, const T &y) noexcept
-
void setWidth(const T &width) noexcept
-
const T & getEndX() const noexcept
-
void growBy(double multiplier) noexcept
-
Size() noexcept
-
const T & getHeight() const noexcept
-
const T & getStartX() const noexcept
-
void setEndY(const T &y) noexcept
void setY(const T &y) noexcept
-
const T & getStartY() const noexcept
bool isNotZero() const noexcept
bool isZero() const noexcept
-
void moveBy(const T &x, const T &y) noexcept
-
const T & getWidth() const noexcept
-
const Point< T > & getStartPos() const noexcept
diff --git a/ImageWidgets_8hpp_source.html b/ImageWidgets_8hpp_source.html index b878796d..dd30b6e8 100644 --- a/ImageWidgets_8hpp_source.html +++ b/ImageWidgets_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/ImageWidgets.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,303 +66,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
ImageWidgets.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_IMAGE_WIDGETS_HPP_INCLUDED
-
18 #define DGL_IMAGE_WIDGETS_HPP_INCLUDED
-
19 
-
20 #include "Image.hpp"
-
21 #include "Widget.hpp"
-
22 #include "Window.hpp"
-
23 
-
24 START_NAMESPACE_DGL
-
25 
-
26 // -----------------------------------------------------------------------
-
27 
-
28 class ImageAboutWindow : public Window,
-
29  public Widget
-
30 {
-
31 public:
-
32  explicit ImageAboutWindow(Window& parent, const Image& image = Image());
-
33  explicit ImageAboutWindow(Widget* widget, const Image& image = Image());
-
34 
-
35  void setImage(const Image& image);
-
36 
-
37 protected:
-
38  void onDisplay() override;
-
39  bool onKeyboard(const KeyboardEvent&) override;
-
40  bool onMouse(const MouseEvent&) override;
-
41  void onReshape(uint width, uint height) override;
-
42 
-
43 private:
-
44  Image fImgBackground;
-
45 
-
46  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageAboutWindow)
-
47 };
-
48 
-
49 // -----------------------------------------------------------------------
-
50 
-
51 class ImageButton : public Widget
-
52 {
-
53 public:
-
54  class Callback
-
55  {
-
56  public:
-
57  virtual ~Callback() {}
-
58  virtual void imageButtonClicked(ImageButton* imageButton, int button) = 0;
-
59  };
-
60 
-
61  explicit ImageButton(Window& parent, const Image& image);
-
62  explicit ImageButton(Window& parent, const Image& imageNormal, const Image& imageDown);
-
63  explicit ImageButton(Window& parent, const Image& imageNormal, const Image& imageHover, const Image& imageDown);
-
64 
-
65  explicit ImageButton(Widget* widget, const Image& image);
-
66  explicit ImageButton(Widget* widget, const Image& imageNormal, const Image& imageDown);
-
67  explicit ImageButton(Widget* widget, const Image& imageNormal, const Image& imageHover, const Image& imageDown);
-
68 
-
69  ~ImageButton() override;
-
70 
-
71  void setCallback(Callback* callback) noexcept;
-
72 
-
73 protected:
-
74  void onDisplay() override;
-
75  bool onMouse(const MouseEvent&) override;
-
76  bool onMotion(const MotionEvent&) override;
-
77 
-
78 private:
-
79  struct PrivateData;
-
80  PrivateData* const pData;
-
81 
-
82  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageButton)
-
83 };
-
84 
-
85 // -----------------------------------------------------------------------
-
86 
-
87 class ImageKnob : public Widget
-
88 {
-
89 public:
-
90  enum Orientation {
-
91  Horizontal,
-
92  Vertical
-
93  };
-
94 
-
95  class Callback
-
96  {
-
97  public:
-
98  virtual ~Callback() {}
-
99  virtual void imageKnobDragStarted(ImageKnob* imageKnob) = 0;
-
100  virtual void imageKnobDragFinished(ImageKnob* imageKnob) = 0;
-
101  virtual void imageKnobValueChanged(ImageKnob* imageKnob, float value) = 0;
-
102  };
-
103 
-
104  explicit ImageKnob(Window& parent, const Image& image, Orientation orientation = Vertical) noexcept;
-
105  explicit ImageKnob(Widget* widget, const Image& image, Orientation orientation = Vertical) noexcept;
-
106  explicit ImageKnob(const ImageKnob& imageKnob);
-
107  ImageKnob& operator=(const ImageKnob& imageKnob);
-
108  ~ImageKnob() override;
-
109 
-
110  float getValue() const noexcept;
-
111 
-
112  void setDefault(float def) noexcept;
-
113  void setRange(float min, float max) noexcept;
-
114  void setStep(float step) noexcept;
-
115  void setValue(float value, bool sendCallback = false) noexcept;
-
116  void setUsingLogScale(bool yesNo) noexcept;
-
117 
-
118  void setCallback(Callback* callback) noexcept;
-
119  void setOrientation(Orientation orientation) noexcept;
-
120  void setRotationAngle(int angle);
-
121 
-
122  void setImageLayerCount(uint count) noexcept;
-
123 
-
124 protected:
-
125  void onDisplay() override;
-
126  bool onMouse(const MouseEvent&) override;
-
127  bool onMotion(const MotionEvent&) override;
-
128  bool onScroll(const ScrollEvent&) override;
-
129 
-
130 private:
-
131  Image fImage;
-
132  float fMinimum;
-
133  float fMaximum;
-
134  float fStep;
-
135  float fValue;
-
136  float fValueDef;
-
137  float fValueTmp;
-
138  bool fUsingDefault;
-
139  bool fUsingLog;
-
140  Orientation fOrientation;
-
141 
-
142  int fRotationAngle;
-
143  bool fDragging;
-
144  int fLastX;
-
145  int fLastY;
-
146 
-
147  Callback* fCallback;
-
148 
-
149  bool fIsImgVertical;
-
150  uint fImgLayerWidth;
-
151  uint fImgLayerHeight;
-
152  uint fImgLayerCount;
-
153  bool fIsReady;
-
154  GLuint fTextureId;
-
155 
-
156  float _logscale(float value) const;
-
157  float _invlogscale(float value) const;
-
158 
-
159  DISTRHO_LEAK_DETECTOR(ImageKnob)
-
160 };
-
161 
-
162 // -----------------------------------------------------------------------
-
163 
-
164 // note set range and step before setting the value
-
165 
-
166 class ImageSlider : public Widget
-
167 {
-
168 public:
-
169  class Callback
-
170  {
-
171  public:
-
172  virtual ~Callback() {}
-
173  virtual void imageSliderDragStarted(ImageSlider* imageSlider) = 0;
-
174  virtual void imageSliderDragFinished(ImageSlider* imageSlider) = 0;
-
175  virtual void imageSliderValueChanged(ImageSlider* imageSlider, float value) = 0;
-
176  };
-
177 
-
178  explicit ImageSlider(Window& parent, const Image& image) noexcept;
-
179  explicit ImageSlider(Widget* widget, const Image& image) noexcept;
-
180 
-
181  float getValue() const noexcept;
-
182  void setValue(float value, bool sendCallback = false) noexcept;
-
183 
-
184  void setStartPos(const Point<int>& startPos) noexcept;
-
185  void setStartPos(int x, int y) noexcept;
-
186  void setEndPos(const Point<int>& endPos) noexcept;
-
187  void setEndPos(int x, int y) noexcept;
-
188 
-
189  void setInverted(bool inverted) noexcept;
-
190  void setRange(float min, float max) noexcept;
-
191  void setStep(float step) noexcept;
-
192 
-
193  void setCallback(Callback* callback) noexcept;
-
194 
-
195 protected:
-
196  void onDisplay() override;
-
197  bool onMouse(const MouseEvent&) override;
-
198  bool onMotion(const MotionEvent&) override;
-
199 
-
200 private:
-
201  Image fImage;
-
202  float fMinimum;
-
203  float fMaximum;
-
204  float fStep;
-
205  float fValue;
-
206  float fValueTmp;
-
207 
-
208  bool fDragging;
-
209  bool fInverted;
-
210  bool fValueIsSet;
-
211  int fStartedX;
-
212  int fStartedY;
-
213 
-
214  Callback* fCallback;
-
215 
-
216  Point<int> fStartPos;
-
217  Point<int> fEndPos;
-
218  Rectangle<int> fSliderArea;
-
219 
-
220  void _recheckArea() noexcept;
-
221 
-
222  // these should not be used
-
223  void setAbsoluteX(int) const noexcept {}
-
224  void setAbsoluteY(int) const noexcept {}
-
225  void setAbsolutePos(int, int) const noexcept {}
-
226  void setAbsolutePos(const Point<int>&) const noexcept {}
-
227 
-
228  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageSlider)
-
229 };
-
230 
-
231 // -----------------------------------------------------------------------
-
232 
-
233 class ImageSwitch : public Widget
-
234 {
-
235 public:
-
236  class Callback
-
237  {
-
238  public:
-
239  virtual ~Callback() {}
-
240  virtual void imageSwitchClicked(ImageSwitch* imageButton, bool down) = 0;
-
241  };
-
242 
-
243  explicit ImageSwitch(Window& parent, const Image& imageNormal, const Image& imageDown) noexcept;
-
244  explicit ImageSwitch(Widget* widget, const Image& imageNormal, const Image& imageDown) noexcept;
-
245  explicit ImageSwitch(const ImageSwitch& imageSwitch) noexcept;
-
246  ImageSwitch& operator=(const ImageSwitch& imageSwitch) noexcept;
-
247 
-
248  bool isDown() const noexcept;
-
249  void setDown(bool down) noexcept;
-
250 
-
251  void setCallback(Callback* callback) noexcept;
-
252 
-
253 protected:
-
254  void onDisplay() override;
-
255  bool onMouse(const MouseEvent&) override;
-
256 
-
257 private:
-
258  Image fImageNormal;
-
259  Image fImageDown;
-
260  bool fIsDown;
-
261 
-
262  Callback* fCallback;
-
263 
-
264  DISTRHO_LEAK_DETECTOR(ImageSwitch)
-
265 };
-
266 
-
267 // -----------------------------------------------------------------------
-
268 
-
269 END_NAMESPACE_DGL
-
270 
-
271 #endif // DGL_IMAGE_WIDGETS_HPP_INCLUDED
-
Definition: ImageWidgets.hpp:28
-
void onDisplay() override
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_IMAGE_WIDGETS_HPP_INCLUDED
18 #define DGL_IMAGE_WIDGETS_HPP_INCLUDED
19 
20 #include "Image.hpp"
21 #include "Widget.hpp"
22 #include "Window.hpp"
23 
24 START_NAMESPACE_DGL
25 
26 // -----------------------------------------------------------------------
27 
28 class ImageAboutWindow : public Window,
29  public Widget
30 {
31 public:
32  explicit ImageAboutWindow(Window& parent, const Image& image = Image());
33  explicit ImageAboutWindow(Widget* widget, const Image& image = Image());
34 
35  void setImage(const Image& image);
36 
37 protected:
38  void onDisplay() override;
39  bool onKeyboard(const KeyboardEvent&) override;
40  bool onMouse(const MouseEvent&) override;
41  void onReshape(uint width, uint height) override;
42 
43 private:
44  Image fImgBackground;
45 
46  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageAboutWindow)
47 };
48 
49 // -----------------------------------------------------------------------
50 
51 class ImageButton : public Widget
52 {
53 public:
54  class Callback
55  {
56  public:
57  virtual ~Callback() {}
58  virtual void imageButtonClicked(ImageButton* imageButton, int button) = 0;
59  };
60 
61  explicit ImageButton(Window& parent, const Image& image);
62  explicit ImageButton(Window& parent, const Image& imageNormal, const Image& imageDown);
63  explicit ImageButton(Window& parent, const Image& imageNormal, const Image& imageHover, const Image& imageDown);
64 
65  explicit ImageButton(Widget* widget, const Image& image);
66  explicit ImageButton(Widget* widget, const Image& imageNormal, const Image& imageDown);
67  explicit ImageButton(Widget* widget, const Image& imageNormal, const Image& imageHover, const Image& imageDown);
68 
69  ~ImageButton() override;
70 
71  void setCallback(Callback* callback) noexcept;
72 
73 protected:
74  void onDisplay() override;
75  bool onMouse(const MouseEvent&) override;
76  bool onMotion(const MotionEvent&) override;
77 
78 private:
79  struct PrivateData;
80  PrivateData* const pData;
81 
82  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageButton)
83 };
84 
85 // -----------------------------------------------------------------------
86 
87 class ImageKnob : public Widget
88 {
89 public:
90  enum Orientation {
91  Horizontal,
92  Vertical
93  };
94 
95  class Callback
96  {
97  public:
98  virtual ~Callback() {}
99  virtual void imageKnobDragStarted(ImageKnob* imageKnob) = 0;
100  virtual void imageKnobDragFinished(ImageKnob* imageKnob) = 0;
101  virtual void imageKnobValueChanged(ImageKnob* imageKnob, float value) = 0;
102  };
103 
104  explicit ImageKnob(Window& parent, const Image& image, Orientation orientation = Vertical) noexcept;
105  explicit ImageKnob(Widget* widget, const Image& image, Orientation orientation = Vertical) noexcept;
106  explicit ImageKnob(const ImageKnob& imageKnob);
107  ImageKnob& operator=(const ImageKnob& imageKnob);
108  ~ImageKnob() override;
109 
110  float getValue() const noexcept;
111 
112  void setDefault(float def) noexcept;
113  void setRange(float min, float max) noexcept;
114  void setStep(float step) noexcept;
115  void setValue(float value, bool sendCallback = false) noexcept;
116  void setUsingLogScale(bool yesNo) noexcept;
117 
118  void setCallback(Callback* callback) noexcept;
119  void setOrientation(Orientation orientation) noexcept;
120  void setRotationAngle(int angle);
121 
122  void setImageLayerCount(uint count) noexcept;
123 
124 protected:
125  void onDisplay() override;
126  bool onMouse(const MouseEvent&) override;
127  bool onMotion(const MotionEvent&) override;
128  bool onScroll(const ScrollEvent&) override;
129 
130 private:
131  Image fImage;
132  float fMinimum;
133  float fMaximum;
134  float fStep;
135  float fValue;
136  float fValueDef;
137  float fValueTmp;
138  bool fUsingDefault;
139  bool fUsingLog;
140  Orientation fOrientation;
141 
142  int fRotationAngle;
143  bool fDragging;
144  int fLastX;
145  int fLastY;
146 
147  Callback* fCallback;
148 
149  bool fIsImgVertical;
150  uint fImgLayerWidth;
151  uint fImgLayerHeight;
152  uint fImgLayerCount;
153  bool fIsReady;
154  GLuint fTextureId;
155 
156  float _logscale(float value) const;
157  float _invlogscale(float value) const;
158 
159  DISTRHO_LEAK_DETECTOR(ImageKnob)
160 };
161 
162 // -----------------------------------------------------------------------
163 
164 // note set range and step before setting the value
165 
166 class ImageSlider : public Widget
167 {
168 public:
169  class Callback
170  {
171  public:
172  virtual ~Callback() {}
173  virtual void imageSliderDragStarted(ImageSlider* imageSlider) = 0;
174  virtual void imageSliderDragFinished(ImageSlider* imageSlider) = 0;
175  virtual void imageSliderValueChanged(ImageSlider* imageSlider, float value) = 0;
176  };
177 
178  explicit ImageSlider(Window& parent, const Image& image) noexcept;
179  explicit ImageSlider(Widget* widget, const Image& image) noexcept;
180 
181  float getValue() const noexcept;
182  void setValue(float value, bool sendCallback = false) noexcept;
183 
184  void setStartPos(const Point<int>& startPos) noexcept;
185  void setStartPos(int x, int y) noexcept;
186  void setEndPos(const Point<int>& endPos) noexcept;
187  void setEndPos(int x, int y) noexcept;
188 
189  void setInverted(bool inverted) noexcept;
190  void setRange(float min, float max) noexcept;
191  void setStep(float step) noexcept;
192 
193  void setCallback(Callback* callback) noexcept;
194 
195 protected:
196  void onDisplay() override;
197  bool onMouse(const MouseEvent&) override;
198  bool onMotion(const MotionEvent&) override;
199 
200 private:
201  Image fImage;
202  float fMinimum;
203  float fMaximum;
204  float fStep;
205  float fValue;
206  float fValueTmp;
207 
208  bool fDragging;
209  bool fInverted;
210  bool fValueIsSet;
211  int fStartedX;
212  int fStartedY;
213 
214  Callback* fCallback;
215 
216  Point<int> fStartPos;
217  Point<int> fEndPos;
218  Rectangle<int> fSliderArea;
219 
220  void _recheckArea() noexcept;
221 
222  // these should not be used
223  void setAbsoluteX(int) const noexcept {}
224  void setAbsoluteY(int) const noexcept {}
225  void setAbsolutePos(int, int) const noexcept {}
226  void setAbsolutePos(const Point<int>&) const noexcept {}
227 
228  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageSlider)
229 };
230 
231 // -----------------------------------------------------------------------
232 
233 class ImageSwitch : public Widget
234 {
235 public:
236  class Callback
237  {
238  public:
239  virtual ~Callback() {}
240  virtual void imageSwitchClicked(ImageSwitch* imageButton, bool down) = 0;
241  };
242 
243  explicit ImageSwitch(Window& parent, const Image& imageNormal, const Image& imageDown) noexcept;
244  explicit ImageSwitch(Widget* widget, const Image& imageNormal, const Image& imageDown) noexcept;
245  explicit ImageSwitch(const ImageSwitch& imageSwitch) noexcept;
246  ImageSwitch& operator=(const ImageSwitch& imageSwitch) noexcept;
247 
248  bool isDown() const noexcept;
249  void setDown(bool down) noexcept;
250 
251  void setCallback(Callback* callback) noexcept;
252 
253 protected:
254  void onDisplay() override;
255  bool onMouse(const MouseEvent&) override;
256 
257 private:
258  Image fImageNormal;
259  Image fImageDown;
260  bool fIsDown;
261 
262  Callback* fCallback;
263 
264  DISTRHO_LEAK_DETECTOR(ImageSwitch)
265 };
266 
267 // -----------------------------------------------------------------------
268 
269 END_NAMESPACE_DGL
270 
271 #endif // DGL_IMAGE_WIDGETS_HPP_INCLUDED
Definition: ImageWidgets.hpp:28
+
virtual bool onScroll(const ScrollEvent &)
Definition: Window.hpp:34
-
bool onMouse(const MouseEvent &) override
-
void onDisplay() override
Definition: ImageWidgets.hpp:169
-
Definition: Geometry.hpp:40
+
Definition: ImageWidgets.hpp:51
Definition: Widget.hpp:83
void setAbsolutePos(int x, int y) noexcept
void setAbsoluteX(int x) noexcept
Definition: ImageWidgets.hpp:95
-
Definition: Geometry.hpp:30
-
bool onMouse(const MouseEvent &) override
+
bool onKeyboard(const KeyboardEvent &) override
Definition: Widget.hpp:136
void setAbsoluteY(int y) noexcept
-
bool onMotion(const MotionEvent &) override
void onDisplay() override
+
virtual bool onMotion(const MotionEvent &)
Definition: Widget.hpp:59
Definition: Widget.hpp:118
bool onMouse(const MouseEvent &) override
Definition: Image.hpp:38
-
bool onScroll(const ScrollEvent &) override
Definition: ImageWidgets.hpp:87
-
bool onMotion(const MotionEvent &) override
Definition: Widget.hpp:151
Definition: ImageWidgets.hpp:54
Definition: ImageWidgets.hpp:236
@@ -392,9 +95,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/Image_8hpp_source.html b/Image_8hpp_source.html index 67998578..23f48da6 100644 --- a/Image_8hpp_source.html +++ b/Image_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/Image.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,154 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Image.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_IMAGE_HPP_INCLUDED
-
18 #define DGL_IMAGE_HPP_INCLUDED
-
19 
-
20 #include "Geometry.hpp"
-
21 
-
22 START_NAMESPACE_DGL
-
23 
-
24 // -----------------------------------------------------------------------
-
25 
-
26 /**
-
27  Base DGL Image class.
-
28 
-
29  This is an Image class that handles raw image data in pixels.
-
30  You can init the image data on the contructor or later on by calling loadFromMemory().
-
31 
-
32  To generate raw data useful for this class see the utils/png2rgba.py script.
-
33  Be careful when using a PNG without alpha channel, for those the format is 'GL_BGR'
-
34  instead of the default 'GL_BGRA'.
-
35 
-
36  Images are drawn on screen via 2D textures.
-
37  */
-
38 class Image
-
39 {
-
40 public:
-
41  /**
-
42  Constructor for a null Image.
-
43  */
-
44  Image();
-
45 
-
46  /**
-
47  Constructor using raw image data.
-
48  @note @a rawData must remain valid for the lifetime of this Image.
-
49  */
-
50  Image(const char* const rawData, const uint width, const uint height, const GLenum format = GL_BGRA, const GLenum type = GL_UNSIGNED_BYTE);
-
51 
-
52  /**
-
53  Constructor using raw image data.
-
54  @note @a rawData must remain valid for the lifetime of this Image.
-
55  */
-
56  Image(const char* const rawData, const Size<uint>& size, const GLenum format = GL_BGRA, const GLenum type = GL_UNSIGNED_BYTE);
-
57 
-
58  /**
-
59  Constructor using another image data.
-
60  */
-
61  Image(const Image& image);
-
62 
-
63  /**
-
64  Destructor.
-
65  */
-
66  ~Image();
-
67 
-
68  /**
-
69  Load image data from memory.
-
70  @note @a rawData must remain valid for the lifetime of this Image.
-
71  */
-
72  void loadFromMemory(const char* const rawData, const uint width, const uint height, const GLenum format = GL_BGRA, const GLenum type = GL_UNSIGNED_BYTE) noexcept;
-
73 
-
74  /**
-
75  Load image data from memory.
-
76  @note @a rawData must remain valid for the lifetime of this Image.
-
77  */
-
78  void loadFromMemory(const char* const rawData, const Size<uint>& size, const GLenum format = GL_BGRA, const GLenum type = GL_UNSIGNED_BYTE) noexcept;
-
79 
-
80  /**
-
81  Check if this image is valid.
-
82  */
-
83  bool isValid() const noexcept;
-
84 
-
85  /**
-
86  Get width.
-
87  */
-
88  uint getWidth() const noexcept;
-
89 
-
90  /**
-
91  Get height.
-
92  */
-
93  uint getHeight() const noexcept;
-
94 
-
95  /**
-
96  Get size.
-
97  */
-
98  const Size<uint>& getSize() const noexcept;
-
99 
-
100  /**
-
101  Get the raw image data.
-
102  */
-
103  const char* getRawData() const noexcept;
-
104 
-
105  /**
-
106  Get the image format.
-
107  */
-
108  GLenum getFormat() const noexcept;
-
109 
-
110  /**
-
111  Get the image type.
-
112  */
-
113  GLenum getType() const noexcept;
-
114 
-
115  /**
-
116  Draw this image at (0, 0) point.
-
117  */
-
118  void draw();
-
119 
-
120  /**
-
121  Draw this image at (x, y) point.
-
122  */
-
123  void drawAt(const int x, const int y);
-
124 
-
125  /**
-
126  Draw this image at position @a pos.
-
127  */
-
128  void drawAt(const Point<int>& pos);
-
129 
-
130  Image& operator=(const Image& image) noexcept;
-
131  bool operator==(const Image& image) const noexcept;
-
132  bool operator!=(const Image& image) const noexcept;
-
133 
-
134 private:
-
135  const char* fRawData;
-
136  Size<uint> fSize;
-
137  GLenum fFormat;
-
138  GLenum fType;
-
139  GLuint fTextureId;
-
140  bool fIsReady;
-
141 };
-
142 
-
143 // -----------------------------------------------------------------------
-
144 
-
145 END_NAMESPACE_DGL
-
146 
-
147 #endif // DGL_IMAGE_HPP_INCLUDED
-
GLenum getType() const noexcept
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_IMAGE_HPP_INCLUDED
18 #define DGL_IMAGE_HPP_INCLUDED
19 
20 #include "Geometry.hpp"
21 
22 START_NAMESPACE_DGL
23 
24 // -----------------------------------------------------------------------
25 
26 /**
27  Base DGL Image class.
28 
29  This is an Image class that handles raw image data in pixels.
30  You can init the image data on the contructor or later on by calling loadFromMemory().
31 
32  To generate raw data useful for this class see the utils/png2rgba.py script.
33  Be careful when using a PNG without alpha channel, for those the format is 'GL_BGR'
34  instead of the default 'GL_BGRA'.
35 
36  Images are drawn on screen via 2D textures.
37  */
38 class Image
39 {
40 public:
41  /**
42  Constructor for a null Image.
43  */
44  Image();
45 
46  /**
47  Constructor using raw image data.
48  @note @a rawData must remain valid for the lifetime of this Image.
49  */
50  Image(const char* const rawData, const uint width, const uint height, const GLenum format = GL_BGRA, const GLenum type = GL_UNSIGNED_BYTE);
51 
52  /**
53  Constructor using raw image data.
54  @note @a rawData must remain valid for the lifetime of this Image.
55  */
56  Image(const char* const rawData, const Size<uint>& size, const GLenum format = GL_BGRA, const GLenum type = GL_UNSIGNED_BYTE);
57 
58  /**
59  Constructor using another image data.
60  */
61  Image(const Image& image);
62 
63  /**
64  Destructor.
65  */
66  ~Image();
67 
68  /**
69  Load image data from memory.
70  @note @a rawData must remain valid for the lifetime of this Image.
71  */
72  void loadFromMemory(const char* const rawData, const uint width, const uint height, const GLenum format = GL_BGRA, const GLenum type = GL_UNSIGNED_BYTE) noexcept;
73 
74  /**
75  Load image data from memory.
76  @note @a rawData must remain valid for the lifetime of this Image.
77  */
78  void loadFromMemory(const char* const rawData, const Size<uint>& size, const GLenum format = GL_BGRA, const GLenum type = GL_UNSIGNED_BYTE) noexcept;
79 
80  /**
81  Check if this image is valid.
82  */
83  bool isValid() const noexcept;
84 
85  /**
86  Get width.
87  */
88  uint getWidth() const noexcept;
89 
90  /**
91  Get height.
92  */
93  uint getHeight() const noexcept;
94 
95  /**
96  Get size.
97  */
98  const Size<uint>& getSize() const noexcept;
99 
100  /**
101  Get the raw image data.
102  */
103  const char* getRawData() const noexcept;
104 
105  /**
106  Get the image format.
107  */
108  GLenum getFormat() const noexcept;
109 
110  /**
111  Get the image type.
112  */
113  GLenum getType() const noexcept;
114 
115  /**
116  Draw this image at (0, 0) point.
117  */
118  void draw();
119 
120  /**
121  Draw this image at (x, y) point.
122  */
123  void drawAt(const int x, const int y);
124 
125  /**
126  Draw this image at position @a pos.
127  */
128  void drawAt(const Point<int>& pos);
129 
130  Image& operator=(const Image& image) noexcept;
131  bool operator==(const Image& image) const noexcept;
132  bool operator!=(const Image& image) const noexcept;
133 
134 private:
135  const char* fRawData;
136  Size<uint> fSize;
137  GLenum fFormat;
138  GLenum fType;
139  GLuint fTextureId;
140  bool fIsReady;
141 };
142 
143 // -----------------------------------------------------------------------
144 
145 END_NAMESPACE_DGL
146 
147 #endif // DGL_IMAGE_HPP_INCLUDED
GLenum getType() const noexcept
@@ -252,9 +84,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/LeakDetector_8hpp_source.html b/LeakDetector_8hpp_source.html index 5472d74d..3df5de02 100644 --- a/LeakDetector_8hpp_source.html +++ b/LeakDetector_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra/LeakDetector.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,162 +66,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
LeakDetector.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_LEAK_DETECTOR_HPP_INCLUDED
-
18 #define DISTRHO_LEAK_DETECTOR_HPP_INCLUDED
-
19 
-
20 #include "../DistrhoUtils.hpp"
-
21 
-
22 START_NAMESPACE_DISTRHO
-
23 
-
24 // -----------------------------------------------------------------------
-
25 // The following code was based from juce-core LeakDetector class
-
26 // Copyright (C) 2013 Raw Material Software Ltd.
-
27 
-
28 /** A good old-fashioned C macro concatenation helper.
-
29  This combines two items (which may themselves be macros) into a single string,
-
30  avoiding the pitfalls of the ## macro operator.
-
31 */
-
32 #define DISTRHO_JOIN_MACRO_HELPER(a, b) a ## b
-
33 #define DISTRHO_JOIN_MACRO(item1, item2) DISTRHO_JOIN_MACRO_HELPER(item1, item2)
-
34 
-
35 #ifdef DEBUG
-
36 /** This macro lets you embed a leak-detecting object inside a class.\n
-
37  To use it, simply declare a DISTRHO_LEAK_DETECTOR(YourClassName) inside a private section
-
38  of the class declaration. E.g.
-
39  \code
-
40  class MyClass
-
41  {
-
42  public:
-
43  MyClass();
-
44  void blahBlah();
-
45 
-
46  private:
-
47  DISTRHO_LEAK_DETECTOR(MyClass)
-
48  };
-
49  \endcode
-
50 */
-
51 # define DISTRHO_LEAK_DETECTOR(ClassName) \
-
52  friend class DISTRHO_NAMESPACE::LeakedObjectDetector<ClassName>; \
-
53  static const char* getLeakedObjectClassName() noexcept { return #ClassName; } \
-
54  DISTRHO_NAMESPACE::LeakedObjectDetector<ClassName> DISTRHO_JOIN_MACRO(leakDetector_, ClassName);
-
55 
-
56 # define DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \
-
57  DISTRHO_DECLARE_NON_COPY_CLASS(ClassName) \
-
58  DISTRHO_LEAK_DETECTOR(ClassName)
-
59 #else
-
60 /** Don't use leak detection on release builds. */
-
61 # define DISTRHO_LEAK_DETECTOR(ClassName)
-
62 # define DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \
-
63  DISTRHO_DECLARE_NON_COPY_CLASS(ClassName)
-
64 #endif
-
65 
-
66 //==============================================================================
-
67 /**
-
68  Embedding an instance of this class inside another class can be used as a low-overhead
-
69  way of detecting leaked instances.
-
70 
-
71  This class keeps an internal static count of the number of instances that are
-
72  active, so that when the app is shutdown and the static destructors are called,
-
73  it can check whether there are any left-over instances that may have been leaked.
-
74 
-
75  To use it, use the DISTRHO_LEAK_DETECTOR macro as a simple way to put one in your
-
76  class declaration.
-
77 */
-
78 template<class OwnerClass>
- -
80 {
-
81 public:
-
82  //==============================================================================
-
83  LeakedObjectDetector() noexcept { ++(getCounter().numObjects); }
-
84  LeakedObjectDetector(const LeakedObjectDetector&) noexcept { ++(getCounter().numObjects); }
-
85 
- -
87  {
-
88  if (--(getCounter().numObjects) < 0)
-
89  {
-
90  /** If you hit this, then you've managed to delete more instances of this class than you've
-
91  created.. That indicates that you're deleting some dangling pointers.
-
92 
-
93  Note that although this assertion will have been triggered during a destructor, it might
-
94  not be this particular deletion that's at fault - the incorrect one may have happened
-
95  at an earlier point in the program, and simply not been detected until now.
-
96 
-
97  Most errors like this are caused by using old-fashioned, non-RAII techniques for
-
98  your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,
-
99  ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
-
100  */
-
101  d_stderr2("*** Dangling pointer deletion! Class: '%s', Count: %i", getLeakedObjectClassName(), getCounter().numObjects);
-
102  }
-
103  }
-
104 
-
105 private:
-
106  //==============================================================================
-
107  class LeakCounter
-
108  {
-
109  public:
-
110  LeakCounter() noexcept
-
111  : numObjects(0) {}
-
112 
-
113  ~LeakCounter() noexcept
-
114  {
-
115  if (numObjects > 0)
-
116  {
-
117  /** If you hit this, then you've leaked one or more objects of the type specified by
-
118  the 'OwnerClass' template parameter - the name should have been printed by the line above.
-
119 
-
120  If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for
-
121  your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,
-
122  ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
-
123  */
-
124  d_stderr2("*** Leaked objects detected: %i instance(s) of class '%s'", numObjects, getLeakedObjectClassName());
-
125  }
-
126  }
-
127 
-
128  // this should be an atomic...
-
129  volatile int numObjects;
-
130  };
-
131 
-
132  static const char* getLeakedObjectClassName() noexcept
-
133  {
-
134  return OwnerClass::getLeakedObjectClassName();
-
135  }
-
136 
-
137  static LeakCounter& getCounter() noexcept
-
138  {
-
139  static LeakCounter counter;
-
140  return counter;
-
141  }
-
142 };
-
143 
-
144 // -----------------------------------------------------------------------
-
145 
-
146 END_NAMESPACE_DISTRHO
-
147 
-
148 #endif // DISTRHO_LEAK_DETECTOR_HPP_INCLUDED
-
Definition: LeakDetector.hpp:79
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_LEAK_DETECTOR_HPP_INCLUDED
18 #define DISTRHO_LEAK_DETECTOR_HPP_INCLUDED
19 
20 #include "../DistrhoUtils.hpp"
21 
22 START_NAMESPACE_DISTRHO
23 
24 // -----------------------------------------------------------------------
25 // The following code was based from juce-core LeakDetector class
26 // Copyright (C) 2013 Raw Material Software Ltd.
27 
28 /** A good old-fashioned C macro concatenation helper.
29  This combines two items (which may themselves be macros) into a single string,
30  avoiding the pitfalls of the ## macro operator.
31 */
32 #define DISTRHO_JOIN_MACRO_HELPER(a, b) a ## b
33 #define DISTRHO_JOIN_MACRO(item1, item2) DISTRHO_JOIN_MACRO_HELPER(item1, item2)
34 
35 #ifdef DEBUG
36 /** This macro lets you embed a leak-detecting object inside a class.\n
37  To use it, simply declare a DISTRHO_LEAK_DETECTOR(YourClassName) inside a private section
38  of the class declaration. E.g.
39  \code
40  class MyClass
41  {
42  public:
43  MyClass();
44  void blahBlah();
45 
46  private:
47  DISTRHO_LEAK_DETECTOR(MyClass)
48  };
49  \endcode
50 */
51 # define DISTRHO_LEAK_DETECTOR(ClassName) \
52  friend class DISTRHO_NAMESPACE::LeakedObjectDetector<ClassName>; \
53  static const char* getLeakedObjectClassName() noexcept { return #ClassName; } \
54  DISTRHO_NAMESPACE::LeakedObjectDetector<ClassName> DISTRHO_JOIN_MACRO(leakDetector_, ClassName);
55 
56 # define DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \
57  DISTRHO_DECLARE_NON_COPY_CLASS(ClassName) \
58  DISTRHO_LEAK_DETECTOR(ClassName)
59 #else
60 /** Don't use leak detection on release builds. */
61 # define DISTRHO_LEAK_DETECTOR(ClassName)
62 # define DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \
63  DISTRHO_DECLARE_NON_COPY_CLASS(ClassName)
64 #endif
65 
66 //==============================================================================
67 /**
68  Embedding an instance of this class inside another class can be used as a low-overhead
69  way of detecting leaked instances.
70 
71  This class keeps an internal static count of the number of instances that are
72  active, so that when the app is shutdown and the static destructors are called,
73  it can check whether there are any left-over instances that may have been leaked.
74 
75  To use it, use the DISTRHO_LEAK_DETECTOR macro as a simple way to put one in your
76  class declaration.
77 */
78 template<class OwnerClass>
80 {
81 public:
82  //==============================================================================
83  LeakedObjectDetector() noexcept { ++(getCounter().numObjects); }
84  LeakedObjectDetector(const LeakedObjectDetector&) noexcept { ++(getCounter().numObjects); }
85 
87  {
88  if (--(getCounter().numObjects) < 0)
89  {
90  /** If you hit this, then you've managed to delete more instances of this class than you've
91  created.. That indicates that you're deleting some dangling pointers.
92 
93  Note that although this assertion will have been triggered during a destructor, it might
94  not be this particular deletion that's at fault - the incorrect one may have happened
95  at an earlier point in the program, and simply not been detected until now.
96 
97  Most errors like this are caused by using old-fashioned, non-RAII techniques for
98  your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,
99  ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
100  */
101  d_stderr2("*** Dangling pointer deletion! Class: '%s', Count: %i", getLeakedObjectClassName(), getCounter().numObjects);
102  }
103  }
104 
105 private:
106  //==============================================================================
107  class LeakCounter
108  {
109  public:
110  LeakCounter() noexcept
111  : numObjects(0) {}
112 
113  ~LeakCounter() noexcept
114  {
115  if (numObjects > 0)
116  {
117  /** If you hit this, then you've leaked one or more objects of the type specified by
118  the 'OwnerClass' template parameter - the name should have been printed by the line above.
119 
120  If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for
121  your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,
122  ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
123  */
124  d_stderr2("*** Leaked objects detected: %i instance(s) of class '%s'", numObjects, getLeakedObjectClassName());
125  }
126  }
127 
128  // this should be an atomic...
129  volatile int numObjects;
130  };
131 
132  static const char* getLeakedObjectClassName() noexcept
133  {
134  return OwnerClass::getLeakedObjectClassName();
135  }
136 
137  static LeakCounter& getCounter() noexcept
138  {
139  static LeakCounter counter;
140  return counter;
141  }
142 };
143 
144 // -----------------------------------------------------------------------
145 
146 END_NAMESPACE_DISTRHO
147 
148 #endif // DISTRHO_LEAK_DETECTOR_HPP_INCLUDED
Definition: LeakDetector.hpp:79
~LeakedObjectDetector() noexcept
Definition: LeakDetector.hpp:86
diff --git a/Mutex_8hpp_source.html b/Mutex_8hpp_source.html index 523c1a9e..7c13b4ac 100644 --- a/Mutex_8hpp_source.html +++ b/Mutex_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra/Mutex.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,370 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Mutex.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_MUTEX_HPP_INCLUDED
-
18 #define DISTRHO_MUTEX_HPP_INCLUDED
-
19 
-
20 #include "../DistrhoUtils.hpp"
-
21 
-
22 #ifdef DISTRHO_OS_WINDOWS
-
23 # include <winsock2.h>
-
24 # include <windows.h>
-
25 #endif
-
26 
-
27 #include <pthread.h>
-
28 
-
29 START_NAMESPACE_DISTRHO
-
30 
-
31 class Signal;
-
32 
-
33 // -----------------------------------------------------------------------
-
34 // Mutex class
-
35 
-
36 class Mutex
-
37 {
-
38 public:
-
39  /*
-
40  * Constructor.
-
41  */
-
42  Mutex(bool inheritPriority = true) noexcept
-
43  : fMutex()
-
44  {
-
45  pthread_mutexattr_t attr;
-
46  pthread_mutexattr_init(&attr);
-
47  pthread_mutexattr_setprotocol(&attr, inheritPriority ? PTHREAD_PRIO_INHERIT : PTHREAD_PRIO_NONE);
-
48  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
-
49  pthread_mutex_init(&fMutex, &attr);
-
50  pthread_mutexattr_destroy(&attr);
-
51  }
-
52 
-
53  /*
-
54  * Destructor.
-
55  */
-
56  ~Mutex() noexcept
-
57  {
-
58  pthread_mutex_destroy(&fMutex);
-
59  }
-
60 
-
61  /*
-
62  * Lock the mutex.
-
63  */
-
64  void lock() const noexcept
-
65  {
-
66  pthread_mutex_lock(&fMutex);
-
67  }
-
68 
-
69  /*
-
70  * Try to lock the mutex.
-
71  * Returns true if successful.
-
72  */
-
73  bool tryLock() const noexcept
-
74  {
-
75  return (pthread_mutex_trylock(&fMutex) == 0);
-
76  }
-
77 
-
78  /*
-
79  * Unlock the mutex.
-
80  */
-
81  void unlock() const noexcept
-
82  {
-
83  pthread_mutex_unlock(&fMutex);
-
84  }
-
85 
-
86 private:
-
87  mutable pthread_mutex_t fMutex;
-
88 
-
89  DISTRHO_PREVENT_HEAP_ALLOCATION
-
90  DISTRHO_DECLARE_NON_COPY_CLASS(Mutex)
-
91 };
-
92 
-
93 // -----------------------------------------------------------------------
-
94 // RecursiveMutex class
-
95 
- -
97 {
-
98 public:
-
99  /*
-
100  * Constructor.
-
101  */
-
102  RecursiveMutex() noexcept
-
103 #ifdef DISTRHO_OS_WINDOWS
-
104  : fSection()
-
105 #else
-
106  : fMutex()
-
107 #endif
-
108  {
-
109 #ifdef DISTRHO_OS_WINDOWS
-
110  InitializeCriticalSection(&fSection);
-
111 #else
-
112  pthread_mutexattr_t attr;
-
113  pthread_mutexattr_init(&attr);
-
114  pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
-
115  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-
116  pthread_mutex_init(&fMutex, &attr);
-
117  pthread_mutexattr_destroy(&attr);
-
118 #endif
-
119  }
-
120 
-
121  /*
-
122  * Destructor.
-
123  */
-
124  ~RecursiveMutex() noexcept
-
125  {
-
126 #ifdef DISTRHO_OS_WINDOWS
-
127  DeleteCriticalSection(&fSection);
-
128 #else
-
129  pthread_mutex_destroy(&fMutex);
-
130 #endif
-
131  }
-
132 
-
133  /*
-
134  * Lock the mutex.
-
135  */
-
136  void lock() const noexcept
-
137  {
-
138 #ifdef DISTRHO_OS_WINDOWS
-
139  EnterCriticalSection(&fSection);
-
140 #else
-
141  pthread_mutex_lock(&fMutex);
-
142 #endif
-
143  }
-
144 
-
145  /*
-
146  * Try to lock the mutex.
-
147  * Returns true if successful.
-
148  */
-
149  bool tryLock() const noexcept
-
150  {
-
151 #ifdef DISTRHO_OS_WINDOWS
-
152  return (TryEnterCriticalSection(&fSection) != FALSE);
-
153 #else
-
154  return (pthread_mutex_trylock(&fMutex) == 0);
-
155 #endif
-
156  }
-
157 
-
158  /*
-
159  * Unlock the mutex.
-
160  */
-
161  void unlock() const noexcept
-
162  {
-
163 #ifdef DISTRHO_OS_WINDOWS
-
164  LeaveCriticalSection(&fSection);
-
165 #else
-
166  pthread_mutex_unlock(&fMutex);
-
167 #endif
-
168  }
-
169 
-
170 private:
-
171 #ifdef DISTRHO_OS_WINDOWS
-
172  mutable CRITICAL_SECTION fSection;
-
173 #else
-
174  mutable pthread_mutex_t fMutex;
-
175 #endif
-
176 
-
177  DISTRHO_PREVENT_HEAP_ALLOCATION
-
178  DISTRHO_DECLARE_NON_COPY_CLASS(RecursiveMutex)
-
179 };
-
180 
-
181 // -----------------------------------------------------------------------
-
182 // Signal class
-
183 
-
184 class Signal
-
185 {
-
186 public:
-
187  /*
-
188  * Constructor.
-
189  */
-
190  Signal() noexcept
-
191  : fCondition(),
-
192  fMutex(),
-
193  fTriggered(false)
-
194  {
-
195  pthread_condattr_t cattr;
-
196  pthread_condattr_init(&cattr);
-
197  pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_PRIVATE);
-
198  pthread_cond_init(&fCondition, &cattr);
-
199  pthread_condattr_destroy(&cattr);
-
200 
-
201  pthread_mutexattr_t mattr;
-
202  pthread_mutexattr_init(&mattr);
-
203  pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT);
-
204  pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_NORMAL);
-
205  pthread_mutex_init(&fMutex, &mattr);
-
206  pthread_mutexattr_destroy(&mattr);
-
207  }
-
208 
-
209  /*
-
210  * Destructor.
-
211  */
-
212  ~Signal() noexcept
-
213  {
-
214  pthread_cond_destroy(&fCondition);
-
215  pthread_mutex_destroy(&fMutex);
-
216  }
-
217 
-
218  /*
-
219  * Wait for a signal.
-
220  */
-
221  void wait() noexcept
-
222  {
-
223  pthread_mutex_lock(&fMutex);
-
224 
-
225  while (! fTriggered)
-
226  {
-
227  try {
-
228  pthread_cond_wait(&fCondition, &fMutex);
-
229  } DISTRHO_SAFE_EXCEPTION("pthread_cond_wait");
-
230  }
-
231 
-
232  fTriggered = false;
-
233 
-
234  pthread_mutex_unlock(&fMutex);
-
235  }
-
236 
-
237  /*
-
238  * Wake up all waiting threads.
-
239  */
-
240  void signal() noexcept
-
241  {
-
242  pthread_mutex_lock(&fMutex);
-
243 
-
244  if (! fTriggered)
-
245  {
-
246  fTriggered = true;
-
247  pthread_cond_broadcast(&fCondition);
-
248  }
-
249 
-
250  pthread_mutex_unlock(&fMutex);
-
251  }
-
252 
-
253 private:
-
254  pthread_cond_t fCondition;
-
255  pthread_mutex_t fMutex;
-
256  volatile bool fTriggered;
-
257 
-
258  DISTRHO_PREVENT_HEAP_ALLOCATION
-
259  DISTRHO_DECLARE_NON_COPY_CLASS(Signal)
-
260 };
-
261 
-
262 // -----------------------------------------------------------------------
-
263 // Helper class to lock&unlock a mutex during a function scope.
-
264 
-
265 template <class Mutex>
- -
267 {
-
268 public:
-
269  ScopeLocker(const Mutex& mutex) noexcept
-
270  : fMutex(mutex)
-
271  {
-
272  fMutex.lock();
-
273  }
-
274 
-
275  ~ScopeLocker() noexcept
-
276  {
-
277  fMutex.unlock();
-
278  }
-
279 
-
280 private:
-
281  const Mutex& fMutex;
-
282 
-
283  DISTRHO_PREVENT_HEAP_ALLOCATION
-
284  DISTRHO_DECLARE_NON_COPY_CLASS(ScopeLocker)
-
285 };
-
286 
-
287 // -----------------------------------------------------------------------
-
288 // Helper class to try-lock&unlock a mutex during a function scope.
-
289 
-
290 template <class Mutex>
- -
292 {
-
293 public:
-
294  ScopeTryLocker(const Mutex& mutex) noexcept
-
295  : fMutex(mutex),
-
296  fLocked(mutex.tryLock()) {}
-
297 
-
298  ~ScopeTryLocker() noexcept
-
299  {
-
300  if (fLocked)
-
301  fMutex.unlock();
-
302  }
-
303 
-
304  bool wasLocked() const noexcept
-
305  {
-
306  return fLocked;
-
307  }
-
308 
-
309  bool wasNotLocked() const noexcept
-
310  {
-
311  return !fLocked;
-
312  }
-
313 
-
314 private:
-
315  const Mutex& fMutex;
-
316  const bool fLocked;
-
317 
-
318  DISTRHO_PREVENT_HEAP_ALLOCATION
-
319  DISTRHO_DECLARE_NON_COPY_CLASS(ScopeTryLocker)
-
320 };
-
321 
-
322 // -----------------------------------------------------------------------
-
323 // Helper class to unlock&lock a mutex during a function scope.
-
324 
-
325 template <class Mutex>
- -
327 {
-
328 public:
-
329  ScopeUnlocker(const Mutex& mutex) noexcept
-
330  : fMutex(mutex)
-
331  {
-
332  fMutex.unlock();
-
333  }
-
334 
-
335  ~ScopeUnlocker() noexcept
-
336  {
-
337  fMutex.lock();
-
338  }
-
339 
-
340 private:
-
341  const Mutex& fMutex;
-
342 
-
343  DISTRHO_PREVENT_HEAP_ALLOCATION
-
344  DISTRHO_DECLARE_NON_COPY_CLASS(ScopeUnlocker)
-
345 };
-
346 
-
347 // -----------------------------------------------------------------------
-
348 // Define types
-
349 
- - -
352 
- - -
355 
- - -
358 
-
359 // -----------------------------------------------------------------------
-
360 
-
361 END_NAMESPACE_DISTRHO
-
362 
-
363 #endif // DISTRHO_MUTEX_HPP_INCLUDED
-
Definition: Mutex.hpp:96
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_MUTEX_HPP_INCLUDED
18 #define DISTRHO_MUTEX_HPP_INCLUDED
19 
20 #include "../DistrhoUtils.hpp"
21 
22 #ifdef DISTRHO_OS_WINDOWS
23 # include <winsock2.h>
24 # include <windows.h>
25 #endif
26 
27 #include <pthread.h>
28 
29 START_NAMESPACE_DISTRHO
30 
31 class Signal;
32 
33 // -----------------------------------------------------------------------
34 // Mutex class
35 
36 class Mutex
37 {
38 public:
39  /*
40  * Constructor.
41  */
42  Mutex(bool inheritPriority = true) noexcept
43  : fMutex()
44  {
45  pthread_mutexattr_t attr;
46  pthread_mutexattr_init(&attr);
47  pthread_mutexattr_setprotocol(&attr, inheritPriority ? PTHREAD_PRIO_INHERIT : PTHREAD_PRIO_NONE);
48  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
49  pthread_mutex_init(&fMutex, &attr);
50  pthread_mutexattr_destroy(&attr);
51  }
52 
53  /*
54  * Destructor.
55  */
56  ~Mutex() noexcept
57  {
58  pthread_mutex_destroy(&fMutex);
59  }
60 
61  /*
62  * Lock the mutex.
63  */
64  void lock() const noexcept
65  {
66  pthread_mutex_lock(&fMutex);
67  }
68 
69  /*
70  * Try to lock the mutex.
71  * Returns true if successful.
72  */
73  bool tryLock() const noexcept
74  {
75  return (pthread_mutex_trylock(&fMutex) == 0);
76  }
77 
78  /*
79  * Unlock the mutex.
80  */
81  void unlock() const noexcept
82  {
83  pthread_mutex_unlock(&fMutex);
84  }
85 
86 private:
87  mutable pthread_mutex_t fMutex;
88 
89  DISTRHO_PREVENT_HEAP_ALLOCATION
90  DISTRHO_DECLARE_NON_COPY_CLASS(Mutex)
91 };
92 
93 // -----------------------------------------------------------------------
94 // RecursiveMutex class
95 
97 {
98 public:
99  /*
100  * Constructor.
101  */
102  RecursiveMutex() noexcept
103 #ifdef DISTRHO_OS_WINDOWS
104  : fSection()
105 #else
106  : fMutex()
107 #endif
108  {
109 #ifdef DISTRHO_OS_WINDOWS
110  InitializeCriticalSection(&fSection);
111 #else
112  pthread_mutexattr_t attr;
113  pthread_mutexattr_init(&attr);
114  pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
115  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
116  pthread_mutex_init(&fMutex, &attr);
117  pthread_mutexattr_destroy(&attr);
118 #endif
119  }
120 
121  /*
122  * Destructor.
123  */
124  ~RecursiveMutex() noexcept
125  {
126 #ifdef DISTRHO_OS_WINDOWS
127  DeleteCriticalSection(&fSection);
128 #else
129  pthread_mutex_destroy(&fMutex);
130 #endif
131  }
132 
133  /*
134  * Lock the mutex.
135  */
136  void lock() const noexcept
137  {
138 #ifdef DISTRHO_OS_WINDOWS
139  EnterCriticalSection(&fSection);
140 #else
141  pthread_mutex_lock(&fMutex);
142 #endif
143  }
144 
145  /*
146  * Try to lock the mutex.
147  * Returns true if successful.
148  */
149  bool tryLock() const noexcept
150  {
151 #ifdef DISTRHO_OS_WINDOWS
152  return (TryEnterCriticalSection(&fSection) != FALSE);
153 #else
154  return (pthread_mutex_trylock(&fMutex) == 0);
155 #endif
156  }
157 
158  /*
159  * Unlock the mutex.
160  */
161  void unlock() const noexcept
162  {
163 #ifdef DISTRHO_OS_WINDOWS
164  LeaveCriticalSection(&fSection);
165 #else
166  pthread_mutex_unlock(&fMutex);
167 #endif
168  }
169 
170 private:
171 #ifdef DISTRHO_OS_WINDOWS
172  mutable CRITICAL_SECTION fSection;
173 #else
174  mutable pthread_mutex_t fMutex;
175 #endif
176 
177  DISTRHO_PREVENT_HEAP_ALLOCATION
178  DISTRHO_DECLARE_NON_COPY_CLASS(RecursiveMutex)
179 };
180 
181 // -----------------------------------------------------------------------
182 // Signal class
183 
184 class Signal
185 {
186 public:
187  /*
188  * Constructor.
189  */
190  Signal() noexcept
191  : fCondition(),
192  fMutex(),
193  fTriggered(false)
194  {
195  pthread_condattr_t cattr;
196  pthread_condattr_init(&cattr);
197  pthread_condattr_setpshared(&cattr, PTHREAD_PROCESS_PRIVATE);
198  pthread_cond_init(&fCondition, &cattr);
199  pthread_condattr_destroy(&cattr);
200 
201  pthread_mutexattr_t mattr;
202  pthread_mutexattr_init(&mattr);
203  pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT);
204  pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_NORMAL);
205  pthread_mutex_init(&fMutex, &mattr);
206  pthread_mutexattr_destroy(&mattr);
207  }
208 
209  /*
210  * Destructor.
211  */
212  ~Signal() noexcept
213  {
214  pthread_cond_destroy(&fCondition);
215  pthread_mutex_destroy(&fMutex);
216  }
217 
218  /*
219  * Wait for a signal.
220  */
221  void wait() noexcept
222  {
223  pthread_mutex_lock(&fMutex);
224 
225  while (! fTriggered)
226  {
227  try {
228  pthread_cond_wait(&fCondition, &fMutex);
229  } DISTRHO_SAFE_EXCEPTION("pthread_cond_wait");
230  }
231 
232  fTriggered = false;
233 
234  pthread_mutex_unlock(&fMutex);
235  }
236 
237  /*
238  * Wake up all waiting threads.
239  */
240  void signal() noexcept
241  {
242  pthread_mutex_lock(&fMutex);
243 
244  if (! fTriggered)
245  {
246  fTriggered = true;
247  pthread_cond_broadcast(&fCondition);
248  }
249 
250  pthread_mutex_unlock(&fMutex);
251  }
252 
253 private:
254  pthread_cond_t fCondition;
255  pthread_mutex_t fMutex;
256  volatile bool fTriggered;
257 
258  DISTRHO_PREVENT_HEAP_ALLOCATION
259  DISTRHO_DECLARE_NON_COPY_CLASS(Signal)
260 };
261 
262 // -----------------------------------------------------------------------
263 // Helper class to lock&unlock a mutex during a function scope.
264 
265 template <class Mutex>
267 {
268 public:
269  ScopeLocker(const Mutex& mutex) noexcept
270  : fMutex(mutex)
271  {
272  fMutex.lock();
273  }
274 
275  ~ScopeLocker() noexcept
276  {
277  fMutex.unlock();
278  }
279 
280 private:
281  const Mutex& fMutex;
282 
283  DISTRHO_PREVENT_HEAP_ALLOCATION
284  DISTRHO_DECLARE_NON_COPY_CLASS(ScopeLocker)
285 };
286 
287 // -----------------------------------------------------------------------
288 // Helper class to try-lock&unlock a mutex during a function scope.
289 
290 template <class Mutex>
292 {
293 public:
294  ScopeTryLocker(const Mutex& mutex) noexcept
295  : fMutex(mutex),
296  fLocked(mutex.tryLock()) {}
297 
298  ~ScopeTryLocker() noexcept
299  {
300  if (fLocked)
301  fMutex.unlock();
302  }
303 
304  bool wasLocked() const noexcept
305  {
306  return fLocked;
307  }
308 
309  bool wasNotLocked() const noexcept
310  {
311  return !fLocked;
312  }
313 
314 private:
315  const Mutex& fMutex;
316  const bool fLocked;
317 
318  DISTRHO_PREVENT_HEAP_ALLOCATION
319  DISTRHO_DECLARE_NON_COPY_CLASS(ScopeTryLocker)
320 };
321 
322 // -----------------------------------------------------------------------
323 // Helper class to unlock&lock a mutex during a function scope.
324 
325 template <class Mutex>
327 {
328 public:
329  ScopeUnlocker(const Mutex& mutex) noexcept
330  : fMutex(mutex)
331  {
332  fMutex.unlock();
333  }
334 
335  ~ScopeUnlocker() noexcept
336  {
337  fMutex.lock();
338  }
339 
340 private:
341  const Mutex& fMutex;
342 
343  DISTRHO_PREVENT_HEAP_ALLOCATION
344  DISTRHO_DECLARE_NON_COPY_CLASS(ScopeUnlocker)
345 };
346 
347 // -----------------------------------------------------------------------
348 // Define types
349 
352 
355 
358 
359 // -----------------------------------------------------------------------
360 
361 END_NAMESPACE_DISTRHO
362 
363 #endif // DISTRHO_MUTEX_HPP_INCLUDED
Definition: Mutex.hpp:96
Definition: Mutex.hpp:266
Definition: Mutex.hpp:291
Definition: Mutex.hpp:36
@@ -459,9 +75,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/NanoVG_8hpp_source.html b/NanoVG_8hpp_source.html index f0a20efa..89c160d1 100644 --- a/NanoVG_8hpp_source.html +++ b/NanoVG_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/NanoVG.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,1045 +66,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
NanoVG.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_NANO_WIDGET_HPP_INCLUDED
-
18 #define DGL_NANO_WIDGET_HPP_INCLUDED
-
19 
-
20 #include "Color.hpp"
-
21 #include "Widget.hpp"
-
22 
-
23 #define NANOVG_DEJAVU_SANS_TTF "__dpf_dejavusans_ttf__"
-
24 
-
25 struct NVGcontext;
-
26 struct NVGpaint;
-
27 
-
28 START_NAMESPACE_DGL
-
29 
-
30 // -----------------------------------------------------------------------
-
31 // Forward class names
-
32 
-
33 class BlendishWidget;
-
34 class NanoVG;
-
35 
-
36 // -----------------------------------------------------------------------
-
37 // NanoImage
-
38 
-
39 /**
-
40  NanoVG Image class.
-
41 
-
42  This implements NanoVG images as a C++ class where deletion is handled automatically.
-
43  Images need to be created within a NanoVG or NanoWidget class.
-
44  */
-
45 class NanoImage
-
46 {
-
47 private:
-
48  struct Handle {
-
49  NVGcontext* context;
-
50  int imageId;
-
51 
-
52  Handle() noexcept
-
53  : context(nullptr),
-
54  imageId(0) {}
-
55 
-
56  Handle(NVGcontext* c, int id) noexcept
-
57  : context(c),
-
58  imageId(id) {}
-
59  };
-
60 
-
61 public:
-
62  /**
-
63  Constructor for an invalid/null image.
-
64  */
-
65  NanoImage();
-
66 
-
67  /**
-
68  Constructor.
-
69  */
-
70  NanoImage(const Handle& handle);
-
71 
-
72  /**
-
73  Destructor.
-
74  */
-
75  ~NanoImage();
-
76 
-
77  /**
-
78  Create a new image without recreating the C++ class.
-
79  */
-
80  NanoImage& operator=(const Handle& handle);
-
81 
-
82  /**
-
83  Wherever this image is valid.
-
84  */
-
85  bool isValid() const noexcept;
-
86 
-
87  /**
-
88  Get size.
-
89  */
-
90  Size<uint> getSize() const noexcept;
-
91 
-
92  /**
-
93  Get the OpenGL texture handle.
-
94  */
-
95  GLuint getTextureHandle() const;
-
96 
-
97 private:
-
98  Handle fHandle;
-
99  Size<uint> fSize;
-
100  friend class NanoVG;
-
101 
-
102  /** @internal */
-
103  void _updateSize();
-
104 
-
105  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NanoImage)
-
106 };
-
107 
-
108 // -----------------------------------------------------------------------
-
109 // NanoVG
-
110 
-
111 /**
-
112  NanoVG class.
-
113 
-
114  This class exposes the NanoVG drawing API.
-
115  All calls should be wrapped in beginFrame() and endFrame().
-
116 
-
117  @section State Handling
-
118  NanoVG contains state which represents how paths will be rendered.
-
119  The state contains transform, fill and stroke styles, text and font styles, and scissor clipping.
-
120 
-
121  @section Render styles
-
122  Fill and stroke render style can be either a solid color or a paint which is a gradient or a pattern.
-
123  Solid color is simply defined as a color value, different kinds of paints can be created
-
124  using linearGradient(), boxGradient(), radialGradient() and imagePattern().
-
125 
-
126  Current render style can be saved and restored using save() and restore().
-
127 
-
128  @section Transforms
-
129  The paths, gradients, patterns and scissor region are transformed by an transformation
-
130  matrix at the time when they are passed to the API.
-
131  The current transformation matrix is a affine matrix:
-
132  [sx kx tx]
-
133  [ky sy ty]
-
134  [ 0 0 1]
-
135  Where: sx,sy define scaling, kx,ky skewing, and tx,ty translation.
-
136  The last row is assumed to be 0,0,1 and is not stored.
-
137 
-
138  Apart from resetTransform(), each transformation function first creates
-
139  specific transformation matrix and pre-multiplies the current transformation by it.
-
140 
-
141  Current coordinate system (transformation) can be saved and restored using save() and restore().
-
142 
-
143  @section Images
-
144  NanoVG allows you to load jpg, png, psd, tga, pic and gif files to be used for rendering.
-
145  In addition you can upload your own image. The image loading is provided by stb_image.
-
146 
-
147  @section Paints
-
148  NanoVG supports four types of paints: linear gradient, box gradient, radial gradient and image pattern.
-
149  These can be used as paints for strokes and fills.
-
150 
-
151  @section Scissoring
-
152  Scissoring allows you to clip the rendering into a rectangle. This is useful for various
-
153  user interface cases like rendering a text edit or a timeline.
-
154 
-
155  @section Paths
-
156  Drawing a new shape starts with beginPath(), it clears all the currently defined paths.
-
157  Then you define one or more paths and sub-paths which describe the shape. The are functions
-
158  to draw common shapes like rectangles and circles, and lower level step-by-step functions,
-
159  which allow to define a path curve by curve.
-
160 
-
161  NanoVG uses even-odd fill rule to draw the shapes. Solid shapes should have counter clockwise
-
162  winding and holes should have counter clockwise order. To specify winding of a path you can
-
163  call pathWinding(). This is useful especially for the common shapes, which are drawn CCW.
-
164 
-
165  Finally you can fill the path using current fill style by calling fill(), and stroke it
-
166  with current stroke style by calling stroke().
-
167 
-
168  The curve segments and sub-paths are transformed by the current transform.
-
169 
-
170  @section Text
-
171  NanoVG allows you to load .ttf files and use the font to render text.
-
172 
-
173  The appearance of the text can be defined by setting the current text style
-
174  and by specifying the fill color. Common text and font settings such as
-
175  font size, letter spacing and text align are supported. Font blur allows you
-
176  to create simple text effects such as drop shadows.
-
177 
-
178  At render time the font face can be set based on the font handles or name.
-
179 
-
180  Font measure functions return values in local space, the calculations are
-
181  carried in the same resolution as the final rendering. This is done because
-
182  the text glyph positions are snapped to the nearest pixels sharp rendering.
-
183 
-
184  The local space means that values are not rotated or scale as per the current
-
185  transformation. For example if you set font size to 12, which would mean that
-
186  line height is 16, then regardless of the current scaling and rotation, the
-
187  returned line height is always 16. Some measures may vary because of the scaling
-
188  since aforementioned pixel snapping.
-
189 
-
190  While this may sound a little odd, the setup allows you to always render the
-
191  same way regardless of scaling. i.e. following works regardless of scaling:
-
192 
-
193  @code
-
194  const char* txt = "Text me up.";
-
195  vg.textBounds(x,y, txt, NULL, bounds);
-
196  vg.beginPath();
-
197  vg.roundedRect(bounds[0], bounds[1], bounds[2]-bounds[0], bounds[3]-bounds[1]);
-
198  vg.fill();
-
199  @endcode
-
200 
-
201  Note: currently only solid color fill is supported for text.
-
202  */
-
203 class NanoVG
-
204 {
-
205 public:
-
206  enum CreateFlags {
-
207  /**
-
208  Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).
-
209  */
- -
211 
-
212  /**
-
213  Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little
-
214  slower, but path overlaps (i.e. self-intersecting or sharp turns) will be drawn just once.
-
215  */
- -
217 
-
218  /**
-
219  Flag indicating that additional debug checks are done.
-
220  */
-
221  CREATE_DEBUG = 1 << 2,
-
222  };
-
223 
-
224  enum ImageFlags {
-
225  IMAGE_GENERATE_MIPMAPS = 1 << 0, // Generate mipmaps during creation of the image.
-
226  IMAGE_REPEAT_X = 1 << 1, // Repeat image in X direction.
-
227  IMAGE_REPEAT_Y = 1 << 2, // Repeat image in Y direction.
-
228  IMAGE_FLIP_Y = 1 << 3, // Flips (inverses) image in Y direction when rendered.
-
229  IMAGE_PREMULTIPLIED = 1 << 4 // Image data has premultiplied alpha.
-
230  };
-
231 
-
232  enum Align {
-
233  // Horizontal align
-
234  ALIGN_LEFT = 1 << 0, // Align horizontally to left (default).
-
235  ALIGN_CENTER = 1 << 1, // Align horizontally to center.
-
236  ALIGN_RIGHT = 1 << 2, // Align horizontally to right.
-
237  // Vertical align
-
238  ALIGN_TOP = 1 << 3, // Align vertically to top.
-
239  ALIGN_MIDDLE = 1 << 4, // Align vertically to middle.
-
240  ALIGN_BOTTOM = 1 << 5, // Align vertically to bottom.
-
241  ALIGN_BASELINE = 1 << 6 // Align vertically to baseline (default).
-
242  };
-
243 
-
244  enum LineCap {
-
245  BUTT,
-
246  ROUND,
-
247  SQUARE,
-
248  BEVEL,
-
249  MITER
-
250  };
-
251 
-
252  enum Solidity {
-
253  SOLID = 1, // CCW
-
254  HOLE = 2 // CW
-
255  };
-
256 
-
257  enum Winding {
-
258  CCW = 1, // Winding for solid shapes
-
259  CW = 2 // Winding for holes
-
260  };
-
261 
-
262  struct Paint {
-
263  float xform[6];
-
264  float extent[2];
-
265  float radius;
-
266  float feather;
-
267  Color innerColor;
-
268  Color outerColor;
-
269  int imageId;
-
270 
-
271  Paint() noexcept;
-
272 
-
273  /**
-
274  @internal
-
275  */
-
276  Paint(const NVGpaint&) noexcept;
-
277  operator NVGpaint() const noexcept;
-
278  };
-
279 
-
280  struct GlyphPosition {
-
281  const char* str; // Position of the glyph in the input string.
-
282  float x; // The x-coordinate of the logical glyph position.
-
283  float minx, maxx; // The bounds of the glyph shape.
-
284  };
-
285 
-
286  struct TextRow {
-
287  const char* start; // Pointer to the input text where the row starts.
-
288  const char* end; // Pointer to the input text where the row ends (one past the last character).
-
289  const char* next; // Pointer to the beginning of the next row.
-
290  float width; // Logical width of the row.
-
291  float minx, maxx; // Actual bounds of the row. Logical with and bounds can differ because of kerning and some parts over extending.
-
292  };
-
293 
-
294  typedef int FontId;
-
295 
-
296  /**
-
297  Constructor.
-
298  @see CreateFlags
-
299  */
-
300  NanoVG(int flags = CREATE_ANTIALIAS);
-
301 
-
302  /**
-
303  Constructor reusing a NanoVG context, used for subwidgets.
-
304  */
-
305  NanoVG(NanoWidget* groupWidget);
-
306 
-
307  /**
-
308  Destructor.
-
309  */
-
310  virtual ~NanoVG();
-
311 
-
312  /**
-
313  Get the NanoVG context.
-
314  You should not need this under normal circumstances.
-
315  */
-
316  NVGcontext* getContext() const noexcept
-
317  {
-
318  return fContext;
-
319  }
-
320 
-
321  /**
-
322  Begin drawing a new frame.
-
323  */
-
324  void beginFrame(const uint width, const uint height, const float scaleFactor = 1.0f);
-
325 
-
326  /**
-
327  Begin drawing a new frame inside a widget.
-
328  */
-
329  void beginFrame(Widget* const widget);
-
330 
-
331  /**
-
332  Cancels drawing the current frame.
-
333  */
-
334  void cancelFrame();
-
335 
-
336  /**
-
337  Ends drawing flushing remaining render state.
-
338  */
-
339  void endFrame();
-
340 
-
341  /* --------------------------------------------------------------------
-
342  * State Handling */
-
343 
-
344  /**
-
345  Pushes and saves the current render state into a state stack.
-
346  A matching restore() must be used to restore the state.
-
347  */
-
348  void save();
-
349 
-
350  /**
-
351  Pops and restores current render state.
-
352  */
-
353  void restore();
-
354 
-
355  /**
-
356  Resets current render state to default values. Does not affect the render state stack.
-
357  */
-
358  void reset();
-
359 
-
360  /* --------------------------------------------------------------------
-
361  * Render styles */
-
362 
-
363  /**
-
364  Sets current stroke style to a solid color.
-
365  */
-
366  void strokeColor(const Color& color);
-
367 
-
368  /**
-
369  Sets current stroke style to a solid color, made from red, green, blue and alpha numeric values.
-
370  Values must be in [0..255] range.
-
371  */
-
372  void strokeColor(const int red, const int green, const int blue, const int alpha = 255);
-
373 
-
374  /**
-
375  Sets current stroke style to a solid color, made from red, green, blue and alpha numeric values.
-
376  Values must in [0..1] range.
-
377  */
-
378  void strokeColor(const float red, const float green, const float blue, const float alpha = 1.0f);
-
379 
-
380  /**
-
381  Sets current stroke style to a paint, which can be a one of the gradients or a pattern.
-
382  */
-
383  void strokePaint(const Paint& paint);
-
384 
-
385  /**
-
386  Sets current fill style to a solid color.
-
387  */
-
388  void fillColor(const Color& color);
-
389 
-
390  /**
-
391  Sets current fill style to a solid color, made from red, green, blue and alpha numeric values.
-
392  Values must be in [0..255] range.
-
393  */
-
394  void fillColor(const int red, const int green, const int blue, const int alpha = 255);
-
395 
-
396  /**
-
397  Sets current fill style to a solid color, made from red, green, blue and alpha numeric values.
-
398  Values must in [0..1] range.
-
399  */
-
400  void fillColor(const float red, const float green, const float blue, const float alpha = 1.0f);
-
401 
-
402  /**
-
403  Sets current fill style to a paint, which can be a one of the gradients or a pattern.
-
404  */
-
405  void fillPaint(const Paint& paint);
-
406 
-
407  /**
-
408  Sets the miter limit of the stroke style.
-
409  Miter limit controls when a sharp corner is beveled.
-
410  */
-
411  void miterLimit(float limit);
-
412 
-
413  /**
-
414  Sets the stroke width of the stroke style.
-
415  */
-
416  void strokeWidth(float size);
-
417 
-
418  /**
-
419  Sets how the end of the line (cap) is drawn,
-
420  Can be one of: BUTT, ROUND, SQUARE.
-
421  */
-
422  void lineCap(LineCap cap = BUTT);
-
423 
-
424  /**
-
425  Sets how sharp path corners are drawn.
-
426  Can be one of MITER, ROUND, BEVEL.
-
427  */
-
428  void lineJoin(LineCap join = MITER);
-
429 
-
430  /**
-
431  Sets the transparency applied to all rendered shapes.
-
432  Already transparent paths will get proportionally more transparent as well.
-
433  */
-
434  void globalAlpha(float alpha);
-
435 
-
436  /* --------------------------------------------------------------------
-
437  * Transforms */
-
438 
-
439  /**
-
440  Resets current transform to a identity matrix.
-
441  */
-
442  void resetTransform();
-
443 
-
444  /**
-
445  Pre-multiplies current coordinate system by specified matrix.
-
446  The parameters are interpreted as matrix as follows:
-
447  [a c e]
-
448  [b d f]
-
449  [0 0 1]
-
450  */
-
451  void transform(float a, float b, float c, float d, float e, float f);
-
452 
-
453  /**
-
454  Translates current coordinate system.
-
455  */
-
456  void translate(float x, float y);
-
457 
-
458  /**
-
459  Rotates current coordinate system. Angle is specified in radians.
-
460  */
-
461  void rotate(float angle);
-
462 
-
463  /**
-
464  Skews the current coordinate system along X axis. Angle is specified in radians.
-
465  */
-
466  void skewX(float angle);
-
467 
-
468  /**
-
469  Skews the current coordinate system along Y axis. Angle is specified in radians.
-
470  */
-
471  void skewY(float angle);
-
472 
-
473  /**
-
474  Scales the current coordinate system.
-
475  */
-
476  void scale(float x, float y);
-
477 
-
478  /**
-
479  Stores the top part (a-f) of the current transformation matrix in to the specified buffer.
-
480  [a c e]
-
481  [b d f]
-
482  [0 0 1]
-
483  */
-
484  void currentTransform(float xform[6]);
-
485 
-
486  /**
-
487  The following functions can be used to make calculations on 2x3 transformation matrices.
-
488  A 2x3 matrix is represented as float[6]. */
-
489 
-
490  /**
-
491  Sets the transform to identity matrix.
-
492  */
-
493  static void transformIdentity(float dst[6]);
-
494 
-
495  /**
-
496  Sets the transform to translation matrix
-
497  */
-
498  static void transformTranslate(float dst[6], float tx, float ty);
-
499 
-
500  /**
-
501  Sets the transform to scale matrix.
-
502  */
-
503  static void transformScale(float dst[6], float sx, float sy);
-
504 
-
505  /**
-
506  Sets the transform to rotate matrix. Angle is specified in radians.
-
507  */
-
508  static void transformRotate(float dst[6], float a);
-
509 
-
510  /**
-
511  Sets the transform to skew-x matrix. Angle is specified in radians.
-
512  */
-
513  static void transformSkewX(float dst[6], float a);
-
514 
-
515  /**
-
516  Sets the transform to skew-y matrix. Angle is specified in radians.
-
517  */
-
518  static void transformSkewY(float dst[6], float a);
-
519 
-
520  /**
-
521  Sets the transform to the result of multiplication of two transforms, of A = A*B.
-
522  */
-
523  static void transformMultiply(float dst[6], const float src[6]);
-
524 
-
525  /**
-
526  Sets the transform to the result of multiplication of two transforms, of A = B*A.
-
527  */
-
528  static void transformPremultiply(float dst[6], const float src[6]);
-
529 
-
530  /**
-
531  Sets the destination to inverse of specified transform.
-
532  Returns 1 if the inverse could be calculated, else 0.
-
533  */
-
534  static int transformInverse(float dst[6], const float src[6]);
-
535 
-
536  /**
-
537  Transform a point by given transform.
-
538  */
-
539  static void transformPoint(float& dstx, float& dsty, const float xform[6], float srcx, float srcy);
-
540 
-
541  /**
-
542  Convert degrees to radians.
-
543  */
-
544  static float degToRad(float deg);
-
545 
-
546  /**
-
547  Convert radians to degrees.
-
548  */
-
549  static float radToDeg(float rad);
-
550 
-
551  /* --------------------------------------------------------------------
-
552  * Images */
-
553 
-
554  /**
-
555  Creates image by loading it from the disk from specified file name.
-
556  */
-
557  NanoImage::Handle createImageFromFile(const char* filename, ImageFlags imageFlags);
-
558 
-
559  /**
-
560  Creates image by loading it from the disk from specified file name.
-
561  Overloaded function for convenience.
-
562  @see ImageFlags
-
563  */
-
564  NanoImage::Handle createImageFromFile(const char* filename, int imageFlags);
-
565 
-
566  /**
-
567  Creates image by loading it from the specified chunk of memory.
-
568  */
-
569  NanoImage::Handle createImageFromMemory(uchar* data, uint dataSize, ImageFlags imageFlags);
-
570 
-
571  /**
-
572  Creates image by loading it from the specified chunk of memory.
-
573  Overloaded function for convenience.
-
574  @see ImageFlags
-
575  */
-
576  NanoImage::Handle createImageFromMemory(uchar* data, uint dataSize, int imageFlags);
-
577 
-
578  /**
-
579  Creates image from specified image data.
-
580  */
-
581  NanoImage::Handle createImageFromRGBA(uint w, uint h, const uchar* data, ImageFlags imageFlags);
-
582 
-
583  /**
-
584  Creates image from specified image data.
-
585  Overloaded function for convenience.
-
586  @see ImageFlags
-
587  */
-
588  NanoImage::Handle createImageFromRGBA(uint w, uint h, const uchar* data, int imageFlags);
-
589 
-
590  /**
-
591  Creates image from an OpenGL texture handle.
-
592  */
-
593  NanoImage::Handle createImageFromTextureHandle(GLuint textureId, uint w, uint h, ImageFlags imageFlags, bool deleteTexture = false);
-
594 
-
595  /**
-
596  Creates image from an OpenGL texture handle.
-
597  Overloaded function for convenience.
-
598  @see ImageFlags
-
599  */
-
600  NanoImage::Handle createImageFromTextureHandle(GLuint textureId, uint w, uint h, int imageFlags, bool deleteTexture = false);
-
601 
-
602  /* --------------------------------------------------------------------
-
603  * Paints */
-
604 
-
605  /**
-
606  Creates and returns a linear gradient. Parameters (sx,sy)-(ex,ey) specify the start and end coordinates
-
607  of the linear gradient, icol specifies the start color and ocol the end color.
-
608  The gradient is transformed by the current transform when it is passed to fillPaint() or strokePaint().
-
609  */
-
610  Paint linearGradient(float sx, float sy, float ex, float ey, const Color& icol, const Color& ocol);
-
611 
-
612  /**
-
613  Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering
-
614  drop shadows or highlights for boxes. Parameters (x,y) define the top-left corner of the rectangle,
-
615  (w,h) define the size of the rectangle, r defines the corner radius, and f feather. Feather defines how blurry
-
616  the border of the rectangle is. Parameter icol specifies the inner color and ocol the outer color of the gradient.
-
617  The gradient is transformed by the current transform when it is passed to fillPaint() or strokePaint().
-
618  */
-
619  Paint boxGradient(float x, float y, float w, float h, float r, float f, const Color& icol, const Color& ocol);
-
620 
-
621  /**
-
622  Creates and returns a radial gradient. Parameters (cx,cy) specify the center, inr and outr specify
-
623  the inner and outer radius of the gradient, icol specifies the start color and ocol the end color.
-
624  The gradient is transformed by the current transform when it is passed to fillPaint() or strokePaint().
-
625  */
-
626  Paint radialGradient(float cx, float cy, float inr, float outr, const Color& icol, const Color& ocol);
-
627 
-
628  /**
-
629  Creates and returns an image pattern. Parameters (ox,oy) specify the left-top location of the image pattern,
-
630  (ex,ey) the size of one image, angle rotation around the top-left corner, image is handle to the image to render.
-
631  The gradient is transformed by the current transform when it is passed to fillPaint() or strokePaint().
-
632  */
-
633  Paint imagePattern(float ox, float oy, float ex, float ey, float angle, const NanoImage& image, float alpha);
-
634 
-
635  /* --------------------------------------------------------------------
-
636  * Scissoring */
-
637 
-
638  /**
-
639  Sets the current scissor rectangle.
-
640  The scissor rectangle is transformed by the current transform.
-
641  */
-
642  void scissor(float x, float y, float w, float h);
-
643 
-
644  /**
-
645  Intersects current scissor rectangle with the specified rectangle.
-
646  The scissor rectangle is transformed by the current transform.
-
647  Note: in case the rotation of previous scissor rect differs from
-
648  the current one, the intersection will be done between the specified
-
649  rectangle and the previous scissor rectangle transformed in the current
-
650  transform space. The resulting shape is always rectangle.
-
651  */
-
652  void intersectScissor(float x, float y, float w, float h);
-
653 
-
654  /**
-
655  Reset and disables scissoring.
-
656  */
-
657  void resetScissor();
-
658 
-
659  /* --------------------------------------------------------------------
-
660  * Paths */
-
661 
-
662  /**
-
663  Clears the current path and sub-paths.
-
664  */
-
665  void beginPath();
-
666 
-
667  /**
-
668  Starts new sub-path with specified point as first point.
-
669  */
-
670  void moveTo(float x, float y);
-
671 
-
672  /**
-
673  Adds line segment from the last point in the path to the specified point.
-
674  */
-
675  void lineTo(float x, float y);
-
676 
-
677  /**
-
678  Adds cubic bezier segment from last point in the path via two control points to the specified point.
-
679  */
-
680  void bezierTo(float c1x, float c1y, float c2x, float c2y, float x, float y);
-
681 
-
682  /**
-
683  Adds quadratic bezier segment from last point in the path via a control point to the specified point.
-
684  */
-
685  void quadTo(float cx, float cy, float x, float y);
-
686 
-
687  /**
-
688  Adds an arc segment at the corner defined by the last path point, and two specified points.
-
689  */
-
690  void arcTo(float x1, float y1, float x2, float y2, float radius);
-
691 
-
692  /**
-
693  Closes current sub-path with a line segment.
-
694  */
-
695  void closePath();
-
696 
-
697  /**
-
698  Sets the current sub-path winding.
-
699  */
-
700  void pathWinding(Winding dir);
-
701 
-
702  /**
-
703  Creates new circle arc shaped sub-path. The arc center is at cx,cy, the arc radius is r,
-
704  and the arc is drawn from angle a0 to a1, and swept in direction dir (NVG_CCW or NVG_CW).
-
705  Angles are specified in radians.
-
706  */
-
707  void arc(float cx, float cy, float r, float a0, float a1, Winding dir);
-
708 
-
709  /**
-
710  Creates new rectangle shaped sub-path.
-
711  */
-
712  void rect(float x, float y, float w, float h);
-
713 
-
714  /**
-
715  Creates new rounded rectangle shaped sub-path.
-
716  */
-
717  void roundedRect(float x, float y, float w, float h, float r);
-
718 
-
719  /**
-
720  Creates new ellipse shaped sub-path.
-
721  */
-
722  void ellipse(float cx, float cy, float rx, float ry);
-
723 
-
724  /**
-
725  Creates new circle shaped sub-path.
-
726  */
-
727  void circle(float cx, float cy, float r);
-
728 
-
729  /**
-
730  Fills the current path with current fill style.
-
731  */
-
732  void fill();
-
733 
-
734  /**
-
735  Fills the current path with current stroke style.
-
736  */
-
737  void stroke();
-
738 
-
739  /* --------------------------------------------------------------------
-
740  * Text */
-
741 
-
742  /**
-
743  Creates font by loading it from the disk from specified file name.
-
744  Returns handle to the font.
-
745  */
-
746  FontId createFontFromFile(const char* name, const char* filename);
-
747 
-
748  /**
-
749  Creates font by loading it from the specified memory chunk.
-
750  Returns handle to the font.
-
751  */
-
752  FontId createFontFromMemory(const char* name, const uchar* data, uint dataSize, bool freeData);
-
753 
-
754  /**
-
755  Finds a loaded font of specified name, and returns handle to it, or -1 if the font is not found.
-
756  */
-
757  FontId findFont(const char* name);
-
758 
-
759  /**
-
760  Sets the font size of current text style.
-
761  */
-
762  void fontSize(float size);
-
763 
-
764  /**
-
765  Sets the blur of current text style.
-
766  */
-
767  void fontBlur(float blur);
-
768 
-
769  /**
-
770  Sets the letter spacing of current text style.
-
771  */
-
772  void textLetterSpacing(float spacing);
-
773 
-
774  /**
-
775  Sets the proportional line height of current text style. The line height is specified as multiple of font size.
-
776  */
-
777  void textLineHeight(float lineHeight);
-
778 
-
779  /**
-
780  Sets the text align of current text style.
-
781  */
-
782  void textAlign(Align align);
-
783 
-
784  /**
-
785  Sets the text align of current text style.
-
786  Overloaded function for convenience.
-
787  @see Align
-
788  */
-
789  void textAlign(int align);
-
790 
-
791  /**
-
792  Sets the font face based on specified id of current text style.
-
793  */
-
794  void fontFaceId(FontId font);
-
795 
-
796  /**
-
797  Sets the font face based on specified name of current text style.
-
798  */
-
799  void fontFace(const char* font);
-
800 
-
801  /**
-
802  Draws text string at specified location. If end is specified only the sub-string up to the end is drawn.
-
803  */
-
804  float text(float x, float y, const char* string, const char* end);
-
805 
-
806  /**
-
807  Draws multi-line text string at specified location wrapped at the specified width.
-
808  If end is specified only the sub-string up to the end is drawn.
-
809  White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered.
-
810  Words longer than the max width are slit at nearest character (i.e. no hyphenation).
-
811  */
-
812  void textBox(float x, float y, float breakRowWidth, const char* string, const char* end = nullptr);
-
813 
-
814  /**
-
815  Measures the specified text string. The bounds value are [xmin,ymin, xmax,ymax].
-
816  Returns the horizontal advance of the measured text (i.e. where the next character should drawn).
-
817  Measured values are returned in local coordinate space.
-
818  */
-
819  float textBounds(float x, float y, const char* string, const char* end, Rectangle<float>& bounds);
-
820 
-
821  /**
-
822  Measures the specified multi-text string. Parameter bounds should be a pointer to float[4],
-
823  if the bounding box of the text should be returned. The bounds value are [xmin,ymin, xmax,ymax]
-
824  Measured values are returned in local coordinate space.
-
825  */
-
826  void textBoxBounds(float x, float y, float breakRowWidth, const char* string, const char* end, float bounds[4]);
-
827 
-
828  /**
-
829  Calculates the glyph x positions of the specified text. If end is specified only the sub-string will be used.
-
830  Measured values are returned in local coordinate space.
-
831  */
-
832  int textGlyphPositions(float x, float y, const char* string, const char* end, GlyphPosition& positions, int maxPositions);
-
833 
-
834  /**
-
835  Returns the vertical metrics based on the current text style.
-
836  Measured values are returned in local coordinate space.
-
837  */
-
838  void textMetrics(float* ascender, float* descender, float* lineh);
-
839 
-
840  /**
-
841  Breaks the specified text into lines. If end is specified only the sub-string will be used.
-
842  White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered.
-
843  Words longer than the max width are slit at nearest character (i.e. no hyphenation).
-
844  */
-
845  int textBreakLines(const char* string, const char* end, float breakRowWidth, TextRow& rows, int maxRows);
-
846 
-
847  /**
-
848  Load DPF's internal shared resources for this NanoVG class.
-
849  */
-
850  virtual void loadSharedResources();
-
851 
-
852 private:
-
853  NVGcontext* const fContext;
-
854  bool fInFrame;
-
855  bool fIsSubWidget;
-
856  friend class BlendishWidget;
-
857 
-
858  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NanoVG)
-
859 };
-
860 
-
861 // -----------------------------------------------------------------------
-
862 // NanoWidget
-
863 
-
864 /**
-
865  NanoVG Widget class.
-
866 
-
867  This class implements the NanoVG drawing API inside a DGL Widget.
-
868  The drawing function onDisplay() is implemented internally but a
-
869  new onNanoDisplay() needs to be overridden instead.
-
870  */
-
871 class NanoWidget : public Widget,
-
872  public NanoVG
-
873 {
-
874 public:
-
875  /**
-
876  Constructor.
-
877  @see CreateFlags
-
878  */
-
879  explicit NanoWidget(Window& parent, int flags = CREATE_ANTIALIAS);
-
880 
-
881  /**
-
882  Constructor for a subwidget.
-
883  */
-
884  explicit NanoWidget(Widget* groupWidget, int flags = CREATE_ANTIALIAS);
-
885 
-
886  /**
-
887  Constructor for a subwidget, reusing a NanoVG context.
-
888  */
-
889  explicit NanoWidget(NanoWidget* groupWidget);
-
890 
-
891  /**
-
892  Destructor.
-
893  */
-
894  virtual ~NanoWidget();
-
895 
-
896 protected:
-
897  /**
-
898  New virtual onDisplay function.
-
899  @see onDisplay
-
900  */
-
901  virtual void onNanoDisplay() = 0;
-
902 
-
903 private:
-
904  struct PrivateData;
-
905  PrivateData* const nData;
-
906 
-
907  /**
-
908  Widget display function.
-
909  Implemented internally to wrap begin/endFrame() automatically.
-
910  */
-
911  void onDisplay() override;
-
912 
-
913  // these should not be used
-
914  void beginFrame(uint,uint) {}
-
915  void beginFrame(uint,uint,float) {}
-
916  void beginFrame(Widget*) {}
-
917  void cancelFrame() {}
-
918  void endFrame() {}
-
919 
-
920  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NanoWidget)
-
921 };
-
922 
-
923 // -----------------------------------------------------------------------
-
924 
-
925 END_NAMESPACE_DGL
-
926 
-
927 #endif // DGL_NANO_WIDGET_HPP_INCLUDED
-
static void transformPoint(float &dstx, float &dsty, const float xform[6], float srcx, float srcy)
-
NVGcontext * getContext() const noexcept
Definition: NanoVG.hpp:316
-
void textAlign(Align align)
-
Definition: NanoVG.hpp:286
-
void beginPath()
-
void textBox(float x, float y, float breakRowWidth, const char *string, const char *end=nullptr)
-
Definition: NanoVG.hpp:45
-
void lineTo(float x, float y)
-
void globalAlpha(float alpha)
-
virtual ~NanoWidget()
-
static void transformScale(float dst[6], float sx, float sy)
-
NanoImage::Handle createImageFromMemory(uchar *data, uint dataSize, ImageFlags imageFlags)
-
void stroke()
-
void currentTransform(float xform[6])
-
void circle(float cx, float cy, float r)
-
int textBreakLines(const char *string, const char *end, float breakRowWidth, TextRow &rows, int maxRows)
-
static void transformMultiply(float dst[6], const float src[6])
-
void fontSize(float size)
-
FontId createFontFromMemory(const char *name, const uchar *data, uint dataSize, bool freeData)
-
Definition: NanoVG.hpp:871
-
void intersectScissor(float x, float y, float w, float h)
-
void textBoxBounds(float x, float y, float breakRowWidth, const char *string, const char *end, float bounds[4])
-
int textGlyphPositions(float x, float y, const char *string, const char *end, GlyphPosition &positions, int maxPositions)
-
NanoWidget(Window &parent, int flags=CREATE_ANTIALIAS)
-
void miterLimit(float limit)
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_NANO_WIDGET_HPP_INCLUDED
18 #define DGL_NANO_WIDGET_HPP_INCLUDED
19 
20 #include "Color.hpp"
21 #include "Widget.hpp"
22 
23 #ifndef DGL_NO_SHARED_RESOURCES
24 # define NANOVG_DEJAVU_SANS_TTF "__dpf_dejavusans_ttf__"
25 #endif
26 
27 struct NVGcontext;
28 struct NVGpaint;
29 
30 START_NAMESPACE_DGL
31 
32 // -----------------------------------------------------------------------
33 // Forward class names
34 
35 class BlendishWidget;
36 class NanoVG;
37 
38 // -----------------------------------------------------------------------
39 // NanoImage
40 
41 /**
42  NanoVG Image class.
43 
44  This implements NanoVG images as a C++ class where deletion is handled automatically.
45  Images need to be created within a NanoVG or NanoWidget class.
46  */
47 class NanoImage
48 {
49 private:
50  struct Handle {
51  NVGcontext* context;
52  int imageId;
53 
54  Handle() noexcept
55  : context(nullptr),
56  imageId(0) {}
57 
58  Handle(NVGcontext* c, int id) noexcept
59  : context(c),
60  imageId(id) {}
61  };
62 
63 public:
64  /**
65  Constructor for an invalid/null image.
66  */
67  NanoImage();
68 
69  /**
70  Constructor.
71  */
72  NanoImage(const Handle& handle);
73 
74  /**
75  Destructor.
76  */
77  ~NanoImage();
78 
79  /**
80  Create a new image without recreating the C++ class.
81  */
82  NanoImage& operator=(const Handle& handle);
83 
84  /**
85  Wherever this image is valid.
86  */
87  bool isValid() const noexcept;
88 
89  /**
90  Get size.
91  */
92  Size<uint> getSize() const noexcept;
93 
94  /**
95  Get the OpenGL texture handle.
96  */
97  GLuint getTextureHandle() const;
98 
99 private:
100  Handle fHandle;
101  Size<uint> fSize;
102  friend class NanoVG;
103 
104  /** @internal */
105  void _updateSize();
106 
107  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NanoImage)
108 };
109 
110 // -----------------------------------------------------------------------
111 // NanoVG
112 
113 /**
114  NanoVG class.
115 
116  This class exposes the NanoVG drawing API.
117  All calls should be wrapped in beginFrame() and endFrame().
118 
119  @section State Handling
120  NanoVG contains state which represents how paths will be rendered.
121  The state contains transform, fill and stroke styles, text and font styles, and scissor clipping.
122 
123  @section Render styles
124  Fill and stroke render style can be either a solid color or a paint which is a gradient or a pattern.
125  Solid color is simply defined as a color value, different kinds of paints can be created
126  using linearGradient(), boxGradient(), radialGradient() and imagePattern().
127 
128  Current render style can be saved and restored using save() and restore().
129 
130  @section Transforms
131  The paths, gradients, patterns and scissor region are transformed by an transformation
132  matrix at the time when they are passed to the API.
133  The current transformation matrix is a affine matrix:
134  [sx kx tx]
135  [ky sy ty]
136  [ 0 0 1]
137  Where: sx,sy define scaling, kx,ky skewing, and tx,ty translation.
138  The last row is assumed to be 0,0,1 and is not stored.
139 
140  Apart from resetTransform(), each transformation function first creates
141  specific transformation matrix and pre-multiplies the current transformation by it.
142 
143  Current coordinate system (transformation) can be saved and restored using save() and restore().
144 
145  @section Images
146  NanoVG allows you to load jpg, png, psd, tga, pic and gif files to be used for rendering.
147  In addition you can upload your own image. The image loading is provided by stb_image.
148 
149  @section Paints
150  NanoVG supports four types of paints: linear gradient, box gradient, radial gradient and image pattern.
151  These can be used as paints for strokes and fills.
152 
153  @section Scissoring
154  Scissoring allows you to clip the rendering into a rectangle. This is useful for various
155  user interface cases like rendering a text edit or a timeline.
156 
157  @section Paths
158  Drawing a new shape starts with beginPath(), it clears all the currently defined paths.
159  Then you define one or more paths and sub-paths which describe the shape. The are functions
160  to draw common shapes like rectangles and circles, and lower level step-by-step functions,
161  which allow to define a path curve by curve.
162 
163  NanoVG uses even-odd fill rule to draw the shapes. Solid shapes should have counter clockwise
164  winding and holes should have counter clockwise order. To specify winding of a path you can
165  call pathWinding(). This is useful especially for the common shapes, which are drawn CCW.
166 
167  Finally you can fill the path using current fill style by calling fill(), and stroke it
168  with current stroke style by calling stroke().
169 
170  The curve segments and sub-paths are transformed by the current transform.
171 
172  @section Text
173  NanoVG allows you to load .ttf files and use the font to render text.
174 
175  The appearance of the text can be defined by setting the current text style
176  and by specifying the fill color. Common text and font settings such as
177  font size, letter spacing and text align are supported. Font blur allows you
178  to create simple text effects such as drop shadows.
179 
180  At render time the font face can be set based on the font handles or name.
181 
182  Font measure functions return values in local space, the calculations are
183  carried in the same resolution as the final rendering. This is done because
184  the text glyph positions are snapped to the nearest pixels sharp rendering.
185 
186  The local space means that values are not rotated or scale as per the current
187  transformation. For example if you set font size to 12, which would mean that
188  line height is 16, then regardless of the current scaling and rotation, the
189  returned line height is always 16. Some measures may vary because of the scaling
190  since aforementioned pixel snapping.
191 
192  While this may sound a little odd, the setup allows you to always render the
193  same way regardless of scaling. i.e. following works regardless of scaling:
194 
195  @code
196  const char* txt = "Text me up.";
197  vg.textBounds(x,y, txt, NULL, bounds);
198  vg.beginPath();
199  vg.roundedRect(bounds[0], bounds[1], bounds[2]-bounds[0], bounds[3]-bounds[1]);
200  vg.fill();
201  @endcode
202 
203  Note: currently only solid color fill is supported for text.
204  */
205 class NanoVG
206 {
207 public:
208  enum CreateFlags {
209  /**
210  Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).
211  */
212  CREATE_ANTIALIAS = 1 << 0,
213 
214  /**
215  Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little
216  slower, but path overlaps (i.e. self-intersecting or sharp turns) will be drawn just once.
217  */
218  CREATE_STENCIL_STROKES = 1 << 1,
219 
220  /**
221  Flag indicating that additional debug checks are done.
222  */
223  CREATE_DEBUG = 1 << 2,
224  };
225 
226  enum ImageFlags {
227  IMAGE_GENERATE_MIPMAPS = 1 << 0, // Generate mipmaps during creation of the image.
228  IMAGE_REPEAT_X = 1 << 1, // Repeat image in X direction.
229  IMAGE_REPEAT_Y = 1 << 2, // Repeat image in Y direction.
230  IMAGE_FLIP_Y = 1 << 3, // Flips (inverses) image in Y direction when rendered.
231  IMAGE_PREMULTIPLIED = 1 << 4 // Image data has premultiplied alpha.
232  };
233 
234  enum Align {
235  // Horizontal align
236  ALIGN_LEFT = 1 << 0, // Align horizontally to left (default).
237  ALIGN_CENTER = 1 << 1, // Align horizontally to center.
238  ALIGN_RIGHT = 1 << 2, // Align horizontally to right.
239  // Vertical align
240  ALIGN_TOP = 1 << 3, // Align vertically to top.
241  ALIGN_MIDDLE = 1 << 4, // Align vertically to middle.
242  ALIGN_BOTTOM = 1 << 5, // Align vertically to bottom.
243  ALIGN_BASELINE = 1 << 6 // Align vertically to baseline (default).
244  };
245 
246  enum LineCap {
247  BUTT,
248  ROUND,
249  SQUARE,
250  BEVEL,
251  MITER
252  };
253 
254  enum Solidity {
255  SOLID = 1, // CCW
256  HOLE = 2 // CW
257  };
258 
259  enum Winding {
260  CCW = 1, // Winding for solid shapes
261  CW = 2 // Winding for holes
262  };
263 
264  struct Paint {
265  float xform[6];
266  float extent[2];
267  float radius;
268  float feather;
269  Color innerColor;
270  Color outerColor;
271  int imageId;
272 
273  Paint() noexcept;
274 
275  /**
276  @internal
277  */
278  Paint(const NVGpaint&) noexcept;
279  operator NVGpaint() const noexcept;
280  };
281 
282  struct GlyphPosition {
283  const char* str; // Position of the glyph in the input string.
284  float x; // The x-coordinate of the logical glyph position.
285  float minx, maxx; // The bounds of the glyph shape.
286  };
287 
288  struct TextRow {
289  const char* start; // Pointer to the input text where the row starts.
290  const char* end; // Pointer to the input text where the row ends (one past the last character).
291  const char* next; // Pointer to the beginning of the next row.
292  float width; // Logical width of the row.
293  float minx, maxx; // Actual bounds of the row. Logical with and bounds can differ because of kerning and some parts over extending.
294  };
295 
296  typedef int FontId;
297 
298  /**
299  Constructor.
300  @see CreateFlags
301  */
302  NanoVG(int flags = CREATE_ANTIALIAS);
303 
304  /**
305  Constructor reusing a NanoVG context, used for subwidgets.
306  */
307  NanoVG(NanoWidget* groupWidget);
308 
309  /**
310  Destructor.
311  */
312  virtual ~NanoVG();
313 
314  /**
315  Get the NanoVG context.
316  You should not need this under normal circumstances.
317  */
318  NVGcontext* getContext() const noexcept
319  {
320  return fContext;
321  }
322 
323  /**
324  Begin drawing a new frame.
325  */
326  void beginFrame(const uint width, const uint height, const float scaleFactor = 1.0f);
327 
328  /**
329  Begin drawing a new frame inside a widget.
330  */
331  void beginFrame(Widget* const widget);
332 
333  /**
334  Cancels drawing the current frame.
335  */
336  void cancelFrame();
337 
338  /**
339  Ends drawing flushing remaining render state.
340  */
341  void endFrame();
342 
343  /* --------------------------------------------------------------------
344  * State Handling */
345 
346  /**
347  Pushes and saves the current render state into a state stack.
348  A matching restore() must be used to restore the state.
349  */
350  void save();
351 
352  /**
353  Pops and restores current render state.
354  */
355  void restore();
356 
357  /**
358  Resets current render state to default values. Does not affect the render state stack.
359  */
360  void reset();
361 
362  /* --------------------------------------------------------------------
363  * Render styles */
364 
365  /**
366  Sets current stroke style to a solid color.
367  */
368  void strokeColor(const Color& color);
369 
370  /**
371  Sets current stroke style to a solid color, made from red, green, blue and alpha numeric values.
372  Values must be in [0..255] range.
373  */
374  void strokeColor(const int red, const int green, const int blue, const int alpha = 255);
375 
376  /**
377  Sets current stroke style to a solid color, made from red, green, blue and alpha numeric values.
378  Values must in [0..1] range.
379  */
380  void strokeColor(const float red, const float green, const float blue, const float alpha = 1.0f);
381 
382  /**
383  Sets current stroke style to a paint, which can be a one of the gradients or a pattern.
384  */
385  void strokePaint(const Paint& paint);
386 
387  /**
388  Sets current fill style to a solid color.
389  */
390  void fillColor(const Color& color);
391 
392  /**
393  Sets current fill style to a solid color, made from red, green, blue and alpha numeric values.
394  Values must be in [0..255] range.
395  */
396  void fillColor(const int red, const int green, const int blue, const int alpha = 255);
397 
398  /**
399  Sets current fill style to a solid color, made from red, green, blue and alpha numeric values.
400  Values must in [0..1] range.
401  */
402  void fillColor(const float red, const float green, const float blue, const float alpha = 1.0f);
403 
404  /**
405  Sets current fill style to a paint, which can be a one of the gradients or a pattern.
406  */
407  void fillPaint(const Paint& paint);
408 
409  /**
410  Sets the miter limit of the stroke style.
411  Miter limit controls when a sharp corner is beveled.
412  */
413  void miterLimit(float limit);
414 
415  /**
416  Sets the stroke width of the stroke style.
417  */
418  void strokeWidth(float size);
419 
420  /**
421  Sets how the end of the line (cap) is drawn,
422  Can be one of: BUTT, ROUND, SQUARE.
423  */
424  void lineCap(LineCap cap = BUTT);
425 
426  /**
427  Sets how sharp path corners are drawn.
428  Can be one of MITER, ROUND, BEVEL.
429  */
430  void lineJoin(LineCap join = MITER);
431 
432  /**
433  Sets the transparency applied to all rendered shapes.
434  Already transparent paths will get proportionally more transparent as well.
435  */
436  void globalAlpha(float alpha);
437 
438  /* --------------------------------------------------------------------
439  * Transforms */
440 
441  /**
442  Resets current transform to a identity matrix.
443  */
444  void resetTransform();
445 
446  /**
447  Pre-multiplies current coordinate system by specified matrix.
448  The parameters are interpreted as matrix as follows:
449  [a c e]
450  [b d f]
451  [0 0 1]
452  */
453  void transform(float a, float b, float c, float d, float e, float f);
454 
455  /**
456  Translates current coordinate system.
457  */
458  void translate(float x, float y);
459 
460  /**
461  Rotates current coordinate system. Angle is specified in radians.
462  */
463  void rotate(float angle);
464 
465  /**
466  Skews the current coordinate system along X axis. Angle is specified in radians.
467  */
468  void skewX(float angle);
469 
470  /**
471  Skews the current coordinate system along Y axis. Angle is specified in radians.
472  */
473  void skewY(float angle);
474 
475  /**
476  Scales the current coordinate system.
477  */
478  void scale(float x, float y);
479 
480  /**
481  Stores the top part (a-f) of the current transformation matrix in to the specified buffer.
482  [a c e]
483  [b d f]
484  [0 0 1]
485  */
486  void currentTransform(float xform[6]);
487 
488  /**
489  The following functions can be used to make calculations on 2x3 transformation matrices.
490  A 2x3 matrix is represented as float[6]. */
491 
492  /**
493  Sets the transform to identity matrix.
494  */
495  static void transformIdentity(float dst[6]);
496 
497  /**
498  Sets the transform to translation matrix
499  */
500  static void transformTranslate(float dst[6], float tx, float ty);
501 
502  /**
503  Sets the transform to scale matrix.
504  */
505  static void transformScale(float dst[6], float sx, float sy);
506 
507  /**
508  Sets the transform to rotate matrix. Angle is specified in radians.
509  */
510  static void transformRotate(float dst[6], float a);
511 
512  /**
513  Sets the transform to skew-x matrix. Angle is specified in radians.
514  */
515  static void transformSkewX(float dst[6], float a);
516 
517  /**
518  Sets the transform to skew-y matrix. Angle is specified in radians.
519  */
520  static void transformSkewY(float dst[6], float a);
521 
522  /**
523  Sets the transform to the result of multiplication of two transforms, of A = A*B.
524  */
525  static void transformMultiply(float dst[6], const float src[6]);
526 
527  /**
528  Sets the transform to the result of multiplication of two transforms, of A = B*A.
529  */
530  static void transformPremultiply(float dst[6], const float src[6]);
531 
532  /**
533  Sets the destination to inverse of specified transform.
534  Returns 1 if the inverse could be calculated, else 0.
535  */
536  static int transformInverse(float dst[6], const float src[6]);
537 
538  /**
539  Transform a point by given transform.
540  */
541  static void transformPoint(float& dstx, float& dsty, const float xform[6], float srcx, float srcy);
542 
543  /**
544  Convert degrees to radians.
545  */
546  static float degToRad(float deg);
547 
548  /**
549  Convert radians to degrees.
550  */
551  static float radToDeg(float rad);
552 
553  /* --------------------------------------------------------------------
554  * Images */
555 
556  /**
557  Creates image by loading it from the disk from specified file name.
558  */
559  NanoImage::Handle createImageFromFile(const char* filename, ImageFlags imageFlags);
560 
561  /**
562  Creates image by loading it from the disk from specified file name.
563  Overloaded function for convenience.
564  @see ImageFlags
565  */
566  NanoImage::Handle createImageFromFile(const char* filename, int imageFlags);
567 
568  /**
569  Creates image by loading it from the specified chunk of memory.
570  */
571  NanoImage::Handle createImageFromMemory(uchar* data, uint dataSize, ImageFlags imageFlags);
572 
573  /**
574  Creates image by loading it from the specified chunk of memory.
575  Overloaded function for convenience.
576  @see ImageFlags
577  */
578  NanoImage::Handle createImageFromMemory(uchar* data, uint dataSize, int imageFlags);
579 
580  /**
581  Creates image from specified image data.
582  */
583  NanoImage::Handle createImageFromRGBA(uint w, uint h, const uchar* data, ImageFlags imageFlags);
584 
585  /**
586  Creates image from specified image data.
587  Overloaded function for convenience.
588  @see ImageFlags
589  */
590  NanoImage::Handle createImageFromRGBA(uint w, uint h, const uchar* data, int imageFlags);
591 
592  /**
593  Creates image from an OpenGL texture handle.
594  */
595  NanoImage::Handle createImageFromTextureHandle(GLuint textureId, uint w, uint h, ImageFlags imageFlags, bool deleteTexture = false);
596 
597  /**
598  Creates image from an OpenGL texture handle.
599  Overloaded function for convenience.
600  @see ImageFlags
601  */
602  NanoImage::Handle createImageFromTextureHandle(GLuint textureId, uint w, uint h, int imageFlags, bool deleteTexture = false);
603 
604  /* --------------------------------------------------------------------
605  * Paints */
606 
607  /**
608  Creates and returns a linear gradient. Parameters (sx,sy)-(ex,ey) specify the start and end coordinates
609  of the linear gradient, icol specifies the start color and ocol the end color.
610  The gradient is transformed by the current transform when it is passed to fillPaint() or strokePaint().
611  */
612  Paint linearGradient(float sx, float sy, float ex, float ey, const Color& icol, const Color& ocol);
613 
614  /**
615  Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering
616  drop shadows or highlights for boxes. Parameters (x,y) define the top-left corner of the rectangle,
617  (w,h) define the size of the rectangle, r defines the corner radius, and f feather. Feather defines how blurry
618  the border of the rectangle is. Parameter icol specifies the inner color and ocol the outer color of the gradient.
619  The gradient is transformed by the current transform when it is passed to fillPaint() or strokePaint().
620  */
621  Paint boxGradient(float x, float y, float w, float h, float r, float f, const Color& icol, const Color& ocol);
622 
623  /**
624  Creates and returns a radial gradient. Parameters (cx,cy) specify the center, inr and outr specify
625  the inner and outer radius of the gradient, icol specifies the start color and ocol the end color.
626  The gradient is transformed by the current transform when it is passed to fillPaint() or strokePaint().
627  */
628  Paint radialGradient(float cx, float cy, float inr, float outr, const Color& icol, const Color& ocol);
629 
630  /**
631  Creates and returns an image pattern. Parameters (ox,oy) specify the left-top location of the image pattern,
632  (ex,ey) the size of one image, angle rotation around the top-left corner, image is handle to the image to render.
633  The gradient is transformed by the current transform when it is passed to fillPaint() or strokePaint().
634  */
635  Paint imagePattern(float ox, float oy, float ex, float ey, float angle, const NanoImage& image, float alpha);
636 
637  /* --------------------------------------------------------------------
638  * Scissoring */
639 
640  /**
641  Sets the current scissor rectangle.
642  The scissor rectangle is transformed by the current transform.
643  */
644  void scissor(float x, float y, float w, float h);
645 
646  /**
647  Intersects current scissor rectangle with the specified rectangle.
648  The scissor rectangle is transformed by the current transform.
649  Note: in case the rotation of previous scissor rect differs from
650  the current one, the intersection will be done between the specified
651  rectangle and the previous scissor rectangle transformed in the current
652  transform space. The resulting shape is always rectangle.
653  */
654  void intersectScissor(float x, float y, float w, float h);
655 
656  /**
657  Reset and disables scissoring.
658  */
659  void resetScissor();
660 
661  /* --------------------------------------------------------------------
662  * Paths */
663 
664  /**
665  Clears the current path and sub-paths.
666  */
667  void beginPath();
668 
669  /**
670  Starts new sub-path with specified point as first point.
671  */
672  void moveTo(float x, float y);
673 
674  /**
675  Adds line segment from the last point in the path to the specified point.
676  */
677  void lineTo(float x, float y);
678 
679  /**
680  Adds cubic bezier segment from last point in the path via two control points to the specified point.
681  */
682  void bezierTo(float c1x, float c1y, float c2x, float c2y, float x, float y);
683 
684  /**
685  Adds quadratic bezier segment from last point in the path via a control point to the specified point.
686  */
687  void quadTo(float cx, float cy, float x, float y);
688 
689  /**
690  Adds an arc segment at the corner defined by the last path point, and two specified points.
691  */
692  void arcTo(float x1, float y1, float x2, float y2, float radius);
693 
694  /**
695  Closes current sub-path with a line segment.
696  */
697  void closePath();
698 
699  /**
700  Sets the current sub-path winding.
701  */
702  void pathWinding(Winding dir);
703 
704  /**
705  Creates new circle arc shaped sub-path. The arc center is at cx,cy, the arc radius is r,
706  and the arc is drawn from angle a0 to a1, and swept in direction dir (NVG_CCW or NVG_CW).
707  Angles are specified in radians.
708  */
709  void arc(float cx, float cy, float r, float a0, float a1, Winding dir);
710 
711  /**
712  Creates new rectangle shaped sub-path.
713  */
714  void rect(float x, float y, float w, float h);
715 
716  /**
717  Creates new rounded rectangle shaped sub-path.
718  */
719  void roundedRect(float x, float y, float w, float h, float r);
720 
721  /**
722  Creates new ellipse shaped sub-path.
723  */
724  void ellipse(float cx, float cy, float rx, float ry);
725 
726  /**
727  Creates new circle shaped sub-path.
728  */
729  void circle(float cx, float cy, float r);
730 
731  /**
732  Fills the current path with current fill style.
733  */
734  void fill();
735 
736  /**
737  Fills the current path with current stroke style.
738  */
739  void stroke();
740 
741  /* --------------------------------------------------------------------
742  * Text */
743 
744  /**
745  Creates font by loading it from the disk from specified file name.
746  Returns handle to the font.
747  */
748  FontId createFontFromFile(const char* name, const char* filename);
749 
750  /**
751  Creates font by loading it from the specified memory chunk.
752  Returns handle to the font.
753  */
754  FontId createFontFromMemory(const char* name, const uchar* data, uint dataSize, bool freeData);
755 
756  /**
757  Finds a loaded font of specified name, and returns handle to it, or -1 if the font is not found.
758  */
759  FontId findFont(const char* name);
760 
761  /**
762  Sets the font size of current text style.
763  */
764  void fontSize(float size);
765 
766  /**
767  Sets the blur of current text style.
768  */
769  void fontBlur(float blur);
770 
771  /**
772  Sets the letter spacing of current text style.
773  */
774  void textLetterSpacing(float spacing);
775 
776  /**
777  Sets the proportional line height of current text style. The line height is specified as multiple of font size.
778  */
779  void textLineHeight(float lineHeight);
780 
781  /**
782  Sets the text align of current text style.
783  */
784  void textAlign(Align align);
785 
786  /**
787  Sets the text align of current text style.
788  Overloaded function for convenience.
789  @see Align
790  */
791  void textAlign(int align);
792 
793  /**
794  Sets the font face based on specified id of current text style.
795  */
796  void fontFaceId(FontId font);
797 
798  /**
799  Sets the font face based on specified name of current text style.
800  */
801  void fontFace(const char* font);
802 
803  /**
804  Draws text string at specified location. If end is specified only the sub-string up to the end is drawn.
805  */
806  float text(float x, float y, const char* string, const char* end);
807 
808  /**
809  Draws multi-line text string at specified location wrapped at the specified width.
810  If end is specified only the sub-string up to the end is drawn.
811  White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered.
812  Words longer than the max width are slit at nearest character (i.e. no hyphenation).
813  */
814  void textBox(float x, float y, float breakRowWidth, const char* string, const char* end = nullptr);
815 
816  /**
817  Measures the specified text string. The bounds value are [xmin,ymin, xmax,ymax].
818  Returns the horizontal advance of the measured text (i.e. where the next character should drawn).
819  Measured values are returned in local coordinate space.
820  */
821  float textBounds(float x, float y, const char* string, const char* end, Rectangle<float>& bounds);
822 
823  /**
824  Measures the specified multi-text string. Parameter bounds should be a pointer to float[4],
825  if the bounding box of the text should be returned. The bounds value are [xmin,ymin, xmax,ymax]
826  Measured values are returned in local coordinate space.
827  */
828  void textBoxBounds(float x, float y, float breakRowWidth, const char* string, const char* end, float bounds[4]);
829 
830  /**
831  Calculates the glyph x positions of the specified text. If end is specified only the sub-string will be used.
832  Measured values are returned in local coordinate space.
833  */
834  int textGlyphPositions(float x, float y, const char* string, const char* end, GlyphPosition& positions, int maxPositions);
835 
836  /**
837  Returns the vertical metrics based on the current text style.
838  Measured values are returned in local coordinate space.
839  */
840  void textMetrics(float* ascender, float* descender, float* lineh);
841 
842  /**
843  Breaks the specified text into lines. If end is specified only the sub-string will be used.
844  White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered.
845  Words longer than the max width are slit at nearest character (i.e. no hyphenation).
846  */
847  int textBreakLines(const char* string, const char* end, float breakRowWidth, TextRow& rows, int maxRows);
848 
849 #ifndef DGL_NO_SHARED_RESOURCES
850  /**
851  Load DPF's internal shared resources for this NanoVG class.
852  */
853  virtual void loadSharedResources();
854 #endif
855 
856 private:
857  NVGcontext* const fContext;
858  bool fInFrame;
859  bool fIsSubWidget;
860  friend class BlendishWidget;
861 
862  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NanoVG)
863 };
864 
865 // -----------------------------------------------------------------------
866 // NanoWidget
867 
868 /**
869  NanoVG Widget class.
870 
871  This class implements the NanoVG drawing API inside a DGL Widget.
872  The drawing function onDisplay() is implemented internally but a
873  new onNanoDisplay() needs to be overridden instead.
874  */
875 class NanoWidget : public Widget,
876  public NanoVG
877 {
878 public:
879  /**
880  Constructor.
881  @see CreateFlags
882  */
883  explicit NanoWidget(Window& parent, int flags = CREATE_ANTIALIAS);
884 
885  /**
886  Constructor for a subwidget.
887  */
888  explicit NanoWidget(Widget* groupWidget, int flags = CREATE_ANTIALIAS);
889 
890  /**
891  Constructor for a subwidget, reusing a NanoVG context.
892  */
893  explicit NanoWidget(NanoWidget* groupWidget);
894 
895  /**
896  Destructor.
897  */
898  virtual ~NanoWidget();
899 
900 protected:
901  /**
902  New virtual onDisplay function.
903  @see onDisplay
904  */
905  virtual void onNanoDisplay() = 0;
906 
907 private:
908  struct PrivateData;
909  PrivateData* const nData;
910 
911  /**
912  Widget display function.
913  Implemented internally to wrap begin/endFrame() automatically.
914  */
915  void onDisplay() override;
916 
917  // these should not be used
918  void beginFrame(uint,uint) {}
919  void beginFrame(uint,uint,float) {}
920  void beginFrame(Widget*) {}
921  void cancelFrame() {}
922  void endFrame() {}
923 
924  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NanoWidget)
925 };
926 
927 // -----------------------------------------------------------------------
928 
929 END_NAMESPACE_DGL
930 
931 #endif // DGL_NANO_WIDGET_HPP_INCLUDED
NVGcontext * getContext() const noexcept
Definition: NanoVG.hpp:318
+
Definition: NanoVG.hpp:288
+
Definition: NanoVG.hpp:47
+
Definition: NanoVG.hpp:875
Definition: Window.hpp:34
-
void strokeWidth(float size)
-
virtual void onNanoDisplay()=0
-
Paint linearGradient(float sx, float sy, float ex, float ey, const Color &icol, const Color &ocol)
-
void translate(float x, float y)
-
static void transformPremultiply(float dst[6], const float src[6])
-
void arcTo(float x1, float y1, float x2, float y2, float radius)
-
void scale(float x, float y)
Definition: Color.hpp:31
-
void cancelFrame()
-
static void transformSkewX(float dst[6], float a)
-
void rect(float x, float y, float w, float h)
-
Paint radialGradient(float cx, float cy, float inr, float outr, const Color &icol, const Color &ocol)
-
Definition: NanoVG.hpp:216
-
void fontBlur(float blur)
-
void strokePaint(const Paint &paint)
-
virtual void loadSharedResources()
-
void reset()
-
NanoImage::Handle createImageFromFile(const char *filename, ImageFlags imageFlags)
-
void save()
-
void fontFaceId(FontId font)
-
void moveTo(float x, float y)
-
void transform(float a, float b, float c, float d, float e, float f)
-
void ellipse(float cx, float cy, float rx, float ry)
-
void bezierTo(float c1x, float c1y, float c2x, float c2y, float x, float y)
-
void fontFace(const char *font)
+
GLuint getTextureHandle() const
-
NanoVG(int flags=CREATE_ANTIALIAS)
Definition: Geometry.hpp:30
-
void restore()
-
void skewY(float angle)
-
Definition: NanoVG.hpp:210
-
void endFrame()
-
FontId findFont(const char *name)
-
void rotate(float angle)
-
void beginFrame(const uint width, const uint height, const float scaleFactor=1.0f)
-
virtual ~NanoVG()
-
Definition: NanoVG.hpp:262
-
void pathWinding(Winding dir)
-
Definition: NanoVG.hpp:203
-
void textLineHeight(float lineHeight)
-
void closePath()
-
static void transformIdentity(float dst[6])
-
void skewX(float angle)
+
Definition: NanoVG.hpp:264
+
Definition: NanoVG.hpp:205
Size< uint > getSize() const noexcept
-
float textBounds(float x, float y, const char *string, const char *end, Rectangle< float > &bounds)
-
static float radToDeg(float rad)
-
Definition: NanoVG.hpp:280
-
static void transformSkewY(float dst[6], float a)
-
static int transformInverse(float dst[6], const float src[6])
-
void roundedRect(float x, float y, float w, float h, float r)
-
NanoImage::Handle createImageFromRGBA(uint w, uint h, const uchar *data, ImageFlags imageFlags)
-
FontId createFontFromFile(const char *name, const char *filename)
-
static float degToRad(float deg)
-
static void transformTranslate(float dst[6], float tx, float ty)
-
Definition: NanoVG.hpp:221
+
Definition: NanoVG.hpp:282
-
void arc(float cx, float cy, float r, float a0, float a1, Winding dir)
Definition: Widget.hpp:59
-
void lineCap(LineCap cap=BUTT)
NanoImage & operator=(const Handle &handle)
-
void resetTransform()
-
float text(float x, float y, const char *string, const char *end)
-
void lineJoin(LineCap join=MITER)
-
GLuint getTextureHandle() const
-
void fillColor(const Color &color)
-
void scissor(float x, float y, float w, float h)
-
void strokeColor(const Color &color)
-
void textMetrics(float *ascender, float *descender, float *lineh)
-
void quadTo(float cx, float cy, float x, float y)
-
void fillPaint(const Paint &paint)
bool isValid() const noexcept
-
static void transformRotate(float dst[6], float a)
-
CreateFlags
Definition: NanoVG.hpp:206
-
Paint boxGradient(float x, float y, float w, float h, float r, float f, const Color &icol, const Color &ocol)
-
NanoImage::Handle createImageFromTextureHandle(GLuint textureId, uint w, uint h, ImageFlags imageFlags, bool deleteTexture=false)
-
void textLetterSpacing(float spacing)
-
void fill()
-
Paint imagePattern(float ox, float oy, float ex, float ey, float angle, const NanoImage &image, float alpha)
-
void resetScissor()
+
CreateFlags
Definition: NanoVG.hpp:208
diff --git a/ScopedPointer_8hpp_source.html b/ScopedPointer_8hpp_source.html index e9a29d19..0c92d367 100644 --- a/ScopedPointer_8hpp_source.html +++ b/ScopedPointer_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra/ScopedPointer.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,237 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
ScopedPointer.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_SCOPED_POINTER_HPP_INCLUDED
-
18 #define DISTRHO_SCOPED_POINTER_HPP_INCLUDED
-
19 
-
20 #include "../DistrhoUtils.hpp"
-
21 
-
22 #include <algorithm>
-
23 
-
24 START_NAMESPACE_DISTRHO
-
25 
-
26 // -----------------------------------------------------------------------
-
27 // The following code was based from juce-core ScopedPointer class
-
28 // Copyright (C) 2013 Raw Material Software Ltd.
-
29 
-
30 //==============================================================================
-
31 /**
-
32  This class holds a pointer which is automatically deleted when this object goes
-
33  out of scope.
-
34 
-
35  Once a pointer has been passed to a ScopedPointer, it will make sure that the pointer
-
36  gets deleted when the ScopedPointer is deleted. Using the ScopedPointer on the stack or
-
37  as member variables is a good way to use RAII to avoid accidentally leaking dynamically
-
38  created objects.
-
39 
-
40  A ScopedPointer can be used in pretty much the same way that you'd use a normal pointer
-
41  to an object. If you use the assignment operator to assign a different object to a
-
42  ScopedPointer, the old one will be automatically deleted.
-
43 
-
44  A const ScopedPointer is guaranteed not to lose ownership of its object or change the
-
45  object to which it points during its lifetime. This means that making a copy of a const
-
46  ScopedPointer is impossible, as that would involve the new copy taking ownership from the
-
47  old one.
-
48 
-
49  If you need to get a pointer out of a ScopedPointer without it being deleted, you
-
50  can use the release() method.
-
51 
-
52  Something to note is the main difference between this class and the std::auto_ptr class,
-
53  which is that ScopedPointer provides a cast-to-object operator, wheras std::auto_ptr
-
54  requires that you always call get() to retrieve the pointer. The advantages of providing
-
55  the cast is that you don't need to call get(), so can use the ScopedPointer in pretty much
-
56  exactly the same way as a raw pointer. The disadvantage is that the compiler is free to
-
57  use the cast in unexpected and sometimes dangerous ways - in particular, it becomes difficult
-
58  to return a ScopedPointer as the result of a function. To avoid this causing errors,
-
59  ScopedPointer contains an overloaded constructor that should cause a syntax error in these
-
60  circumstances, but it does mean that instead of returning a ScopedPointer from a function,
-
61  you'd need to return a raw pointer (or use a std::auto_ptr instead).
-
62 */
-
63 template<class ObjectType>
- -
65 {
-
66 public:
-
67  //==============================================================================
-
68  /** Creates a ScopedPointer containing a null pointer. */
-
69  ScopedPointer() noexcept
-
70  : object(nullptr) {}
-
71 
-
72  /** Creates a ScopedPointer that owns the specified object. */
-
73  ScopedPointer(ObjectType* const objectToTakePossessionOf) noexcept
-
74  : object(objectToTakePossessionOf) {}
-
75 
-
76  /** Creates a ScopedPointer that takes its pointer from another ScopedPointer.
-
77 
-
78  Because a pointer can only belong to one ScopedPointer, this transfers
-
79  the pointer from the other object to this one, and the other object is reset to
-
80  be a null pointer.
-
81  */
-
82  ScopedPointer(ScopedPointer& objectToTransferFrom) noexcept
-
83  : object(objectToTransferFrom.object)
-
84  {
-
85  objectToTransferFrom.object = nullptr;
-
86  }
-
87 
-
88  /** Destructor.
-
89  This will delete the object that this ScopedPointer currently refers to.
-
90  */
- -
92  {
-
93  delete object;
-
94  }
-
95 
-
96  /** Changes this ScopedPointer to point to a new object.
-
97 
-
98  Because a pointer can only belong to one ScopedPointer, this transfers
-
99  the pointer from the other object to this one, and the other object is reset to
-
100  be a null pointer.
-
101 
-
102  If this ScopedPointer already points to an object, that object
-
103  will first be deleted.
-
104  */
-
105  ScopedPointer& operator=(ScopedPointer& objectToTransferFrom)
-
106  {
-
107  if (this != objectToTransferFrom.getAddress())
-
108  {
-
109  // Two ScopedPointers should never be able to refer to the same object - if
-
110  // this happens, you must have done something dodgy!
-
111  DISTRHO_SAFE_ASSERT_RETURN(object == nullptr || object != objectToTransferFrom.object, *this);
-
112 
-
113  ObjectType* const oldObject = object;
-
114  object = objectToTransferFrom.object;
-
115  objectToTransferFrom.object = nullptr;
-
116  delete oldObject;
-
117  }
-
118 
-
119  return *this;
-
120  }
-
121 
-
122  /** Changes this ScopedPointer to point to a new object.
-
123 
-
124  If this ScopedPointer already points to an object, that object
-
125  will first be deleted.
-
126 
-
127  The pointer that you pass in may be a nullptr.
-
128  */
-
129  ScopedPointer& operator=(ObjectType* const newObjectToTakePossessionOf)
-
130  {
-
131  if (object != newObjectToTakePossessionOf)
-
132  {
-
133  ObjectType* const oldObject = object;
-
134  object = newObjectToTakePossessionOf;
-
135  delete oldObject;
-
136  }
-
137 
-
138  return *this;
-
139  }
-
140 
-
141  //==============================================================================
-
142  /** Returns the object that this ScopedPointer refers to. */
-
143  operator ObjectType*() const noexcept { return object; }
-
144 
-
145  /** Returns the object that this ScopedPointer refers to. */
-
146  ObjectType* get() const noexcept { return object; }
-
147 
-
148  /** Returns the object that this ScopedPointer refers to. */
-
149  ObjectType& operator*() const noexcept { return *object; }
-
150 
-
151  /** Lets you access methods and properties of the object that this ScopedPointer refers to. */
-
152  ObjectType* operator->() const noexcept { return object; }
-
153 
-
154  //==============================================================================
-
155  /** Removes the current object from this ScopedPointer without deleting it.
-
156  This will return the current object, and set the ScopedPointer to a null pointer.
-
157  */
-
158  ObjectType* release() noexcept { ObjectType* const o = object; object = nullptr; return o; }
-
159 
-
160  //==============================================================================
-
161  /** Swaps this object with that of another ScopedPointer.
-
162  The two objects simply exchange their pointers.
-
163  */
-
164  void swapWith(ScopedPointer<ObjectType>& other) noexcept
-
165  {
-
166  // Two ScopedPointers should never be able to refer to the same object - if
-
167  // this happens, you must have done something dodgy!
-
168  DISTRHO_SAFE_ASSERT_RETURN(object != other.object || this == other.getAddress() || object == nullptr,);
-
169 
-
170  std::swap(object, other.object);
-
171  }
-
172 
-
173 private:
-
174  //==============================================================================
-
175  ObjectType* object;
-
176 
-
177  // (Required as an alternative to the overloaded & operator).
-
178  const ScopedPointer* getAddress() const noexcept { return this; }
-
179 
-
180 #ifndef _MSC_VER // (MSVC can't deal with multiple copy constructors)
-
181  /* The copy constructors are private to stop people accidentally copying a const ScopedPointer
-
182  (the compiler would let you do so by implicitly casting the source to its raw object pointer).
-
183 
-
184  A side effect of this is that in a compiler that doesn't support C++11, you may hit an
-
185  error when you write something like this:
-
186 
-
187  ScopedPointer<MyClass> m = new MyClass(); // Compile error: copy constructor is private.
-
188 
-
189  Even though the compiler would normally ignore the assignment here, it can't do so when the
-
190  copy constructor is private. It's very easy to fix though - just write it like this:
-
191 
-
192  ScopedPointer<MyClass> m (new MyClass()); // Compiles OK
-
193 
-
194  It's probably best to use the latter form when writing your object declarations anyway, as
-
195  this is a better representation of the code that you actually want the compiler to produce.
-
196  */
-
197 # ifdef DISTRHO_PROPER_CPP11_SUPPORT
-
198  ScopedPointer(const ScopedPointer&) = delete;
-
199  ScopedPointer& operator=(const ScopedPointer&) = delete;
-
200 # else
- - -
203 # endif
-
204 #endif
-
205 };
-
206 
-
207 //==============================================================================
-
208 /** Compares a ScopedPointer with another pointer.
-
209  This can be handy for checking whether this is a null pointer.
-
210 */
-
211 template<class ObjectType>
-
212 bool operator==(const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
-
213 {
-
214  return static_cast<ObjectType*>(pointer1) == pointer2;
-
215 }
-
216 
-
217 /** Compares a ScopedPointer with another pointer.
-
218  This can be handy for checking whether this is a null pointer.
-
219 */
-
220 template<class ObjectType>
-
221 bool operator!=(const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
-
222 {
-
223  return static_cast<ObjectType*>(pointer1) != pointer2;
-
224 }
-
225 
-
226 // -----------------------------------------------------------------------
-
227 
-
228 END_NAMESPACE_DISTRHO
-
229 
-
230 #endif // DISTRHO_SCOPED_POINTER_HPP_INCLUDED
-
ObjectType * release() noexcept
Definition: ScopedPointer.hpp:158
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_SCOPED_POINTER_HPP_INCLUDED
18 #define DISTRHO_SCOPED_POINTER_HPP_INCLUDED
19 
20 #include "../DistrhoUtils.hpp"
21 
22 #include <algorithm>
23 
24 START_NAMESPACE_DISTRHO
25 
26 // -----------------------------------------------------------------------
27 // The following code was based from juce-core ScopedPointer class
28 // Copyright (C) 2013 Raw Material Software Ltd.
29 
30 //==============================================================================
31 /**
32  This class holds a pointer which is automatically deleted when this object goes
33  out of scope.
34 
35  Once a pointer has been passed to a ScopedPointer, it will make sure that the pointer
36  gets deleted when the ScopedPointer is deleted. Using the ScopedPointer on the stack or
37  as member variables is a good way to use RAII to avoid accidentally leaking dynamically
38  created objects.
39 
40  A ScopedPointer can be used in pretty much the same way that you'd use a normal pointer
41  to an object. If you use the assignment operator to assign a different object to a
42  ScopedPointer, the old one will be automatically deleted.
43 
44  A const ScopedPointer is guaranteed not to lose ownership of its object or change the
45  object to which it points during its lifetime. This means that making a copy of a const
46  ScopedPointer is impossible, as that would involve the new copy taking ownership from the
47  old one.
48 
49  If you need to get a pointer out of a ScopedPointer without it being deleted, you
50  can use the release() method.
51 
52  Something to note is the main difference between this class and the std::auto_ptr class,
53  which is that ScopedPointer provides a cast-to-object operator, wheras std::auto_ptr
54  requires that you always call get() to retrieve the pointer. The advantages of providing
55  the cast is that you don't need to call get(), so can use the ScopedPointer in pretty much
56  exactly the same way as a raw pointer. The disadvantage is that the compiler is free to
57  use the cast in unexpected and sometimes dangerous ways - in particular, it becomes difficult
58  to return a ScopedPointer as the result of a function. To avoid this causing errors,
59  ScopedPointer contains an overloaded constructor that should cause a syntax error in these
60  circumstances, but it does mean that instead of returning a ScopedPointer from a function,
61  you'd need to return a raw pointer (or use a std::auto_ptr instead).
62 */
63 template<class ObjectType>
65 {
66 public:
67  //==============================================================================
68  /** Creates a ScopedPointer containing a null pointer. */
69  ScopedPointer() noexcept
70  : object(nullptr) {}
71 
72  /** Creates a ScopedPointer that owns the specified object. */
73  ScopedPointer(ObjectType* const objectToTakePossessionOf) noexcept
74  : object(objectToTakePossessionOf) {}
75 
76  /** Creates a ScopedPointer that takes its pointer from another ScopedPointer.
77 
78  Because a pointer can only belong to one ScopedPointer, this transfers
79  the pointer from the other object to this one, and the other object is reset to
80  be a null pointer.
81  */
82  ScopedPointer(ScopedPointer& objectToTransferFrom) noexcept
83  : object(objectToTransferFrom.object)
84  {
85  objectToTransferFrom.object = nullptr;
86  }
87 
88  /** Destructor.
89  This will delete the object that this ScopedPointer currently refers to.
90  */
92  {
93  delete object;
94  }
95 
96  /** Changes this ScopedPointer to point to a new object.
97 
98  Because a pointer can only belong to one ScopedPointer, this transfers
99  the pointer from the other object to this one, and the other object is reset to
100  be a null pointer.
101 
102  If this ScopedPointer already points to an object, that object
103  will first be deleted.
104  */
105  ScopedPointer& operator=(ScopedPointer& objectToTransferFrom)
106  {
107  if (this != objectToTransferFrom.getAddress())
108  {
109  // Two ScopedPointers should never be able to refer to the same object - if
110  // this happens, you must have done something dodgy!
111  DISTRHO_SAFE_ASSERT_RETURN(object == nullptr || object != objectToTransferFrom.object, *this);
112 
113  ObjectType* const oldObject = object;
114  object = objectToTransferFrom.object;
115  objectToTransferFrom.object = nullptr;
116  delete oldObject;
117  }
118 
119  return *this;
120  }
121 
122  /** Changes this ScopedPointer to point to a new object.
123 
124  If this ScopedPointer already points to an object, that object
125  will first be deleted.
126 
127  The pointer that you pass in may be a nullptr.
128  */
129  ScopedPointer& operator=(ObjectType* const newObjectToTakePossessionOf)
130  {
131  if (object != newObjectToTakePossessionOf)
132  {
133  ObjectType* const oldObject = object;
134  object = newObjectToTakePossessionOf;
135  delete oldObject;
136  }
137 
138  return *this;
139  }
140 
141  //==============================================================================
142  /** Returns the object that this ScopedPointer refers to. */
143  operator ObjectType*() const noexcept { return object; }
144 
145  /** Returns the object that this ScopedPointer refers to. */
146  ObjectType* get() const noexcept { return object; }
147 
148  /** Returns the object that this ScopedPointer refers to. */
149  ObjectType& operator*() const noexcept { return *object; }
150 
151  /** Lets you access methods and properties of the object that this ScopedPointer refers to. */
152  ObjectType* operator->() const noexcept { return object; }
153 
154  //==============================================================================
155  /** Removes the current object from this ScopedPointer without deleting it.
156  This will return the current object, and set the ScopedPointer to a null pointer.
157  */
158  ObjectType* release() noexcept { ObjectType* const o = object; object = nullptr; return o; }
159 
160  //==============================================================================
161  /** Swaps this object with that of another ScopedPointer.
162  The two objects simply exchange their pointers.
163  */
164  void swapWith(ScopedPointer<ObjectType>& other) noexcept
165  {
166  // Two ScopedPointers should never be able to refer to the same object - if
167  // this happens, you must have done something dodgy!
168  DISTRHO_SAFE_ASSERT_RETURN(object != other.object || this == other.getAddress() || object == nullptr,);
169 
170  std::swap(object, other.object);
171  }
172 
173 private:
174  //==============================================================================
175  ObjectType* object;
176 
177  // (Required as an alternative to the overloaded & operator).
178  const ScopedPointer* getAddress() const noexcept { return this; }
179 
180 #ifndef _MSC_VER // (MSVC can't deal with multiple copy constructors)
181  /* The copy constructors are private to stop people accidentally copying a const ScopedPointer
182  (the compiler would let you do so by implicitly casting the source to its raw object pointer).
183 
184  A side effect of this is that in a compiler that doesn't support C++11, you may hit an
185  error when you write something like this:
186 
187  ScopedPointer<MyClass> m = new MyClass(); // Compile error: copy constructor is private.
188 
189  Even though the compiler would normally ignore the assignment here, it can't do so when the
190  copy constructor is private. It's very easy to fix though - just write it like this:
191 
192  ScopedPointer<MyClass> m (new MyClass()); // Compiles OK
193 
194  It's probably best to use the latter form when writing your object declarations anyway, as
195  this is a better representation of the code that you actually want the compiler to produce.
196  */
197 # ifdef DISTRHO_PROPER_CPP11_SUPPORT
198  ScopedPointer(const ScopedPointer&) = delete;
199  ScopedPointer& operator=(const ScopedPointer&) = delete;
200 # else
203 # endif
204 #endif
205 };
206 
207 //==============================================================================
208 /** Compares a ScopedPointer with another pointer.
209  This can be handy for checking whether this is a null pointer.
210 */
211 template<class ObjectType>
212 bool operator==(const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
213 {
214  return static_cast<ObjectType*>(pointer1) == pointer2;
215 }
216 
217 /** Compares a ScopedPointer with another pointer.
218  This can be handy for checking whether this is a null pointer.
219 */
220 template<class ObjectType>
221 bool operator!=(const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
222 {
223  return static_cast<ObjectType*>(pointer1) != pointer2;
224 }
225 
226 // -----------------------------------------------------------------------
227 
228 END_NAMESPACE_DISTRHO
229 
230 #endif // DISTRHO_SCOPED_POINTER_HPP_INCLUDED
ObjectType * release() noexcept
Definition: ScopedPointer.hpp:158
~ScopedPointer()
Definition: ScopedPointer.hpp:91
ObjectType & operator*() const noexcept
Definition: ScopedPointer.hpp:149
ScopedPointer(ObjectType *const objectToTakePossessionOf) noexcept
Definition: ScopedPointer.hpp:73
@@ -331,9 +80,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/Sleep_8hpp_source.html b/Sleep_8hpp_source.html index 722d5c89..ce0af567 100644 --- a/Sleep_8hpp_source.html +++ b/Sleep_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra/Sleep.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,80 +66,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Sleep.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_SLEEP_HPP_INCLUDED
-
18 #define DISTRHO_SLEEP_HPP_INCLUDED
-
19 
-
20 #include "../DistrhoUtils.hpp"
-
21 
-
22 #ifdef DISTRHO_OS_WINDOWS
-
23 # include <winsock2.h>
-
24 # include <windows.h>
-
25 #else
-
26 # include <unistd.h>
-
27 #endif
-
28 
-
29 // -----------------------------------------------------------------------
-
30 // d_*sleep
-
31 
-
32 /*
-
33  * Sleep for 'secs' seconds.
-
34  */
-
35 static inline
-
36 void d_sleep(const uint secs) noexcept
-
37 {
-
38  DISTRHO_SAFE_ASSERT_RETURN(secs > 0,);
-
39 
-
40  try {
-
41 #ifdef DISTRHO_OS_WINDOWS
-
42  ::Sleep(secs * 1000);
-
43 #else
-
44  ::sleep(secs);
-
45 #endif
-
46  } DISTRHO_SAFE_EXCEPTION("d_sleep");
-
47 }
-
48 
-
49 /*
-
50  * Sleep for 'msecs' milliseconds.
-
51  */
-
52 static inline
-
53 void d_msleep(const uint msecs) noexcept
-
54 {
-
55  DISTRHO_SAFE_ASSERT_RETURN(msecs > 0,);
-
56 
-
57  try {
-
58 #ifdef DISTRHO_OS_WINDOWS
-
59  ::Sleep(msecs);
-
60 #else
-
61  ::usleep(msecs * 1000);
-
62 #endif
-
63  } DISTRHO_SAFE_EXCEPTION("d_msleep");
-
64 }
-
65 
-
66 // -----------------------------------------------------------------------
-
67 
-
68 #endif // DISTRHO_SLEEP_HPP_INCLUDED
-
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_SLEEP_HPP_INCLUDED
18 #define DISTRHO_SLEEP_HPP_INCLUDED
19 
20 #include "../DistrhoUtils.hpp"
21 
22 #ifdef DISTRHO_OS_WINDOWS
23 # include <winsock2.h>
24 # include <windows.h>
25 #else
26 # include <unistd.h>
27 #endif
28 
29 // -----------------------------------------------------------------------
30 // d_*sleep
31 
32 /*
33  * Sleep for 'secs' seconds.
34  */
35 static inline
36 void d_sleep(const uint secs) noexcept
37 {
38  DISTRHO_SAFE_ASSERT_RETURN(secs > 0,);
39 
40  try {
41 #ifdef DISTRHO_OS_WINDOWS
42  ::Sleep(secs * 1000);
43 #else
44  ::sleep(secs);
45 #endif
46  } DISTRHO_SAFE_EXCEPTION("d_sleep");
47 }
48 
49 /*
50  * Sleep for 'msecs' milliseconds.
51  */
52 static inline
53 void d_msleep(const uint msecs) noexcept
54 {
55  DISTRHO_SAFE_ASSERT_RETURN(msecs > 0,);
56 
57  try {
58 #ifdef DISTRHO_OS_WINDOWS
59  ::Sleep(msecs);
60 #else
61  ::usleep(msecs * 1000);
62 #endif
63  } DISTRHO_SAFE_EXCEPTION("d_msleep");
64 }
65 
66 // -----------------------------------------------------------------------
67 
68 #endif // DISTRHO_SLEEP_HPP_INCLUDED
diff --git a/StandaloneWindow_8hpp_source.html b/StandaloneWindow_8hpp_source.html index cb651230..b2d79046 100644 --- a/StandaloneWindow_8hpp_source.html +++ b/StandaloneWindow_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/StandaloneWindow.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,68 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
StandaloneWindow.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_STANDALONE_WINDOW_HPP_INCLUDED
-
18 #define DGL_STANDALONE_WINDOW_HPP_INCLUDED
-
19 
-
20 #include "Application.hpp"
-
21 #include "Widget.hpp"
-
22 #include "Window.hpp"
-
23 
-
24 START_NAMESPACE_DGL
-
25 
-
26 // -----------------------------------------------------------------------
-
27 
- -
29  public Window
-
30 {
-
31 public:
-
32  /**
-
33  Constructor.
-
34  */
- -
36 
-
37  /**
-
38  Show window and execute application.
-
39  */
-
40  void exec();
-
41 
-
42 private:
-
43  Widget* fWidget;
-
44 
-
45  /** @internal */
-
46  void onReshape(uint width, uint height) override;
-
47 
-
48  /** @internal */
-
49  void _addWidget(Widget* widget) override;
-
50 
-
51  /** @internal */
-
52  void _removeWidget(Widget* widget) override;
-
53 
-
54  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(StandaloneWindow)
-
55 };
-
56 
-
57 // -----------------------------------------------------------------------
-
58 
-
59 END_NAMESPACE_DGL
-
60 
-
61 #endif // DGL_STANDALONE_WINDOW_HPP_INCLUDED
-
Definition: Window.hpp:34
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_STANDALONE_WINDOW_HPP_INCLUDED
18 #define DGL_STANDALONE_WINDOW_HPP_INCLUDED
19 
20 #include "Application.hpp"
21 #include "Widget.hpp"
22 #include "Window.hpp"
23 
24 START_NAMESPACE_DGL
25 
26 // -----------------------------------------------------------------------
27 
29  public Window
30 {
31 public:
32  /**
33  Constructor.
34  */
36 
37  /**
38  Show window and execute application.
39  */
40  void exec();
41 
42 private:
43  Widget* fWidget;
44 
45  /** @internal */
46  void onReshape(uint width, uint height) override;
47 
48  /** @internal */
49  void _addWidget(Widget* widget) override;
50 
51  /** @internal */
52  void _removeWidget(Widget* widget) override;
53 
54  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(StandaloneWindow)
55 };
56 
57 // -----------------------------------------------------------------------
58 
59 END_NAMESPACE_DGL
60 
61 #endif // DGL_STANDALONE_WINDOW_HPP_INCLUDED
Definition: Window.hpp:34
Definition: StandaloneWindow.hpp:28
Definition: Application.hpp:41
@@ -157,9 +75,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/String_8hpp_source.html b/String_8hpp_source.html index 25ba0c95..165775ae 100644 --- a/String_8hpp_source.html +++ b/String_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra/String.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,864 +66,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
String.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_STRING_HPP_INCLUDED
-
18 #define DISTRHO_STRING_HPP_INCLUDED
-
19 
-
20 #include "../DistrhoUtils.hpp"
-
21 
-
22 #include <algorithm>
-
23 
-
24 START_NAMESPACE_DISTRHO
-
25 
-
26 // -----------------------------------------------------------------------
-
27 // String class
-
28 
-
29 class String
-
30 {
-
31 public:
-
32  // -------------------------------------------------------------------
-
33  // constructors (no explicit conversions allowed)
-
34 
-
35  /*
-
36  * Empty string.
-
37  */
-
38  explicit String() noexcept
-
39  : fBuffer(_null()),
-
40  fBufferLen(0) {}
-
41 
-
42  /*
-
43  * Simple character.
-
44  */
-
45  explicit String(const char c) noexcept
-
46  : fBuffer(_null()),
-
47  fBufferLen(0)
-
48  {
-
49  char ch[2];
-
50  ch[0] = c;
-
51  ch[1] = '\0';
-
52 
-
53  _dup(ch);
-
54  }
-
55 
-
56  /*
-
57  * Simple char string.
-
58  */
-
59  explicit String(char* const strBuf, const bool copyData = true) noexcept
-
60  : fBuffer(_null()),
-
61  fBufferLen(0)
-
62  {
-
63  if (copyData || strBuf == nullptr)
-
64  {
-
65  _dup(strBuf);
-
66  }
-
67  else
-
68  {
-
69  fBuffer = strBuf;
-
70  fBufferLen = std::strlen(strBuf);
-
71  }
-
72 
-
73  }
-
74 
-
75  /*
-
76  * Simple const char string.
-
77  */
-
78  explicit String(const char* const strBuf) noexcept
-
79  : fBuffer(_null()),
-
80  fBufferLen(0)
-
81  {
-
82  _dup(strBuf);
-
83  }
-
84 
-
85  /*
-
86  * Integer.
-
87  */
-
88  explicit String(const int value) noexcept
-
89  : fBuffer(_null()),
-
90  fBufferLen(0)
-
91  {
-
92  char strBuf[0xff+1];
-
93  std::snprintf(strBuf, 0xff, "%d", value);
-
94  strBuf[0xff] = '\0';
-
95 
-
96  _dup(strBuf);
-
97  }
-
98 
-
99  /*
-
100  * Unsigned integer, possibly in hexadecimal.
-
101  */
-
102  explicit String(const unsigned int value, const bool hexadecimal = false) noexcept
-
103  : fBuffer(_null()),
-
104  fBufferLen(0)
-
105  {
-
106  char strBuf[0xff+1];
-
107  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%x" : "%u", value);
-
108  strBuf[0xff] = '\0';
-
109 
-
110  _dup(strBuf);
-
111  }
-
112 
-
113  /*
-
114  * Long integer.
-
115  */
-
116  explicit String(const long value) noexcept
-
117  : fBuffer(_null()),
-
118  fBufferLen(0)
-
119  {
-
120  char strBuf[0xff+1];
-
121  std::snprintf(strBuf, 0xff, "%ld", value);
-
122  strBuf[0xff] = '\0';
-
123 
-
124  _dup(strBuf);
-
125  }
-
126 
-
127  /*
-
128  * Long unsigned integer, possibly hexadecimal.
-
129  */
-
130  explicit String(const unsigned long value, const bool hexadecimal = false) noexcept
-
131  : fBuffer(_null()),
-
132  fBufferLen(0)
-
133  {
-
134  char strBuf[0xff+1];
-
135  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%lx" : "%lu", value);
-
136  strBuf[0xff] = '\0';
-
137 
-
138  _dup(strBuf);
-
139  }
-
140 
-
141  /*
-
142  * Long long integer.
-
143  */
-
144  explicit String(const long long value) noexcept
-
145  : fBuffer(_null()),
-
146  fBufferLen(0)
-
147  {
-
148  char strBuf[0xff+1];
-
149  std::snprintf(strBuf, 0xff, "%lld", value);
-
150  strBuf[0xff] = '\0';
-
151 
-
152  _dup(strBuf);
-
153  }
-
154 
-
155  /*
-
156  * Long long unsigned integer, possibly hexadecimal.
-
157  */
-
158  explicit String(const unsigned long long value, const bool hexadecimal = false) noexcept
-
159  : fBuffer(_null()),
-
160  fBufferLen(0)
-
161  {
-
162  char strBuf[0xff+1];
-
163  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%llx" : "%llu", value);
-
164  strBuf[0xff] = '\0';
-
165 
-
166  _dup(strBuf);
-
167  }
-
168 
-
169  /*
-
170  * Single-precision floating point number.
-
171  */
-
172  explicit String(const float value) noexcept
-
173  : fBuffer(_null()),
-
174  fBufferLen(0)
-
175  {
-
176  char strBuf[0xff+1];
-
177  std::snprintf(strBuf, 0xff, "%f", value);
-
178  strBuf[0xff] = '\0';
-
179 
-
180  _dup(strBuf);
-
181  }
-
182 
-
183  /*
-
184  * Double-precision floating point number.
-
185  */
-
186  explicit String(const double value) noexcept
-
187  : fBuffer(_null()),
-
188  fBufferLen(0)
-
189  {
-
190  char strBuf[0xff+1];
-
191  std::snprintf(strBuf, 0xff, "%g", value);
-
192  strBuf[0xff] = '\0';
-
193 
-
194  _dup(strBuf);
-
195  }
-
196 
-
197  // -------------------------------------------------------------------
-
198  // non-explicit constructor
-
199 
-
200  /*
-
201  * Create string from another string.
-
202  */
-
203  String(const String& str) noexcept
-
204  : fBuffer(_null()),
-
205  fBufferLen(0)
-
206  {
-
207  _dup(str.fBuffer);
-
208  }
-
209 
-
210  // -------------------------------------------------------------------
-
211  // destructor
-
212 
-
213  /*
-
214  * Destructor.
-
215  */
-
216  ~String() noexcept
-
217  {
-
218  DISTRHO_SAFE_ASSERT_RETURN(fBuffer != nullptr,);
-
219 
-
220  if (fBuffer == _null())
-
221  return;
-
222 
-
223  std::free(fBuffer);
-
224 
-
225  fBuffer = nullptr;
-
226  fBufferLen = 0;
-
227  }
-
228 
-
229  // -------------------------------------------------------------------
-
230  // public methods
-
231 
-
232  /*
-
233  * Get length of the string.
-
234  */
-
235  std::size_t length() const noexcept
-
236  {
-
237  return fBufferLen;
-
238  }
-
239 
-
240  /*
-
241  * Check if the string is empty.
-
242  */
-
243  bool isEmpty() const noexcept
-
244  {
-
245  return (fBufferLen == 0);
-
246  }
-
247 
-
248  /*
-
249  * Check if the string is not empty.
-
250  */
-
251  bool isNotEmpty() const noexcept
-
252  {
-
253  return (fBufferLen != 0);
-
254  }
-
255 
-
256  /*
-
257  * Check if the string contains another string, optionally ignoring case.
-
258  */
-
259  bool contains(const char* const strBuf, const bool ignoreCase = false) const noexcept
-
260  {
-
261  DISTRHO_SAFE_ASSERT_RETURN(strBuf != nullptr, false);
-
262 
-
263  if (ignoreCase)
-
264  {
-
265 #ifdef __USE_GNU
-
266  return (strcasestr(fBuffer, strBuf) != nullptr);
-
267 #else
-
268  String tmp1(fBuffer), tmp2(strBuf);
-
269 
-
270  // memory allocation failed or empty string(s)
-
271  if (tmp1.fBuffer == _null() || tmp2.fBuffer == _null())
-
272  return false;
-
273 
-
274  tmp1.toLower();
-
275  tmp2.toLower();
-
276  return (std::strstr(tmp1, tmp2) != nullptr);
-
277 #endif
-
278  }
-
279 
-
280  return (std::strstr(fBuffer, strBuf) != nullptr);
-
281  }
-
282 
-
283  /*
-
284  * Check if character at 'pos' is a digit.
-
285  */
-
286  bool isDigit(const std::size_t pos) const noexcept
-
287  {
-
288  DISTRHO_SAFE_ASSERT_RETURN(pos < fBufferLen, false);
-
289 
-
290  return (fBuffer[pos] >= '0' && fBuffer[pos] <= '9');
-
291  }
-
292 
-
293  /*
-
294  * Check if the string starts with the character 'c'.
-
295  */
-
296  bool startsWith(const char c) const noexcept
-
297  {
-
298  DISTRHO_SAFE_ASSERT_RETURN(c != '\0', false);
-
299 
-
300  return (fBufferLen > 0 && fBuffer[0] == c);
-
301  }
-
302 
-
303  /*
-
304  * Check if the string starts with the string 'prefix'.
-
305  */
-
306  bool startsWith(const char* const prefix) const noexcept
-
307  {
-
308  DISTRHO_SAFE_ASSERT_RETURN(prefix != nullptr, false);
-
309 
-
310  const std::size_t prefixLen(std::strlen(prefix));
-
311 
-
312  if (fBufferLen < prefixLen)
-
313  return false;
-
314 
-
315  return (std::strncmp(fBuffer, prefix, prefixLen) == 0);
-
316  }
-
317 
-
318  /*
-
319  * Check if the string ends with the character 'c'.
-
320  */
-
321  bool endsWith(const char c) const noexcept
-
322  {
-
323  DISTRHO_SAFE_ASSERT_RETURN(c != '\0', false);
-
324 
-
325  return (fBufferLen > 0 && fBuffer[fBufferLen-1] == c);
-
326  }
-
327 
-
328  /*
-
329  * Check if the string ends with the string 'suffix'.
-
330  */
-
331  bool endsWith(const char* const suffix) const noexcept
-
332  {
-
333  DISTRHO_SAFE_ASSERT_RETURN(suffix != nullptr, false);
-
334 
-
335  const std::size_t suffixLen(std::strlen(suffix));
-
336 
-
337  if (fBufferLen < suffixLen)
-
338  return false;
-
339 
-
340  return (std::strncmp(fBuffer + (fBufferLen-suffixLen), suffix, suffixLen) == 0);
-
341  }
-
342 
-
343  /*
-
344  * Find the first occurrence of character 'c' in the string.
-
345  * Returns "length()" if the character is not found.
-
346  */
-
347  std::size_t find(const char c, bool* const found = nullptr) const noexcept
-
348  {
-
349  if (fBufferLen == 0 || c == '\0')
-
350  {
-
351  if (found != nullptr)
-
352  *found = false;
-
353  return fBufferLen;
-
354  }
-
355 
-
356  for (std::size_t i=0; i < fBufferLen; ++i)
-
357  {
-
358  if (fBuffer[i] == c)
-
359  {
-
360  if (found != nullptr)
-
361  *found = true;
-
362  return i;
-
363  }
-
364  }
-
365 
-
366  if (found != nullptr)
-
367  *found = false;
-
368  return fBufferLen;
-
369  }
-
370 
-
371  /*
-
372  * Find the first occurrence of string 'strBuf' in the string.
-
373  * Returns "length()" if the string is not found.
-
374  */
-
375  std::size_t find(const char* const strBuf, bool* const found = nullptr) const noexcept
-
376  {
-
377  if (fBufferLen == 0 || strBuf == nullptr || strBuf[0] == '\0')
-
378  {
-
379  if (found != nullptr)
-
380  *found = false;
-
381  return fBufferLen;
-
382  }
-
383 
-
384  if (char* const subStrBuf = std::strstr(fBuffer, strBuf))
-
385  {
-
386  const ssize_t ret(subStrBuf - fBuffer);
-
387 
-
388  if (ret < 0)
-
389  {
-
390  // should never happen!
-
391  d_safe_assert("ret >= 0", __FILE__, __LINE__);
-
392 
-
393  if (found != nullptr)
-
394  *found = false;
-
395  return fBufferLen;
-
396  }
-
397 
-
398  if (found != nullptr)
-
399  *found = true;
-
400  return static_cast<std::size_t>(ret);
-
401  }
-
402 
-
403  if (found != nullptr)
-
404  *found = false;
-
405  return fBufferLen;
-
406  }
-
407 
-
408  /*
-
409  * Find the last occurrence of character 'c' in the string.
-
410  * Returns "length()" if the character is not found.
-
411  */
-
412  std::size_t rfind(const char c, bool* const found = nullptr) const noexcept
-
413  {
-
414  if (fBufferLen == 0 || c == '\0')
-
415  {
-
416  if (found != nullptr)
-
417  *found = false;
-
418  return fBufferLen;
-
419  }
-
420 
-
421  for (std::size_t i=fBufferLen; i > 0; --i)
-
422  {
-
423  if (fBuffer[i-1] == c)
-
424  {
-
425  if (found != nullptr)
-
426  *found = true;
-
427  return i-1;
-
428  }
-
429  }
-
430 
-
431  if (found != nullptr)
-
432  *found = false;
-
433  return fBufferLen;
-
434  }
-
435 
-
436  /*
-
437  * Find the last occurrence of string 'strBuf' in the string.
-
438  * Returns "length()" if the string is not found.
-
439  */
-
440  std::size_t rfind(const char* const strBuf, bool* const found = nullptr) const noexcept
-
441  {
-
442  if (found != nullptr)
-
443  *found = false;
-
444 
-
445  if (fBufferLen == 0 || strBuf == nullptr || strBuf[0] == '\0')
-
446  return fBufferLen;
-
447 
-
448  const std::size_t strBufLen(std::strlen(strBuf));
-
449 
-
450  std::size_t ret = fBufferLen;
-
451  const char* tmpBuf = fBuffer;
-
452 
-
453  for (std::size_t i=0; i < fBufferLen; ++i)
-
454  {
-
455  if (std::strstr(tmpBuf+1, strBuf) == nullptr && std::strncmp(tmpBuf, strBuf, strBufLen) == 0)
-
456  {
-
457  if (found != nullptr)
-
458  *found = true;
-
459  break;
-
460  }
-
461 
-
462  --ret;
-
463  ++tmpBuf;
-
464  }
-
465 
-
466  return fBufferLen-ret;
-
467  }
-
468 
-
469  /*
-
470  * Clear the string.
-
471  */
-
472  void clear() noexcept
-
473  {
-
474  truncate(0);
-
475  }
-
476 
-
477  /*
-
478  * Replace all occurrences of character 'before' with character 'after'.
-
479  */
-
480  String& replace(const char before, const char after) noexcept
-
481  {
-
482  DISTRHO_SAFE_ASSERT_RETURN(before != '\0' && after != '\0', *this);
-
483 
-
484  for (std::size_t i=0; i < fBufferLen; ++i)
-
485  {
-
486  if (fBuffer[i] == before)
-
487  fBuffer[i] = after;
-
488  }
-
489 
-
490  return *this;
-
491  }
-
492 
-
493  /*
-
494  * Truncate the string to size 'n'.
-
495  */
-
496  String& truncate(const std::size_t n) noexcept
-
497  {
-
498  if (n >= fBufferLen)
-
499  return *this;
-
500 
-
501  for (std::size_t i=n; i < fBufferLen; ++i)
-
502  fBuffer[i] = '\0';
-
503 
-
504  fBufferLen = n;
-
505 
-
506  return *this;
-
507  }
-
508 
-
509  /*
-
510  * Convert all non-basic characters to '_'.
-
511  */
-
512  String& toBasic() noexcept
-
513  {
-
514  for (std::size_t i=0; i < fBufferLen; ++i)
-
515  {
-
516  if (fBuffer[i] >= '0' && fBuffer[i] <= '9')
-
517  continue;
-
518  if (fBuffer[i] >= 'A' && fBuffer[i] <= 'Z')
-
519  continue;
-
520  if (fBuffer[i] >= 'a' && fBuffer[i] <= 'z')
-
521  continue;
-
522  if (fBuffer[i] == '_')
-
523  continue;
-
524 
-
525  fBuffer[i] = '_';
-
526  }
-
527 
-
528  return *this;
-
529  }
-
530 
-
531  /*
-
532  * Convert to all ascii characters to lowercase.
-
533  */
-
534  String& toLower() noexcept
-
535  {
-
536  static const char kCharDiff('a' - 'A');
-
537 
-
538  for (std::size_t i=0; i < fBufferLen; ++i)
-
539  {
-
540  if (fBuffer[i] >= 'A' && fBuffer[i] <= 'Z')
-
541  fBuffer[i] = static_cast<char>(fBuffer[i] + kCharDiff);
-
542  }
-
543 
-
544  return *this;
-
545  }
-
546 
-
547  /*
-
548  * Convert to all ascii characters to uppercase.
-
549  */
-
550  String& toUpper() noexcept
-
551  {
-
552  static const char kCharDiff('a' - 'A');
-
553 
-
554  for (std::size_t i=0; i < fBufferLen; ++i)
-
555  {
-
556  if (fBuffer[i] >= 'a' && fBuffer[i] <= 'z')
-
557  fBuffer[i] = static_cast<char>(fBuffer[i] - kCharDiff);
-
558  }
-
559 
-
560  return *this;
-
561  }
-
562 
-
563  /*
-
564  * Direct access to the string buffer (read-only).
-
565  */
-
566  const char* buffer() const noexcept
-
567  {
-
568  return fBuffer;
-
569  }
-
570 
-
571  // -------------------------------------------------------------------
-
572  // base64 stuff, based on http://www.adp-gmbh.ch/cpp/common/base64.html
-
573  // Copyright (C) 2004-2008 René Nyffenegger
-
574 
-
575  static String asBase64(const void* const data, const std::size_t dataSize)
-
576  {
-
577  static const char* const kBase64Chars =
-
578  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-
579  "abcdefghijklmnopqrstuvwxyz"
-
580  "0123456789+/";
-
581 
-
582  const std::size_t kTmpBufSize = std::min(d_nextPowerOf2(dataSize/3), 65536U);
-
583 
-
584  const uchar* bytesToEncode((const uchar*)data);
-
585 
-
586  uint i=0, j=0;
-
587  uint charArray3[3], charArray4[4];
-
588 
-
589  char strBuf[kTmpBufSize+1];
-
590  strBuf[kTmpBufSize] = '\0';
-
591  std::size_t strBufIndex = 0;
-
592 
-
593  String ret;
-
594 
-
595  for (std::size_t s=0; s<dataSize; ++s)
-
596  {
-
597  charArray3[i++] = *(bytesToEncode++);
-
598 
-
599  if (i == 3)
-
600  {
-
601  charArray4[0] = (charArray3[0] & 0xfc) >> 2;
-
602  charArray4[1] = ((charArray3[0] & 0x03) << 4) + ((charArray3[1] & 0xf0) >> 4);
-
603  charArray4[2] = ((charArray3[1] & 0x0f) << 2) + ((charArray3[2] & 0xc0) >> 6);
-
604  charArray4[3] = charArray3[2] & 0x3f;
-
605 
-
606  for (i=0; i<4; ++i)
-
607  strBuf[strBufIndex++] = kBase64Chars[charArray4[i]];
-
608 
-
609  if (strBufIndex >= kTmpBufSize-7)
-
610  {
-
611  strBuf[strBufIndex] = '\0';
-
612  strBufIndex = 0;
-
613  ret += strBuf;
-
614  }
-
615 
-
616  i = 0;
-
617  }
-
618  }
-
619 
-
620  if (i != 0)
-
621  {
-
622  for (j=i; j<3; ++j)
-
623  charArray3[j] = '\0';
-
624 
-
625  charArray4[0] = (charArray3[0] & 0xfc) >> 2;
-
626  charArray4[1] = ((charArray3[0] & 0x03) << 4) + ((charArray3[1] & 0xf0) >> 4);
-
627  charArray4[2] = ((charArray3[1] & 0x0f) << 2) + ((charArray3[2] & 0xc0) >> 6);
-
628  charArray4[3] = charArray3[2] & 0x3f;
-
629 
-
630  for (j=0; j<4 && i<3 && j<i+1; ++j)
-
631  strBuf[strBufIndex++] = kBase64Chars[charArray4[j]];
-
632 
-
633  for (; i++ < 3;)
-
634  strBuf[strBufIndex++] = '=';
-
635  }
-
636 
-
637  if (strBufIndex != 0)
-
638  {
-
639  strBuf[strBufIndex] = '\0';
-
640  ret += strBuf;
-
641  }
-
642 
-
643  return ret;
-
644  }
-
645 
-
646  // -------------------------------------------------------------------
-
647  // public operators
-
648 
-
649  operator const char*() const noexcept
-
650  {
-
651  return fBuffer;
-
652  }
-
653 
-
654  char operator[](const std::size_t pos) const noexcept
-
655  {
-
656  if (pos < fBufferLen)
-
657  return fBuffer[pos];
-
658 
-
659  d_safe_assert("pos < fBufferLen", __FILE__, __LINE__);
-
660 
-
661  static char fallback;
-
662  fallback = '\0';
-
663  return fallback;
-
664  }
-
665 
-
666  char& operator[](const std::size_t pos) noexcept
-
667  {
-
668  if (pos < fBufferLen)
-
669  return fBuffer[pos];
-
670 
-
671  d_safe_assert("pos < fBufferLen", __FILE__, __LINE__);
-
672 
-
673  static char fallback;
-
674  fallback = '\0';
-
675  return fallback;
-
676  }
-
677 
-
678  bool operator==(const char* const strBuf) const noexcept
-
679  {
-
680  return (strBuf != nullptr && std::strcmp(fBuffer, strBuf) == 0);
-
681  }
-
682 
-
683  bool operator==(const String& str) const noexcept
-
684  {
-
685  return operator==(str.fBuffer);
-
686  }
-
687 
-
688  bool operator!=(const char* const strBuf) const noexcept
-
689  {
-
690  return !operator==(strBuf);
-
691  }
-
692 
-
693  bool operator!=(const String& str) const noexcept
-
694  {
-
695  return !operator==(str.fBuffer);
-
696  }
-
697 
-
698  String& operator=(const char* const strBuf) noexcept
-
699  {
-
700  _dup(strBuf);
-
701 
-
702  return *this;
-
703  }
-
704 
-
705  String& operator=(const String& str) noexcept
-
706  {
-
707  _dup(str.fBuffer);
-
708 
-
709  return *this;
-
710  }
-
711 
-
712  String& operator+=(const char* const strBuf) noexcept
-
713  {
-
714  if (strBuf == nullptr)
-
715  return *this;
-
716 
-
717  const std::size_t newBufSize = fBufferLen + std::strlen(strBuf) + 1;
-
718  char newBuf[newBufSize];
-
719 
-
720  std::strcpy(newBuf, fBuffer);
-
721  std::strcat(newBuf, strBuf);
-
722 
-
723  _dup(newBuf, newBufSize-1);
-
724 
-
725  return *this;
-
726  }
-
727 
-
728  String& operator+=(const String& str) noexcept
-
729  {
-
730  return operator+=(str.fBuffer);
-
731  }
-
732 
-
733  String operator+(const char* const strBuf) noexcept
-
734  {
-
735  const std::size_t newBufSize = fBufferLen + ((strBuf != nullptr) ? std::strlen(strBuf) : 0) + 1;
-
736  char newBuf[newBufSize];
-
737 
-
738  std::strcpy(newBuf, fBuffer);
-
739 
-
740  if (strBuf != nullptr)
-
741  std::strcat(newBuf, strBuf);
-
742 
-
743  return String(newBuf);
-
744  }
-
745 
-
746  String operator+(const String& str) noexcept
-
747  {
-
748  return operator+(str.fBuffer);
-
749  }
-
750 
-
751  // -------------------------------------------------------------------
-
752 
-
753 private:
-
754  char* fBuffer; // the actual string buffer
-
755  std::size_t fBufferLen; // string length
-
756 
-
757  /*
-
758  * Static null string.
-
759  * Prevents allocation for new and/or empty strings.
-
760  */
-
761  static char* _null() noexcept
-
762  {
-
763  static char sNull = '\0';
-
764  return &sNull;
-
765  }
-
766 
-
767  /*
-
768  * Helper function.
-
769  * Called whenever the string needs to be allocated.
-
770  *
-
771  * Notes:
-
772  * - Allocates string only if 'strBuf' is not null and new string contents are different
-
773  * - If 'strBuf' is null, 'size' must be 0
-
774  */
-
775  void _dup(const char* const strBuf, const std::size_t size = 0) noexcept
-
776  {
-
777  if (strBuf != nullptr)
-
778  {
-
779  // don't recreate string if contents match
-
780  if (std::strcmp(fBuffer, strBuf) == 0)
-
781  return;
-
782 
-
783  if (fBuffer != _null())
-
784  std::free(fBuffer);
-
785 
-
786  fBufferLen = (size > 0) ? size : std::strlen(strBuf);
-
787  fBuffer = (char*)std::malloc(fBufferLen+1);
-
788 
-
789  if (fBuffer == nullptr)
-
790  {
-
791  fBuffer = _null();
-
792  fBufferLen = 0;
-
793  return;
-
794  }
-
795 
-
796  std::strcpy(fBuffer, strBuf);
-
797 
-
798  fBuffer[fBufferLen] = '\0';
-
799  }
-
800  else
-
801  {
-
802  DISTRHO_SAFE_ASSERT(size == 0);
-
803 
-
804  // don't recreate null string
-
805  if (fBuffer == _null())
-
806  return;
-
807 
-
808  DISTRHO_SAFE_ASSERT(fBuffer != nullptr);
-
809  std::free(fBuffer);
-
810 
-
811  fBuffer = _null();
-
812  fBufferLen = 0;
-
813  }
-
814  }
-
815 
-
816  DISTRHO_PREVENT_HEAP_ALLOCATION
-
817 };
-
818 
-
819 // -----------------------------------------------------------------------
-
820 
-
821 static inline
-
822 String operator+(const String& strBefore, const char* const strBufAfter) noexcept
-
823 {
-
824  const char* const strBufBefore = strBefore.buffer();
-
825  const std::size_t newBufSize = strBefore.length() + ((strBufAfter != nullptr) ? std::strlen(strBufAfter) : 0) + 1;
-
826  char newBuf[newBufSize];
-
827 
-
828  std::strcpy(newBuf, strBufBefore);
-
829  std::strcat(newBuf, strBufAfter);
-
830 
-
831  return String(newBuf);
-
832 }
-
833 
-
834 static inline
-
835 String operator+(const char* const strBufBefore, const String& strAfter) noexcept
-
836 {
-
837  const char* const strBufAfter = strAfter.buffer();
-
838  const std::size_t newBufSize = ((strBufBefore != nullptr) ? std::strlen(strBufBefore) : 0) + strAfter.length() + 1;
-
839  char newBuf[newBufSize];
-
840 
-
841  std::strcpy(newBuf, strBufBefore);
-
842  std::strcat(newBuf, strBufAfter);
-
843 
-
844  return String(newBuf);
-
845 }
-
846 
-
847 // -----------------------------------------------------------------------
-
848 
-
849 END_NAMESPACE_DISTRHO
-
850 
-
851 #endif // DISTRHO_STRING_HPP_INCLUDED
-
Definition: String.hpp:29
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_STRING_HPP_INCLUDED
18 #define DISTRHO_STRING_HPP_INCLUDED
19 
20 #include "../DistrhoUtils.hpp"
21 
22 #include <algorithm>
23 
24 START_NAMESPACE_DISTRHO
25 
26 // -----------------------------------------------------------------------
27 // String class
28 
29 class String
30 {
31 public:
32  // -------------------------------------------------------------------
33  // constructors (no explicit conversions allowed)
34 
35  /*
36  * Empty string.
37  */
38  explicit String() noexcept
39  : fBuffer(_null()),
40  fBufferLen(0) {}
41 
42  /*
43  * Simple character.
44  */
45  explicit String(const char c) noexcept
46  : fBuffer(_null()),
47  fBufferLen(0)
48  {
49  char ch[2];
50  ch[0] = c;
51  ch[1] = '\0';
52 
53  _dup(ch);
54  }
55 
56  /*
57  * Simple char string.
58  */
59  explicit String(char* const strBuf, const bool copyData = true) noexcept
60  : fBuffer(_null()),
61  fBufferLen(0)
62  {
63  if (copyData || strBuf == nullptr)
64  {
65  _dup(strBuf);
66  }
67  else
68  {
69  fBuffer = strBuf;
70  fBufferLen = std::strlen(strBuf);
71  }
72 
73  }
74 
75  /*
76  * Simple const char string.
77  */
78  explicit String(const char* const strBuf) noexcept
79  : fBuffer(_null()),
80  fBufferLen(0)
81  {
82  _dup(strBuf);
83  }
84 
85  /*
86  * Integer.
87  */
88  explicit String(const int value) noexcept
89  : fBuffer(_null()),
90  fBufferLen(0)
91  {
92  char strBuf[0xff+1];
93  std::snprintf(strBuf, 0xff, "%d", value);
94  strBuf[0xff] = '\0';
95 
96  _dup(strBuf);
97  }
98 
99  /*
100  * Unsigned integer, possibly in hexadecimal.
101  */
102  explicit String(const unsigned int value, const bool hexadecimal = false) noexcept
103  : fBuffer(_null()),
104  fBufferLen(0)
105  {
106  char strBuf[0xff+1];
107  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%x" : "%u", value);
108  strBuf[0xff] = '\0';
109 
110  _dup(strBuf);
111  }
112 
113  /*
114  * Long integer.
115  */
116  explicit String(const long value) noexcept
117  : fBuffer(_null()),
118  fBufferLen(0)
119  {
120  char strBuf[0xff+1];
121  std::snprintf(strBuf, 0xff, "%ld", value);
122  strBuf[0xff] = '\0';
123 
124  _dup(strBuf);
125  }
126 
127  /*
128  * Long unsigned integer, possibly hexadecimal.
129  */
130  explicit String(const unsigned long value, const bool hexadecimal = false) noexcept
131  : fBuffer(_null()),
132  fBufferLen(0)
133  {
134  char strBuf[0xff+1];
135  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%lx" : "%lu", value);
136  strBuf[0xff] = '\0';
137 
138  _dup(strBuf);
139  }
140 
141  /*
142  * Long long integer.
143  */
144  explicit String(const long long value) noexcept
145  : fBuffer(_null()),
146  fBufferLen(0)
147  {
148  char strBuf[0xff+1];
149  std::snprintf(strBuf, 0xff, "%lld", value);
150  strBuf[0xff] = '\0';
151 
152  _dup(strBuf);
153  }
154 
155  /*
156  * Long long unsigned integer, possibly hexadecimal.
157  */
158  explicit String(const unsigned long long value, const bool hexadecimal = false) noexcept
159  : fBuffer(_null()),
160  fBufferLen(0)
161  {
162  char strBuf[0xff+1];
163  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%llx" : "%llu", value);
164  strBuf[0xff] = '\0';
165 
166  _dup(strBuf);
167  }
168 
169  /*
170  * Single-precision floating point number.
171  */
172  explicit String(const float value) noexcept
173  : fBuffer(_null()),
174  fBufferLen(0)
175  {
176  char strBuf[0xff+1];
177  std::snprintf(strBuf, 0xff, "%f", value);
178  strBuf[0xff] = '\0';
179 
180  _dup(strBuf);
181  }
182 
183  /*
184  * Double-precision floating point number.
185  */
186  explicit String(const double value) noexcept
187  : fBuffer(_null()),
188  fBufferLen(0)
189  {
190  char strBuf[0xff+1];
191  std::snprintf(strBuf, 0xff, "%g", value);
192  strBuf[0xff] = '\0';
193 
194  _dup(strBuf);
195  }
196 
197  // -------------------------------------------------------------------
198  // non-explicit constructor
199 
200  /*
201  * Create string from another string.
202  */
203  String(const String& str) noexcept
204  : fBuffer(_null()),
205  fBufferLen(0)
206  {
207  _dup(str.fBuffer);
208  }
209 
210  // -------------------------------------------------------------------
211  // destructor
212 
213  /*
214  * Destructor.
215  */
216  ~String() noexcept
217  {
218  DISTRHO_SAFE_ASSERT_RETURN(fBuffer != nullptr,);
219 
220  if (fBuffer == _null())
221  return;
222 
223  std::free(fBuffer);
224 
225  fBuffer = nullptr;
226  fBufferLen = 0;
227  }
228 
229  // -------------------------------------------------------------------
230  // public methods
231 
232  /*
233  * Get length of the string.
234  */
235  std::size_t length() const noexcept
236  {
237  return fBufferLen;
238  }
239 
240  /*
241  * Check if the string is empty.
242  */
243  bool isEmpty() const noexcept
244  {
245  return (fBufferLen == 0);
246  }
247 
248  /*
249  * Check if the string is not empty.
250  */
251  bool isNotEmpty() const noexcept
252  {
253  return (fBufferLen != 0);
254  }
255 
256  /*
257  * Check if the string contains another string, optionally ignoring case.
258  */
259  bool contains(const char* const strBuf, const bool ignoreCase = false) const noexcept
260  {
261  DISTRHO_SAFE_ASSERT_RETURN(strBuf != nullptr, false);
262 
263  if (ignoreCase)
264  {
265 #ifdef __USE_GNU
266  return (strcasestr(fBuffer, strBuf) != nullptr);
267 #else
268  String tmp1(fBuffer), tmp2(strBuf);
269 
270  // memory allocation failed or empty string(s)
271  if (tmp1.fBuffer == _null() || tmp2.fBuffer == _null())
272  return false;
273 
274  tmp1.toLower();
275  tmp2.toLower();
276  return (std::strstr(tmp1, tmp2) != nullptr);
277 #endif
278  }
279 
280  return (std::strstr(fBuffer, strBuf) != nullptr);
281  }
282 
283  /*
284  * Check if character at 'pos' is a digit.
285  */
286  bool isDigit(const std::size_t pos) const noexcept
287  {
288  DISTRHO_SAFE_ASSERT_RETURN(pos < fBufferLen, false);
289 
290  return (fBuffer[pos] >= '0' && fBuffer[pos] <= '9');
291  }
292 
293  /*
294  * Check if the string starts with the character 'c'.
295  */
296  bool startsWith(const char c) const noexcept
297  {
298  DISTRHO_SAFE_ASSERT_RETURN(c != '\0', false);
299 
300  return (fBufferLen > 0 && fBuffer[0] == c);
301  }
302 
303  /*
304  * Check if the string starts with the string 'prefix'.
305  */
306  bool startsWith(const char* const prefix) const noexcept
307  {
308  DISTRHO_SAFE_ASSERT_RETURN(prefix != nullptr, false);
309 
310  const std::size_t prefixLen(std::strlen(prefix));
311 
312  if (fBufferLen < prefixLen)
313  return false;
314 
315  return (std::strncmp(fBuffer, prefix, prefixLen) == 0);
316  }
317 
318  /*
319  * Check if the string ends with the character 'c'.
320  */
321  bool endsWith(const char c) const noexcept
322  {
323  DISTRHO_SAFE_ASSERT_RETURN(c != '\0', false);
324 
325  return (fBufferLen > 0 && fBuffer[fBufferLen-1] == c);
326  }
327 
328  /*
329  * Check if the string ends with the string 'suffix'.
330  */
331  bool endsWith(const char* const suffix) const noexcept
332  {
333  DISTRHO_SAFE_ASSERT_RETURN(suffix != nullptr, false);
334 
335  const std::size_t suffixLen(std::strlen(suffix));
336 
337  if (fBufferLen < suffixLen)
338  return false;
339 
340  return (std::strncmp(fBuffer + (fBufferLen-suffixLen), suffix, suffixLen) == 0);
341  }
342 
343  /*
344  * Find the first occurrence of character 'c' in the string.
345  * Returns "length()" if the character is not found.
346  */
347  std::size_t find(const char c, bool* const found = nullptr) const noexcept
348  {
349  if (fBufferLen == 0 || c == '\0')
350  {
351  if (found != nullptr)
352  *found = false;
353  return fBufferLen;
354  }
355 
356  for (std::size_t i=0; i < fBufferLen; ++i)
357  {
358  if (fBuffer[i] == c)
359  {
360  if (found != nullptr)
361  *found = true;
362  return i;
363  }
364  }
365 
366  if (found != nullptr)
367  *found = false;
368  return fBufferLen;
369  }
370 
371  /*
372  * Find the first occurrence of string 'strBuf' in the string.
373  * Returns "length()" if the string is not found.
374  */
375  std::size_t find(const char* const strBuf, bool* const found = nullptr) const noexcept
376  {
377  if (fBufferLen == 0 || strBuf == nullptr || strBuf[0] == '\0')
378  {
379  if (found != nullptr)
380  *found = false;
381  return fBufferLen;
382  }
383 
384  if (char* const subStrBuf = std::strstr(fBuffer, strBuf))
385  {
386  const ssize_t ret(subStrBuf - fBuffer);
387 
388  if (ret < 0)
389  {
390  // should never happen!
391  d_safe_assert("ret >= 0", __FILE__, __LINE__);
392 
393  if (found != nullptr)
394  *found = false;
395  return fBufferLen;
396  }
397 
398  if (found != nullptr)
399  *found = true;
400  return static_cast<std::size_t>(ret);
401  }
402 
403  if (found != nullptr)
404  *found = false;
405  return fBufferLen;
406  }
407 
408  /*
409  * Find the last occurrence of character 'c' in the string.
410  * Returns "length()" if the character is not found.
411  */
412  std::size_t rfind(const char c, bool* const found = nullptr) const noexcept
413  {
414  if (fBufferLen == 0 || c == '\0')
415  {
416  if (found != nullptr)
417  *found = false;
418  return fBufferLen;
419  }
420 
421  for (std::size_t i=fBufferLen; i > 0; --i)
422  {
423  if (fBuffer[i-1] == c)
424  {
425  if (found != nullptr)
426  *found = true;
427  return i-1;
428  }
429  }
430 
431  if (found != nullptr)
432  *found = false;
433  return fBufferLen;
434  }
435 
436  /*
437  * Find the last occurrence of string 'strBuf' in the string.
438  * Returns "length()" if the string is not found.
439  */
440  std::size_t rfind(const char* const strBuf, bool* const found = nullptr) const noexcept
441  {
442  if (found != nullptr)
443  *found = false;
444 
445  if (fBufferLen == 0 || strBuf == nullptr || strBuf[0] == '\0')
446  return fBufferLen;
447 
448  const std::size_t strBufLen(std::strlen(strBuf));
449 
450  std::size_t ret = fBufferLen;
451  const char* tmpBuf = fBuffer;
452 
453  for (std::size_t i=0; i < fBufferLen; ++i)
454  {
455  if (std::strstr(tmpBuf+1, strBuf) == nullptr && std::strncmp(tmpBuf, strBuf, strBufLen) == 0)
456  {
457  if (found != nullptr)
458  *found = true;
459  break;
460  }
461 
462  --ret;
463  ++tmpBuf;
464  }
465 
466  return fBufferLen-ret;
467  }
468 
469  /*
470  * Clear the string.
471  */
472  void clear() noexcept
473  {
474  truncate(0);
475  }
476 
477  /*
478  * Replace all occurrences of character 'before' with character 'after'.
479  */
480  String& replace(const char before, const char after) noexcept
481  {
482  DISTRHO_SAFE_ASSERT_RETURN(before != '\0' && after != '\0', *this);
483 
484  for (std::size_t i=0; i < fBufferLen; ++i)
485  {
486  if (fBuffer[i] == before)
487  fBuffer[i] = after;
488  }
489 
490  return *this;
491  }
492 
493  /*
494  * Truncate the string to size 'n'.
495  */
496  String& truncate(const std::size_t n) noexcept
497  {
498  if (n >= fBufferLen)
499  return *this;
500 
501  for (std::size_t i=n; i < fBufferLen; ++i)
502  fBuffer[i] = '\0';
503 
504  fBufferLen = n;
505 
506  return *this;
507  }
508 
509  /*
510  * Convert all non-basic characters to '_'.
511  */
512  String& toBasic() noexcept
513  {
514  for (std::size_t i=0; i < fBufferLen; ++i)
515  {
516  if (fBuffer[i] >= '0' && fBuffer[i] <= '9')
517  continue;
518  if (fBuffer[i] >= 'A' && fBuffer[i] <= 'Z')
519  continue;
520  if (fBuffer[i] >= 'a' && fBuffer[i] <= 'z')
521  continue;
522  if (fBuffer[i] == '_')
523  continue;
524 
525  fBuffer[i] = '_';
526  }
527 
528  return *this;
529  }
530 
531  /*
532  * Convert to all ascii characters to lowercase.
533  */
534  String& toLower() noexcept
535  {
536  static const char kCharDiff('a' - 'A');
537 
538  for (std::size_t i=0; i < fBufferLen; ++i)
539  {
540  if (fBuffer[i] >= 'A' && fBuffer[i] <= 'Z')
541  fBuffer[i] = static_cast<char>(fBuffer[i] + kCharDiff);
542  }
543 
544  return *this;
545  }
546 
547  /*
548  * Convert to all ascii characters to uppercase.
549  */
550  String& toUpper() noexcept
551  {
552  static const char kCharDiff('a' - 'A');
553 
554  for (std::size_t i=0; i < fBufferLen; ++i)
555  {
556  if (fBuffer[i] >= 'a' && fBuffer[i] <= 'z')
557  fBuffer[i] = static_cast<char>(fBuffer[i] - kCharDiff);
558  }
559 
560  return *this;
561  }
562 
563  /*
564  * Direct access to the string buffer (read-only).
565  */
566  const char* buffer() const noexcept
567  {
568  return fBuffer;
569  }
570 
571  // -------------------------------------------------------------------
572  // base64 stuff, based on http://www.adp-gmbh.ch/cpp/common/base64.html
573  // Copyright (C) 2004-2008 René Nyffenegger
574 
575  static String asBase64(const void* const data, const std::size_t dataSize)
576  {
577  static const char* const kBase64Chars =
578  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
579  "abcdefghijklmnopqrstuvwxyz"
580  "0123456789+/";
581 
582  const std::size_t kTmpBufSize = std::min(d_nextPowerOf2(dataSize/3), 65536U);
583 
584  const uchar* bytesToEncode((const uchar*)data);
585 
586  uint i=0, j=0;
587  uint charArray3[3], charArray4[4];
588 
589  char strBuf[kTmpBufSize+1];
590  strBuf[kTmpBufSize] = '\0';
591  std::size_t strBufIndex = 0;
592 
593  String ret;
594 
595  for (std::size_t s=0; s<dataSize; ++s)
596  {
597  charArray3[i++] = *(bytesToEncode++);
598 
599  if (i == 3)
600  {
601  charArray4[0] = (charArray3[0] & 0xfc) >> 2;
602  charArray4[1] = ((charArray3[0] & 0x03) << 4) + ((charArray3[1] & 0xf0) >> 4);
603  charArray4[2] = ((charArray3[1] & 0x0f) << 2) + ((charArray3[2] & 0xc0) >> 6);
604  charArray4[3] = charArray3[2] & 0x3f;
605 
606  for (i=0; i<4; ++i)
607  strBuf[strBufIndex++] = kBase64Chars[charArray4[i]];
608 
609  if (strBufIndex >= kTmpBufSize-7)
610  {
611  strBuf[strBufIndex] = '\0';
612  strBufIndex = 0;
613  ret += strBuf;
614  }
615 
616  i = 0;
617  }
618  }
619 
620  if (i != 0)
621  {
622  for (j=i; j<3; ++j)
623  charArray3[j] = '\0';
624 
625  charArray4[0] = (charArray3[0] & 0xfc) >> 2;
626  charArray4[1] = ((charArray3[0] & 0x03) << 4) + ((charArray3[1] & 0xf0) >> 4);
627  charArray4[2] = ((charArray3[1] & 0x0f) << 2) + ((charArray3[2] & 0xc0) >> 6);
628  charArray4[3] = charArray3[2] & 0x3f;
629 
630  for (j=0; j<4 && i<3 && j<i+1; ++j)
631  strBuf[strBufIndex++] = kBase64Chars[charArray4[j]];
632 
633  for (; i++ < 3;)
634  strBuf[strBufIndex++] = '=';
635  }
636 
637  if (strBufIndex != 0)
638  {
639  strBuf[strBufIndex] = '\0';
640  ret += strBuf;
641  }
642 
643  return ret;
644  }
645 
646  // -------------------------------------------------------------------
647  // public operators
648 
649  operator const char*() const noexcept
650  {
651  return fBuffer;
652  }
653 
654  char operator[](const std::size_t pos) const noexcept
655  {
656  if (pos < fBufferLen)
657  return fBuffer[pos];
658 
659  d_safe_assert("pos < fBufferLen", __FILE__, __LINE__);
660 
661  static char fallback;
662  fallback = '\0';
663  return fallback;
664  }
665 
666  char& operator[](const std::size_t pos) noexcept
667  {
668  if (pos < fBufferLen)
669  return fBuffer[pos];
670 
671  d_safe_assert("pos < fBufferLen", __FILE__, __LINE__);
672 
673  static char fallback;
674  fallback = '\0';
675  return fallback;
676  }
677 
678  bool operator==(const char* const strBuf) const noexcept
679  {
680  return (strBuf != nullptr && std::strcmp(fBuffer, strBuf) == 0);
681  }
682 
683  bool operator==(const String& str) const noexcept
684  {
685  return operator==(str.fBuffer);
686  }
687 
688  bool operator!=(const char* const strBuf) const noexcept
689  {
690  return !operator==(strBuf);
691  }
692 
693  bool operator!=(const String& str) const noexcept
694  {
695  return !operator==(str.fBuffer);
696  }
697 
698  String& operator=(const char* const strBuf) noexcept
699  {
700  _dup(strBuf);
701 
702  return *this;
703  }
704 
705  String& operator=(const String& str) noexcept
706  {
707  _dup(str.fBuffer);
708 
709  return *this;
710  }
711 
712  String& operator+=(const char* const strBuf) noexcept
713  {
714  if (strBuf == nullptr)
715  return *this;
716 
717  const std::size_t newBufSize = fBufferLen + std::strlen(strBuf) + 1;
718  char newBuf[newBufSize];
719 
720  std::strcpy(newBuf, fBuffer);
721  std::strcat(newBuf, strBuf);
722 
723  _dup(newBuf, newBufSize-1);
724 
725  return *this;
726  }
727 
728  String& operator+=(const String& str) noexcept
729  {
730  return operator+=(str.fBuffer);
731  }
732 
733  String operator+(const char* const strBuf) noexcept
734  {
735  const std::size_t newBufSize = fBufferLen + ((strBuf != nullptr) ? std::strlen(strBuf) : 0) + 1;
736  char newBuf[newBufSize];
737 
738  std::strcpy(newBuf, fBuffer);
739 
740  if (strBuf != nullptr)
741  std::strcat(newBuf, strBuf);
742 
743  return String(newBuf);
744  }
745 
746  String operator+(const String& str) noexcept
747  {
748  return operator+(str.fBuffer);
749  }
750 
751  // -------------------------------------------------------------------
752 
753 private:
754  char* fBuffer; // the actual string buffer
755  std::size_t fBufferLen; // string length
756 
757  /*
758  * Static null string.
759  * Prevents allocation for new and/or empty strings.
760  */
761  static char* _null() noexcept
762  {
763  static char sNull = '\0';
764  return &sNull;
765  }
766 
767  /*
768  * Helper function.
769  * Called whenever the string needs to be allocated.
770  *
771  * Notes:
772  * - Allocates string only if 'strBuf' is not null and new string contents are different
773  * - If 'strBuf' is null, 'size' must be 0
774  */
775  void _dup(const char* const strBuf, const std::size_t size = 0) noexcept
776  {
777  if (strBuf != nullptr)
778  {
779  // don't recreate string if contents match
780  if (std::strcmp(fBuffer, strBuf) == 0)
781  return;
782 
783  if (fBuffer != _null())
784  std::free(fBuffer);
785 
786  fBufferLen = (size > 0) ? size : std::strlen(strBuf);
787  fBuffer = (char*)std::malloc(fBufferLen+1);
788 
789  if (fBuffer == nullptr)
790  {
791  fBuffer = _null();
792  fBufferLen = 0;
793  return;
794  }
795 
796  std::strcpy(fBuffer, strBuf);
797 
798  fBuffer[fBufferLen] = '\0';
799  }
800  else
801  {
802  DISTRHO_SAFE_ASSERT(size == 0);
803 
804  // don't recreate null string
805  if (fBuffer == _null())
806  return;
807 
808  DISTRHO_SAFE_ASSERT(fBuffer != nullptr);
809  std::free(fBuffer);
810 
811  fBuffer = _null();
812  fBufferLen = 0;
813  }
814  }
815 
816  DISTRHO_PREVENT_HEAP_ALLOCATION
817 };
818 
819 // -----------------------------------------------------------------------
820 
821 static inline
822 String operator+(const String& strBefore, const char* const strBufAfter) noexcept
823 {
824  const char* const strBufBefore = strBefore.buffer();
825  const std::size_t newBufSize = strBefore.length() + ((strBufAfter != nullptr) ? std::strlen(strBufAfter) : 0) + 1;
826  char newBuf[newBufSize];
827 
828  std::strcpy(newBuf, strBufBefore);
829  std::strcat(newBuf, strBufAfter);
830 
831  return String(newBuf);
832 }
833 
834 static inline
835 String operator+(const char* const strBufBefore, const String& strAfter) noexcept
836 {
837  const char* const strBufAfter = strAfter.buffer();
838  const std::size_t newBufSize = ((strBufBefore != nullptr) ? std::strlen(strBufBefore) : 0) + strAfter.length() + 1;
839  char newBuf[newBufSize];
840 
841  std::strcpy(newBuf, strBufBefore);
842  std::strcat(newBuf, strBufAfter);
843 
844  return String(newBuf);
845 }
846 
847 // -----------------------------------------------------------------------
848 
849 END_NAMESPACE_DISTRHO
850 
851 #endif // DISTRHO_STRING_HPP_INCLUDED
Definition: String.hpp:29
diff --git a/Thread_8hpp_source.html b/Thread_8hpp_source.html index 800a6d0f..2bf7f7ad 100644 --- a/Thread_8hpp_source.html +++ b/Thread_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra/Thread.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,298 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Thread.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DISTRHO_THREAD_HPP_INCLUDED
-
18 #define DISTRHO_THREAD_HPP_INCLUDED
-
19 
-
20 #include "Mutex.hpp"
-
21 #include "Sleep.hpp"
-
22 #include "String.hpp"
-
23 
-
24 #ifdef DISTRHO_OS_LINUX
-
25 # include <sys/prctl.h>
-
26 #endif
-
27 
-
28 START_NAMESPACE_DISTRHO
-
29 
-
30 // -----------------------------------------------------------------------
-
31 // Thread class
-
32 
-
33 class Thread
-
34 {
-
35 protected:
-
36  /*
-
37  * Constructor.
-
38  */
-
39  Thread(const char* const threadName = nullptr) noexcept
-
40  : fLock(),
-
41  fSignal(),
-
42  fName(threadName),
-
43 #ifdef PTW32_DLLPORT
-
44  fHandle({nullptr, 0}),
-
45 #else
-
46  fHandle(0),
-
47 #endif
-
48  fShouldExit(false) {}
-
49 
-
50  /*
-
51  * Destructor.
-
52  */
-
53  virtual ~Thread() /*noexcept*/
-
54  {
-
55  DISTRHO_SAFE_ASSERT(! isThreadRunning());
-
56 
-
57  stopThread(-1);
-
58  }
-
59 
-
60  /*
-
61  * Virtual function to be implemented by the subclass.
-
62  */
-
63  virtual void run() = 0;
-
64 
-
65  // -------------------------------------------------------------------
-
66 
-
67 public:
-
68  /*
-
69  * Check if the thread is running.
-
70  */
-
71  bool isThreadRunning() const noexcept
-
72  {
-
73 #ifdef PTW32_DLLPORT
-
74  return (fHandle.p != nullptr);
-
75 #else
-
76  return (fHandle != 0);
-
77 #endif
-
78  }
-
79 
-
80  /*
-
81  * Check if the thread should exit.
-
82  */
-
83  bool shouldThreadExit() const noexcept
-
84  {
-
85  return fShouldExit;
-
86  }
-
87 
-
88  /*
-
89  * Start the thread.
-
90  */
-
91  bool startThread() noexcept
-
92  {
-
93  // check if already running
-
94  DISTRHO_SAFE_ASSERT_RETURN(! isThreadRunning(), true);
-
95 
-
96  const MutexLocker ml(fLock);
-
97 
-
98  fShouldExit = false;
-
99 
-
100  pthread_t handle;
-
101 
-
102  if (pthread_create(&handle, nullptr, _entryPoint, this) == 0)
-
103  {
-
104 #ifdef PTW32_DLLPORT
-
105  DISTRHO_SAFE_ASSERT_RETURN(handle.p != nullptr, false);
-
106 #else
-
107  DISTRHO_SAFE_ASSERT_RETURN(handle != 0, false);
-
108 #endif
-
109  pthread_detach(handle);
-
110  _copyFrom(handle);
-
111 
-
112  // wait for thread to start
-
113  fSignal.wait();
-
114  return true;
-
115  }
-
116 
-
117  return false;
-
118  }
-
119 
-
120  /*
-
121  * Stop the thread.
-
122  * In the 'timeOutMilliseconds':
-
123  * = 0 -> no wait
-
124  * > 0 -> wait timeout value
-
125  * < 0 -> wait forever
-
126  */
-
127  bool stopThread(const int timeOutMilliseconds) noexcept
-
128  {
-
129  const MutexLocker ml(fLock);
-
130 
-
131  if (isThreadRunning())
-
132  {
-
133  signalThreadShouldExit();
-
134 
-
135  if (timeOutMilliseconds != 0)
-
136  {
-
137  // Wait for the thread to stop
-
138  int timeOutCheck = (timeOutMilliseconds == 1 || timeOutMilliseconds == -1) ? timeOutMilliseconds : timeOutMilliseconds/2;
-
139 
-
140  for (; isThreadRunning();)
-
141  {
-
142  d_msleep(2);
-
143 
-
144  if (timeOutCheck < 0)
-
145  continue;
-
146 
-
147  if (timeOutCheck > 0)
-
148  timeOutCheck -= 1;
-
149  else
-
150  break;
-
151  }
-
152  }
-
153 
-
154  if (isThreadRunning())
-
155  {
-
156  // should never happen!
-
157  d_stderr2("assertion failure: \"! isThreadRunning()\" in file %s, line %i", __FILE__, __LINE__);
-
158 
-
159  // copy thread id so we can clear our one
-
160  pthread_t threadId;
-
161  _copyTo(threadId);
-
162  _init();
-
163 
-
164  try {
-
165  pthread_cancel(threadId);
-
166  } DISTRHO_SAFE_EXCEPTION("pthread_cancel");
-
167 
-
168  return false;
-
169  }
-
170  }
-
171 
-
172  return true;
-
173  }
-
174 
-
175  /*
-
176  * Tell the thread to stop as soon as possible.
-
177  */
-
178  void signalThreadShouldExit() noexcept
-
179  {
-
180  fShouldExit = true;
-
181  }
-
182 
-
183  // -------------------------------------------------------------------
-
184 
-
185  /*
-
186  * Returns the name of the thread.
-
187  * This is the name that gets set in the constructor.
-
188  */
-
189  const String& getThreadName() const noexcept
-
190  {
-
191  return fName;
-
192  }
-
193 
-
194  /*
-
195  * Changes the name of the caller thread.
-
196  */
-
197  static void setCurrentThreadName(const char* const name) noexcept
-
198  {
-
199  DISTRHO_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',);
-
200 
-
201 #ifdef DISTRHO_OS_LINUX
-
202  prctl(PR_SET_NAME, name, 0, 0, 0);
-
203 #endif
-
204 #if defined(__GLIBC__) && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
-
205  pthread_setname_np(pthread_self(), name);
-
206 #endif
-
207  }
-
208 
-
209  // -------------------------------------------------------------------
-
210 
-
211 private:
-
212  Mutex fLock; // Thread lock
-
213  Signal fSignal; // Thread start wait signal
-
214  const String fName; // Thread name
-
215  volatile pthread_t fHandle; // Handle for this thread
-
216  volatile bool fShouldExit; // true if thread should exit
-
217 
-
218  /*
-
219  * Init pthread type.
-
220  */
-
221  void _init() noexcept
-
222  {
-
223 #ifdef PTW32_DLLPORT
-
224  fHandle.p = nullptr;
-
225  fHandle.x = 0;
-
226 #else
-
227  fHandle = 0;
-
228 #endif
-
229  }
-
230 
-
231  /*
-
232  * Copy our pthread type from another var.
-
233  */
-
234  void _copyFrom(const pthread_t& handle) noexcept
-
235  {
-
236 #ifdef PTW32_DLLPORT
-
237  fHandle.p = handle.p;
-
238  fHandle.x = handle.x;
-
239 #else
-
240  fHandle = handle;
-
241 #endif
-
242  }
-
243 
-
244  /*
-
245  * Copy our pthread type to another var.
-
246  */
-
247  void _copyTo(volatile pthread_t& handle) const noexcept
-
248  {
-
249 #ifdef PTW32_DLLPORT
-
250  handle.p = fHandle.p;
-
251  handle.x = fHandle.x;
-
252 #else
-
253  handle = fHandle;
-
254 #endif
-
255  }
-
256 
-
257  /*
-
258  * Thread entry point.
-
259  */
-
260  void _runEntryPoint() noexcept
-
261  {
-
262  setCurrentThreadName(fName);
-
263 
-
264  // report ready
-
265  fSignal.signal();
-
266 
-
267  try {
-
268  run();
-
269  } catch(...) {}
-
270 
-
271  // done
-
272  _init();
-
273  }
-
274 
-
275  /*
-
276  * Thread entry point.
-
277  */
-
278  static void* _entryPoint(void* userData) noexcept
-
279  {
-
280  static_cast<Thread*>(userData)->_runEntryPoint();
-
281  return nullptr;
-
282  }
-
283 
-
284  DISTRHO_DECLARE_NON_COPY_CLASS(Thread)
-
285 };
-
286 
-
287 // -----------------------------------------------------------------------
-
288 
-
289 END_NAMESPACE_DISTRHO
-
290 
-
291 #endif // DISTRHO_THREAD_HPP_INCLUDED
-
Definition: Mutex.hpp:266
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DISTRHO_THREAD_HPP_INCLUDED
18 #define DISTRHO_THREAD_HPP_INCLUDED
19 
20 #include "Mutex.hpp"
21 #include "Sleep.hpp"
22 #include "String.hpp"
23 
24 #ifdef DISTRHO_OS_LINUX
25 # include <sys/prctl.h>
26 #endif
27 
28 START_NAMESPACE_DISTRHO
29 
30 // -----------------------------------------------------------------------
31 // Thread class
32 
33 class Thread
34 {
35 protected:
36  /*
37  * Constructor.
38  */
39  Thread(const char* const threadName = nullptr) noexcept
40  : fLock(),
41  fSignal(),
42  fName(threadName),
43 #ifdef PTW32_DLLPORT
44  fHandle({nullptr, 0}),
45 #else
46  fHandle(0),
47 #endif
48  fShouldExit(false) {}
49 
50  /*
51  * Destructor.
52  */
53  virtual ~Thread() /*noexcept*/
54  {
55  DISTRHO_SAFE_ASSERT(! isThreadRunning());
56 
57  stopThread(-1);
58  }
59 
60  /*
61  * Virtual function to be implemented by the subclass.
62  */
63  virtual void run() = 0;
64 
65  // -------------------------------------------------------------------
66 
67 public:
68  /*
69  * Check if the thread is running.
70  */
71  bool isThreadRunning() const noexcept
72  {
73 #ifdef PTW32_DLLPORT
74  return (fHandle.p != nullptr);
75 #else
76  return (fHandle != 0);
77 #endif
78  }
79 
80  /*
81  * Check if the thread should exit.
82  */
83  bool shouldThreadExit() const noexcept
84  {
85  return fShouldExit;
86  }
87 
88  /*
89  * Start the thread.
90  */
91  bool startThread() noexcept
92  {
93  // check if already running
94  DISTRHO_SAFE_ASSERT_RETURN(! isThreadRunning(), true);
95 
96  const MutexLocker ml(fLock);
97 
98  fShouldExit = false;
99 
100  pthread_t handle;
101 
102  if (pthread_create(&handle, nullptr, _entryPoint, this) == 0)
103  {
104 #ifdef PTW32_DLLPORT
105  DISTRHO_SAFE_ASSERT_RETURN(handle.p != nullptr, false);
106 #else
107  DISTRHO_SAFE_ASSERT_RETURN(handle != 0, false);
108 #endif
109  pthread_detach(handle);
110  _copyFrom(handle);
111 
112  // wait for thread to start
113  fSignal.wait();
114  return true;
115  }
116 
117  return false;
118  }
119 
120  /*
121  * Stop the thread.
122  * In the 'timeOutMilliseconds':
123  * = 0 -> no wait
124  * > 0 -> wait timeout value
125  * < 0 -> wait forever
126  */
127  bool stopThread(const int timeOutMilliseconds) noexcept
128  {
129  const MutexLocker ml(fLock);
130 
131  if (isThreadRunning())
132  {
133  signalThreadShouldExit();
134 
135  if (timeOutMilliseconds != 0)
136  {
137  // Wait for the thread to stop
138  int timeOutCheck = (timeOutMilliseconds == 1 || timeOutMilliseconds == -1) ? timeOutMilliseconds : timeOutMilliseconds/2;
139 
140  for (; isThreadRunning();)
141  {
142  d_msleep(2);
143 
144  if (timeOutCheck < 0)
145  continue;
146 
147  if (timeOutCheck > 0)
148  timeOutCheck -= 1;
149  else
150  break;
151  }
152  }
153 
154  if (isThreadRunning())
155  {
156  // should never happen!
157  d_stderr2("assertion failure: \"! isThreadRunning()\" in file %s, line %i", __FILE__, __LINE__);
158 
159  // copy thread id so we can clear our one
160  pthread_t threadId;
161  _copyTo(threadId);
162  _init();
163 
164  try {
165  pthread_cancel(threadId);
166  } DISTRHO_SAFE_EXCEPTION("pthread_cancel");
167 
168  return false;
169  }
170  }
171 
172  return true;
173  }
174 
175  /*
176  * Tell the thread to stop as soon as possible.
177  */
178  void signalThreadShouldExit() noexcept
179  {
180  fShouldExit = true;
181  }
182 
183  // -------------------------------------------------------------------
184 
185  /*
186  * Returns the name of the thread.
187  * This is the name that gets set in the constructor.
188  */
189  const String& getThreadName() const noexcept
190  {
191  return fName;
192  }
193 
194  /*
195  * Changes the name of the caller thread.
196  */
197  static void setCurrentThreadName(const char* const name) noexcept
198  {
199  DISTRHO_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',);
200 
201 #ifdef DISTRHO_OS_LINUX
202  prctl(PR_SET_NAME, name, 0, 0, 0);
203 #endif
204 #if defined(__GLIBC__) && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
205  pthread_setname_np(pthread_self(), name);
206 #endif
207  }
208 
209  // -------------------------------------------------------------------
210 
211 private:
212  Mutex fLock; // Thread lock
213  Signal fSignal; // Thread start wait signal
214  const String fName; // Thread name
215  volatile pthread_t fHandle; // Handle for this thread
216  volatile bool fShouldExit; // true if thread should exit
217 
218  /*
219  * Init pthread type.
220  */
221  void _init() noexcept
222  {
223 #ifdef PTW32_DLLPORT
224  fHandle.p = nullptr;
225  fHandle.x = 0;
226 #else
227  fHandle = 0;
228 #endif
229  }
230 
231  /*
232  * Copy our pthread type from another var.
233  */
234  void _copyFrom(const pthread_t& handle) noexcept
235  {
236 #ifdef PTW32_DLLPORT
237  fHandle.p = handle.p;
238  fHandle.x = handle.x;
239 #else
240  fHandle = handle;
241 #endif
242  }
243 
244  /*
245  * Copy our pthread type to another var.
246  */
247  void _copyTo(volatile pthread_t& handle) const noexcept
248  {
249 #ifdef PTW32_DLLPORT
250  handle.p = fHandle.p;
251  handle.x = fHandle.x;
252 #else
253  handle = fHandle;
254 #endif
255  }
256 
257  /*
258  * Thread entry point.
259  */
260  void _runEntryPoint() noexcept
261  {
262  setCurrentThreadName(fName);
263 
264  // report ready
265  fSignal.signal();
266 
267  try {
268  run();
269  } catch(...) {}
270 
271  // done
272  _init();
273  }
274 
275  /*
276  * Thread entry point.
277  */
278  static void* _entryPoint(void* userData) noexcept
279  {
280  static_cast<Thread*>(userData)->_runEntryPoint();
281  return nullptr;
282  }
283 
284  DISTRHO_DECLARE_NON_COPY_CLASS(Thread)
285 };
286 
287 // -----------------------------------------------------------------------
288 
289 END_NAMESPACE_DISTRHO
290 
291 #endif // DISTRHO_THREAD_HPP_INCLUDED
Definition: Mutex.hpp:266
Definition: Mutex.hpp:36
Definition: String.hpp:29
Definition: Thread.hpp:33
@@ -386,9 +74,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/Widget_8hpp_source.html b/Widget_8hpp_source.html index 74882a08..9a1f9725 100644 --- a/Widget_8hpp_source.html +++ b/Widget_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/Widget.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,392 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Widget.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_WIDGET_HPP_INCLUDED
-
18 #define DGL_WIDGET_HPP_INCLUDED
-
19 
-
20 #include "Geometry.hpp"
-
21 
-
22 #include <vector>
-
23 
-
24 // -----------------------------------------------------------------------
-
25 // Forward class names
-
26 
-
27 START_NAMESPACE_DISTRHO
-
28 class UI;
-
29 END_NAMESPACE_DISTRHO
-
30 
-
31 START_NAMESPACE_DGL
-
32 
-
33 class Application;
-
34 class ImageSlider;
-
35 class NanoWidget;
-
36 class Window;
-
37 class StandaloneWindow;
-
38 
-
39 // -----------------------------------------------------------------------
-
40 
-
41 /**
-
42  Base DGL Widget class.
-
43 
-
44  This is the base Widget class, from which all widgets are built.
-
45 
-
46  All widgets have a parent Window where they'll be drawn.
-
47  This parent is never changed during the widget lifetime.
-
48 
-
49  Widgets receive events in relative coordinates.
-
50  (0, 0) means its top-left position.
-
51 
-
52  Windows paint widgets in the order they are constructed.
-
53  Early widgets are drawn first, at the bottom, then newer ones on top.
-
54  Events are sent in the inverse order so that the top-most widget gets
-
55  a chance to catch the event and stop its propagation.
-
56 
-
57  All widget event callbacks do nothing by default.
-
58  */
-
59 class Widget
-
60 {
-
61 public:
-
62  /**
-
63  Base event data.
-
64  @a mod The currently active keyboard modifiers, @see Modifier.
-
65  @a time The timestamp (if any).
-
66  */
-
67  struct BaseEvent {
-
68  uint mod;
-
69  uint32_t time;
-
70 
-
71  /** Constuctor */
-
72  BaseEvent() noexcept : mod(0x0), time(0) {}
-
73  /** Destuctor */
-
74  virtual ~BaseEvent() noexcept {}
-
75  };
-
76 
-
77  /**
-
78  Keyboard event.
-
79  @a press True if the key was pressed, false if released.
-
80  @a key Unicode point of the key pressed.
-
81  @see onKeyboard
-
82  */
- -
84  bool press;
-
85  uint key;
-
86 
-
87  /** Constuctor */
-
88  KeyboardEvent() noexcept
-
89  : BaseEvent(),
-
90  press(false),
-
91  key(0) {}
-
92  };
-
93 
-
94  /**
-
95  Special keyboard event.
-
96  @a press True if the key was pressed, false if released.
-
97  @a key The key pressed.
-
98  @see onSpecial
-
99  */
- -
101  bool press;
-
102  Key key;
-
103 
-
104  /** Constuctor */
-
105  SpecialEvent() noexcept
-
106  : BaseEvent(),
-
107  press(false),
-
108  key(Key(0)) {}
-
109  };
-
110 
-
111  /**
-
112  Mouse event.
-
113  @a button The button number (1 = left, 2 = middle, 3 = right).
-
114  @a press True if the button was pressed, false if released.
-
115  @a pos The widget-relative coordinates of the pointer.
-
116  @see onMouse
-
117  */
- -
119  int button;
-
120  bool press;
-
121  Point<int> pos;
-
122 
-
123  /** Constuctor */
-
124  MouseEvent() noexcept
-
125  : BaseEvent(),
-
126  button(0),
-
127  press(false),
-
128  pos(0, 0) {}
-
129  };
-
130 
-
131  /**
-
132  Mouse motion event.
-
133  @a pos The widget-relative coordinates of the pointer.
-
134  @see onMotion
-
135  */
- -
137  Point<int> pos;
-
138 
-
139  /** Constuctor */
-
140  MotionEvent() noexcept
-
141  : BaseEvent(),
-
142  pos(0, 0) {}
-
143  };
-
144 
-
145  /**
-
146  Mouse scroll event.
-
147  @a pos The widget-relative coordinates of the pointer.
-
148  @a delta The scroll distance.
-
149  @see onScroll
-
150  */
- -
152  Point<int> pos;
-
153  Point<float> delta;
-
154 
-
155  /** Constuctor */
-
156  ScrollEvent() noexcept
-
157  : BaseEvent(),
-
158  pos(0, 0),
-
159  delta(0.0f, 0.0f) {}
-
160  };
-
161 
-
162  /**
-
163  Resize event.
-
164  @a size The new widget size.
-
165  @a oldSize The previous size, may be null.
-
166  @see onResize
-
167  */
-
168  struct ResizeEvent {
-
169  Size<uint> size;
-
170  Size<uint> oldSize;
-
171 
-
172  /** Constuctor */
-
173  ResizeEvent() noexcept
-
174  : size(0, 0),
-
175  oldSize(0, 0) {}
-
176  };
-
177 
-
178  /**
-
179  Constructor.
-
180  */
-
181  explicit Widget(Window& parent);
-
182 
-
183  /**
-
184  Constructor for a subwidget.
-
185  */
-
186  explicit Widget(Widget* groupWidget);
-
187 
-
188  /**
-
189  Destructor.
-
190  */
-
191  virtual ~Widget();
-
192 
-
193  /**
-
194  Check if this widget is visible within its parent window.
-
195  Invisible widgets do not receive events except resize.
-
196  */
-
197  bool isVisible() const noexcept;
-
198 
-
199  /**
-
200  Set widget visible (or not) according to @a yesNo.
-
201  */
-
202  void setVisible(bool yesNo);
-
203 
-
204  /**
-
205  Show widget.
-
206  This is the same as calling setVisible(true).
-
207  */
-
208  void show();
-
209 
-
210  /**
-
211  Hide widget.
-
212  This is the same as calling setVisible(false).
-
213  */
-
214  void hide();
-
215 
-
216  /**
-
217  Get width.
-
218  */
-
219  uint getWidth() const noexcept;
-
220 
-
221  /**
-
222  Get height.
-
223  */
-
224  uint getHeight() const noexcept;
-
225 
-
226  /**
-
227  Get size.
-
228  */
-
229  const Size<uint>& getSize() const noexcept;
-
230 
-
231  /**
-
232  Set width.
-
233  */
-
234  void setWidth(uint width) noexcept;
-
235 
-
236  /**
-
237  Set height.
-
238  */
-
239  void setHeight(uint height) noexcept;
-
240 
-
241  /**
-
242  Set size using @a width and @a height values.
-
243  */
-
244  void setSize(uint width, uint height) noexcept;
-
245 
-
246  /**
-
247  Set size.
-
248  */
-
249  void setSize(const Size<uint>& size) noexcept;
-
250 
-
251  /**
-
252  Get absolute X.
-
253  */
-
254  int getAbsoluteX() const noexcept;
-
255 
-
256  /**
-
257  Get absolute Y.
-
258  */
-
259  int getAbsoluteY() const noexcept;
-
260 
-
261  /**
-
262  Get absolute position.
-
263  */
-
264  const Point<int>& getAbsolutePos() const noexcept;
-
265 
-
266  /**
-
267  Set absolute X.
-
268  */
-
269  void setAbsoluteX(int x) noexcept;
-
270 
-
271  /**
-
272  Set absolute Y.
-
273  */
-
274  void setAbsoluteY(int y) noexcept;
-
275 
-
276  /**
-
277  Set absolute position using @a x and @a y values.
-
278  */
-
279  void setAbsolutePos(int x, int y) noexcept;
-
280 
-
281  /**
-
282  Set absolute position.
-
283  */
-
284  void setAbsolutePos(const Point<int>& pos) noexcept;
-
285 
-
286  /**
-
287  Get this widget's window application.
-
288  Same as calling getParentWindow().getApp().
-
289  */
-
290  Application& getParentApp() const noexcept;
-
291 
-
292  /**
-
293  Get parent window, as passed in the constructor.
-
294  */
-
295  Window& getParentWindow() const noexcept;
-
296 
-
297  /**
-
298  Check if this widget contains the point defined by @a x and @a y.
-
299  */
-
300  bool contains(int x, int y) const noexcept;
-
301 
-
302  /**
-
303  Check if this widget contains the point @a pos.
-
304  */
-
305  bool contains(const Point<int>& pos) const noexcept;
-
306 
-
307  /**
-
308  Tell this widget's window to repaint itself.
-
309  */
-
310  void repaint() noexcept;
-
311 
-
312  /**
-
313  Get the Id associated with this widget.
-
314  @see setId
-
315  */
-
316  uint getId() const noexcept;
-
317 
-
318  /**
-
319  Set an Id to be associated with this widget.
-
320  @see getId
-
321  */
-
322  void setId(uint id) noexcept;
-
323 
-
324 protected:
-
325  /**
-
326  A function called to draw the view contents with OpenGL.
-
327  */
-
328  virtual void onDisplay() = 0;
-
329 
-
330  /**
-
331  A function called when a key is pressed or released.
-
332  @return True to stop event propagation, false otherwise.
-
333  */
-
334  virtual bool onKeyboard(const KeyboardEvent&);
-
335 
-
336  /**
-
337  A function called when a special key is pressed or released.
-
338  @return True to stop event propagation, false otherwise.
-
339  */
-
340  virtual bool onSpecial(const SpecialEvent&);
-
341 
-
342  /**
-
343  A function called when a mouse button is pressed or released.
-
344  @return True to stop event propagation, false otherwise.
-
345  */
-
346  virtual bool onMouse(const MouseEvent&);
-
347 
-
348  /**
-
349  A function called when the pointer moves.
-
350  @return True to stop event propagation, false otherwise.
-
351  */
-
352  virtual bool onMotion(const MotionEvent&);
-
353 
-
354  /**
-
355  A function called on scrolling (e.g. mouse wheel or track pad).
-
356  @return True to stop event propagation, false otherwise.
-
357  */
-
358  virtual bool onScroll(const ScrollEvent&);
-
359 
-
360  /**
-
361  A function called when the widget is resized.
-
362  */
-
363  virtual void onResize(const ResizeEvent&);
-
364 
-
365 private:
-
366  struct PrivateData;
-
367  PrivateData* const pData;
-
368 
-
369  /** @internal */
-
370  explicit Widget(Widget* groupWidget, bool addToSubWidgets);
-
371 
-
372  friend class ImageSlider;
-
373  friend class NanoWidget;
-
374  friend class Window;
-
375  friend class StandaloneWindow;
-
376  friend class DISTRHO_NAMESPACE::UI;
-
377 
-
378  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Widget)
-
379 };
-
380 
-
381 // -----------------------------------------------------------------------
-
382 
-
383 END_NAMESPACE_DGL
-
384 
-
385 #endif // DGL_WIDGET_HPP_INCLUDED
-
Window & getParentWindow() const noexcept
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_WIDGET_HPP_INCLUDED
18 #define DGL_WIDGET_HPP_INCLUDED
19 
20 #include "Geometry.hpp"
21 
22 #include <vector>
23 
24 // -----------------------------------------------------------------------
25 // Forward class names
26 
27 START_NAMESPACE_DISTRHO
28 class UI;
29 END_NAMESPACE_DISTRHO
30 
31 START_NAMESPACE_DGL
32 
33 class Application;
34 class ImageSlider;
35 class NanoWidget;
36 class Window;
37 class StandaloneWindow;
38 
39 // -----------------------------------------------------------------------
40 
41 /**
42  Base DGL Widget class.
43 
44  This is the base Widget class, from which all widgets are built.
45 
46  All widgets have a parent Window where they'll be drawn.
47  This parent is never changed during the widget lifetime.
48 
49  Widgets receive events in relative coordinates.
50  (0, 0) means its top-left position.
51 
52  Windows paint widgets in the order they are constructed.
53  Early widgets are drawn first, at the bottom, then newer ones on top.
54  Events are sent in the inverse order so that the top-most widget gets
55  a chance to catch the event and stop its propagation.
56 
57  All widget event callbacks do nothing by default.
58  */
59 class Widget
60 {
61 public:
62  /**
63  Base event data.
64  @a mod The currently active keyboard modifiers, @see Modifier.
65  @a time The timestamp (if any).
66  */
67  struct BaseEvent {
68  uint mod;
69  uint32_t time;
70 
71  /** Constuctor */
72  BaseEvent() noexcept : mod(0x0), time(0) {}
73  /** Destuctor */
74  virtual ~BaseEvent() noexcept {}
75  };
76 
77  /**
78  Keyboard event.
79  @a press True if the key was pressed, false if released.
80  @a key Unicode point of the key pressed.
81  @see onKeyboard
82  */
84  bool press;
85  uint key;
86 
87  /** Constuctor */
88  KeyboardEvent() noexcept
89  : BaseEvent(),
90  press(false),
91  key(0) {}
92  };
93 
94  /**
95  Special keyboard event.
96  @a press True if the key was pressed, false if released.
97  @a key The key pressed.
98  @see onSpecial
99  */
101  bool press;
102  Key key;
103 
104  /** Constuctor */
105  SpecialEvent() noexcept
106  : BaseEvent(),
107  press(false),
108  key(Key(0)) {}
109  };
110 
111  /**
112  Mouse event.
113  @a button The button number (1 = left, 2 = middle, 3 = right).
114  @a press True if the button was pressed, false if released.
115  @a pos The widget-relative coordinates of the pointer.
116  @see onMouse
117  */
119  int button;
120  bool press;
121  Point<int> pos;
122 
123  /** Constuctor */
124  MouseEvent() noexcept
125  : BaseEvent(),
126  button(0),
127  press(false),
128  pos(0, 0) {}
129  };
130 
131  /**
132  Mouse motion event.
133  @a pos The widget-relative coordinates of the pointer.
134  @see onMotion
135  */
137  Point<int> pos;
138 
139  /** Constuctor */
140  MotionEvent() noexcept
141  : BaseEvent(),
142  pos(0, 0) {}
143  };
144 
145  /**
146  Mouse scroll event.
147  @a pos The widget-relative coordinates of the pointer.
148  @a delta The scroll distance.
149  @see onScroll
150  */
152  Point<int> pos;
153  Point<float> delta;
154 
155  /** Constuctor */
156  ScrollEvent() noexcept
157  : BaseEvent(),
158  pos(0, 0),
159  delta(0.0f, 0.0f) {}
160  };
161 
162  /**
163  Resize event.
164  @a size The new widget size.
165  @a oldSize The previous size, may be null.
166  @see onResize
167  */
168  struct ResizeEvent {
169  Size<uint> size;
170  Size<uint> oldSize;
171 
172  /** Constuctor */
173  ResizeEvent() noexcept
174  : size(0, 0),
175  oldSize(0, 0) {}
176  };
177 
178  /**
179  Constructor.
180  */
181  explicit Widget(Window& parent);
182 
183  /**
184  Constructor for a subwidget.
185  */
186  explicit Widget(Widget* groupWidget);
187 
188  /**
189  Destructor.
190  */
191  virtual ~Widget();
192 
193  /**
194  Check if this widget is visible within its parent window.
195  Invisible widgets do not receive events except resize.
196  */
197  bool isVisible() const noexcept;
198 
199  /**
200  Set widget visible (or not) according to @a yesNo.
201  */
202  void setVisible(bool yesNo);
203 
204  /**
205  Show widget.
206  This is the same as calling setVisible(true).
207  */
208  void show();
209 
210  /**
211  Hide widget.
212  This is the same as calling setVisible(false).
213  */
214  void hide();
215 
216  /**
217  Get width.
218  */
219  uint getWidth() const noexcept;
220 
221  /**
222  Get height.
223  */
224  uint getHeight() const noexcept;
225 
226  /**
227  Get size.
228  */
229  const Size<uint>& getSize() const noexcept;
230 
231  /**
232  Set width.
233  */
234  void setWidth(uint width) noexcept;
235 
236  /**
237  Set height.
238  */
239  void setHeight(uint height) noexcept;
240 
241  /**
242  Set size using @a width and @a height values.
243  */
244  void setSize(uint width, uint height) noexcept;
245 
246  /**
247  Set size.
248  */
249  void setSize(const Size<uint>& size) noexcept;
250 
251  /**
252  Get absolute X.
253  */
254  int getAbsoluteX() const noexcept;
255 
256  /**
257  Get absolute Y.
258  */
259  int getAbsoluteY() const noexcept;
260 
261  /**
262  Get absolute position.
263  */
264  const Point<int>& getAbsolutePos() const noexcept;
265 
266  /**
267  Set absolute X.
268  */
269  void setAbsoluteX(int x) noexcept;
270 
271  /**
272  Set absolute Y.
273  */
274  void setAbsoluteY(int y) noexcept;
275 
276  /**
277  Set absolute position using @a x and @a y values.
278  */
279  void setAbsolutePos(int x, int y) noexcept;
280 
281  /**
282  Set absolute position.
283  */
284  void setAbsolutePos(const Point<int>& pos) noexcept;
285 
286  /**
287  Get this widget's window application.
288  Same as calling getParentWindow().getApp().
289  */
290  Application& getParentApp() const noexcept;
291 
292  /**
293  Get parent window, as passed in the constructor.
294  */
295  Window& getParentWindow() const noexcept;
296 
297  /**
298  Check if this widget contains the point defined by @a x and @a y.
299  */
300  bool contains(int x, int y) const noexcept;
301 
302  /**
303  Check if this widget contains the point @a pos.
304  */
305  bool contains(const Point<int>& pos) const noexcept;
306 
307  /**
308  Tell this widget's window to repaint itself.
309  */
310  void repaint() noexcept;
311 
312  /**
313  Get the Id associated with this widget.
314  @see setId
315  */
316  uint getId() const noexcept;
317 
318  /**
319  Set an Id to be associated with this widget.
320  @see getId
321  */
322  void setId(uint id) noexcept;
323 
324 protected:
325  /**
326  A function called to draw the view contents with OpenGL.
327  */
328  virtual void onDisplay() = 0;
329 
330  /**
331  A function called when a key is pressed or released.
332  @return True to stop event propagation, false otherwise.
333  */
334  virtual bool onKeyboard(const KeyboardEvent&);
335 
336  /**
337  A function called when a special key is pressed or released.
338  @return True to stop event propagation, false otherwise.
339  */
340  virtual bool onSpecial(const SpecialEvent&);
341 
342  /**
343  A function called when a mouse button is pressed or released.
344  @return True to stop event propagation, false otherwise.
345  */
346  virtual bool onMouse(const MouseEvent&);
347 
348  /**
349  A function called when the pointer moves.
350  @return True to stop event propagation, false otherwise.
351  */
352  virtual bool onMotion(const MotionEvent&);
353 
354  /**
355  A function called on scrolling (e.g. mouse wheel or track pad).
356  @return True to stop event propagation, false otherwise.
357  */
358  virtual bool onScroll(const ScrollEvent&);
359 
360  /**
361  A function called when the widget is resized.
362  */
363  virtual void onResize(const ResizeEvent&);
364 
365 private:
366  struct PrivateData;
367  PrivateData* const pData;
368 
369  /** @internal */
370  explicit Widget(Widget* groupWidget, bool addToSubWidgets);
371 
372  friend class ImageSlider;
373  friend class NanoWidget;
374  friend class Window;
375  friend class StandaloneWindow;
376  friend class DISTRHO_NAMESPACE::UI;
377 
378  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Widget)
379 };
380 
381 // -----------------------------------------------------------------------
382 
383 END_NAMESPACE_DGL
384 
385 #endif // DGL_WIDGET_HPP_INCLUDED
Window & getParentWindow() const noexcept
const Point< int > & getAbsolutePos() const noexcept
virtual bool onSpecial(const SpecialEvent &)
virtual bool onScroll(const ScrollEvent &)
@@ -482,7 +76,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
ScrollEvent() noexcept
Definition: Widget.hpp:156
ResizeEvent() noexcept
Definition: Widget.hpp:173
void setId(uint id) noexcept
-
Definition: NanoVG.hpp:871
+
Definition: NanoVG.hpp:875
Definition: Window.hpp:34
virtual void onDisplay()=0
uint getWidth() const noexcept
@@ -530,9 +124,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/Window_8hpp_source.html b/Window_8hpp_source.html index 1eb92ee2..4662bb31 100644 --- a/Window_8hpp_source.html +++ b/Window_8hpp_source.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl/Window.hpp Source File + - @@ -21,7 +20,7 @@ - @@ -30,45 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -87,164 +66,22 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Window.hpp
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
-
4  *
-
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
-
6  * or without fee is hereby granted, provided that the above copyright notice and this
-
7  * permission notice appear in all copies.
-
8  *
-
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
-
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
15  */
-
16 
-
17 #ifndef DGL_WINDOW_HPP_INCLUDED
-
18 #define DGL_WINDOW_HPP_INCLUDED
-
19 
-
20 #include "Geometry.hpp"
-
21 
-
22 START_NAMESPACE_DISTRHO
-
23 class UIExporter;
-
24 END_NAMESPACE_DISTRHO
-
25 
-
26 START_NAMESPACE_DGL
-
27 
-
28 // -----------------------------------------------------------------------
-
29 
-
30 class Application;
-
31 class Widget;
-
32 class StandaloneWindow;
-
33 
-
34 class Window
-
35 {
-
36 public:
-
37  /**
-
38  File browser options.
-
39  */
- -
41  const char* startDir;
-
42  const char* title;
-
43  uint width;
-
44  uint height;
-
45 
-
46  /**
-
47  File browser buttons.
-
48 
-
49  0 means hidden.
-
50  1 means visible and unchecked.
-
51  2 means visible and checked.
-
52  */
-
53  struct Buttons {
-
54  uint listAllFiles;
-
55  uint showHidden;
-
56  uint showPlaces;
-
57 
-
58  /** Constuctor for default values */
- -
60  : listAllFiles(2),
-
61  showHidden(1),
-
62  showPlaces(1) {}
-
63  } buttons;
-
64 
-
65  /** Constuctor for default values */
- -
67  : startDir(nullptr),
-
68  title(nullptr),
-
69  width(0),
-
70  height(0),
-
71  buttons() {}
-
72  };
-
73 
-
74  explicit Window(Application& app);
-
75  explicit Window(Application& app, Window& parent);
-
76  explicit Window(Application& app, intptr_t parentId);
-
77  virtual ~Window();
-
78 
-
79  void show();
-
80  void hide();
-
81  void close();
-
82  void exec(bool lockWait = false);
-
83 
-
84  void focus();
-
85  void repaint() noexcept;
-
86 
-
87  bool openFileBrowser(const FileBrowserOptions& options);
-
88 
-
89  bool isVisible() const noexcept;
-
90  void setVisible(bool yesNo);
-
91 
-
92  bool isResizable() const noexcept;
-
93  void setResizable(bool yesNo);
-
94 
-
95  uint getWidth() const noexcept;
-
96  uint getHeight() const noexcept;
-
97  Size<uint> getSize() const noexcept;
-
98  void setSize(uint width, uint height);
-
99  void setSize(Size<uint> size);
-
100 
-
101  const char* getTitle() const noexcept;
-
102  void setTitle(const char* title);
-
103 
-
104  void setTransientWinId(uintptr_t winId);
-
105 
-
106  Application& getApp() const noexcept;
-
107  intptr_t getWindowId() const noexcept;
-
108 
-
109  void addIdleCallback(IdleCallback* const callback);
-
110  void removeIdleCallback(IdleCallback* const callback);
-
111 
-
112 protected:
-
113  virtual void onDisplayBefore();
-
114  virtual void onDisplayAfter();
-
115  virtual void onReshape(uint width, uint height);
-
116  virtual void onClose();
-
117 
-
118  virtual void fileBrowserSelected(const char* filename);
-
119 
-
120 private:
-
121  struct PrivateData;
-
122  PrivateData* const pData;
-
123  friend class Application;
-
124  friend class Widget;
-
125  friend class StandaloneWindow;
-
126  friend class DISTRHO_NAMESPACE::UIExporter;
-
127 
-
128  virtual void _addWidget(Widget* const widget);
-
129  virtual void _removeWidget(Widget* const widget);
-
130  void _idle();
-
131 
-
132  bool handlePluginKeyboard(const bool press, const uint key);
-
133  bool handlePluginSpecial(const bool press, const Key key);
-
134 
-
135  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Window)
-
136 };
-
137 
-
138 // -----------------------------------------------------------------------
-
139 
-
140 END_NAMESPACE_DGL
-
141 
-
142 #endif // DGL_WINDOW_HPP_INCLUDED
-
FileBrowserOptions()
Definition: Window.hpp:66
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_WINDOW_HPP_INCLUDED
18 #define DGL_WINDOW_HPP_INCLUDED
19 
20 #include "Geometry.hpp"
21 
22 START_NAMESPACE_DISTRHO
23 class UIExporter;
24 END_NAMESPACE_DISTRHO
25 
26 START_NAMESPACE_DGL
27 
28 // -----------------------------------------------------------------------
29 
30 class Application;
31 class Widget;
32 class StandaloneWindow;
33 
34 class Window
35 {
36 public:
37 #ifndef DGL_FILE_BROWSER_DISABLED
38  /**
39  File browser options.
40  */
42  const char* startDir;
43  const char* title;
44  uint width;
45  uint height;
46 
47  /**
48  File browser buttons.
49 
50  0 means hidden.
51  1 means visible and unchecked.
52  2 means visible and checked.
53  */
54  struct Buttons {
55  uint listAllFiles;
56  uint showHidden;
57  uint showPlaces;
58 
59  /** Constuctor for default values */
61  : listAllFiles(2),
62  showHidden(1),
63  showPlaces(1) {}
64  } buttons;
65 
66  /** Constuctor for default values */
68  : startDir(nullptr),
69  title(nullptr),
70  width(0),
71  height(0),
72  buttons() {}
73  };
74 #endif // DGL_FILE_BROWSER_DISABLED
75 
76  explicit Window(Application& app);
77  explicit Window(Application& app, Window& parent);
78  explicit Window(Application& app, intptr_t parentId);
79  virtual ~Window();
80 
81  void show();
82  void hide();
83  void close();
84  void exec(bool lockWait = false);
85 
86  void focus();
87  void repaint() noexcept;
88 
89 #ifndef DGL_FILE_BROWSER_DISABLED
90  bool openFileBrowser(const FileBrowserOptions& options);
91 #endif
92 
93  bool isVisible() const noexcept;
94  void setVisible(bool yesNo);
95 
96  bool isResizable() const noexcept;
97  void setResizable(bool yesNo);
98 
99  uint getWidth() const noexcept;
100  uint getHeight() const noexcept;
101  Size<uint> getSize() const noexcept;
102  void setSize(uint width, uint height);
103  void setSize(Size<uint> size);
104 
105  const char* getTitle() const noexcept;
106  void setTitle(const char* title);
107 
108  void setTransientWinId(uintptr_t winId);
109 
110  Application& getApp() const noexcept;
111  intptr_t getWindowId() const noexcept;
112 
113  void addIdleCallback(IdleCallback* const callback);
114  void removeIdleCallback(IdleCallback* const callback);
115 
116 protected:
117  virtual void onDisplayBefore();
118  virtual void onDisplayAfter();
119  virtual void onReshape(uint width, uint height);
120  virtual void onClose();
121 
122 #ifndef DGL_FILE_BROWSER_DISABLED
123  virtual void fileBrowserSelected(const char* filename);
124 #endif
125 
126 private:
127  struct PrivateData;
128  PrivateData* const pData;
129  friend class Application;
130  friend class Widget;
131  friend class StandaloneWindow;
132  friend class DISTRHO_NAMESPACE::UIExporter;
133 
134  virtual void _addWidget(Widget* const widget);
135  virtual void _removeWidget(Widget* const widget);
136  void _idle();
137 
138  bool handlePluginKeyboard(const bool press, const uint key);
139  bool handlePluginSpecial(const bool press, const Key key);
140 
141  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Window)
142 };
143 
144 // -----------------------------------------------------------------------
145 
146 END_NAMESPACE_DGL
147 
148 #endif // DGL_WINDOW_HPP_INCLUDED
FileBrowserOptions()
Definition: Window.hpp:67
Definition: Window.hpp:34
-
Buttons()
Definition: Window.hpp:59
+
Buttons()
Definition: Window.hpp:60
Definition: StandaloneWindow.hpp:28
-
Definition: Geometry.hpp:132
-
Definition: Window.hpp:40
+ +
Definition: Window.hpp:41
Definition: Base.hpp:178
-
Definition: Window.hpp:53
+
Definition: Window.hpp:54
Definition: Application.hpp:41
Definition: Widget.hpp:59
diff --git a/annotated.html b/annotated.html index 6ba6f8d7..300539de 100644 --- a/annotated.html +++ b/annotated.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class List + - @@ -21,7 +20,7 @@ - @@ -30,49 +29,26 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -88,70 +64,72 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 123]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
oCApplication
oCAudioPort
oCCircle
oCColor
oCExternalWindow
oCIdleCallback
oCImage
oCImageAboutWindow
oCImageButton
|\CCallback
oCImageKnob
|\CCallback
oCImageSlider
|\CCallback
oCImageSwitch
|\CCallback
oCLeakedObjectDetector
oCLine
oCMidiEvent
oCMutex
oCNanoImage
oCNanoVG
|oCGlyphPosition
|oCPaint
|\CTextRow
oCNanoWidget
oCParameter
oCParameterRanges
oCPlugin
oCPoint
oCRectangle
oCRecursiveMutex
oCScopedPointer
oCScopeLocker
oCScopeTryLocker
oCScopeUnlocker
oCSignal
oCSize
oCStandaloneWindow
oCString
oCThread
oCTimePosition
|\CBarBeatTick
oCTriangle
oCUI
oCWidget
|oCBaseEvent
|oCKeyboardEvent
|oCMotionEvent
|oCMouseEvent
|oCResizeEvent
|oCScrollEvent
|\CSpecialEvent
\CWindow
 \CFileBrowserOptions
  \CButtons
 CApplication
 CAudioPort
 CCircle
 CColor
 CExternalWindow
 CIdleCallback
 CImage
 CImageAboutWindow
 CImageButton
 CCallback
 CImageKnob
 CCallback
 CImageSlider
 CCallback
 CImageSwitch
 CCallback
 CLeakedObjectDetector
 CLine
 CMidiEvent
 CMutex
 CNanoImage
 CNanoVG
 CGlyphPosition
 CPaint
 CTextRow
 CNanoWidget
 CParameter
 CParameterEnumerationValue
 CParameterEnumerationValues
 CParameterRanges
 CPlugin
 CPoint
 CRectangle
 CRecursiveMutex
 CScopedPointer
 CScopeLocker
 CScopeTryLocker
 CScopeUnlocker
 CSignal
 CSize
 CStandaloneWindow
 CString
 CThread
 CTimePosition
 CBarBeatTick
 CTriangle
 CUI
 CWidget
 CBaseEvent
 CKeyboardEvent
 CMotionEvent
 CMouseEvent
 CResizeEvent
 CScrollEvent
 CSpecialEvent
 CWindow
 CFileBrowserOptions
 CButtons
diff --git a/classApplication-members.html b/classApplication-members.html index d6832279..5271a340 100644 --- a/classApplication-members.html +++ b/classApplication-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -90,7 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

This is the complete list of members for Application, including all inherited members.

- + @@ -99,9 +75,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Application()Application
exec()Application
exec(int idleTime=10)Application
idle()Application
isQuiting() const noexceptApplication
quit()Application
diff --git a/classApplication.html b/classApplication.html index c91f7a3a..eb4a4e83 100644 --- a/classApplication.html +++ b/classApplication.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Application Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -110,8 +86,8 @@ Public Member Functions   void idle ()   -void exec () -  +void exec (int idleTime=10) +  void quit ()   bool isQuiting () const noexcept @@ -119,7 +95,7 @@ Public Member Functions -

Friends

+
class Window
 
@@ -128,7 +104,9 @@ class Window

One application instance is required for creating a window. There's no single/global application instance in DGL, and multiple windows can share the same app instance.

In standalone mode an application will automatically quit its event-loop when all its windows are closed.

Constructor & Destructor Documentation

- + +

◆ Application()

+
@@ -144,7 +122,9 @@ class  - + +

◆ ~Application()

+
Window
@@ -169,7 +149,9 @@ class 

Member Function Documentation

- + +

◆ idle()

+
Window
@@ -185,24 +167,28 @@ class  - + +

◆ exec()

+
Window
- + +
void Application::exec ()int idleTime = 10)
-

Run the application event-loop until all Windows are closed. idle() is called at regular intervals.

-
Note
This function is meant for standalones only, never call this from plugins.
+

Run the application event-loop until all Windows are closed. idle() is called at regular intervals.

Note
This function is meant for standalones only, never call this from plugins.
- + +

◆ quit()

+
@@ -218,7 +204,9 @@ class  - + +

◆ isQuiting()

+
Window
@@ -248,9 +236,9 @@ class  diff --git a/classCircle-members.html b/classCircle-members.html index 70f60589..de24501a 100644 --- a/classCircle-members.html +++ b/classCircle-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
Window
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -83,38 +59,38 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-
Circle< typename > Member List
+
Circle< T > Member List
-

This is the complete list of members for Circle< typename >, including all inherited members.

+

This is the complete list of members for Circle< T >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
Circle() noexceptCircle< typename >
Circle(const T &x, const T &y, const float size, const uint numSegments=300)Circle< typename >
Circle(const Point< T > &pos, const float size, const uint numSegments=300)Circle< typename >
Circle(const Circle< T > &cir) noexceptCircle< typename >
draw()Circle< typename >
drawOutline()Circle< typename >
getNumSegments() const noexceptCircle< typename >
getPos() const noexceptCircle< typename >
getSize() const noexceptCircle< typename >
getX() const noexceptCircle< typename >
getY() const noexceptCircle< typename >
operator!=(const Circle< T > &cir) const noexcept (defined in Circle< typename >)Circle< typename >
operator=(const Circle< T > &cir) noexcept (defined in Circle< typename >)Circle< typename >
operator==(const Circle< T > &cir) const noexcept (defined in Circle< typename >)Circle< typename >
setNumSegments(const uint num)Circle< typename >
setPos(const T &x, const T &y) noexceptCircle< typename >
setPos(const Point< T > &pos) noexceptCircle< typename >
setSize(const float size) noexceptCircle< typename >
setX(const T &x) noexceptCircle< typename >
setY(const T &y) noexceptCircle< typename >
Circle() noexceptCircle< T >
Circle(const T &x, const T &y, const float size, const uint numSegments=300)Circle< T >
Circle(const Point< T > &pos, const float size, const uint numSegments=300)Circle< T >
Circle(const Circle< T > &cir) noexceptCircle< T >
draw()Circle< T >
drawOutline()Circle< T >
getNumSegments() const noexceptCircle< T >
getPos() const noexceptCircle< T >
getSize() const noexceptCircle< T >
getX() const noexceptCircle< T >
getY() const noexceptCircle< T >
operator!=(const Circle< T > &cir) const noexcept (defined in Circle< T >)Circle< T >
operator=(const Circle< T > &cir) noexcept (defined in Circle< T >)Circle< T >
operator==(const Circle< T > &cir) const noexcept (defined in Circle< T >)Circle< T >
setNumSegments(const uint num)Circle< T >
setPos(const T &x, const T &y) noexceptCircle< T >
setPos(const Point< T > &pos) noexceptCircle< T >
setSize(const float size) noexceptCircle< T >
setX(const T &x) noexceptCircle< T >
setY(const T &y) noexceptCircle< T >
diff --git a/classCircle.html b/classCircle.html index 117c3773..b455a354 100644 --- a/classCircle.html +++ b/classCircle.html @@ -3,16 +3,15 @@ - -DISTRHO Plugin Framework: Circle< typename > Class Template Reference + + +DISTRHO Plugin Framework: Circle< T > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + +
- All Classes Functions Variables Enumerations Enumerator Groups Pages
+
@@ -86,7 +62,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Public Member Functions | List of all members
-
Circle< typename > Class Template Reference
+
Circle< T > Class Template Reference
@@ -94,69 +70,71 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + - +

Public Member Functions

 Circle () noexcept
 
 Circle (const T &x, const T &y, const float size, const uint numSegments=300)
 
 Circle (const Point< T > &pos, const float size, const uint numSegments=300)
 
 Circle (const Circle< T > &cir) noexcept
 
const T & getX () const noexcept
 
const T & getY () const noexcept
 
const Point< T > & getPos () const noexcept
 
void setX (const T &x) noexcept
 
void setY (const T &y) noexcept
 
void setPos (const T &x, const T &y) noexcept
 
void setPos (const Point< T > &pos) noexcept
 
float getSize () const noexcept
 
void setSize (const float size) noexcept
 
uint getNumSegments () const noexcept
 
void setNumSegments (const uint num)
 
void draw ()
 
void drawOutline ()
 
+
 Circle () noexcept
 
 Circle (const T &x, const T &y, const float size, const uint numSegments=300)
 
 Circle (const Point< T > &pos, const float size, const uint numSegments=300)
 
 Circle (const Circle< T > &cir) noexcept
 
const T & getX () const noexcept
 
const T & getY () const noexcept
 
const Point< T > & getPos () const noexcept
 
void setX (const T &x) noexcept
 
void setY (const T &y) noexcept
 
void setPos (const T &x, const T &y) noexcept
 
void setPos (const Point< T > &pos) noexcept
 
float getSize () const noexcept
 
void setSize (const float size) noexcept
 
uint getNumSegments () const noexcept
 
void setNumSegments (const uint num)
 
void draw ()
 
void drawOutline ()
 
Circle< T > & operator= (const Circle< T > &cir) noexcept
 
+
 
bool operator== (const Circle< T > &cir) const noexcept
 
+
 
bool operator!= (const Circle< T > &cir) const noexcept
 
 

Detailed Description

-

template<typename>
-class Circle< typename >

+

template<typename T>
+class Circle< T >

DGL Circle class.

This class describes a circle, defined by position, size and a minimum of 3 segments.

TODO: report if circle starts at top-left, bottom-right or center. and size grows from which point?

Constructor & Destructor Documentation

- + +

◆ Circle() [1/4]

+
-template<typename >
+template<typename T>
- + @@ -172,14 +150,16 @@ template<typename > - + +

◆ Circle() [2/4]

+
-template<typename >
+template<typename T>
Circle< typename >::Circle Circle< T >::Circle ( )
- + @@ -213,14 +193,16 @@ template<typename > - + +

◆ Circle() [3/4]

+
-template<typename >
+template<typename T>
Circle< typename >::Circle Circle< T >::Circle ( const T &  x,
- + @@ -248,17 +230,19 @@ template<typename > - + +

◆ Circle() [4/4]

+
-template<typename >
+template<typename T>
Circle< typename >::Circle Circle< T >::Circle ( const Point< T > &  pos,
- + @@ -276,17 +260,19 @@ template<typename >

Member Function Documentation

- + +

◆ getX()

+
-template<typename >
+template<typename T>
Circle< typename >::Circle Circle< T >::Circle ( const Circle< T > &  cir)
- + @@ -302,17 +288,19 @@ template<typename > - + +

◆ getY()

+
-template<typename >
+template<typename T>
const T& Circle< typename >::getX const T& Circle< T >::getX ( ) const
- + @@ -328,17 +316,19 @@ template<typename > - + +

◆ getPos()

+
-template<typename >
+template<typename T>
const T& Circle< typename >::getY const T& Circle< T >::getY ( ) const
- + @@ -354,17 +344,19 @@ template<typename > - + +

◆ setX()

+
-template<typename >
+template<typename T>
const Point<T>& Circle< typename >::getPos const Point<T>& Circle< T >::getPos ( ) const
diff --git a/classImageSwitch_1_1Callback-members.html b/classImageSwitch_1_1Callback-members.html index eafe6d69..33f34a9b 100644 --- a/classImageSwitch_1_1Callback-members.html +++ b/classImageSwitch_1_1Callback-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- + @@ -381,17 +373,19 @@ template<typename > - + +

◆ setY()

+
-template<typename >
+template<typename T>
void Circle< typename >::setX void Circle< T >::setX ( const T &  x)
- + @@ -408,17 +402,19 @@ template<typename > - + +

◆ setPos() [1/2]

+
-template<typename >
+template<typename T>
void Circle< typename >::setY void Circle< T >::setY ( const T &  y)
- - -
- + @@ -445,17 +441,19 @@ template<typename > - + +

◆ setPos() [2/2]

+
-template<typename >
+template<typename T>
void Circle< typename >::setPos void Circle< T >::setPos ( const T &  x,
- + @@ -472,17 +470,19 @@ template<typename > - + +

◆ getSize()

+
-template<typename >
+template<typename T>
void Circle< typename >::setPos void Circle< T >::setPos ( const Point< T > &  pos)
- + @@ -498,17 +498,19 @@ template<typename > - + +

◆ setSize()

+
-template<typename >
+template<typename T>
float Circle< typename >::getSize float Circle< T >::getSize ( ) const
< diff --git a/classIdleCallback-members.html b/classIdleCallback-members.html index d5d99df7..53ca6a5e 100644 --- a/classIdleCallback-members.html +++ b/classIdleCallback-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- + @@ -521,22 +523,23 @@ template<typename >
void Circle< typename >::setSize void Circle< T >::setSize ( const float  size)
-

Set size.

-
Note
Must always be > 0
+

Set size.

Note
Must always be > 0
- + +

◆ getNumSegments()

+
-template<typename >
+template<typename T>
- + @@ -552,14 +555,16 @@ template<typename > - + +

◆ setNumSegments()

+
-template<typename >
+template<typename T>
uint Circle< typename >::getNumSegments uint Circle< T >::getNumSegments ( ) const
- + @@ -567,19 +572,20 @@ template<typename >
void Circle< typename >::setNumSegments void Circle< T >::setNumSegments ( const uint  num)
-

Set the number of line segments that will make this circle.

-
Note
Must always be >= 3
+

Set the number of line segments that will make this circle.

Note
Must always be >= 3
- + +

◆ draw()

+
-template<typename >
+template<typename T>
- + @@ -590,14 +596,16 @@ template<typename > - + +

◆ drawOutline()

+
-template<typename >
+template<typename T>
void Circle< typename >::draw void Circle< T >::draw ( )
- + @@ -614,9 +622,9 @@ template<typename > diff --git a/classExternalWindow-members.html b/classExternalWindow-members.html index 0020f3f0..701a2e78 100644 --- a/classExternalWindow-members.html +++ b/classExternalWindow-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
void Circle< typename >::drawOutline void Circle< T >::drawOutline ( )
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -101,9 +77,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classExternalWindow.html b/classExternalWindow.html index c4c1728c..0fb1d498 100644 --- a/classExternalWindow.html +++ b/classExternalWindow.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ExternalWindow Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -94,34 +70,34 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - - - - -

Public Member Functions

+
 ExternalWindow (const uint w=1, const uint h=1, const char *const t="")
 
+
uint getWidth () const noexcept
 
+
uint getHeight () const noexcept
 
+
const char * getTitle () const noexcept
 
+
void setTitle (const char *const t) noexcept
 
+
bool isRunning () noexcept
 
-

Protected Member Functions

+
bool startExternalProcess (const char *args[])
 
-

Friends

+
class UIExporter
 
@@ -131,9 +107,9 @@ class 
UIExporter
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -94,9 +70,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classIdleCallback.html b/classIdleCallback.html index b26b8bcd..64aff4cf 100644 --- a/classIdleCallback.html +++ b/classIdleCallback.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: IdleCallback Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -94,7 +70,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); -

Public Member Functions

+
virtual void idleCallback ()=0
 
@@ -106,9 +82,9 @@ virtual void 
idleCallback< diff --git a/classImage-members.html b/classImage-members.html index bbc8b9f8..4f90db7f 100644 --- a/classImage-members.html +++ b/classImage-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -112,9 +88,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImage.html b/classImage.html index 2d22d950..3102c712 100644 --- a/classImage.html +++ b/classImage.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Image Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -128,13 +104,13 @@ Public Member Functions
 
void drawAt (const Point< int > &pos)
 
+
Imageoperator= (const Image &image) noexcept
 
+
bool operator== (const Image &image) const noexcept
 
+
bool operator!= (const Image &image) const noexcept
 
@@ -144,7 +120,9 @@ bool 
operator!= (const

To generate raw data useful for this class see the utils/png2rgba.py script. Be careful when using a PNG without alpha channel, for those the format is 'GL_BGR' instead of the default 'GL_BGRA'.

Images are drawn on screen via 2D textures.

Constructor & Destructor Documentation

- + +

◆ Image() [1/4]

+
@@ -160,7 +138,9 @@ bool 
operator!= (const - + +

◆ Image() [2/4]

+
@@ -201,12 +181,13 @@ bool 
operator!= (const
-

Constructor using raw image data.

-
Note
rawData must remain valid for the lifetime of this Image.
+

Constructor using raw image data.

Note
rawData must remain valid for the lifetime of this Image.
- + +

◆ Image() [3/4]

+
@@ -241,12 +222,13 @@ bool 
operator!= (const
-

Constructor using raw image data.

-
Note
rawData must remain valid for the lifetime of this Image.
+

Constructor using raw image data.

Note
rawData must remain valid for the lifetime of this Image.
- + +

◆ Image() [4/4]

+
@@ -263,7 +245,9 @@ bool 
operator!= (const - + +

◆ ~Image()

+
@@ -280,7 +264,9 @@ bool  diff --git a/classImageSlider_1_1Callback-members.html b/classImageSlider_1_1Callback-members.html index 381e1992..87fba8da 100644 --- a/classImageSlider_1_1Callback-members.html +++ b/classImageSlider_1_1Callback-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
operator!= (const

Member Function Documentation

- + +

◆ loadFromMemory() [1/2]

+
@@ -329,12 +315,13 @@ bool 
operator!= (const
-

Load image data from memory.

-
Note
rawData must remain valid for the lifetime of this Image.
+

Load image data from memory.

Note
rawData must remain valid for the lifetime of this Image.
- + +

◆ loadFromMemory() [2/2]

+
@@ -377,12 +364,13 @@ bool 
operator!= (const
-

Load image data from memory.

-
Note
rawData must remain valid for the lifetime of this Image.
+

Load image data from memory.

Note
rawData must remain valid for the lifetime of this Image.
- + +

◆ isValid()

+
@@ -406,7 +394,9 @@ bool 
operator!= (const - + +

◆ getWidth()

+
@@ -430,7 +420,9 @@ bool 
operator!= (const - + +

◆ getHeight()

+
@@ -454,7 +446,9 @@ bool 
operator!= (const - + +

◆ getSize()

+
@@ -478,7 +472,9 @@ bool  diff --git a/classImageKnob_1_1Callback-members.html b/classImageKnob_1_1Callback-members.html index 66ecd32a..537d2bf2 100644 --- a/classImageKnob_1_1Callback-members.html +++ b/classImageKnob_1_1Callback-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
operator!= (const - + +

◆ getRawData()

+
@@ -502,7 +498,9 @@ bool 
operator!= (const - + +

◆ getFormat()

+
@@ -526,7 +524,9 @@ bool 
operator!= (const - + +

◆ getType()

+
@@ -550,7 +550,9 @@ bool 
operator!= (const - + +

◆ draw()

+
@@ -566,7 +568,9 @@ bool  diff --git a/classImageButton_1_1Callback-members.html b/classImageButton_1_1Callback-members.html index 47ee21a6..aa1e82ab 100644 --- a/classImageButton_1_1Callback-members.html +++ b/classImageButton_1_1Callback-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
operator!= (const - + +

◆ drawAt() [1/2]

+
@@ -593,7 +597,9 @@ bool 
operator!= (const - + +

◆ drawAt() [2/2]

+
@@ -616,9 +622,9 @@ bool 
operator!= (const diff --git a/classImageAboutWindow-members.html b/classImageAboutWindow-members.html index ac4012c1..8d076e20 100644 --- a/classImageAboutWindow-members.html +++ b/classImageAboutWindow-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -162,9 +138,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageAboutWindow.html b/classImageAboutWindow.html index 0e03de30..3096a94a 100644 --- a/classImageAboutWindow.html +++ b/classImageAboutWindow.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageAboutWindow Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -103,92 +79,92 @@ Inheritance diagram for ImageAboutWindow:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -257,20 +233,20 @@ Protected Member Functions - - - - - @@ -284,7 +260,9 @@ virtual void 

Public Member Functions

+
 ImageAboutWindow (Window &parent, const Image &image=Image())
 
+
 ImageAboutWindow (Widget *widget, const Image &image=Image())
 
+
void setImage (const Image &image)
 
- Public Member Functions inherited from Window
+
 Window (Application &app)
 
+
 Window (Application &app, Window &parent)
 
+
 Window (Application &app, intptr_t parentId)
 
+
void show ()
 
+
void hide ()
 
+
void close ()
 
+
void exec (bool lockWait=false)
 
+
void focus ()
 
+
void repaint () noexcept
 
+
bool openFileBrowser (const FileBrowserOptions &options)
 
+
bool isVisible () const noexcept
 
+
void setVisible (bool yesNo)
 
+
bool isResizable () const noexcept
 
+
void setResizable (bool yesNo)
 
+
uint getWidth () const noexcept
 
+
uint getHeight () const noexcept
 
+
Size< uint > getSize () const noexcept
 
+
void setSize (uint width, uint height)
 
+
void setSize (Size< uint > size)
 
+
const char * getTitle () const noexcept
 
+
void setTitle (const char *title)
 
+
void setTransientWinId (uintptr_t winId)
 
+
ApplicationgetApp () const noexcept
 
+
intptr_t getWindowId () const noexcept
 
+
void addIdleCallback (IdleCallback *const callback)
 
+
void removeIdleCallback (IdleCallback *const callback)
 
- Public Member Functions inherited from Widget
 
bool onMouse (const MouseEvent &) override
 
+
void onReshape (uint width, uint height) override
 
- Protected Member Functions inherited from Window
+
virtual void onDisplayBefore ()
 
+
virtual void onDisplayAfter ()
 
+
virtual void onClose ()
 
+
virtual void fileBrowserSelected (const char *filename)
 
- Protected Member Functions inherited from Widget
fileBrowserSe
 

Member Function Documentation

- + +

◆ onDisplay()

+
@@ -310,7 +288,9 @@ virtual void 
fileBrowserSe - + +

◆ onKeyboard()

+
@@ -331,14 +311,15 @@ virtual void 
fileBrowserSe
-

A function called when a key is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a key is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

- + +

◆ onMouse()

+
@@ -359,8 +340,7 @@ virtual void 
fileBrowserSe
-

A function called when a mouse button is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a mouse button is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

@@ -372,9 +352,9 @@ virtual void 
fileBrowserSe diff --git a/classImageButton-members.html b/classImageButton-members.html index a6ab835d..01267f61 100644 --- a/classImageButton-members.html +++ b/classImageButton-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -135,9 +111,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageButton.html b/classImageButton.html index dff308fd..3127b34f 100644 --- a/classImageButton.html +++ b/classImageButton.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageButton Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -108,25 +84,25 @@ Classes
- - - - - - - @@ -206,7 +182,9 @@ Protected Member Functions

Public Member Functions

+
 ImageButton (Window &parent, const Image &image)
 
+
 ImageButton (Window &parent, const Image &imageNormal, const Image &imageDown)
 
+
 ImageButton (Window &parent, const Image &imageNormal, const Image &imageHover, const Image &imageDown)
 
+
 ImageButton (Widget *widget, const Image &image)
 
+
 ImageButton (Widget *widget, const Image &imageNormal, const Image &imageDown)
 
+
 ImageButton (Widget *widget, const Image &imageNormal, const Image &imageHover, const Image &imageDown)
 
+
void setCallback (Callback *callback) noexcept
 
- Public Member Functions inherited from Widget
 

Member Function Documentation

- + +

◆ onDisplay()

+
@@ -232,7 +210,9 @@ Protected Member Functions - + +

◆ onMouse()

+
@@ -253,14 +233,15 @@ Protected Member Functions
-

A function called when a mouse button is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a mouse button is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

- + +

◆ onMotion()

+
@@ -281,8 +262,7 @@ Protected Member Functions
-

A function called when the pointer moves.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when the pointer moves.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

@@ -294,9 +274,9 @@ Protected Member Functions
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -98,9 +74,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageButton_1_1Callback.html b/classImageButton_1_1Callback.html index 4dd0c6f2..06db0032 100644 --- a/classImageButton_1_1Callback.html +++ b/classImageButton_1_1Callback.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageButton::Callback Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -96,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); -

Public Member Functions

+
virtual void imageButtonClicked (ImageButton *imageButton, int button)=0
 
@@ -106,9 +82,9 @@ virtual void 
imageButtonCl diff --git a/classImageKnob-members.html b/classImageKnob-members.html index 6ec37df1..480e7cc4 100644 --- a/classImageKnob-members.html +++ b/classImageKnob-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -145,9 +121,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageKnob.html b/classImageKnob.html index aaa00cca..70c6b489 100644 --- a/classImageKnob.html +++ b/classImageKnob.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageKnob Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -109,53 +85,53 @@ Classes
-

Public Types

enum  Orientation { Horizontal, +
enum  Orientation { Horizontal, Vertical }
 
- - - - - - - - - - - - - - @@ -235,7 +211,9 @@ Protected Member Functions

Public Member Functions

+
 ImageKnob (Window &parent, const Image &image, Orientation orientation=Vertical) noexcept
 
+
 ImageKnob (Widget *widget, const Image &image, Orientation orientation=Vertical) noexcept
 
+
 ImageKnob (const ImageKnob &imageKnob)
 
+
ImageKnoboperator= (const ImageKnob &imageKnob)
 
+
float getValue () const noexcept
 
+
void setDefault (float def) noexcept
 
+
void setRange (float min, float max) noexcept
 
+
void setStep (float step) noexcept
 
+
void setValue (float value, bool sendCallback=false) noexcept
 
+
void setUsingLogScale (bool yesNo) noexcept
 
+
void setCallback (Callback *callback) noexcept
 
+
void setOrientation (Orientation orientation) noexcept
 
+
void setRotationAngle (int angle)
 
+
void setImageLayerCount (uint count) noexcept
 
- Public Member Functions inherited from Widget
 

Member Function Documentation

- + +

◆ onDisplay()

+
@@ -261,7 +239,9 @@ Protected Member Functions - + +

◆ onMouse()

+
@@ -282,14 +262,15 @@ Protected Member Functions
-

A function called when a mouse button is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a mouse button is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

- + +

◆ onMotion()

+
@@ -310,14 +291,15 @@ Protected Member Functions
-

A function called when the pointer moves.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when the pointer moves.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

- + +

◆ onScroll()

+
@@ -338,8 +320,7 @@ Protected Member Functions
-

A function called on scrolling (e.g. mouse wheel or track pad).

-
Returns
True to stop event propagation, false otherwise.
+

A function called on scrolling (e.g. mouse wheel or track pad).

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

@@ -351,9 +332,9 @@ Protected Member Functions
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -100,9 +76,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageKnob_1_1Callback.html b/classImageKnob_1_1Callback.html index 85b5afc0..7ac0f1ad 100644 --- a/classImageKnob_1_1Callback.html +++ b/classImageKnob_1_1Callback.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageKnob::Callback Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -96,13 +72,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - -

Public Member Functions

+
virtual void imageKnobDragStarted (ImageKnob *imageKnob)=0
 
+
virtual void imageKnobDragFinished (ImageKnob *imageKnob)=0
 
+
virtual void imageKnobValueChanged (ImageKnob *imageKnob, float value)=0
 
@@ -112,9 +88,9 @@ virtual void 
imageKnobValu diff --git a/classImageSlider-members.html b/classImageSlider-members.html index eab20de2..7efb0343 100644 --- a/classImageSlider-members.html +++ b/classImageSlider-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -139,9 +115,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageSlider.html b/classImageSlider.html index 6fec6a30..47f417f6 100644 --- a/classImageSlider.html +++ b/classImageSlider.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageSlider Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -108,40 +84,40 @@ Classes
- - - - - - - - - - - - @@ -221,7 +197,9 @@ Protected Member Functions

Public Member Functions

+
 ImageSlider (Window &parent, const Image &image) noexcept
 
+
 ImageSlider (Widget *widget, const Image &image) noexcept
 
+
float getValue () const noexcept
 
+
void setValue (float value, bool sendCallback=false) noexcept
 
+
void setStartPos (const Point< int > &startPos) noexcept
 
+
void setStartPos (int x, int y) noexcept
 
+
void setEndPos (const Point< int > &endPos) noexcept
 
+
void setEndPos (int x, int y) noexcept
 
+
void setInverted (bool inverted) noexcept
 
+
void setRange (float min, float max) noexcept
 
+
void setStep (float step) noexcept
 
+
void setCallback (Callback *callback) noexcept
 
- Public Member Functions inherited from Widget
 

Member Function Documentation

- + +

◆ onDisplay()

+
@@ -247,7 +225,9 @@ Protected Member Functions - + +

◆ onMouse()

+
@@ -268,14 +248,15 @@ Protected Member Functions
-

A function called when a mouse button is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a mouse button is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

- + +

◆ onMotion()

+
@@ -296,8 +277,7 @@ Protected Member Functions
-

A function called when the pointer moves.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when the pointer moves.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

@@ -309,9 +289,9 @@ Protected Member Functions
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -100,9 +76,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageSlider_1_1Callback.html b/classImageSlider_1_1Callback.html index 238f74e9..29ec7dd4 100644 --- a/classImageSlider_1_1Callback.html +++ b/classImageSlider_1_1Callback.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageSlider::Callback Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -96,13 +72,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - -

Public Member Functions

+
virtual void imageSliderDragStarted (ImageSlider *imageSlider)=0
 
+
virtual void imageSliderDragFinished (ImageSlider *imageSlider)=0
 
+
virtual void imageSliderValueChanged (ImageSlider *imageSlider, float value)=0
 
@@ -112,9 +88,9 @@ virtual void 
imageSliderVa diff --git a/classImageSwitch-members.html b/classImageSwitch-members.html index 2d7fd339..2bb2acbf 100644 --- a/classImageSwitch-members.html +++ b/classImageSwitch-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -134,9 +110,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageSwitch.html b/classImageSwitch.html index cd95ef83..3dfb9577 100644 --- a/classImageSwitch.html +++ b/classImageSwitch.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageSwitch Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -108,25 +84,25 @@ Classes
- - - - - - - @@ -206,7 +182,9 @@ Protected Member Functions

Public Member Functions

+
 ImageSwitch (Window &parent, const Image &imageNormal, const Image &imageDown) noexcept
 
+
 ImageSwitch (Widget *widget, const Image &imageNormal, const Image &imageDown) noexcept
 
+
 ImageSwitch (const ImageSwitch &imageSwitch) noexcept
 
+
ImageSwitchoperator= (const ImageSwitch &imageSwitch) noexcept
 
+
bool isDown () const noexcept
 
+
void setDown (bool down) noexcept
 
+
void setCallback (Callback *callback) noexcept
 
- Public Member Functions inherited from Widget
 

Member Function Documentation

- + +

◆ onDisplay()

+
@@ -232,7 +210,9 @@ Protected Member Functions - + +

◆ onMouse()

+
@@ -253,8 +233,7 @@ Protected Member Functions
-

A function called when a mouse button is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a mouse button is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented from Widget.

@@ -266,9 +245,9 @@ Protected Member Functions
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -98,9 +74,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classImageSwitch_1_1Callback.html b/classImageSwitch_1_1Callback.html index fd74b127..9120d049 100644 --- a/classImageSwitch_1_1Callback.html +++ b/classImageSwitch_1_1Callback.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ImageSwitch::Callback Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -96,7 +72,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); -

Public Member Functions

+
virtual void imageSwitchClicked (ImageSwitch *imageButton, bool down)=0
 
@@ -106,9 +82,9 @@ virtual void 
imageSwitchCl diff --git a/classLeakedObjectDetector-members.html b/classLeakedObjectDetector-members.html index eebc2f7f..b9ba2e27 100644 --- a/classLeakedObjectDetector-members.html +++ b/classLeakedObjectDetector-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -95,9 +71,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classLeakedObjectDetector.html b/classLeakedObjectDetector.html index db7239d9..c67757d8 100644 --- a/classLeakedObjectDetector.html +++ b/classLeakedObjectDetector.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: LeakedObjectDetector< OwnerClass > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -95,21 +71,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); -

Public Member Functions

+
 LeakedObjectDetector (const LeakedObjectDetector &) noexcept
 
 ~LeakedObjectDetector () noexcept
 

Detailed Description

-

template<class OwnerClass>
+

template<class OwnerClass>
class LeakedObjectDetector< OwnerClass >

Embedding an instance of this class inside another class can be used as a low-overhead way of detecting leaked instances.

This class keeps an internal static count of the number of instances that are active, so that when the app is shutdown and the static destructors are called, it can check whether there are any left-over instances that may have been leaked.

To use it, use the DISTRHO_LEAK_DETECTOR macro as a simple way to put one in your class declaration.

Constructor & Destructor Documentation

- + +

◆ ~LeakedObjectDetector()

+
@@ -143,9 +121,9 @@ template<class OwnerClass >
diff --git a/classLine-members.html b/classLine-members.html index d2de7129..b76b0777 100644 --- a/classLine-members.html +++ b/classLine-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -83,46 +59,46 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-
Line< typename > Member List
+
Line< T > Member List
-

This is the complete list of members for Line< typename >, including all inherited members.

+

This is the complete list of members for Line< T >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
draw()Line< typename >
getEndPos() const noexceptLine< typename >
getEndX() const noexceptLine< typename >
getEndY() const noexceptLine< typename >
getStartPos() const noexceptLine< typename >
getStartX() const noexceptLine< typename >
getStartY() const noexceptLine< typename >
isNotNull() const noexceptLine< typename >
isNull() const noexceptLine< typename >
Line() noexceptLine< typename >
Line(const T &startX, const T &startY, const T &endX, const T &endY) noexceptLine< typename >
Line(const T &startX, const T &startY, const Point< T > &endPos) noexceptLine< typename >
Line(const Point< T > &startPos, const T &endX, const T &endY) noexceptLine< typename >
Line(const Point< T > &startPos, const Point< T > &endPos) noexceptLine< typename >
Line(const Line< T > &line) noexceptLine< typename >
moveBy(const T &x, const T &y) noexceptLine< typename >
moveBy(const Point< T > &pos) noexceptLine< typename >
operator!=(const Line< T > &line) const noexcept (defined in Line< typename >)Line< typename >
operator=(const Line< T > &line) noexcept (defined in Line< typename >)Line< typename >
operator==(const Line< T > &line) const noexcept (defined in Line< typename >)Line< typename >
setEndPos(const T &x, const T &y) noexceptLine< typename >
setEndPos(const Point< T > &pos) noexceptLine< typename >
setEndX(const T &x) noexceptLine< typename >
setEndY(const T &y) noexceptLine< typename >
setStartPos(const T &x, const T &y) noexceptLine< typename >
setStartPos(const Point< T > &pos) noexceptLine< typename >
setStartX(const T &x) noexceptLine< typename >
setStartY(const T &y) noexceptLine< typename >
draw()Line< T >
getEndPos() const noexceptLine< T >
getEndX() const noexceptLine< T >
getEndY() const noexceptLine< T >
getStartPos() const noexceptLine< T >
getStartX() const noexceptLine< T >
getStartY() const noexceptLine< T >
isNotNull() const noexceptLine< T >
isNull() const noexceptLine< T >
Line() noexceptLine< T >
Line(const T &startX, const T &startY, const T &endX, const T &endY) noexceptLine< T >
Line(const T &startX, const T &startY, const Point< T > &endPos) noexceptLine< T >
Line(const Point< T > &startPos, const T &endX, const T &endY) noexceptLine< T >
Line(const Point< T > &startPos, const Point< T > &endPos) noexceptLine< T >
Line(const Line< T > &line) noexceptLine< T >
moveBy(const T &x, const T &y) noexceptLine< T >
moveBy(const Point< T > &pos) noexceptLine< T >
operator!=(const Line< T > &line) const noexcept (defined in Line< T >)Line< T >
operator=(const Line< T > &line) noexcept (defined in Line< T >)Line< T >
operator==(const Line< T > &line) const noexcept (defined in Line< T >)Line< T >
setEndPos(const T &x, const T &y) noexceptLine< T >
setEndPos(const Point< T > &pos) noexceptLine< T >
setEndX(const T &x) noexceptLine< T >
setEndY(const T &y) noexceptLine< T >
setStartPos(const T &x, const T &y) noexceptLine< T >
setStartPos(const Point< T > &pos) noexceptLine< T >
setStartX(const T &x) noexceptLine< T >
setStartY(const T &y) noexceptLine< T >
diff --git a/classLine.html b/classLine.html index e6869b9a..82ea4219 100644 --- a/classLine.html +++ b/classLine.html @@ -3,16 +3,15 @@ - -DISTRHO Plugin Framework: Line< typename > Class Template Reference + + +DISTRHO Plugin Framework: Line< T > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -86,7 +62,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Public Member Functions | List of all members
-
Line< typename > Class Template Reference
+
Line< T > Class Template Reference
@@ -94,84 +70,86 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + - +

Public Member Functions

 Line () noexcept
 
 Line (const T &startX, const T &startY, const T &endX, const T &endY) noexcept
 
 Line (const T &startX, const T &startY, const Point< T > &endPos) noexcept
 
 Line (const Point< T > &startPos, const T &endX, const T &endY) noexcept
 
 Line (const Point< T > &startPos, const Point< T > &endPos) noexcept
 
 Line (const Line< T > &line) noexcept
 
const T & getStartX () const noexcept
 
const T & getStartY () const noexcept
 
const T & getEndX () const noexcept
 
const T & getEndY () const noexcept
 
const Point< T > & getStartPos () const noexcept
 
const Point< T > & getEndPos () const noexcept
 
void setStartX (const T &x) noexcept
 
void setStartY (const T &y) noexcept
 
void setStartPos (const T &x, const T &y) noexcept
 
void setStartPos (const Point< T > &pos) noexcept
 
void setEndX (const T &x) noexcept
 
void setEndY (const T &y) noexcept
 
void setEndPos (const T &x, const T &y) noexcept
 
void setEndPos (const Point< T > &pos) noexcept
 
void moveBy (const T &x, const T &y) noexcept
 
void moveBy (const Point< T > &pos) noexcept
 
void draw ()
 
bool isNull () const noexcept
 
bool isNotNull () const noexcept
 
+
 Line () noexcept
 
 Line (const T &startX, const T &startY, const T &endX, const T &endY) noexcept
 
 Line (const T &startX, const T &startY, const Point< T > &endPos) noexcept
 
 Line (const Point< T > &startPos, const T &endX, const T &endY) noexcept
 
 Line (const Point< T > &startPos, const Point< T > &endPos) noexcept
 
 Line (const Line< T > &line) noexcept
 
const T & getStartX () const noexcept
 
const T & getStartY () const noexcept
 
const T & getEndX () const noexcept
 
const T & getEndY () const noexcept
 
const Point< T > & getStartPos () const noexcept
 
const Point< T > & getEndPos () const noexcept
 
void setStartX (const T &x) noexcept
 
void setStartY (const T &y) noexcept
 
void setStartPos (const T &x, const T &y) noexcept
 
void setStartPos (const Point< T > &pos) noexcept
 
void setEndX (const T &x) noexcept
 
void setEndY (const T &y) noexcept
 
void setEndPos (const T &x, const T &y) noexcept
 
void setEndPos (const Point< T > &pos) noexcept
 
void moveBy (const T &x, const T &y) noexcept
 
void moveBy (const Point< T > &pos) noexcept
 
void draw ()
 
bool isNull () const noexcept
 
bool isNotNull () const noexcept
 
Line< T > & operator= (const Line< T > &line) noexcept
 
+
 
bool operator== (const Line< T > &line) const noexcept
 
+
 
bool operator!= (const Line< T > &line) const noexcept
 
 

Detailed Description

-

template<typename>
-class Line< typename >

+

template<typename T>
+class Line< T >

DGL Line class.

This class describes a line, defined by two points.

Constructor & Destructor Documentation

- + +

◆ Line() [1/6]

+
-template<typename >
+template<typename T>
- + @@ -187,17 +165,19 @@ template<typename > - + +

◆ Line() [2/6]

+
-template<typename >
+template<typename T>
Line< typename >::Line Line< T >::Line ( )
- + @@ -236,17 +216,19 @@ template<typename > - + +

◆ Line() [3/6]

+
-template<typename >
+template<typename T>
Line< typename >::Line Line< T >::Line ( const T &  startX,
- + @@ -279,17 +261,19 @@ template<typename > - + +

◆ Line() [4/6]

+
-template<typename >
+template<typename T>
Line< typename >::Line Line< T >::Line ( const T &  startX,
- + @@ -322,17 +306,19 @@ template<typename > - + +

◆ Line() [5/6]

+
-template<typename >
+template<typename T>
Line< typename >::Line Line< T >::Line ( const Point< T > &  startPos,
- + @@ -359,17 +345,19 @@ template<typename > - + +

◆ Line() [6/6]

+
-template<typename >
+template<typename T>
Line< typename >::Line Line< T >::Line ( const Point< T > &  startPos,
- + @@ -387,17 +375,19 @@ template<typename >

Member Function Documentation

- + +

◆ getStartX()

+
-template<typename >
+template<typename T>
Line< typename >::Line Line< T >::Line ( const Line< T > &  line)
- + @@ -413,17 +403,19 @@ template<typename > - + +

◆ getStartY()

+
-template<typename >
+template<typename T>
const T& Line< typename >::getStartX const T& Line< T >::getStartX ( ) const
- + @@ -439,17 +431,19 @@ template<typename > - + +

◆ getEndX()

+
-template<typename >
+template<typename T>
const T& Line< typename >::getStartY const T& Line< T >::getStartY ( ) const
- + @@ -465,17 +459,19 @@ template<typename > - + +

◆ getEndY()

+
-template<typename >
+template<typename T>
const T& Line< typename >::getEndX const T& Line< T >::getEndX ( ) const
- + @@ -491,17 +487,19 @@ template<typename > - + +

◆ getStartPos()

+
-template<typename >
+template<typename T>
const T& Line< typename >::getEndY const T& Line< T >::getEndY ( ) const
- + @@ -517,17 +515,19 @@ template<typename > - + +

◆ getEndPos()

+
-template<typename >
+template<typename T>
const Point<T>& Line< typename >::getStartPos const Point<T>& Line< T >::getStartPos ( ) const
- + @@ -543,17 +543,19 @@ template<typename > - + +

◆ setStartX()

+
-template<typename >
+template<typename T>
const Point<T>& Line< typename >::getEndPos const Point<T>& Line< T >::getEndPos ( ) const
- - - - - - -
- + @@ -570,17 +572,19 @@ template<typename > - + +

◆ setStartY()

+
-template<typename >
+template<typename T>
void Line< typename >::setStartX void Line< T >::setStartX ( const T &  x)
- + @@ -597,17 +601,19 @@ template<typename > - + +

◆ setStartPos() [1/2]

+
-template<typename >
+template<typename T>
void Line< typename >::setStartY void Line< T >::setStartY ( const T &  y)
- + @@ -634,17 +640,19 @@ template<typename > - + +

◆ setStartPos() [2/2]

+
-template<typename >
+template<typename T>
void Line< typename >::setStartPos void Line< T >::setStartPos ( const T &  x,
- - + + - + @@ -122,9 +98,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- + @@ -661,17 +669,19 @@ template<typename > - + +

◆ setEndX()

+
-template<typename >
+template<typename T>
void Line< typename >::setStartPos void Line< T >::setStartPos ( const Point< T > &  pos)
diff --git a/classPlugin-members.html b/classPlugin-members.html index 8a1ea65a..06ceb485 100644 --- a/classPlugin-members.html +++ b/classPlugin-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- + @@ -688,17 +698,19 @@ template<typename > - + +

◆ setEndY()

+
-template<typename >
+template<typename T>
void Line< typename >::setEndX void Line< T >::setEndX ( const T &  x)
CREATE_DEBUG = 1 << 2 } - - - - - - @@ -433,7 +409,9 @@ typedef int 

NanoVG Widget class.

This class implements the NanoVG drawing API inside a DGL Widget. The drawing function onDisplay() is implemented internally but a new onNanoDisplay() needs to be overridden instead.

Constructor & Destructor Documentation

- + +

◆ NanoWidget() [1/3]

+
- + @@ -715,17 +727,19 @@ template<typename > - + +

◆ setEndPos() [1/2]

+
-template<typename >
+template<typename T>
void Line< typename >::setEndY void Line< T >::setEndY ( const T &  y)
- + @@ -752,17 +766,19 @@ template<typename > - + +

◆ setEndPos() [2/2]

+
-template<typename >
+template<typename T>
void Line< typename >::setEndPos void Line< T >::setEndPos ( const T &  x,
CREATE_DEBUG = 1 << 2 } - - - - - -
- + @@ -779,17 +795,19 @@ template<typename > - + +

◆ moveBy() [1/2]

+
-template<typename >
+template<typename T>
void Line< typename >::setEndPos void Line< T >::setEndPos ( const Point< T > &  pos)
- + @@ -816,17 +834,19 @@ template<typename > - + +

◆ moveBy() [2/2]

+
-template<typename >
+template<typename T>
void Line< typename >::moveBy void Line< T >::moveBy ( const T &  x,

NanoVG Image class.

This implements NanoVG images as a C++ class where deletion is handled automatically. Images need to be created within a NanoVG or NanoWidget class.

Constructor & Destructor Documentation

- + +

◆ NanoImage() [1/2]

+
- + @@ -843,14 +863,16 @@ template<typename > - + +

◆ draw()

+
-template<typename >
+template<typename T>
void Line< typename >::moveBy void Line< T >::moveBy ( const Point< T > &  pos)
- + @@ -861,17 +883,19 @@ template<typename > - + +

◆ isNull()

+
-template<typename >
+template<typename T>
void Line< typename >::draw void Line< T >::draw ( )
- - + +
- + @@ -887,17 +911,19 @@ template<typename > - + +

◆ isNotNull()

+
-template<typename >
+template<typename T>
bool Line< typename >::isNull bool Line< T >::isNull ( ) const
- + @@ -919,9 +945,9 @@ template<typename > diff --git a/classMutex-members.html b/classMutex-members.html index e7069784..1ca502a5 100644 --- a/classMutex-members.html +++ b/classMutex-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
bool Line< typename >::isNotNull bool Line< T >::isNotNull ( ) const
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -97,9 +73,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classMutex.html b/classMutex.html index 27e436a1..9892ecf8 100644 --- a/classMutex.html +++ b/classMutex.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Mutex Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -92,16 +68,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - - -

Public Member Functions

+
 Mutex (bool inheritPriority=true) noexcept
 
+
void lock () const noexcept
 
+
bool tryLock () const noexcept
 
+
void unlock () const noexcept
 
@@ -111,9 +87,9 @@ void 
unlock () const n diff --git a/classNanoImage-members.html b/classNanoImage-members.html index 28ab1caa..426d8f0f 100644 --- a/classNanoImage-members.html +++ b/classNanoImage-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -90,7 +66,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

This is the complete list of members for NanoImage, including all inherited members.

- + @@ -100,9 +76,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
getSize() const noexceptNanoImage
getTextureHandle() const NanoImage
getTextureHandle() constNanoImage
isValid() const noexceptNanoImage
NanoImage()NanoImage
NanoImage(const Handle &handle)NanoImage
diff --git a/classNanoImage.html b/classNanoImage.html index c3fb130e..54a6cec2 100644 --- a/classNanoImage.html +++ b/classNanoImage.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: NanoImage Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -108,12 +84,12 @@ Public Member Functions
 
Size< uint > getSize () const noexcept
 
GLuint getTextureHandle () const
 
GLuint getTextureHandle () const
 
-

Friends

+
class NanoVG
 
@@ -121,7 +97,9 @@ class 
NanoVG
@@ -137,7 +115,9 @@ class  - + +

◆ NanoImage() [2/2]

+
NanoVG
@@ -154,7 +134,9 @@ class  - + +

◆ ~NanoImage()

+
NanoVG
@@ -171,7 +153,9 @@ class 

Member Function Documentation

- + +

◆ operator=()

+
NanoVG
@@ -188,7 +172,9 @@ class  - + +

◆ isValid()

+
NanoVG
@@ -212,7 +198,9 @@ class  - + +

◆ getSize()

+
NanoVG
@@ -236,7 +224,9 @@ class  - + +

◆ getTextureHandle()

+
NanoVG
@@ -258,9 +248,9 @@ class  diff --git a/classNanoVG-members.html b/classNanoVG-members.html index 0fe91634..d799f377 100644 --- a/classNanoVG-members.html +++ b/classNanoVG-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
NanoVG
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -217,9 +193,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classNanoVG.html b/classNanoVG.html index b52e1341..d58feda4 100644 --- a/classNanoVG.html +++ b/classNanoVG.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: NanoVG Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -121,47 +97,47 @@ Public Types
 
enum  ImageFlags {
+
enum  ImageFlags {
  IMAGE_GENERATE_MIPMAPS = 1 << 0, IMAGE_REPEAT_X = 1 << 1, IMAGE_REPEAT_Y = 1 << 2, IMAGE_FLIP_Y = 1 << 3, -
+
  IMAGE_PREMULTIPLIED = 1 << 4 -
+
}
 
enum  Align {
+
enum  Align {
  ALIGN_LEFT = 1 << 0, ALIGN_CENTER = 1 << 1, ALIGN_RIGHT = 1 << 2, ALIGN_TOP = 1 << 3, -
+
  ALIGN_MIDDLE = 1 << 4, ALIGN_BOTTOM = 1 << 5, ALIGN_BASELINE = 1 << 6 -
+
}
 
enum  LineCap {
+
enum  LineCap {
  BUTT, ROUND, SQUARE, BEVEL, -
+
  MITER -
+
}
 
enum  Solidity { SOLID = 1, +
enum  Solidity { SOLID = 1, HOLE = 2 }
 
enum  Winding { CCW = 1, +
enum  Winding { CCW = 1, CW = 2 }
 
+
typedef int FontId
 
@@ -359,7 +335,7 @@ Static Public Member Functions
-

Friends

+
class BlendishWidget
 
@@ -401,14 +377,11 @@ Text

Font measure functions return values in local space, the calculations are carried in the same resolution as the final rendering. This is done because the text glyph positions are snapped to the nearest pixels sharp rendering.

The local space means that values are not rotated or scale as per the current transformation. For example if you set font size to 12, which would mean that line height is 16, then regardless of the current scaling and rotation, the returned line height is always 16. Some measures may vary because of the scaling since aforementioned pixel snapping.

While this may sound a little odd, the setup allows you to always render the same way regardless of scaling. i.e. following works regardless of scaling:

-
const char* txt = "Text me up.";
-
vg.textBounds(x,y, txt, NULL, bounds);
-
vg.beginPath();
-
vg.roundedRect(bounds[0], bounds[1], bounds[2]-bounds[0], bounds[3]-bounds[1]);
-
vg.fill();
-

Note: currently only solid color fill is supported for text.

+
const char* txt = "Text me up.";
vg.textBounds(x,y, txt, NULL, bounds);
vg.beginPath();
vg.roundedRect(bounds[0], bounds[1], bounds[2]-bounds[0], bounds[3]-bounds[1]);
vg.fill();

Note: currently only solid color fill is supported for text.

Member Enumeration Documentation

- + +

◆ CreateFlags

+
@@ -418,21 +391,20 @@ Text
- - -
Enumerator
CREATE_ANTIALIAS  -

Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).

+
Enumerator
CREATE_ANTIALIAS 

Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).

CREATE_STENCIL_STROKES  -

Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little slower, but path overlaps (i.e. self-intersecting or sharp turns) will be drawn just once.

+
CREATE_STENCIL_STROKES 

Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little slower, but path overlaps (i.e. self-intersecting or sharp turns) will be drawn just once.

CREATE_DEBUG  -

Flag indicating that additional debug checks are done.

+
CREATE_DEBUG 

Flag indicating that additional debug checks are done.

Constructor & Destructor Documentation

- + +

◆ NanoVG() [1/2]

+
@@ -445,12 +417,13 @@ Text
-

Constructor.

-
See Also
CreateFlags
+

Constructor.

See also
CreateFlags
- + +

◆ NanoVG() [2/2]

+
@@ -467,7 +440,9 @@ Text - + +

◆ ~NanoVG()

+
@@ -492,7 +467,9 @@ Text

Member Function Documentation

- + +

◆ getContext()

+
@@ -516,7 +493,9 @@ Text - + +

◆ beginFrame() [1/2]

+
@@ -549,7 +528,9 @@ Text - + +

◆ beginFrame() [2/2]

+
@@ -566,7 +547,9 @@ Text - + +

◆ cancelFrame()

+
@@ -582,7 +565,9 @@ Text - + +

◆ endFrame()

+
@@ -598,7 +583,9 @@ Text - + +

◆ save()

+
@@ -614,7 +601,9 @@ Text - + +

◆ restore()

+
@@ -630,7 +619,9 @@ Text - + +

◆ reset()

+
@@ -646,7 +637,9 @@ Text - + +

◆ strokeColor() [1/3]

+
@@ -663,7 +656,9 @@ Text - + +

◆ strokeColor() [2/3]

+
@@ -702,7 +697,9 @@ Text - + +

◆ strokeColor() [3/3]

+
@@ -741,7 +738,9 @@ Text - + +

◆ strokePaint()

+
@@ -758,7 +757,9 @@ Text - + +

◆ fillColor() [1/3]

+
@@ -775,7 +776,9 @@ Text - + +

◆ fillColor() [2/3]

+
@@ -814,7 +817,9 @@ Text - + +

◆ fillColor() [3/3]

+
@@ -853,7 +858,9 @@ Text - + +

◆ fillPaint()

+
@@ -870,7 +877,9 @@ Text - + +

◆ miterLimit()

+
@@ -887,7 +896,9 @@ Text - + +

◆ strokeWidth()

+
@@ -904,7 +915,9 @@ Text - + +

◆ lineCap()

+
@@ -921,7 +934,9 @@ Text - + +

◆ lineJoin()

+
@@ -938,7 +953,9 @@ Text - + +

◆ globalAlpha()

+
@@ -955,7 +972,9 @@ Text - + +

◆ resetTransform()

+
@@ -971,7 +990,9 @@ Text - + +

◆ transform()

+
@@ -1022,7 +1043,9 @@ Text - + +

◆ translate()

+
@@ -1049,7 +1072,9 @@ Text - + +

◆ rotate()

+
@@ -1066,7 +1091,9 @@ Text - + +

◆ skewX()

+
@@ -1083,7 +1110,9 @@ Text - + +

◆ skewY()

+
@@ -1100,7 +1129,9 @@ Text - + +

◆ scale()

+
@@ -1127,7 +1158,9 @@ Text - + +

◆ currentTransform()

+
@@ -1144,7 +1177,9 @@ Text - + +

◆ transformIdentity()

+
@@ -1169,7 +1204,9 @@ Text - + +

◆ transformTranslate()

+
@@ -1210,7 +1247,9 @@ Text - + +

◆ transformScale()

+
@@ -1251,7 +1290,9 @@ Text - + +

◆ transformRotate()

+
@@ -1286,7 +1327,9 @@ Text - + +

◆ transformSkewX()

+
@@ -1321,7 +1364,9 @@ Text - + +

◆ transformSkewY()

+
@@ -1356,7 +1401,9 @@ Text - + +

◆ transformMultiply()

+
@@ -1391,7 +1438,9 @@ Text - + +

◆ transformPremultiply()

+
@@ -1426,7 +1475,9 @@ Text - + +

◆ transformInverse()

+
@@ -1461,7 +1512,9 @@ Text - + +

◆ transformPoint()

+
@@ -1514,7 +1567,9 @@ Text - + +

◆ degToRad()

+
@@ -1539,7 +1594,9 @@ Text - + +

◆ radToDeg()

+
@@ -1564,7 +1621,9 @@ Text - + +

◆ createImageFromFile() [1/2]

+
@@ -1591,7 +1650,9 @@ Text - + +

◆ createImageFromFile() [2/2]

+
@@ -1614,12 +1675,13 @@ Text
-

Creates image by loading it from the disk from specified file name. Overloaded function for convenience.

-
See Also
ImageFlags
+

Creates image by loading it from the disk from specified file name. Overloaded function for convenience.

See also
ImageFlags
- + +

◆ createImageFromMemory() [1/2]

+
@@ -1652,7 +1714,9 @@ Text - + +

◆ createImageFromMemory() [2/2]

+
@@ -1681,12 +1745,13 @@ Text
-

Creates image by loading it from the specified chunk of memory. Overloaded function for convenience.

-
See Also
ImageFlags
+

Creates image by loading it from the specified chunk of memory. Overloaded function for convenience.

See also
ImageFlags
- + +

◆ createImageFromRGBA() [1/2]

+
@@ -1725,7 +1790,9 @@ Text - + +

◆ createImageFromRGBA() [2/2]

+
@@ -1760,12 +1827,13 @@ Text
-

Creates image from specified image data. Overloaded function for convenience.

-
See Also
ImageFlags
+

Creates image from specified image data. Overloaded function for convenience.

See also
ImageFlags
- + +

◆ createImageFromTextureHandle() [1/2]

+
@@ -1810,7 +1878,9 @@ Text - + +

◆ createImageFromTextureHandle() [2/2]

+
@@ -1851,12 +1921,13 @@ Text
-

Creates image from an OpenGL texture handle. Overloaded function for convenience.

-
See Also
ImageFlags
+

Creates image from an OpenGL texture handle. Overloaded function for convenience.

See also
ImageFlags
- + +

◆ linearGradient()

+
@@ -1907,7 +1978,9 @@ Text - + +

◆ boxGradient()

+
@@ -1970,7 +2043,9 @@ Text - + +

◆ radialGradient()

+
@@ -2021,7 +2096,9 @@ Text - + +

◆ imagePattern()

+
@@ -2078,7 +2155,9 @@ Text - + +

◆ scissor()

+
@@ -2117,7 +2196,9 @@ Text - + +

◆ intersectScissor()

+
@@ -2156,7 +2237,9 @@ Text - + +

◆ resetScissor()

+
@@ -2172,7 +2255,9 @@ Text - + +

◆ beginPath()

+
@@ -2188,7 +2273,9 @@ Text - + +

◆ moveTo()

+
@@ -2215,7 +2302,9 @@ Text - + +

◆ lineTo()

+
@@ -2242,7 +2331,9 @@ Text - + +

◆ bezierTo()

+
@@ -2293,7 +2384,9 @@ Text - + +

◆ quadTo()

+
@@ -2332,7 +2425,9 @@ Text - + +

◆ arcTo()

+
@@ -2377,7 +2472,9 @@ Text - + +

◆ closePath()

+
@@ -2393,7 +2490,9 @@ Text - + +

◆ pathWinding()

+
@@ -2410,7 +2509,9 @@ Text - + +

◆ arc()

+
@@ -2461,7 +2562,9 @@ Text - + +

◆ rect()

+
@@ -2500,7 +2603,9 @@ Text - + +

◆ roundedRect()

+
@@ -2545,7 +2650,9 @@ Text - + +

◆ ellipse()

+
@@ -2584,7 +2691,9 @@ Text - + +

◆ circle()

+
@@ -2617,7 +2726,9 @@ Text - + +

◆ fill()

+
@@ -2633,7 +2744,9 @@ Text - + +

◆ stroke()

+
@@ -2649,7 +2762,9 @@ Text - + +

◆ createFontFromFile()

+
@@ -2676,7 +2791,9 @@ Text - + +

◆ createFontFromMemory()

+
@@ -2715,7 +2832,9 @@ Text - + +

◆ findFont()

+
@@ -2732,7 +2851,9 @@ Text - + +

◆ fontSize()

+
@@ -2749,7 +2870,9 @@ Text - + +

◆ fontBlur()

+
@@ -2766,7 +2889,9 @@ Text - + +

◆ textLetterSpacing()

+
@@ -2783,7 +2908,9 @@ Text - + +

◆ textLineHeight()

+
@@ -2800,7 +2927,9 @@ Text - + +

◆ textAlign() [1/2]

+
@@ -2817,7 +2946,9 @@ Text - + +

◆ textAlign() [2/2]

+
@@ -2830,12 +2961,13 @@ Text
-

Sets the text align of current text style. Overloaded function for convenience.

-
See Also
Align
+

Sets the text align of current text style. Overloaded function for convenience.

See also
Align
- + +

◆ fontFaceId()

+
@@ -2852,7 +2984,9 @@ Text - + +

◆ fontFace()

+
@@ -2869,7 +3003,9 @@ Text - + +

◆ text()

+
@@ -2908,7 +3044,9 @@ Text - + +

◆ textBox()

+
@@ -2953,7 +3091,9 @@ Text - + +

◆ textBounds()

+
@@ -2998,7 +3138,9 @@ Text - + +

◆ textBoxBounds()

+
@@ -3049,7 +3191,9 @@ Text - + +

◆ textGlyphPositions()

+
@@ -3100,7 +3244,9 @@ Text - + +

◆ textMetrics()

+
@@ -3133,7 +3279,9 @@ Text - + +

◆ textBreakLines()

+
@@ -3178,7 +3326,9 @@ Text - + +

◆ loadSharedResources()

+
@@ -3208,9 +3358,9 @@ Text diff --git a/classNanoWidget-members.html b/classNanoWidget-members.html index c8998acd..ff9ddb33 100644 --- a/classNanoWidget-members.html +++ b/classNanoWidget-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -251,9 +227,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classNanoWidget.html b/classNanoWidget.html index 7fa2449e..9df4891f 100644 --- a/classNanoWidget.html +++ b/classNanoWidget.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: NanoWidget Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -360,47 +336,47 @@ Additional Inherited Members
 
enum  ImageFlags {
+
enum  ImageFlags {
  IMAGE_GENERATE_MIPMAPS = 1 << 0, IMAGE_REPEAT_X = 1 << 1, IMAGE_REPEAT_Y = 1 << 2, IMAGE_FLIP_Y = 1 << 3, -
+
  IMAGE_PREMULTIPLIED = 1 << 4 -
+
}
 
enum  Align {
+
enum  Align {
  ALIGN_LEFT = 1 << 0, ALIGN_CENTER = 1 << 1, ALIGN_RIGHT = 1 << 2, ALIGN_TOP = 1 << 3, -
+
  ALIGN_MIDDLE = 1 << 4, ALIGN_BOTTOM = 1 << 5, ALIGN_BASELINE = 1 << 6 -
+
}
 
enum  LineCap {
+
enum  LineCap {
  BUTT, ROUND, SQUARE, BEVEL, -
+
  MITER -
+
}
 
enum  Solidity { SOLID = 1, +
enum  Solidity { SOLID = 1, HOLE = 2 }
 
enum  Winding { CCW = 1, +
enum  Winding { CCW = 1, CW = 2 }
 
+
typedef int FontId
 
- Static Public Member Functions inherited from NanoVG
FontId
@@ -464,12 +442,13 @@ typedef int 
FontId
-

Constructor.

-
See Also
CreateFlags
+

Constructor.

See also
CreateFlags
- + +

◆ NanoWidget() [2/3]

+
@@ -504,7 +483,9 @@ typedef int  - + +

◆ NanoWidget() [3/3]

+
FontId
@@ -529,7 +510,9 @@ typedef int  - + +

◆ ~NanoWidget()

+
FontId
@@ -554,7 +537,9 @@ typedef int 

Member Function Documentation

- + +

◆ onNanoDisplay()

+
FontId
@@ -574,8 +559,7 @@ typedef int 
FontId
-

New virtual onDisplay function.

-
See Also
onDisplay
+

New virtual onDisplay function.

See also
onDisplay
@@ -585,9 +569,9 @@ typedef int 
FontId
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -93,12 +69,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
bufferSizeChanged(uint32_t newBufferSize)Pluginprotectedvirtual
deactivate()Plugininlineprotectedvirtual
getBufferSize() const noexceptPlugin
getDescription() const Plugininlineprotectedvirtual
getHomePage() const Plugininlineprotectedvirtual
getDescription() constPlugininlineprotectedvirtual
getHomePage() constPlugininlineprotectedvirtual
getLabel() const =0Pluginprotectedpure virtual
getLicense() const =0Pluginprotectedpure virtual
getMaker() const =0Pluginprotectedpure virtual
getName() const Plugininlineprotectedvirtual
getName() constPlugininlineprotectedvirtual
getParameterValue(uint32_t index) const =0Pluginprotectedpure virtual
getSampleRate() const noexceptPlugin
getState(const char *key) const =0Pluginprotectedpure virtual
diff --git a/classPlugin.html b/classPlugin.html index 8b0a6571..227f4342 100644 --- a/classPlugin.html +++ b/classPlugin.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Plugin Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -113,16 +89,16 @@ Public Member Functions
- - + + - - + + - - + + @@ -160,30 +136,32 @@ Protected Member Functions

Protected Member Functions

virtual const char * getName () const
 
virtual const char * getName () const
 
virtual const char * getLabel () const =0
 
virtual const char * getDescription () const
 
virtual const char * getDescription () const
 
virtual const char * getMaker () const =0
 
virtual const char * getHomePage () const
 
virtual const char * getHomePage () const
 
virtual const char * getLicense () const =0
 
virtual uint32_t getVersion () const =0
-

Friends

+
class PluginExporter
 

Detailed Description

DPF Plugin class from where plugin instances are created.

-

The public methods (Host state) are called from the plugin to get or set host information.
-They can be called from a plugin instance at anytime unless stated otherwise.
+

The public methods (Host state) are called from the plugin to get or set host information.
+They can be called from a plugin instance at anytime unless stated otherwise.
All other methods are to be implemented by the plugin and will be called by the host.

-

Shortly after a plugin instance is created, the various init* functions will be called by the host.
-Host will call activate() before run(), and deactivate() before the plugin instance is destroyed.
-The host may call deactivate right after activate and vice-versa, but never activate/deactivate consecutively.
+

Shortly after a plugin instance is created, the various init* functions will be called by the host.
+Host will call activate() before run(), and deactivate() before the plugin instance is destroyed.
+The host may call deactivate right after activate and vice-versa, but never activate/deactivate consecutively.
There is no limit on how many times run() is called, only that activate/deactivate will be called in between.

-

The buffer size and sample rate values will remain constant between activate and deactivate.
+

The buffer size and sample rate values will remain constant between activate and deactivate.
Buffer size is only a hint though, the host might call run() with a higher or lower number of frames.

Some of this class functions are only available according to some macros.

-

DISTRHO_PLUGIN_WANT_PROGRAMS activates program related features.
+

DISTRHO_PLUGIN_WANT_PROGRAMS activates program related features.
When enabled you need to implement initProgramName() and loadProgram().

-

DISTRHO_PLUGIN_WANT_STATE activates internal state features.
+

DISTRHO_PLUGIN_WANT_STATE activates internal state features.
When enabled you need to implement initStateKey() and setState().

-

The process function run() changes wherever DISTRHO_PLUGIN_WANT_MIDI_INPUT is enabled or not.
+

The process function run() changes wherever DISTRHO_PLUGIN_WANT_MIDI_INPUT is enabled or not.
When enabled it provides midi input events.

Constructor & Destructor Documentation

- + +

◆ Plugin()

+
@@ -212,12 +190,14 @@ When enabled it provides midi input events.

-

Plugin class constructor.
+

Plugin class constructor.
You must set all parameter values to their defaults, matching ParameterRanges::def.

- + +

◆ ~Plugin()

+ - + +

◆ getSampleRate()

+
@@ -290,13 +273,14 @@ This value will remain constant between activate and deactivate.

-

Get the current sample rate that will be used during processing.
-This value will remain constant between activate and deactivate.

-
See Also
sampleRateChanged(double)
+

Get the current sample rate that will be used during processing.
+This value will remain constant between activate and deactivate.

See also
sampleRateChanged(double)
- + +

◆ getTimePosition()

+
@@ -316,14 +300,15 @@ This value will remain constant between activate and deactivate.

-

Get the current host transport time position.
-This function should only be called during run().
-You can call this during other times, but the returned position is not guaranteed to be in sync.

-
Note
TimePosition is not supported in LADSPA and DSSI plugin formats.
+

Get the current host transport time position.
+This function should only be called during run().
+You can call this during other times, but the returned position is not guaranteed to be in sync.

Note
TimePosition is not supported in LADSPA and DSSI plugin formats.
- + +

◆ setLatency()

+
@@ -344,13 +329,14 @@ You can call this during other times, but the returned position is not guarantee
-

Change the plugin audio output latency to frames.
-This function should only be called in the constructor, activate() and run().

-
Note
This function is only available if DISTRHO_PLUGIN_WANT_LATENCY is enabled.
+

Change the plugin audio output latency to frames.
+This function should only be called in the constructor, activate() and run().

Note
This function is only available if DISTRHO_PLUGIN_WANT_LATENCY is enabled.
- + +

◆ writeMidiEvent()

+
@@ -371,16 +357,15 @@ This function should only be called in the constructor, -

Write a MIDI output event.
-This function must only be called during
run().
+

Write a MIDI output event.
+This function must only be called during run().
Returns false when the host buffer is full, in which case do not call this again until the next run().

-
Note
This function is not implemented yet!
- It's here so that developers can prepare MIDI plugins in advance.
- If you plan to use this, please report to DPF authors so it can be implemented.
- + +

◆ getName()

+
@@ -400,12 +385,14 @@ Returns false when the host buffer is full, in which case do not call this again
-

Get the plugin name.
+

Get the plugin name.
Returns DISTRHO_PLUGIN_NAME by default.

- + +

◆ getLabel()

+
@@ -425,12 +412,14 @@ Returns DISTRHO_PLUGIN_NAME by default.

-

Get the plugin label.
+

Get the plugin label.
This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.

- + +

◆ getDescription()

+
@@ -450,12 +439,14 @@ This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 cha
-

Get an extensive comment/description about the plugin.
+

Get an extensive comment/description about the plugin.
Optional, returns nothing by default.

- + +

◆ getMaker()

+
@@ -479,7 +470,9 @@ Optional, returns nothing by default.

- + +

◆ getHomePage()

+
@@ -499,12 +492,14 @@ Optional, returns nothing by default.

-

Get the plugin homepage.
+

Get the plugin homepage.
Optional, returns nothing by default.

- + +

◆ getLicense()

+
@@ -524,12 +519,14 @@ Optional, returns nothing by default.

-

Get the plugin license (a single line of text or a URL).
+

Get the plugin license (a single line of text or a URL).
For commercial plugins this should return some short copyright information.

- + +

◆ getVersion()

+
@@ -549,12 +546,13 @@ For commercial plugins this should return some short copyright information.

-

Get the plugin version, in hexadecimal.

-
See Also
d_version()
+

Get the plugin version, in hexadecimal.

See also
d_version()
- + +

◆ getUniqueId()

+
@@ -574,13 +572,14 @@ For commercial plugins this should return some short copyright information.

-

Get the plugin unique Id.
-This value is used by LADSPA, DSSI and VST plugin formats.

-
See Also
d_cconst()
+

Get the plugin unique Id.
+This value is used by LADSPA, DSSI and VST plugin formats.

See also
d_cconst()
- + +

◆ initAudioPort()

+
@@ -617,12 +616,14 @@ This value is used by LADSPA, DSSI and VST plugin formats.

-

Initialize the audio port index.
+

Initialize the audio port index.
This function will be called once, shortly after the plugin is created.

- + +

◆ initParameter()

+
@@ -653,12 +654,14 @@ This function will be called once, shortly after the plugin is created.

-

Initialize the parameter index.
+

Initialize the parameter index.
This function will be called once, shortly after the plugin is created.

- + +

◆ initProgramName()

+
@@ -689,13 +692,15 @@ This function will be called once, shortly after the plugin is created.

-

Set the name of the program index.
-This function will be called once, shortly after the plugin is created.
+

Set the name of the program index.
+This function will be called once, shortly after the plugin is created.
Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.

- + +

◆ initState()

+
@@ -732,13 +737,15 @@ Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is
-

Set the state key and default value of index.
-This function will be called once, shortly after the plugin is created.
+

Set the state key and default value of index.
+This function will be called once, shortly after the plugin is created.
Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.

- + +

◆ getParameterValue()

+
@@ -759,12 +766,14 @@ Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is en
-

Get the current value of a parameter.
+

Get the current value of a parameter.
The host may call this function from any context, including realtime processing.

- + +

◆ setParameterValue()

+
@@ -795,14 +804,15 @@ The host may call this function from any context, including realtime processing.
-

Change a parameter value.
-The host may call this function from any context, including realtime processing.
-When a parameter is marked as automable, you must ensure no non-realtime operations are performed.

-
Note
This function will only be called for parameter inputs.
+

Change a parameter value.
+The host may call this function from any context, including realtime processing.
+When a parameter is marked as automable, you must ensure no non-realtime operations are performed.

Note
This function will only be called for parameter inputs.
- + +

◆ loadProgram()

+
@@ -823,13 +833,15 @@ When a parameter is marked as automable, you must ensure no non-realtime operati
-

Load a program.
-The host may call this function from any context, including realtime processing.
+

Load a program.
+The host may call this function from any context, including realtime processing.
Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.

- + +

◆ getState()

+
@@ -850,14 +862,15 @@ Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is
-

Get the value of an internal state.
-The host may call this function from any non-realtime context.
-Must be implemented by your plugin class if DISTRHO_PLUGIN_WANT_FULL_STATE is enabled.

-
Note
The use of this function breaks compatibility with the DSSI format.
+

Get the value of an internal state.
+The host may call this function from any non-realtime context.
+Must be implemented by your plugin class if DISTRHO_PLUGIN_WANT_FULL_STATE is enabled.

Note
The use of this function breaks compatibility with the DSSI format.
- + +

◆ setState()

+
@@ -888,12 +901,14 @@ Must be implemented by your plugin class if DISTRHO_PLUGIN_WANT_FULL_STATE is en
-

Change an internal state key to value.
+

Change an internal state key to value.
Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.

- + +

◆ activate()

+
@@ -917,7 +932,9 @@ Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is en - + +

◆ deactivate()

+
@@ -941,7 +958,9 @@ Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is en - + +

◆ run()

+
@@ -990,12 +1009,13 @@ Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is en
-

Run/process function for plugins with MIDI input.

-
Note
Some parameters might be null if there are no audio inputs/outputs or MIDI events.
+

Run/process function for plugins with MIDI input.

Note
Some parameters might be null if there are no audio inputs/outputs or MIDI events.
- + +

◆ bufferSizeChanged()

+
@@ -1016,15 +1036,16 @@ Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is en
-

Optional callback to inform the plugin about a buffer size change.
-This function will only be called when the plugin is deactivated.

-
Note
This value is only a hint!
+

Optional callback to inform the plugin about a buffer size change.
+This function will only be called when the plugin is deactivated.

Note
This value is only a hint!
Hosts might call run() with a higher or lower number of frames.
-
See Also
getBufferSize()
+
See also
getBufferSize()
- + +

◆ sampleRateChanged()

+
@@ -1045,9 +1066,8 @@ This function will only be called when the plugin is deactivated.

-

Optional callback to inform the plugin about a sample rate change.
-This function will only be called when the plugin is deactivated.

-
See Also
getSampleRate()
+

Optional callback to inform the plugin about a sample rate change.
+This function will only be called when the plugin is deactivated.

See also
getSampleRate()
@@ -1057,9 +1077,9 @@ This function will only be called when the plugin is deactivated.

diff --git a/classPoint-members.html b/classPoint-members.html index 1139e1da..bb69c9cd 100644 --- a/classPoint-members.html +++ b/classPoint-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -116,9 +92,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classPoint.html b/classPoint.html index 8a421c86..b9503002 100644 --- a/classPoint.html +++ b/classPoint.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Point< T > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -121,55 +97,57 @@ Public Member Functions
 
bool isNotZero () const noexcept
 
+
Point< T > operator+ (const Point< T > &pos) noexcept
 
+
Point< T > operator- (const Point< T > &pos) noexcept
 
+
Point< T > & operator= (const Point< T > &pos) noexcept
 
+
Point< T > & operator+= (const Point< T > &pos) noexcept
 
+
Point< T > & operator-= (const Point< T > &pos) noexcept
 
+
bool operator== (const Point< T > &pos) const noexcept
 
+
bool operator!= (const Point< T > &pos) const noexcept
 
- - - -

Friends

+
template<typename >
class Line
 
+
template<typename >
class Circle
 
+
template<typename >
class Triangle
 
+
template<typename >
class Rectangle
 

Detailed Description

-

template<typename T>
+

template<typename T>
class Point< T >

DGL Point class.

This class describes a single point in space, defined by an X and Y value.

Constructor & Destructor Documentation

- + +

◆ Point() [1/3]

+
@@ -195,7 +173,9 @@ template<typename T>
- + +

◆ Point() [2/3]

+
@@ -232,7 +212,9 @@ template<typename T>
- + +

◆ Point() [3/3]

+
@@ -260,7 +242,9 @@ template<typename T>

Member Function Documentation

- + +

◆ getX()

+
@@ -286,7 +270,9 @@ template<typename T>
- + +

◆ getY()

+
@@ -312,7 +298,9 @@ template<typename T>
- + +

◆ setX()

+
@@ -339,7 +327,9 @@ template<typename T>
- + +

◆ setY()

+
@@ -366,7 +356,9 @@ template<typename T>
- + +

◆ setPos() [1/2]

+
@@ -403,7 +395,9 @@ template<typename T>
- + +

◆ setPos() [2/2]

+
@@ -430,7 +424,9 @@ template<typename T>
- + +

◆ moveBy() [1/2]

+
@@ -467,7 +463,9 @@ template<typename T>
- + +

◆ moveBy() [2/2]

+
@@ -494,7 +492,9 @@ template<typename T>
- + +

◆ isZero()

+
@@ -520,7 +520,9 @@ template<typename T>
- + +

◆ isNotZero()

+
@@ -552,9 +554,9 @@ template<typename T>
diff --git a/classRectangle-members.html b/classRectangle-members.html index 92ae2081..84e374f6 100644 --- a/classRectangle-members.html +++ b/classRectangle-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -83,55 +59,55 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-
Rectangle< typename > Member List
+
Rectangle< T > Member List
-

This is the complete list of members for Rectangle< typename >, including all inherited members.

+

This is the complete list of members for Rectangle< T >, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
contains(const T &x, const T &y) const noexceptRectangle< typename >
contains(const Point< T > &pos) const noexceptRectangle< typename >
containsX(const T &x) const noexceptRectangle< typename >
containsY(const T &y) const noexceptRectangle< typename >
draw()Rectangle< typename >
drawOutline()Rectangle< typename >
getHeight() const noexceptRectangle< typename >
getPos() const noexceptRectangle< typename >
getSize() const noexceptRectangle< typename >
getWidth() const noexceptRectangle< typename >
getX() const noexceptRectangle< typename >
getY() const noexceptRectangle< typename >
growBy(double multiplier) noexceptRectangle< typename >
moveBy(const T &x, const T &y) noexceptRectangle< typename >
moveBy(const Point< T > &pos) noexceptRectangle< typename >
operator!=(const Rectangle< T > &size) const noexcept (defined in Rectangle< typename >)Rectangle< typename >
operator*=(double m) noexcept (defined in Rectangle< typename >)Rectangle< typename >
operator/=(double d) noexcept (defined in Rectangle< typename >)Rectangle< typename >
operator=(const Rectangle< T > &rect) noexcept (defined in Rectangle< typename >)Rectangle< typename >
operator==(const Rectangle< T > &size) const noexcept (defined in Rectangle< typename >)Rectangle< typename >
Rectangle() noexceptRectangle< typename >
Rectangle(const T &x, const T &y, const T &width, const T &height) noexceptRectangle< typename >
Rectangle(const T &x, const T &y, const Size< T > &size) noexceptRectangle< typename >
Rectangle(const Point< T > &pos, const T &width, const T &height) noexceptRectangle< typename >
Rectangle(const Point< T > &pos, const Size< T > &size) noexceptRectangle< typename >
Rectangle(const Rectangle< T > &rect) noexceptRectangle< typename >
setHeight(const T &height) noexceptRectangle< typename >
setPos(const T &x, const T &y) noexceptRectangle< typename >
setPos(const Point< T > &pos) noexceptRectangle< typename >
setRectangle(const Point< T > &pos, const Size< T > &size) noexceptRectangle< typename >
setRectangle(const Rectangle< T > &rect) noexceptRectangle< typename >
setSize(const T &width, const T &height) noexceptRectangle< typename >
setSize(const Size< T > &size) noexceptRectangle< typename >
setWidth(const T &width) noexceptRectangle< typename >
setX(const T &x) noexceptRectangle< typename >
setY(const T &y) noexceptRectangle< typename >
shrinkBy(double divider) noexceptRectangle< typename >
contains(const T &x, const T &y) const noexceptRectangle< T >
contains(const Point< T > &pos) const noexceptRectangle< T >
containsX(const T &x) const noexceptRectangle< T >
containsY(const T &y) const noexceptRectangle< T >
draw()Rectangle< T >
drawOutline()Rectangle< T >
getHeight() const noexceptRectangle< T >
getPos() const noexceptRectangle< T >
getSize() const noexceptRectangle< T >
getWidth() const noexceptRectangle< T >
getX() const noexceptRectangle< T >
getY() const noexceptRectangle< T >
growBy(double multiplier) noexceptRectangle< T >
moveBy(const T &x, const T &y) noexceptRectangle< T >
moveBy(const Point< T > &pos) noexceptRectangle< T >
operator!=(const Rectangle< T > &size) const noexcept (defined in Rectangle< T >)Rectangle< T >
operator*=(double m) noexcept (defined in Rectangle< T >)Rectangle< T >
operator/=(double d) noexcept (defined in Rectangle< T >)Rectangle< T >
operator=(const Rectangle< T > &rect) noexcept (defined in Rectangle< T >)Rectangle< T >
operator==(const Rectangle< T > &size) const noexcept (defined in Rectangle< T >)Rectangle< T >
Rectangle() noexceptRectangle< T >
Rectangle(const T &x, const T &y, const T &width, const T &height) noexceptRectangle< T >
Rectangle(const T &x, const T &y, const Size< T > &size) noexceptRectangle< T >
Rectangle(const Point< T > &pos, const T &width, const T &height) noexceptRectangle< T >
Rectangle(const Point< T > &pos, const Size< T > &size) noexceptRectangle< T >
Rectangle(const Rectangle< T > &rect) noexceptRectangle< T >
setHeight(const T &height) noexceptRectangle< T >
setPos(const T &x, const T &y) noexceptRectangle< T >
setPos(const Point< T > &pos) noexceptRectangle< T >
setRectangle(const Point< T > &pos, const Size< T > &size) noexceptRectangle< T >
setRectangle(const Rectangle< T > &rect) noexceptRectangle< T >
setSize(const T &width, const T &height) noexceptRectangle< T >
setSize(const Size< T > &size) noexceptRectangle< T >
setWidth(const T &width) noexceptRectangle< T >
setX(const T &x) noexceptRectangle< T >
setY(const T &y) noexceptRectangle< T >
shrinkBy(double divider) noexceptRectangle< T >
diff --git a/classRectangle.html b/classRectangle.html index 59cca0e4..d1e1b487 100644 --- a/classRectangle.html +++ b/classRectangle.html @@ -3,16 +3,15 @@ - -DISTRHO Plugin Framework: Rectangle< typename > Class Template Reference + + +DISTRHO Plugin Framework: Rectangle< T > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -86,7 +62,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Public Member Functions | List of all members
-
Rectangle< typename > Class Template Reference
+
Rectangle< T > Class Template Reference
@@ -94,104 +70,106 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + - - + - - + - +

Public Member Functions

 Rectangle () noexcept
 
 Rectangle (const T &x, const T &y, const T &width, const T &height) noexcept
 
 Rectangle (const T &x, const T &y, const Size< T > &size) noexcept
 
 Rectangle (const Point< T > &pos, const T &width, const T &height) noexcept
 
 Rectangle (const Point< T > &pos, const Size< T > &size) noexcept
 
 Rectangle (const Rectangle< T > &rect) noexcept
 
const T & getX () const noexcept
 
const T & getY () const noexcept
 
const T & getWidth () const noexcept
 
const T & getHeight () const noexcept
 
const Point< T > & getPos () const noexcept
 
const Size< T > & getSize () const noexcept
 
void setX (const T &x) noexcept
 
void setY (const T &y) noexcept
 
void setPos (const T &x, const T &y) noexcept
 
void setPos (const Point< T > &pos) noexcept
 
void moveBy (const T &x, const T &y) noexcept
 
void moveBy (const Point< T > &pos) noexcept
 
void setWidth (const T &width) noexcept
 
void setHeight (const T &height) noexcept
 
void setSize (const T &width, const T &height) noexcept
 
void setSize (const Size< T > &size) noexcept
 
void growBy (double multiplier) noexcept
 
void shrinkBy (double divider) noexcept
 
void setRectangle (const Point< T > &pos, const Size< T > &size) noexcept
 
void setRectangle (const Rectangle< T > &rect) noexcept
 
bool contains (const T &x, const T &y) const noexcept
 
bool contains (const Point< T > &pos) const noexcept
 
bool containsX (const T &x) const noexcept
 
bool containsY (const T &y) const noexcept
 
void draw ()
 
void drawOutline ()
 
+
 Rectangle () noexcept
 
 Rectangle (const T &x, const T &y, const T &width, const T &height) noexcept
 
 Rectangle (const T &x, const T &y, const Size< T > &size) noexcept
 
 Rectangle (const Point< T > &pos, const T &width, const T &height) noexcept
 
 Rectangle (const Point< T > &pos, const Size< T > &size) noexcept
 
 Rectangle (const Rectangle< T > &rect) noexcept
 
const T & getX () const noexcept
 
const T & getY () const noexcept
 
const T & getWidth () const noexcept
 
const T & getHeight () const noexcept
 
const Point< T > & getPos () const noexcept
 
const Size< T > & getSize () const noexcept
 
void setX (const T &x) noexcept
 
void setY (const T &y) noexcept
 
void setPos (const T &x, const T &y) noexcept
 
void setPos (const Point< T > &pos) noexcept
 
void moveBy (const T &x, const T &y) noexcept
 
void moveBy (const Point< T > &pos) noexcept
 
void setWidth (const T &width) noexcept
 
void setHeight (const T &height) noexcept
 
void setSize (const T &width, const T &height) noexcept
 
void setSize (const Size< T > &size) noexcept
 
void growBy (double multiplier) noexcept
 
void shrinkBy (double divider) noexcept
 
void setRectangle (const Point< T > &pos, const Size< T > &size) noexcept
 
void setRectangle (const Rectangle< T > &rect) noexcept
 
bool contains (const T &x, const T &y) const noexcept
 
bool contains (const Point< T > &pos) const noexcept
 
bool containsX (const T &x) const noexcept
 
bool containsY (const T &y) const noexcept
 
void draw ()
 
void drawOutline ()
 
Rectangle< T > & operator= (const Rectangle< T > &rect) noexcept
 
+
 
Rectangle< T > & operator*= (double m) noexcept
 
+
 
Rectangle< T > & operator/= (double d) noexcept
 
+
 
bool operator== (const Rectangle< T > &size) const noexcept
 
+
 
bool operator!= (const Rectangle< T > &size) const noexcept
 
 

Detailed Description

-

template<typename>
-class Rectangle< typename >

+

template<typename T>
+class Rectangle< T >

DGL Rectangle class.

This class describes a rectangle, defined by a starting point and a size.

Constructor & Destructor Documentation

- + +

◆ Rectangle() [1/6]

+
-template<typename >
+template<typename T>
- + @@ -207,17 +185,19 @@ template<typename > - + +

◆ Rectangle() [2/6]

+
-template<typename >
+template<typename T>
Rectangle< typename >::Rectangle Rectangle< T >::Rectangle ( )
- + @@ -256,17 +236,19 @@ template<typename > - + +

◆ Rectangle() [3/6]

+
-template<typename >
+template<typename T>
Rectangle< typename >::Rectangle Rectangle< T >::Rectangle ( const T &  x,
- + @@ -299,17 +281,19 @@ template<typename > - + +

◆ Rectangle() [4/6]

+
-template<typename >
+template<typename T>
Rectangle< typename >::Rectangle Rectangle< T >::Rectangle ( const T &  x,
- + @@ -342,17 +326,19 @@ template<typename > - + +

◆ Rectangle() [5/6]

+
-template<typename >
+template<typename T>
Rectangle< typename >::Rectangle Rectangle< T >::Rectangle ( const Point< T > &  pos,
- + @@ -379,17 +365,19 @@ template<typename > - + +

◆ Rectangle() [6/6]

+
-template<typename >
+template<typename T>
Rectangle< typename >::Rectangle Rectangle< T >::Rectangle ( const Point< T > &  pos,
- + @@ -407,17 +395,19 @@ template<typename >

Member Function Documentation

- + +

◆ getX()

+
-template<typename >
+template<typename T>
Rectangle< typename >::Rectangle Rectangle< T >::Rectangle ( const Rectangle< T > &  rect)
- + @@ -433,17 +423,19 @@ template<typename > - + +

◆ getY()

+
-template<typename >
+template<typename T>
const T& Rectangle< typename >::getX const T& Rectangle< T >::getX ( ) const
- + @@ -459,17 +451,19 @@ template<typename > - + +

◆ getWidth()

+
-template<typename >
+template<typename T>
const T& Rectangle< typename >::getY const T& Rectangle< T >::getY ( ) const
- + @@ -485,17 +479,19 @@ template<typename > - + +

◆ getHeight()

+
-template<typename >
+template<typename T>
const T& Rectangle< typename >::getWidth const T& Rectangle< T >::getWidth ( ) const
- + @@ -511,17 +507,19 @@ template<typename > - + +

◆ getPos()

+
-template<typename >
+template<typename T>
const T& Rectangle< typename >::getHeight const T& Rectangle< T >::getHeight ( ) const
- + @@ -537,17 +535,19 @@ template<typename > - + +

◆ getSize()

+
-template<typename >
+template<typename T>
const Point<T>& Rectangle< typename >::getPos const Point<T>& Rectangle< T >::getPos ( ) const
- + @@ -563,17 +563,19 @@ template<typename > - + +

◆ setX()

+
-template<typename >
+template<typename T>
const Size<T>& Rectangle< typename >::getSize const Size<T>& Rectangle< T >::getSize ( ) const
- + @@ -590,17 +592,19 @@ template<typename > - + +

◆ setY()

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setX void Rectangle< T >::setX ( const T &  x)
- + @@ -617,17 +621,19 @@ template<typename > - + +

◆ setPos() [1/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setY void Rectangle< T >::setY ( const T &  y)
- + @@ -654,17 +660,19 @@ template<typename > - + +

◆ setPos() [2/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setPos void Rectangle< T >::setPos ( const T &  x,
- + @@ -681,17 +689,19 @@ template<typename > - + +

◆ moveBy() [1/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setPos void Rectangle< T >::setPos ( const Point< T > &  pos)
- + @@ -718,17 +728,19 @@ template<typename > - + +

◆ moveBy() [2/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::moveBy void Rectangle< T >::moveBy ( const T &  x,
- - + + - - - - - - - - - - - - - - - - - - - - - - - - - -
- + @@ -745,17 +757,19 @@ template<typename > - + +

◆ setWidth()

+
-template<typename >
+template<typename T>
void Rectangle< typename >::moveBy void Rectangle< T >::moveBy ( const Point< T > &  pos)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- + @@ -772,17 +786,19 @@ template<typename > - + +

◆ setHeight()

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setWidth void Rectangle< T >::setWidth ( const T &  width)
- - - - - - - - -
- + @@ -799,17 +815,19 @@ template<typename > - + +

◆ setSize() [1/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setHeight void Rectangle< T >::setHeight ( const T &  height)
- + @@ -836,17 +854,19 @@ template<typename > - + +

◆ setSize() [2/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setSize void Rectangle< T >::setSize ( const T &  width,
- + @@ -863,17 +883,19 @@ template<typename > - + +

◆ growBy()

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setSize void Rectangle< T >::setSize ( const Size< T > &  size)
- + @@ -890,17 +912,19 @@ template<typename > - + +

◆ shrinkBy()

+
-template<typename >
+template<typename T>
void Rectangle< typename >::growBy void Rectangle< T >::growBy ( double  multiplier)
- + @@ -917,17 +941,19 @@ template<typename > - + +

◆ setRectangle() [1/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::shrinkBy void Rectangle< T >::shrinkBy ( double  divider)
diff --git a/classScopedPointer-members.html b/classScopedPointer-members.html index eab1efbf..7d93a192 100644 --- a/classScopedPointer-members.html +++ b/classScopedPointer-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- + @@ -954,17 +980,19 @@ template<typename > - + +

◆ setRectangle() [2/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setRectangle void Rectangle< T >::setRectangle ( const Point< T > &  pos,
- + @@ -981,17 +1009,19 @@ template<typename > - + +

◆ contains() [1/2]

+
-template<typename >
+template<typename T>
void Rectangle< typename >::setRectangle void Rectangle< T >::setRectangle ( const Rectangle< T > &  rect)
- + @@ -1018,17 +1048,19 @@ template<typename > - + +

◆ contains() [2/2]

+
-template<typename >
+template<typename T>
bool Rectangle< typename >::contains bool Rectangle< T >::contains ( const T &  x,
diff --git a/classScopeTryLocker-members.html b/classScopeTryLocker-members.html index b14ecac9..d582823c 100644 --- a/classScopeTryLocker-members.html +++ b/classScopeTryLocker-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- + @@ -1045,17 +1077,19 @@ template<typename > - + +

◆ containsX()

+
-template<typename >
+template<typename T>
bool Rectangle< typename >::contains bool Rectangle< T >::contains ( const Point< T > &  pos)
- + @@ -1072,17 +1106,19 @@ template<typename > - + +

◆ containsY()

+
-template<typename >
+template<typename T>
bool Rectangle< typename >::containsX bool Rectangle< T >::containsX ( const T &  x)
- + @@ -1099,14 +1135,16 @@ template<typename > - + +

◆ draw()

+
-template<typename >
+template<typename T>
bool Rectangle< typename >::containsY bool Rectangle< T >::containsY ( const T &  y)
- + @@ -1117,14 +1155,16 @@ template<typename > - + +

◆ drawOutline()

+
-template<typename >
+template<typename T>
void Rectangle< typename >::draw void Rectangle< T >::draw ( )
- + @@ -1141,9 +1181,9 @@ template<typename > diff --git a/classRecursiveMutex-members.html b/classRecursiveMutex-members.html index 26124f31..c91942c3 100644 --- a/classRecursiveMutex-members.html +++ b/classRecursiveMutex-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
void Rectangle< typename >::drawOutline void Rectangle< T >::drawOutline ( )
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -97,9 +73,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classRecursiveMutex.html b/classRecursiveMutex.html index cc32f189..f7b4f975 100644 --- a/classRecursiveMutex.html +++ b/classRecursiveMutex.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: RecursiveMutex Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -92,13 +68,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - -

Public Member Functions

+
void lock () const noexcept
 
+
bool tryLock () const noexcept
 
+
void unlock () const noexcept
 
@@ -108,9 +84,9 @@ void 
unlock () const n diff --git a/classScopeLocker-members.html b/classScopeLocker-members.html index f6489161..db36c4ed 100644 --- a/classScopeLocker-members.html +++ b/classScopeLocker-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -94,9 +70,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classScopeLocker.html b/classScopeLocker.html index 5c2abf88..3cdfffb0 100644 --- a/classScopeLocker.html +++ b/classScopeLocker.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ScopeLocker< Mutex > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -92,7 +68,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); -

Public Member Functions

+
 ScopeLocker (const Mutex &mutex) noexcept
 
@@ -102,9 +78,9 @@ Public Member Functions
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -96,9 +72,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classScopeTryLocker.html b/classScopeTryLocker.html index 4b04c3b2..d1728395 100644 --- a/classScopeTryLocker.html +++ b/classScopeTryLocker.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ScopeTryLocker< Mutex > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -92,13 +68,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - -

Public Member Functions

+
 ScopeTryLocker (const Mutex &mutex) noexcept
 
+
bool wasLocked () const noexcept
 
+
bool wasNotLocked () const noexcept
 
@@ -108,9 +84,9 @@ bool 
wasNotLocked () c diff --git a/classScopeUnlocker-members.html b/classScopeUnlocker-members.html index ace796df..a831d165 100644 --- a/classScopeUnlocker-members.html +++ b/classScopeUnlocker-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -94,9 +70,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classScopeUnlocker.html b/classScopeUnlocker.html index adf1a605..69cdbe1e 100644 --- a/classScopeUnlocker.html +++ b/classScopeUnlocker.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ScopeUnlocker< Mutex > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -92,7 +68,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); -

Public Member Functions

+
 ScopeUnlocker (const Mutex &mutex) noexcept
 
@@ -102,9 +78,9 @@ Public Member Functions
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -104,9 +80,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classScopedPointer.html b/classScopedPointer.html index 878bb625..2b2d88df 100644 --- a/classScopedPointer.html +++ b/classScopedPointer.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ScopedPointer< ObjectType > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -120,7 +96,7 @@ Public Member Functions
 

Detailed Description

-

template<class ObjectType>
+

template<class ObjectType>
class ScopedPointer< ObjectType >

This class holds a pointer which is automatically deleted when this object goes out of scope.

@@ -130,7 +106,9 @@ class ScopedPointer< ObjectType >

If you need to get a pointer out of a ScopedPointer without it being deleted, you can use the release() method.

Something to note is the main difference between this class and the std::auto_ptr class, which is that ScopedPointer provides a cast-to-object operator, wheras std::auto_ptr requires that you always call get() to retrieve the pointer. The advantages of providing the cast is that you don't need to call get(), so can use the ScopedPointer in pretty much exactly the same way as a raw pointer. The disadvantage is that the compiler is free to use the cast in unexpected and sometimes dangerous ways - in particular, it becomes difficult to return a ScopedPointer as the result of a function. To avoid this causing errors, ScopedPointer contains an overloaded constructor that should cause a syntax error in these circumstances, but it does mean that instead of returning a ScopedPointer from a function, you'd need to return a raw pointer (or use a std::auto_ptr instead).

Constructor & Destructor Documentation

- + +

◆ ScopedPointer() [1/3]

+
@@ -156,7 +134,9 @@ template<class ObjectType>
- + +

◆ ScopedPointer() [2/3]

+
@@ -183,7 +163,9 @@ template<class ObjectType>
- + +

◆ ScopedPointer() [3/3]

+
@@ -211,7 +193,9 @@ template<class ObjectType>
- + +

◆ ~ScopedPointer()

+
@@ -238,7 +222,9 @@ template<class ObjectType>

Member Function Documentation

- + +

◆ operator=() [1/2]

+
@@ -267,7 +253,9 @@ template<class ObjectType>
- + +

◆ operator=() [2/2]

+
@@ -296,7 +284,9 @@ template<class ObjectType>
- + +

◆ operator ObjectType *()

+
@@ -322,7 +312,9 @@ template<class ObjectType>
- + +

◆ get()

+
@@ -348,7 +340,9 @@ template<class ObjectType>
- + +

◆ operator*()

+
@@ -374,7 +368,9 @@ template<class ObjectType>
- + +

◆ operator->()

+
@@ -400,7 +396,9 @@ template<class ObjectType>
- + +

◆ release()

+
@@ -426,7 +424,9 @@ template<class ObjectType>
- + +

◆ swapWith()

+
@@ -459,9 +459,9 @@ template<class ObjectType>
diff --git a/classSignal-members.html b/classSignal-members.html index 626a7a00..03d88eaf 100644 --- a/classSignal-members.html +++ b/classSignal-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -96,9 +72,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classSignal.html b/classSignal.html index 5b5114de..59f74d86 100644 --- a/classSignal.html +++ b/classSignal.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Signal Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -92,10 +68,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - -

Public Member Functions

+
void wait () noexcept
 
+
void signal () noexcept
 
@@ -105,9 +81,9 @@ void 
signal () noexcep diff --git a/classSize-members.html b/classSize-members.html index 1556ef5f..5e162ca3 100644 --- a/classSize-members.html +++ b/classSize-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -117,9 +93,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classSize.html b/classSize.html index ac7e37e3..f1a615fd 100644 --- a/classSize.html +++ b/classSize.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Size< T > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -125,49 +101,51 @@ Public Member Functions
 
bool isInvalid () const noexcept
 
+
Size< T > operator+ (const Size< T > &size) noexcept
 
+
Size< T > operator- (const Size< T > &size) noexcept
 
+
Size< T > & operator= (const Size< T > &size) noexcept
 
+
Size< T > & operator+= (const Size< T > &size) noexcept
 
+
Size< T > & operator-= (const Size< T > &size) noexcept
 
+
Size< T > & operator*= (double m) noexcept
 
+
Size< T > & operator/= (double d) noexcept
 
+
bool operator== (const Size< T > &size) const noexcept
 
+
bool operator!= (const Size< T > &size) const noexcept
 
-

Friends

+
template<typename >
class Rectangle
 

Detailed Description

-

template<typename T>
+

template<typename T>
class Size< T >

DGL Size class.

This class describes a size, defined by a width and height value.

Constructor & Destructor Documentation

- + +

◆ Size() [1/3]

+
@@ -193,7 +171,9 @@ template<typename T>
- + +

◆ Size() [2/3]

+
@@ -230,7 +210,9 @@ template<typename T>
- + +

◆ Size() [3/3]

+
@@ -258,7 +240,9 @@ template<typename T>

Member Function Documentation

- + +

◆ getWidth()

+
@@ -284,7 +268,9 @@ template<typename T>
- + +

◆ getHeight()

+
@@ -310,7 +296,9 @@ template<typename T>
- + +

◆ setWidth()

+
@@ -337,7 +325,9 @@ template<typename T>
- + +

◆ setHeight()

+
@@ -364,7 +354,9 @@ template<typename T>
- + +

◆ setSize() [1/2]

+
@@ -401,7 +393,9 @@ template<typename T>
- + +

◆ setSize() [2/2]

+
@@ -428,7 +422,9 @@ template<typename T>
- + +

◆ growBy()

+
@@ -455,7 +451,9 @@ template<typename T>
- + +

◆ shrinkBy()

+
@@ -482,7 +480,9 @@ template<typename T>
- + +

◆ isNull()

+
@@ -508,7 +508,9 @@ template<typename T>
- + +

◆ isNotNull()

+
@@ -534,7 +536,9 @@ template<typename T>
- + +

◆ isValid()

+
@@ -560,7 +564,9 @@ template<typename T>
- + +

◆ isInvalid()

+
@@ -592,9 +598,9 @@ template<typename T>
diff --git a/classStandaloneWindow-members.html b/classStandaloneWindow-members.html index e26f6580..c29aee39 100644 --- a/classStandaloneWindow-members.html +++ b/classStandaloneWindow-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -93,46 +69,47 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Application::Application()Application
close() (defined in Window)Window
exec()StandaloneWindow
exec(bool lockWait=false) (defined in Window)Window
fileBrowserSelected(const char *filename) (defined in Window)Windowprotectedvirtual
focus() (defined in Window)Window
getApp() const noexcept (defined in Window)Window
getHeight() const noexcept (defined in Window)Window
getSize() const noexcept (defined in Window)Window
getTitle() const noexcept (defined in Window)Window
getWidth() const noexcept (defined in Window)Window
getWindowId() const noexcept (defined in Window)Window
hide() (defined in Window)Window
idle()Application
isQuiting() const noexceptApplication
isResizable() const noexcept (defined in Window)Window
isVisible() const noexcept (defined in Window)Window
onClose() (defined in Window)Windowprotectedvirtual
onDisplayAfter() (defined in Window)Windowprotectedvirtual
onDisplayBefore() (defined in Window)Windowprotectedvirtual
openFileBrowser(const FileBrowserOptions &options) (defined in Window)Window
quit()Application
removeIdleCallback(IdleCallback *const callback) (defined in Window)Window
repaint() noexcept (defined in Window)Window
setResizable(bool yesNo) (defined in Window)Window
setSize(uint width, uint height) (defined in Window)Window
setSize(Size< uint > size) (defined in Window)Window
setTitle(const char *title) (defined in Window)Window
setTransientWinId(uintptr_t winId) (defined in Window)Window
setVisible(bool yesNo) (defined in Window)Window
show() (defined in Window)Window
StandaloneWindow()StandaloneWindow
Window(Application &app) (defined in Window)Windowexplicit
Window(Application &app, Window &parent) (defined in Window)Windowexplicit
Window(Application &app, intptr_t parentId) (defined in Window)Windowexplicit
~Application()Applicationvirtual
~Window() (defined in Window)Windowvirtual
Application::exec(int idleTime=10)Application
exec(bool lockWait=false) (defined in Window)Window
fileBrowserSelected(const char *filename) (defined in Window)Windowprotectedvirtual
focus() (defined in Window)Window
getApp() const noexcept (defined in Window)Window
getHeight() const noexcept (defined in Window)Window
getSize() const noexcept (defined in Window)Window
getTitle() const noexcept (defined in Window)Window
getWidth() const noexcept (defined in Window)Window
getWindowId() const noexcept (defined in Window)Window
hide() (defined in Window)Window
idle()Application
isQuiting() const noexceptApplication
isResizable() const noexcept (defined in Window)Window
isVisible() const noexcept (defined in Window)Window
onClose() (defined in Window)Windowprotectedvirtual
onDisplayAfter() (defined in Window)Windowprotectedvirtual
onDisplayBefore() (defined in Window)Windowprotectedvirtual
openFileBrowser(const FileBrowserOptions &options) (defined in Window)Window
quit()Application
removeIdleCallback(IdleCallback *const callback) (defined in Window)Window
repaint() noexcept (defined in Window)Window
setResizable(bool yesNo) (defined in Window)Window
setSize(uint width, uint height) (defined in Window)Window
setSize(Size< uint > size) (defined in Window)Window
setTitle(const char *title) (defined in Window)Window
setTransientWinId(uintptr_t winId) (defined in Window)Window
setVisible(bool yesNo) (defined in Window)Window
show() (defined in Window)Window
StandaloneWindow()StandaloneWindow
Window(Application &app) (defined in Window)Windowexplicit
Window(Application &app, Window &parent) (defined in Window)Windowexplicit
Window(Application &app, intptr_t parentId) (defined in Window)Windowexplicit
~Application()Applicationvirtual
~Window() (defined in Window)Windowvirtual
diff --git a/classStandaloneWindow.html b/classStandaloneWindow.html index f2c0b0d4..cd6d8550 100644 --- a/classStandaloneWindow.html +++ b/classStandaloneWindow.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: StandaloneWindow Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -113,110 +89,112 @@ Public Member Functions
 
void idle ()
 
void exec ()
 
void exec (int idleTime=10)
 
void quit ()
 
bool isQuiting () const noexcept
 
- Public Member Functions inherited from Window
+
 Window (Application &app)
 
+
 Window (Application &app, Window &parent)
 
+
 Window (Application &app, intptr_t parentId)
 
+
void show ()
 
+
void hide ()
 
+
void close ()
 
+
void exec (bool lockWait=false)
 
+
void focus ()
 
+
void repaint () noexcept
 
+
bool openFileBrowser (const FileBrowserOptions &options)
 
+
bool isVisible () const noexcept
 
+
void setVisible (bool yesNo)
 
+
bool isResizable () const noexcept
 
+
void setResizable (bool yesNo)
 
+
uint getWidth () const noexcept
 
+
uint getHeight () const noexcept
 
+
Size< uint > getSize () const noexcept
 
+
void setSize (uint width, uint height)
 
+
void setSize (Size< uint > size)
 
+
const char * getTitle () const noexcept
 
+
void setTitle (const char *title)
 
+
void setTransientWinId (uintptr_t winId)
 
+
ApplicationgetApp () const noexcept
 
+
intptr_t getWindowId () const noexcept
 
+
void addIdleCallback (IdleCallback *const callback)
 
+
void removeIdleCallback (IdleCallback *const callback)
 
- - - -

Additional Inherited Members

- Protected Member Functions inherited from Window
+
virtual void onDisplayBefore ()
 
+
virtual void onDisplayAfter ()
 
+
virtual void onClose ()
 
+
virtual void fileBrowserSelected (const char *filename)
 

Constructor & Destructor Documentation

- + +

◆ StandaloneWindow()

+
@@ -233,7 +211,9 @@ virtual void 
fileBrowserSe

Member Function Documentation

- + +

◆ exec()

+
@@ -255,9 +235,9 @@ virtual void 
fileBrowserSe diff --git a/classString-members.html b/classString-members.html index 51b29983..3d32f907 100644 --- a/classString-members.html +++ b/classString-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -140,9 +116,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classString.html b/classString.html index 507058f6..ec7d885e 100644 --- a/classString.html +++ b/classString.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: String Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -93,145 +69,145 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

+
 String (const char c) noexcept
 
+
 String (char *const strBuf, const bool copyData=true) noexcept
 
+
 String (const char *const strBuf) noexcept
 
+
 String (const int value) noexcept
 
+
 String (const unsigned int value, const bool hexadecimal=false) noexcept
 
+
 String (const long value) noexcept
 
+
 String (const unsigned long value, const bool hexadecimal=false) noexcept
 
+
 String (const long long value) noexcept
 
+
 String (const unsigned long long value, const bool hexadecimal=false) noexcept
 
+
 String (const float value) noexcept
 
+
 String (const double value) noexcept
 
+
 String (const String &str) noexcept
 
+
std::size_t length () const noexcept
 
+
bool isEmpty () const noexcept
 
+
bool isNotEmpty () const noexcept
 
+
bool contains (const char *const strBuf, const bool ignoreCase=false) const noexcept
 
+
bool isDigit (const std::size_t pos) const noexcept
 
+
bool startsWith (const char c) const noexcept
 
+
bool startsWith (const char *const prefix) const noexcept
 
+
bool endsWith (const char c) const noexcept
 
+
bool endsWith (const char *const suffix) const noexcept
 
+
std::size_t find (const char c, bool *const found=nullptr) const noexcept
 
+
std::size_t find (const char *const strBuf, bool *const found=nullptr) const noexcept
 
+
std::size_t rfind (const char c, bool *const found=nullptr) const noexcept
 
+
std::size_t rfind (const char *const strBuf, bool *const found=nullptr) const noexcept
 
+
void clear () noexcept
 
+
Stringreplace (const char before, const char after) noexcept
 
+
Stringtruncate (const std::size_t n) noexcept
 
+
StringtoBasic () noexcept
 
+
StringtoLower () noexcept
 
+
StringtoUpper () noexcept
 
+
const char * buffer () const noexcept
 
+
 operator const char * () const noexcept
 
+
char operator[] (const std::size_t pos) const noexcept
 
+
char & operator[] (const std::size_t pos) noexcept
 
+
bool operator== (const char *const strBuf) const noexcept
 
+
bool operator== (const String &str) const noexcept
 
+
bool operator!= (const char *const strBuf) const noexcept
 
+
bool operator!= (const String &str) const noexcept
 
+
Stringoperator= (const char *const strBuf) noexcept
 
+
Stringoperator= (const String &str) noexcept
 
+
Stringoperator+= (const char *const strBuf) noexcept
 
+
Stringoperator+= (const String &str) noexcept
 
+
String operator+ (const char *const strBuf) noexcept
 
+
String operator+ (const String &str) noexcept
 
-

Static Public Member Functions

+
static String asBase64 (const void *const data, const std::size_t dataSize)
 
@@ -241,9 +217,9 @@ static String 
diff --git a/classThread.html b/classThread.html index 994793b2..2d260a71 100644 --- a/classThread.html +++ b/classThread.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Thread Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -94,37 +70,37 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - - - - -

Public Member Functions

+
bool isThreadRunning () const noexcept
 
+
bool shouldThreadExit () const noexcept
 
+
bool startThread () noexcept
 
+
bool stopThread (const int timeOutMilliseconds) noexcept
 
+
void signalThreadShouldExit () noexcept
 
+
const StringgetThreadName () const noexcept
 
-

Static Public Member Functions

+
static void setCurrentThreadName (const char *const name) noexcept
 
- -

Protected Member Functions

+
 Thread (const char *const threadName=nullptr) noexcept
 
+
virtual void run ()=0
 
@@ -134,9 +110,9 @@ virtual void 
run ()=0< diff --git a/classTriangle-members.html b/classTriangle-members.html index 51400a5a..5573508a 100644 --- a/classTriangle-members.html +++ b/classTriangle-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -83,31 +59,31 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
-
Triangle< typename > Member List
+
Triangle< T > Member List
-

This is the complete list of members for Triangle< typename >, including all inherited members.

+

This is the complete list of members for Triangle< T >, including all inherited members.

- - - - - - - - - - - - - + + + + + + + + + + + + +
draw()Triangle< typename >
drawOutline()Triangle< typename >
isInvalid() const noexceptTriangle< typename >
isNotNull() const noexceptTriangle< typename >
isNull() const noexceptTriangle< typename >
isValid() const noexceptTriangle< typename >
operator!=(const Triangle< T > &tri) const noexcept (defined in Triangle< typename >)Triangle< typename >
operator=(const Triangle< T > &tri) noexcept (defined in Triangle< typename >)Triangle< typename >
operator==(const Triangle< T > &tri) const noexcept (defined in Triangle< typename >)Triangle< typename >
Triangle() noexceptTriangle< typename >
Triangle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3) noexceptTriangle< typename >
Triangle(const Point< T > &pos1, const Point< T > &pos2, const Point< T > &pos3) noexceptTriangle< typename >
Triangle(const Triangle< T > &tri) noexceptTriangle< typename >
draw()Triangle< T >
drawOutline()Triangle< T >
isInvalid() const noexceptTriangle< T >
isNotNull() const noexceptTriangle< T >
isNull() const noexceptTriangle< T >
isValid() const noexceptTriangle< T >
operator!=(const Triangle< T > &tri) const noexcept (defined in Triangle< T >)Triangle< T >
operator=(const Triangle< T > &tri) noexcept (defined in Triangle< T >)Triangle< T >
operator==(const Triangle< T > &tri) const noexcept (defined in Triangle< T >)Triangle< T >
Triangle() noexceptTriangle< T >
Triangle(const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3) noexceptTriangle< T >
Triangle(const Point< T > &pos1, const Point< T > &pos2, const Point< T > &pos3) noexceptTriangle< T >
Triangle(const Triangle< T > &tri) noexceptTriangle< T >
diff --git a/classTriangle.html b/classTriangle.html index 0e75a85b..39e18a87 100644 --- a/classTriangle.html +++ b/classTriangle.html @@ -3,16 +3,15 @@ - -DISTRHO Plugin Framework: Triangle< typename > Class Template Reference + + +DISTRHO Plugin Framework: Triangle< T > Class Template Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -86,7 +62,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Public Member Functions | List of all members
-
Triangle< typename > Class Template Reference
+
Triangle< T > Class Template Reference
@@ -94,54 +70,56 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + - - + - +

Public Member Functions

 Triangle () noexcept
 
 Triangle (const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3) noexcept
 
 Triangle (const Point< T > &pos1, const Point< T > &pos2, const Point< T > &pos3) noexcept
 
 Triangle (const Triangle< T > &tri) noexcept
 
void draw ()
 
void drawOutline ()
 
bool isNull () const noexcept
 
bool isNotNull () const noexcept
 
bool isValid () const noexcept
 
bool isInvalid () const noexcept
 
+
 Triangle () noexcept
 
 Triangle (const T &x1, const T &y1, const T &x2, const T &y2, const T &x3, const T &y3) noexcept
 
 Triangle (const Point< T > &pos1, const Point< T > &pos2, const Point< T > &pos3) noexcept
 
 Triangle (const Triangle< T > &tri) noexcept
 
void draw ()
 
void drawOutline ()
 
bool isNull () const noexcept
 
bool isNotNull () const noexcept
 
bool isValid () const noexcept
 
bool isInvalid () const noexcept
 
Triangle< T > & operator= (const Triangle< T > &tri) noexcept
 
+
 
bool operator== (const Triangle< T > &tri) const noexcept
 
+
 
bool operator!= (const Triangle< T > &tri) const noexcept
 
 

Detailed Description

-

template<typename>
-class Triangle< typename >

+

template<typename T>
+class Triangle< T >

DGL Triangle class.

This class describes a triangle, defined by 3 points.

Constructor & Destructor Documentation

- + +

◆ Triangle() [1/4]

+
-template<typename >
+template<typename T>
- + @@ -157,17 +135,19 @@ template<typename > - + +

◆ Triangle() [2/4]

+
-template<typename >
+template<typename T>
Triangle< typename >::Triangle Triangle< T >::Triangle ( )
- + @@ -218,17 +198,19 @@ template<typename > - + +

◆ Triangle() [3/4]

+
-template<typename >
+template<typename T>
Triangle< typename >::Triangle Triangle< T >::Triangle ( const T &  x1,
- + @@ -261,17 +243,19 @@ template<typename > - + +

◆ Triangle() [4/4]

+
-template<typename >
+template<typename T>
Triangle< typename >::Triangle Triangle< T >::Triangle ( const Point< T > &  pos1,

File browser buttons.

0 means hidden. 1 means visible and unchecked. 2 means visible and checked.

Constructor & Destructor Documentation

- + +

◆ Buttons()

+
- + @@ -289,14 +273,16 @@ template<typename >

Member Function Documentation

- + +

◆ draw()

+
-template<typename >
+template<typename T>
Triangle< typename >::Triangle Triangle< T >::Triangle ( const Triangle< T > &  tri)
- + @@ -307,14 +293,16 @@ template<typename > - + +

◆ drawOutline()

+
-template<typename >
+template<typename T>
void Triangle< typename >::draw void Triangle< T >::draw ( )
- + @@ -325,17 +313,19 @@ template<typename > - + +

◆ isNull()

+
-template<typename >
+template<typename T>
void Triangle< typename >::drawOutline void Triangle< T >::drawOutline ( )
- + @@ -351,17 +341,19 @@ template<typename > - + +

◆ isNotNull()

+
-template<typename >
+template<typename T>
bool Triangle< typename >::isNull bool Triangle< T >::isNull ( ) const
- + @@ -377,17 +369,19 @@ template<typename > - + +

◆ isValid()

+
-template<typename >
+template<typename T>
bool Triangle< typename >::isNotNull bool Triangle< T >::isNotNull ( ) const
- + @@ -403,17 +397,19 @@ template<typename > - + +

◆ isInvalid()

+
-template<typename >
+template<typename T>
bool Triangle< typename >::isValid bool Triangle< T >::isValid ( ) const
- + @@ -435,9 +431,9 @@ template<typename > diff --git a/classUI-members.html b/classUI-members.html index c1be8c47..6b08ac42 100644 --- a/classUI-members.html +++ b/classUI-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
bool Triangle< typename >::isInvalid bool Triangle< T >::isInvalid ( ) const
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -112,9 +88,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classUI.html b/classUI.html index 5dcbcfcd..f816279d 100644 --- a/classUI.html +++ b/classUI.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: UI Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -150,10 +126,10 @@ Protected Member Functions
- -

Friends

+
class UIExporter
 
+
class UIExporterWindow
 
@@ -161,7 +137,9 @@ class 
UIExporterWindow

DPF UI class from where UI instances are created.

Note
You must call setSize during construction, Detailed information about this class.

Constructor & Destructor Documentation

- + +

◆ UI()

+
@@ -188,7 +166,9 @@ class 
UIExporterWindow - + +

◆ ~UI()

+
@@ -213,7 +193,9 @@ class 
UIExporterWindow

Member Function Documentation

- + +

◆ getSampleRate()

+
@@ -233,12 +215,13 @@ class 
UIExporterWindow
-

Get the current sample rate used in plugin processing.

-
See Also
sampleRateChanged(double)
+

Get the current sample rate used in plugin processing.

See also
sampleRateChanged(double)
- + +

◆ editParameter()

+
@@ -265,7 +248,9 @@ class 
UIExporterWindow - + +

◆ setParameterValue()

+
@@ -292,7 +277,9 @@ class 
UIExporterWindow - + +

◆ setState()

+
@@ -319,7 +306,9 @@ class 
UIExporterWindow - + +

◆ sendNote()

+
@@ -348,11 +337,13 @@ class 
UIExporterWindow
-

sendNote. Document this.

+

sendNote. Document this.

Note
Work in progress. Implemented for DSSI and LV2 formats.
- + +

◆ getPluginInstancePointer()

+
@@ -376,7 +367,9 @@ class 
UIExporterWindow - + +

◆ getNextBundlePath()

+
@@ -396,12 +389,13 @@ class 
UIExporterWindow
-

Get the bundle path that will be used for the next UI.

-
Note
: This function is only valid during createUI(), it will return null when called from anywhere else.
+

Get the bundle path that will be used for the next UI.

Note
: This function is only valid during createUI(), it will return null when called from anywhere else.
- + +

◆ getNextWindowId()

+
@@ -421,12 +415,13 @@ class 
UIExporterWindow
-

Get the Window Id that will be used for the next created window.

-
Note
: This function is only valid during createUI(), it will return 0 when called from anywhere else.
+

Get the Window Id that will be used for the next created window.

Note
: This function is only valid during createUI(), it will return 0 when called from anywhere else.
- + +

◆ parameterChanged()

+
@@ -457,12 +452,14 @@ class 
UIExporterWindow
-

A parameter has changed on the plugin side.
+

A parameter has changed on the plugin side.
This is called by the host to inform the UI about parameter changes.

- + +

◆ programLoaded()

+
@@ -483,12 +480,14 @@ This is called by the host to inform the UI
-

A program has been loaded on the plugin side.
+

A program has been loaded on the plugin side.
This is called by the host to inform the UI about program changes.

- + +

◆ stateChanged()

+
@@ -519,12 +518,14 @@ This is called by the host to inform the UI
-

A state has changed on the plugin side.
+

A state has changed on the plugin side.
This is called by the host to inform the UI about state changes.

- + +

◆ sampleRateChanged()

+
@@ -545,12 +546,13 @@ This is called by the host to inform the UI
-

Optional callback to inform the UI about a sample rate change on the plugin side.

-
See Also
getSampleRate()
+

Optional callback to inform the UI about a sample rate change on the plugin side.

See also
getSampleRate()
- + +

◆ uiIdle()

+
@@ -574,7 +576,9 @@ This is called by the host to inform the UI - + +

◆ uiFileBrowserSelected()

+
@@ -595,12 +599,13 @@ This is called by the host to inform the UI
-

File browser selected function.

-
See Also
Window::fileBrowserSelected(const char*)
+

File browser selected function.

See also
Window::fileBrowserSelected(const char*)
- + +

◆ uiReshape()

+
@@ -631,12 +636,13 @@ This is called by the host to inform the UI
-

OpenGL window reshape function, called when parent window is resized. You can reimplement this function for a custom OpenGL state.

-
See Also
Window::onReshape(uint,uint)
+

OpenGL window reshape function, called when parent window is resized. You can reimplement this function for a custom OpenGL state.

See also
Window::onReshape(uint,uint)
- + +

◆ onResize()

+
@@ -657,8 +663,7 @@ This is called by the host to inform the UI
-

OpenGL widget resize function, called when the widget is resized. This is overriden here so the host knows when the UI is resized by you.

-
See Also
Widget::onResize(const ResizeEvent&)
+

OpenGL widget resize function, called when the widget is resized. This is overriden here so the host knows when the UI is resized by you.

See also
Widget::onResize(const ResizeEvent&)
@@ -668,9 +673,9 @@ This is called by the host to inform the UI diff --git a/classWidget-members.html b/classWidget-members.html index 6fbe6469..954b2c0c 100644 --- a/classWidget-members.html +++ b/classWidget-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -132,9 +108,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classWidget.html b/classWidget.html index 75695831..5000605c 100644 --- a/classWidget.html +++ b/classWidget.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Widget Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -204,19 +180,19 @@ Protected Member Functions
- - - - -

Friends

+
class ImageSlider
 
+
class NanoWidget
 
+
class Window
 
+
class StandaloneWindow
 
+
class DISTRHO_NAMESPACE::UI
 
@@ -228,7 +204,9 @@ class 
DISTRHO_NAMESPACE::U

Windows paint widgets in the order they are constructed. Early widgets are drawn first, at the bottom, then newer ones on top. Events are sent in the inverse order so that the top-most widget gets a chance to catch the event and stop its propagation.

All widget event callbacks do nothing by default.

Constructor & Destructor Documentation

- + +

◆ Widget() [1/2]

+
@@ -253,7 +231,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ Widget() [2/2]

+
@@ -278,7 +258,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ ~Widget()

+
@@ -303,7 +285,9 @@ class 
DISTRHO_NAMESPACE::U

Member Function Documentation

- + +

◆ isVisible()

+
@@ -327,7 +311,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ setVisible()

+
@@ -344,7 +330,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ show()

+
@@ -360,7 +348,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ hide()

+
@@ -376,7 +366,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ getWidth()

+
@@ -400,7 +392,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ getHeight()

+
@@ -424,7 +418,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ getSize()

+
@@ -448,7 +444,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ setWidth()

+
@@ -473,7 +471,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ setHeight()

+
@@ -498,7 +498,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ setSize() [1/2]

+
@@ -533,7 +535,9 @@ class 

Detailed Description

Bar-Beat-Tick time position.

Constructor & Destructor Documentation

- + +

◆ BarBeatTick()

+
DISTRHO_NAMESPACE::U - + +

◆ setSize() [2/2]

+
@@ -558,7 +562,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ getAbsoluteX()

+
@@ -582,7 +588,9 @@ class  -
DISTRHO_NAMESPACE::U - + +

◆ getAbsoluteY()

+
@@ -606,7 +614,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ getAbsolutePos()

+
@@ -630,7 +640,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ setAbsoluteX()

+
@@ -655,7 +667,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ setAbsoluteY()

+
@@ -680,7 +694,9 @@ class ",""],legend:[1,"
","
"],thead:[1,"
DISTRHO_NAMESPACE::U - + +

◆ setAbsolutePos() [1/2]

+
@@ -715,7 +731,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ setAbsolutePos() [2/2]

+
@@ -740,7 +758,9 @@ class  + +
DISTRHO_NAMESPACE::U - + +

◆ getParentApp()

+
@@ -764,7 +784,9 @@ class  diff --git a/group__ParameterHints.html b/group__ParameterHints.html index 252a2b48..8fd5c06f 100644 --- a/group__ParameterHints.html +++ b/group__ParameterHints.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Parameter Hints + - @@ -21,7 +20,7 @@
DISTRHO_NAMESPACE::U - + +

◆ getParentWindow()

+
@@ -788,7 +810,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ contains() [1/2]

+
@@ -823,7 +847,9 @@ class  + + + + @@ -104,7 +92,9 @@ Enumerations
DISTRHO_NAMESPACE::U - + +

◆ contains() [2/2]

+
@@ -848,7 +874,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ repaint()

+
@@ -872,7 +900,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ getId()

+
@@ -892,12 +922,13 @@ class 
DISTRHO_NAMESPACE::U
-

Get the Id associated with this widget.

-
See Also
setId
+

Get the Id associated with this widget.

See also
setId
- + +

◆ setId()

+
@@ -918,12 +949,13 @@ class 
DISTRHO_NAMESPACE::U
-

Set an Id to be associated with this widget.

-
See Also
getId
+

Set an Id to be associated with this widget.

See also
getId
- + +

◆ onDisplay()

+
@@ -949,7 +981,9 @@ class 
DISTRHO_NAMESPACE::U - + +

◆ onKeyboard()

+
@@ -970,14 +1004,15 @@ class 
DISTRHO_NAMESPACE::U
-

A function called when a key is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a key is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented in ImageAboutWindow.

- + +

◆ onSpecial()

+
@@ -998,12 +1033,13 @@ class 
DISTRHO_NAMESPACE::U
-

A function called when a special key is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a special key is pressed or released.

Returns
True to stop event propagation, false otherwise.
- + +

◆ onMouse()

+
@@ -1024,14 +1060,15 @@ class 
DISTRHO_NAMESPACE::U
-

A function called when a mouse button is pressed or released.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when a mouse button is pressed or released.

Returns
True to stop event propagation, false otherwise.

Reimplemented in ImageSwitch, ImageSlider, ImageKnob, ImageButton, and ImageAboutWindow.

- + +

◆ onMotion()

+
@@ -1052,14 +1089,15 @@ class 
DISTRHO_NAMESPACE::U
-

A function called when the pointer moves.

-
Returns
True to stop event propagation, false otherwise.
+

A function called when the pointer moves.

Returns
True to stop event propagation, false otherwise.

Reimplemented in ImageSlider, ImageKnob, and ImageButton.

- + +

◆ onScroll()

+
@@ -1080,14 +1118,15 @@ class 
DISTRHO_NAMESPACE::U
-

A function called on scrolling (e.g. mouse wheel or track pad).

-
Returns
True to stop event propagation, false otherwise.
+

A function called on scrolling (e.g. mouse wheel or track pad).

Returns
True to stop event propagation, false otherwise.

Reimplemented in ImageKnob.

- + +

◆ onResize()

+
@@ -1118,9 +1157,9 @@ class 
DISTRHO_NAMESPACE::U diff --git a/classWindow-members.html b/classWindow-members.html index 44571233..bb01dc52 100644 --- a/classWindow-members.html +++ b/classWindow-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -128,9 +104,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/classWindow.html b/classWindow.html index e5a2cc81..7553e85f 100644 --- a/classWindow.html +++ b/classWindow.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Window Class Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -110,115 +86,115 @@ Classes
- - - - - - - - - - - - - - - - - - - - - - - - - -

Public Member Functions

+
 Window (Application &app)
 
+
 Window (Application &app, Window &parent)
 
+
 Window (Application &app, intptr_t parentId)
 
+
void show ()
 
+
void hide ()
 
+
void close ()
 
+
void exec (bool lockWait=false)
 
+
void focus ()
 
+
void repaint () noexcept
 
+
bool openFileBrowser (const FileBrowserOptions &options)
 
+
bool isVisible () const noexcept
 
+
void setVisible (bool yesNo)
 
+
bool isResizable () const noexcept
 
+
void setResizable (bool yesNo)
 
+
uint getWidth () const noexcept
 
+
uint getHeight () const noexcept
 
+
Size< uint > getSize () const noexcept
 
+
void setSize (uint width, uint height)
 
+
void setSize (Size< uint > size)
 
+
const char * getTitle () const noexcept
 
+
void setTitle (const char *title)
 
+
void setTransientWinId (uintptr_t winId)
 
+
ApplicationgetApp () const noexcept
 
+
intptr_t getWindowId () const noexcept
 
+
void addIdleCallback (IdleCallback *const callback)
 
+
void removeIdleCallback (IdleCallback *const callback)
 
- - - - -

Protected Member Functions

+
virtual void onDisplayBefore ()
 
+
virtual void onDisplayAfter ()
 
+
virtual void onReshape (uint width, uint height)
 
+
virtual void onClose ()
 
+
virtual void fileBrowserSelected (const char *filename)
 
- - - -

Friends

+
class Application
 
+
class Widget
 
+
class StandaloneWindow
 
+
class DISTRHO_NAMESPACE::UIExporter
 
@@ -228,9 +204,9 @@ class 
DISTRHO_NAMESPACE::U diff --git a/classes.html b/classes.html index e401e7a5..27bd1314 100644 --- a/classes.html +++ b/classes.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Index + - @@ -21,7 +20,7 @@ - @@ -30,49 +29,26 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -86,54 +62,55 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Class Index
-
A | B | C | E | F | G | I | K | L | M | N | P | R | S | T | U | W
- - - - - -
  A  
-
  F  
-
  L  
-
Parameter   Widget::SpecialEvent   
ParameterRanges   StandaloneWindow   
Application   Window::FileBrowserOptions   LeakedObjectDetector   Plugin   String   
AudioPort   
  G  
-
Line   Point   
  T  
-
  B  
-
  M  
-
  R  
+
a | b | c | e | f | g | i | k | l | m | n | p | r | s | t | u | w
+ + - - - - - + + + + + - - - + - - - - - - - + + + + + + + + + + +
  a  
+
  f  
+
Line   Plugin   
  t  
NanoVG::GlyphPosition   NanoVG::TextRow   
TimePosition::BarBeatTick   
  I  
-
MidiEvent   Rectangle   Thread   
Widget::BaseEvent   Widget::MotionEvent   RecursiveMutex   TimePosition   
Window::FileBrowserOptions::Buttons   IdleCallback   Widget::MouseEvent   Widget::ResizeEvent   Triangle   
  C  
-
Image   Mutex   
  S  
-
  U  
+
  m  
+
Point   
Application   Window::FileBrowserOptions   
  r  
+
NanoVG::TextRow   
AudioPort   
  g  
+
MidiEvent   Thread   
  b  
+
Widget::MotionEvent   Rectangle   TimePosition   
NanoVG::GlyphPosition   Widget::MouseEvent   RecursiveMutex   Triangle   
TimePosition::BarBeatTick   
  i  
+
Mutex   Widget::ResizeEvent   
  u  
ImageAboutWindow   
  N  
+
Widget::BaseEvent   
  n  
+
  s  
ImageButton::Callback   ImageButton   ScopedPointer   UI   
ImageKnob::Callback   ImageKnob   NanoImage   ScopeLocker   
  W  
+
Window::FileBrowserOptions::Buttons   IdleCallback   UI   
  c  
+
Image   NanoImage   ScopedPointer   
  w  
ImageSlider::Callback   ImageSlider   NanoVG   ScopeTryLocker   
ImageSwitch::Callback   ImageSwitch   NanoWidget   ScopeUnlocker   Widget   
Circle   
  K  
-
  P  
-
Widget::ScrollEvent   Window   
Color   Signal   
  E  
-
Widget::KeyboardEvent   NanoVG::Paint   Size   
ExternalWindow   
ImageAboutWindow   NanoVG   ScopeLocker   
ImageButton::Callback   ImageButton   NanoWidget   ScopeTryLocker   Widget   
ImageKnob::Callback   ImageKnob   
  p  
+
ScopeUnlocker   Window   
ImageSlider::Callback   ImageSlider   Widget::ScrollEvent   
ImageSwitch::Callback   ImageSwitch   NanoVG::Paint   Signal   
Circle   
  k  
+
Parameter   Size   
Color   ParameterEnumerationValue   Widget::SpecialEvent   
  e  
+
Widget::KeyboardEvent   ParameterEnumerationValues   StandaloneWindow   
  l  
+
ParameterRanges   String   
ExternalWindow   
LeakedObjectDetector   
-
A | B | C | E | F | G | I | K | L | M | N | P | R | S | T | U | W
+
a | b | c | e | f | g | i | k | l | m | n | p | r | s | t | u | w
diff --git a/dir_37257469cca17bab24b582e18a78eb75.html b/dir_37257469cca17bab24b582e18a78eb75.html index 1b24a80a..f918def6 100644 --- a/dir_37257469cca17bab24b582e18a78eb75.html +++ b/dir_37257469cca17bab24b582e18a78eb75.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho Directory Reference + - @@ -21,7 +20,7 @@ - @@ -30,40 +29,25 @@
+
DISTRHO Plugin Framework
- + - + + + + +
@@ -85,30 +69,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); - - -

Directories

directory  extra
 
- - - - - - - - - - - - -

-Files

file  DistrhoInfo.hpp [code]
 
file  DistrhoPlugin.hpp [code]
 
file  DistrhoPluginMain.cpp
 
file  DistrhoUI.hpp [code]
 
file  DistrhoUIMain.cpp
 
file  DistrhoUtils.hpp [code]
 
diff --git a/dir_99893ac99dd47c2a73745483a12a725f.html b/dir_99893ac99dd47c2a73745483a12a725f.html index 454fb325..620a22dc 100644 --- a/dir_99893ac99dd47c2a73745483a12a725f.html +++ b/dir_99893ac99dd47c2a73745483a12a725f.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: dgl Directory Reference + - @@ -21,7 +20,7 @@ - @@ -30,40 +29,25 @@
+
DISTRHO Plugin Framework
- + - + + + + +
@@ -82,36 +66,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
dgl Directory Reference
- - - - - - - - - - - - - - - - - - - - - - -

-Files

file  Application.hpp [code]
 
file  Base.hpp [code]
 
file  Color.hpp [code]
 
file  Geometry.hpp [code]
 
file  Image.hpp [code]
 
file  ImageWidgets.hpp [code]
 
file  NanoVG.hpp [code]
 
file  StandaloneWindow.hpp [code]
 
file  Widget.hpp [code]
 
file  Window.hpp [code]
 
diff --git a/dir_b1be46be7d80596b116b2b4ac973f2f0.html b/dir_b1be46be7d80596b116b2b4ac973f2f0.html index 1ff40c46..b1275142 100644 --- a/dir_b1be46be7d80596b116b2b4ac973f2f0.html +++ b/dir_b1be46be7d80596b116b2b4ac973f2f0.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: distrho/extra Directory Reference + - @@ -21,7 +20,7 @@ - @@ -30,40 +29,25 @@
+
DISTRHO Plugin Framework
- + - + + + + +
@@ -82,32 +66,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
extra Directory Reference
- - - - - - - - - - - - - - - - - - -

-Files

file  Base64.hpp [code]
 
file  ExternalWindow.hpp [code]
 
file  LeakDetector.hpp [code]
 
file  Mutex.hpp [code]
 
file  ScopedPointer.hpp [code]
 
file  Sleep.hpp [code]
 
file  String.hpp [code]
 
file  Thread.hpp [code]
 
diff --git a/doxygen.css b/doxygen.css index f0f36f89..4f1ab919 100644 --- a/doxygen.css +++ b/doxygen.css @@ -1,9 +1,13 @@ -/* The standard CSS for doxygen 1.8.6 */ +/* The standard CSS for doxygen 1.8.13 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; } +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + /* @group Heading Levels */ h1.groupheader { @@ -173,7 +177,7 @@ pre.fragment { } div.fragment { - padding: 4px 6px; + padding: 0px; margin: 4px 8px 4px 2px; background-color: #FBFCFD; border: 1px solid #C4CFE5; @@ -206,6 +210,11 @@ div.line { transition-duration: 0.5s; } +div.line:after { + content:"\000A"; + white-space: pre; +} + div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; @@ -227,7 +236,16 @@ span.lineno a:hover { background-color: #C8C8C8; } -div.ah { +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { background-color: black; font-weight: bold; color: #ffffff; @@ -242,7 +260,16 @@ div.ah { -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; } div.groupHeader { @@ -487,6 +514,29 @@ table.memberdecls { /* Styles for detailed member documentation */ +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + .memtemplate { font-size: 80%; color: #4665A2; @@ -525,7 +575,7 @@ table.memberdecls { } .memname { - font-weight: bold; + font-weight: 400; margin-left: 6px; } @@ -541,24 +591,24 @@ table.memberdecls { color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; + background-color: #DFE5F1; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; - border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; - -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; } +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; @@ -670,12 +720,12 @@ span.mlabel { /* @end */ -/* these are for tree view when not used as main index */ +/* these are for tree view inside a (index) page */ div.directory { margin: 10px 0px; - border-top: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; width: 100%; } @@ -734,6 +784,80 @@ div.directory { color: #3D578C; } +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + div.dynheader { margin-top: 8px; -webkit-touch-callout: none; @@ -749,6 +873,10 @@ address { color: #2A3D61; } +table.doxtable caption { + caption-side: top; +} + table.doxtable { border-collapse:collapse; margin-top: 4px; @@ -822,6 +950,7 @@ table.fieldtable { padding-bottom: 4px; padding-top: 5px; text-align:left; + font-weight: 400; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; @@ -914,6 +1043,18 @@ div.summary a white-space: nowrap; } +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + div.ingroups { font-size: 8pt; @@ -1025,6 +1166,11 @@ dl.section dd { border: 0px none; } +#projectalign +{ + vertical-align: middle; +} + #projectname { font: 300% Tahoma, Arial,sans-serif; @@ -1069,6 +1215,11 @@ dl.section dd { text-align: center; } +.plantumlgraph +{ + text-align: center; +} + .diagraph { text-align: center; @@ -1108,7 +1259,7 @@ div.toc { border-radius: 7px 7px 7px 7px; float: right; height: auto; - margin: 0 20px 10px 10px; + margin: 0 8px 10px 10px; width: 200px; } @@ -1364,3 +1515,82 @@ tr.heading h2 { } } +/* @group Markdown */ + +/* +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTableHead tr { +} + +table.markdownTableBodyLeft td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft { + text-align: left +} + +th.markdownTableHeadRight { + text-align: right +} + +th.markdownTableHeadCenter { + text-align: center +} +*/ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + + +/* @end */ diff --git a/dynsections.js b/dynsections.js index ed092c7f..85e18369 100644 --- a/dynsections.js +++ b/dynsections.js @@ -24,19 +24,20 @@ function updateStripes() $('table.directory tr'). removeClass('even').filter(':visible:even').addClass('even'); } + function toggleLevel(level) { - $('table.directory tr').each(function(){ + $('table.directory tr').each(function() { var l = this.id.split('_').length-1; var i = $('#img'+this.id.substring(3)); var a = $('#arr'+this.id.substring(3)); if (l - + + DISTRHO Plugin Framework: File List + - @@ -21,7 +20,7 @@ - @@ -30,46 +29,26 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -85,39 +64,39 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented files with brief descriptions:
[detail level 123]
- - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
o-dgl
|o*Application.hpp
|o*Base.hpp
|o*Color.hpp
|o*Geometry.hpp
|o*Image.hpp
|o*ImageWidgets.hpp
|o*NanoVG.hpp
|o*StandaloneWindow.hpp
|o*Widget.hpp
|\*Window.hpp
\-distrho
 o-extra
 |o*Base64.hpp
 |o*ExternalWindow.hpp
 |o*LeakDetector.hpp
 |o*Mutex.hpp
 |o*ScopedPointer.hpp
 |o*Sleep.hpp
 |o*String.hpp
 |\*Thread.hpp
 o*DistrhoInfo.hpp
 o*DistrhoPlugin.hpp
 o*DistrhoUI.hpp
 \*DistrhoUtils.hpp
  dgl
 Application.hpp
 Base.hpp
 Color.hpp
 Geometry.hpp
 Image.hpp
 ImageWidgets.hpp
 NanoVG.hpp
 StandaloneWindow.hpp
 Widget.hpp
 Window.hpp
  distrho
  extra
 Base64.hpp
 ExternalWindow.hpp
 LeakDetector.hpp
 Mutex.hpp
 ScopedPointer.hpp
 Sleep.hpp
 String.hpp
 Thread.hpp
 DistrhoInfo.hpp
 DistrhoPlugin.hpp
 DistrhoUI.hpp
 DistrhoUtils.hpp
diff --git a/functions.html b/functions.html index ef567fab..8efd87e7 100644 --- a/functions.html +++ b/functions.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- a -

    +

    - a -

    • activate() : Plugin
    • @@ -140,9 +80,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_0x7e.html b/functions_0x7e.html index b2b03471..7e9880eb 100644 --- a/functions_0x7e.html +++ b/functions_0x7e.html @@ -3,7 +3,8 @@ - + + DISTRHO Plugin Framework: Class Members @@ -11,9 +12,6 @@ - @@ -31,78 +29,19 @@
- + - - - - + + + +
Here is a list of all documented class members with links to the class documentation for each member:
-

- ~ -

    +

    - ~ -

    • ~Application() : Application
    • @@ -159,9 +98,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_b.html b/functions_b.html index 0dfcf7cf..87b3b6dd 100644 --- a/functions_b.html +++ b/functions_b.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- b -

    +

    - b -

diff --git a/functions_c.html b/functions_c.html index 57e2ae07..da128c73 100644 --- a/functions_c.html +++ b/functions_c.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,12 +60,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- c -

diff --git a/functions_d.html b/functions_d.html index 3c0dd21b..2c642f94 100644 --- a/functions_d.html +++ b/functions_d.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- d -

diff --git a/functions_e.html b/functions_e.html index 377cf379..f2e56fd9 100644 --- a/functions_e.html +++ b/functions_e.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- e -

diff --git a/functions_enum.html b/functions_enum.html index 6df6697f..9045f04d 100644 --- a/functions_enum.html +++ b/functions_enum.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Enumerations + - @@ -21,7 +20,7 @@ - @@ -30,58 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - + + + + +
@@ -99,9 +66,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_eval.html b/functions_eval.html index fa06a600..9e38938e 100644 --- a/functions_eval.html +++ b/functions_eval.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Enumerator + - @@ -21,7 +20,7 @@ - @@ -30,58 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - + + + + +
@@ -105,9 +72,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_f.html b/functions_f.html index 3979ce92..7370c12b 100644 --- a/functions_f.html +++ b/functions_f.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- f -

    +

    - f -

    • FileBrowserOptions() : Window::FileBrowserOptions
    • @@ -171,9 +111,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func.html b/functions_func.html index 235eca72..883aca21 100644 --- a/functions_func.html +++ b/functions_func.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- a -

    +

    - a -

    • activate() : Plugin
    • @@ -139,9 +80,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_0x7e.html b/functions_func_0x7e.html index 2d346100..6c547cf5 100644 --- a/functions_func_0x7e.html +++ b/functions_func_0x7e.html @@ -3,7 +3,8 @@ - + + DISTRHO Plugin Framework: Class Members - Functions @@ -11,9 +12,6 @@ - @@ -31,77 +29,19 @@
- + - - - - + + + +
  -

- ~ -

    +

    - ~ -

    • ~Application() : Application
    • @@ -158,9 +98,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_b.html b/functions_func_b.html index f3893ad9..e893eeb3 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- b -

    +

    - b -

    • BarBeatTick() : TimePosition::BarBeatTick
    • @@ -148,9 +89,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_c.html b/functions_func_c.html index f3d08a5e..fcb6b2fe 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,12 +60,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- c -

diff --git a/functions_func_d.html b/functions_func_d.html index abbc807c..12c2495b 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- d -

diff --git a/functions_func_e.html b/functions_func_e.html index 0849aeaa..c3e8d916 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- e -

diff --git a/functions_func_f.html b/functions_func_f.html index 04fe801f..3457a498 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- f -

    +

    - f -

    • FileBrowserOptions() : Window::FileBrowserOptions
    • @@ -166,9 +107,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_g.html b/functions_func_g.html index 866985b7..79ed30d2 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- g -

diff --git a/functions_func_h.html b/functions_func_h.html index 6b6bd728..83aee834 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- h -

    +

    - h -

    • hide() : Widget
    • @@ -127,9 +68,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_i.html b/functions_func_i.html index a99e3d8c..c785d55e 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- i -

diff --git a/functions_func_k.html b/functions_func_k.html index 461c5ad9..b3045029 100644 --- a/functions_func_k.html +++ b/functions_func_k.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- k -

    +

    - k -

    • KeyboardEvent() : Widget::KeyboardEvent
    • @@ -127,9 +68,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_l.html b/functions_func_l.html index bb8a5a05..9df348d3 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,9 +60,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- l -

    +

    - l -

    • Line() -: Line< typename > +: Line< T >
    • linearGradient() : NanoVG @@ -148,9 +89,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_m.html b/functions_func_m.html index 9b13e501..d1bfff22 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- m -

diff --git a/functions_func_n.html b/functions_func_n.html index 5046742a..b66f8d51 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- n -

    +

    - n -

    • NanoImage() : NanoImage
    • @@ -133,9 +74,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_o.html b/functions_func_o.html index 17ca8616..65788633 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- o -

    +

    - o -

    • onDisplay() : ImageAboutWindow , ImageButton @@ -177,9 +118,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_p.html b/functions_func_p.html index 202ce7c8..0d09e6b3 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,13 +60,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- p -

diff --git a/functions_func_q.html b/functions_func_q.html index e965f02b..2a01521a 100644 --- a/functions_func_q.html +++ b/functions_func_q.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- q -

    +

    - q -

    • quadTo() : NanoVG
    • @@ -130,9 +71,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_r.html b/functions_func_r.html index b348a3d2..2d459323 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- r -

diff --git a/functions_func_s.html b/functions_func_s.html index f3f193ea..bd6b3387 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- s -

diff --git a/functions_func_t.html b/functions_func_t.html index afb9e1b8..d0d4bcb7 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- t -

diff --git a/functions_func_u.html b/functions_func_u.html index 0d624c2d..ca2a379b 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- u -

    +

    - u -

    • UI() : UI
    • @@ -136,9 +77,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_func_w.html b/functions_func_w.html index a89838e8..82b5f941 100644 --- a/functions_func_w.html +++ b/functions_func_w.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Functions + - @@ -21,7 +20,7 @@ - @@ -30,84 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -119,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  -

- w -

    +

    - w -

    • Widget() : Widget
    • @@ -130,9 +71,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_g.html b/functions_g.html index 02e5bc0a..22637219 100644 --- a/functions_g.html +++ b/functions_g.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- g -

diff --git a/functions_h.html b/functions_h.html index ea4d09a6..8ea6ab02 100644 --- a/functions_h.html +++ b/functions_h.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- h -

    +

    - h -

    • hide() : Widget
    • @@ -132,9 +72,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_i.html b/functions_i.html index b0584e00..733dbc95 100644 --- a/functions_i.html +++ b/functions_i.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- i -

diff --git a/functions_k.html b/functions_k.html index 0801de00..9f1c8346 100644 --- a/functions_k.html +++ b/functions_k.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- k -

    +

    - k -

    • kDataSize : MidiEvent
    • @@ -131,9 +71,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_l.html b/functions_l.html index c95756a0..892b0ece 100644 --- a/functions_l.html +++ b/functions_l.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,9 +60,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- l -

diff --git a/functions_m.html b/functions_m.html index 17504b8c..ae61a2e2 100644 --- a/functions_m.html +++ b/functions_m.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- m -

diff --git a/functions_n.html b/functions_n.html index 9e14c45f..e3cad232 100644 --- a/functions_n.html +++ b/functions_n.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- n -

    +

    - n -

    • name : AudioPort , Parameter @@ -138,9 +78,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_o.html b/functions_o.html index c6635930..0845feec 100644 --- a/functions_o.html +++ b/functions_o.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- o -

    +

    - o -

    • onDisplay() : ImageAboutWindow , ImageButton @@ -178,9 +118,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_p.html b/functions_p.html index 8df6bbda..f5460548 100644 --- a/functions_p.html +++ b/functions_p.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,13 +60,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- p -

diff --git a/functions_q.html b/functions_q.html index 289c1ccf..6ebaf812 100644 --- a/functions_q.html +++ b/functions_q.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- q -

    +

    - q -

    • quadTo() : NanoVG
    • @@ -131,9 +71,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_r.html b/functions_r.html index 844538f3..f9880760 100644 --- a/functions_r.html +++ b/functions_r.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- r -

diff --git a/functions_s.html b/functions_s.html index eaf84eaf..3e9c199f 100644 --- a/functions_s.html +++ b/functions_s.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- s -

diff --git a/functions_t.html b/functions_t.html index efb2d276..6c40aa62 100644 --- a/functions_t.html +++ b/functions_t.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- t -

diff --git a/functions_u.html b/functions_u.html index 82b15c4f..2e70d9a6 100644 --- a/functions_u.html +++ b/functions_u.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- u -

    +

    - u -

    • UI() : UI
    • @@ -140,9 +80,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_v.html b/functions_v.html index 39a64c20..893acc0f 100644 --- a/functions_v.html +++ b/functions_v.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,17 +60,23 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- v -

diff --git a/functions_vars.html b/functions_vars.html index 634c186a..0c98c854 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members - Variables + - @@ -21,7 +20,7 @@ - @@ -30,58 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - + + + + +
@@ -91,7 +58,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/functions_w.html b/functions_w.html index 7fec4d0c..98961cad 100644 --- a/functions_w.html +++ b/functions_w.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Class Members + - @@ -21,7 +20,7 @@ - @@ -30,85 +29,26 @@
+
DISTRHO Plugin Framework
- + - - - - + + + + +
@@ -120,7 +60,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented class members with links to the class documentation for each member:
-

- w -

    +

    - w -

    • Widget() : Widget
    • @@ -131,9 +71,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/group__AudioPortHints.html b/group__AudioPortHints.html index 1ab12c58..f5a47b4c 100644 --- a/group__AudioPortHints.html +++ b/group__AudioPortHints.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Audio Port Hints + - @@ -21,7 +20,7 @@ - @@ -30,41 +29,26 @@
+
DISTRHO Plugin Framework
- + - + + + + +
@@ -89,10 +73,11 @@ Variables
 

Detailed Description

-

Various audio port hints.

-
See Also
AudioPort::hints
+

Various audio port hints.

See also
AudioPort::hints

Variable Documentation

- + +

◆ kAudioPortIsCV

+
@@ -113,7 +98,9 @@ Variables - + +

◆ kAudioPortIsSidechain

+
@@ -137,9 +124,9 @@ Variables diff --git a/group__BasePluginStructs.html b/group__BasePluginStructs.html index 5be534cf..84d160b8 100644 --- a/group__BasePluginStructs.html +++ b/group__BasePluginStructs.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Base Plugin Structs + - @@ -21,7 +20,7 @@
- @@ -30,41 +29,26 @@
+
DISTRHO Plugin Framework
- + - + + + +
+
@@ -88,6 +72,10 @@ Classes
 
struct  ParameterRanges
 
struct  ParameterEnumerationValue
 
struct  ParameterEnumerationValues
 
struct  Parameter
 
struct  MidiEvent

Detailed Description

Enumeration Type Documentation

- + +

◆ ParameterDesignation

+
@@ -113,18 +103,16 @@ Enumerations
-

Parameter designation.
+

Parameter designation.
Allows a parameter to be specially designated for a task, like bypass.

-

Each designation is unique, there must be only one parameter that uses it.
+

Each designation is unique, there must be only one parameter that uses it.
The use of designated parameters is completely optional.

Note
Designated parameters have strict ranges.
-
See Also
ParameterRanges::adjustForDesignation()
+
See also
ParameterRanges::adjustForDesignation()
- -
Enumerator
kParameterDesignationNull  -

Null or unset designation.

+
Enumerator
kParameterDesignationNull 

Null or unset designation.

kParameterDesignationBypass  -

Bypass designation.
+

kParameterDesignationBypass 

Bypass designation.
When on (> 0.5f), it means the plugin must run in a bypassed state.

@@ -134,9 +122,9 @@ When on (> 0.5f), it means the plugin must run in a bypassed state.

diff --git a/group__EntryPoints.html b/group__EntryPoints.html index dfd2058a..43c5305d 100644 --- a/group__EntryPoints.html +++ b/group__EntryPoints.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Entry Points + - @@ -21,7 +20,7 @@ - @@ -30,41 +29,26 @@
+
DISTRHO Plugin Framework
- + - + + + +
+
@@ -90,7 +74,9 @@ Functions

Detailed Description

Function Documentation

- + +

◆ createPlugin()

+
@@ -106,7 +92,9 @@ Functions - + +

◆ createUI()

+
@@ -125,9 +113,9 @@ Functions diff --git a/group__MainClasses.html b/group__MainClasses.html index 7565ae7a..81d8ea52 100644 --- a/group__MainClasses.html +++ b/group__MainClasses.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Main Classes + - @@ -21,7 +20,7 @@
- @@ -30,41 +29,26 @@
+
DISTRHO Plugin Framework
- + - + + + +
+
@@ -92,9 +76,9 @@ Classes
- @@ -30,41 +29,26 @@
+
DISTRHO Plugin Framework
- + - + + + +
+
@@ -93,12 +77,15 @@ Variables
 
static const uint32_t kParameterIsOutput = 0x10
 
static const uint32_t kParameterIsTrigger = 0x20 | kParameterIsBoolean
 

Detailed Description

-

Various parameter hints.

-
See Also
Parameter::hints
+

Various parameter hints.

See also
Parameter::hints

Variable Documentation

- + +

◆ kParameterIsAutomable

+
@@ -115,12 +102,13 @@ Variables
-

Parameter is automable (real-time safe).

-
See Also
Plugin::setParameterValue(uint32_t, float)
+

Parameter is automable (real-time safe).

See also
Plugin::setParameterValue(uint32_t, float)
- + +

◆ kParameterIsBoolean

+
@@ -137,12 +125,14 @@ Variables
-

Parameter value is boolean.
+

Parameter value is boolean.
It's always at either minimum or maximum value.

- + +

◆ kParameterIsInteger

+
@@ -163,7 +153,9 @@ It's always at either minimum or maximum value.

- + +

◆ kParameterIsLogarithmic

+
@@ -184,7 +176,9 @@ It's always at either minimum or maximum value.

- + +

◆ kParameterIsOutput

+
@@ -201,20 +195,46 @@ It's always at either minimum or maximum value.

-

Parameter is of output type.
+

Parameter is of output type.
When unset, parameter is assumed to be of input type.

-

Parameter inputs are changed by the host and must not be changed by the plugin.
-The only exception being when changing programs, see Plugin::loadProgram().
+

Parameter inputs are changed by the host and must not be changed by the plugin.
+The only exception being when changing programs, see Plugin::loadProgram().
Outputs are changed by the plugin and never modified by the host.

+
+
+ +

◆ kParameterIsTrigger

+ +
+
+ + + + + +
+ + + + +
const uint32_t kParameterIsTrigger = 0x20 | kParameterIsBoolean
+
+static
+
+

Parameter value is a trigger.
+This means the value resets back to its default after each process/run call.
+Cannot be used for output parameters.

+
Note
Only officially supported under LV2. For other formats DPF simulates the behaviour.
+
diff --git a/group__PluginMacros.html b/group__PluginMacros.html index 4e1fc045..b393374f 100644 --- a/group__PluginMacros.html +++ b/group__PluginMacros.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Plugin Macros + - @@ -21,7 +20,7 @@ - @@ -30,41 +29,26 @@
+
DISTRHO Plugin Framework
- + - + + + + +
@@ -118,21 +102,22 @@ Macros

Detailed Description

C Macros that describe your plugin. (defined in the "DistrhoPluginInfo.h" file)

-

With these macros you can tell the host what features your plugin requires.
+

With these macros you can tell the host what features your plugin requires.
Depending on which macros you enable, new functions will be available to call and/or override.

-

All values are either integer or strings.
+

All values are either integer or strings.
For boolean-like values 1 means 'on' and 0 means 'off'.

-

The values defined in this group are for documentation purposes only.
+

The values defined in this group are for documentation purposes only.
All macros are disabled by default.

-

Only 4 macros are required, they are:

-
@@ -88,78 +64,81 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 12]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
oCApplication
|\CStandaloneWindow
oCAudioPort
oCTimePosition::BarBeatTick
oCWidget::BaseEvent
|oCWidget::KeyboardEvent
|oCWidget::MotionEvent
|oCWidget::MouseEvent
|oCWidget::ScrollEvent
|\CWidget::SpecialEvent
oCWindow::FileBrowserOptions::Buttons
oCImageButton::Callback
oCImageKnob::Callback
oCImageSlider::Callback
oCImageSwitch::Callback
oCCircle< typename >
oCColor
oCExternalWindow
oCWindow::FileBrowserOptions
oCNanoVG::GlyphPosition
oCIdleCallback
oCImage
oCLeakedObjectDetector< OwnerClass >
oCLine< typename >
oCMidiEvent
oCMutex
oCNanoImage
oCNanoVG
|\CNanoWidget
oCNanoVG::Paint
oCParameter
oCParameterRanges
oCPlugin
oCPoint< T >
oCPoint< float >
oCPoint< int >
oCRectangle< typename >
oCRectangle< int >
oCRecursiveMutex
oCWidget::ResizeEvent
oCScopedPointer< ObjectType >
oCScopeLocker< Mutex >
oCScopeTryLocker< Mutex >
oCScopeUnlocker< Mutex >
oCSignal
oCSize< T >
oCSize< uint >
oCString
oCNanoVG::TextRow
oCThread
oCTimePosition
oCTriangle< typename >
oCUIWidget
|\CUI
oCWidget
|oCImageAboutWindow
|oCImageButton
|oCImageKnob
|oCImageSlider
|oCImageSwitch
|\CNanoWidget
\CWindow
 oCImageAboutWindow
 \CStandaloneWindow
 CApplication
 CStandaloneWindow
 CAudioPort
 CTimePosition::BarBeatTick
 CWidget::BaseEvent
 CWidget::KeyboardEvent
 CWidget::MotionEvent
 CWidget::MouseEvent
 CWidget::ScrollEvent
 CWidget::SpecialEvent
 CWindow::FileBrowserOptions::Buttons
 CImageButton::Callback
 CImageKnob::Callback
 CImageSlider::Callback
 CImageSwitch::Callback
 CCircle< T >
 CColor
 CExternalWindow
 CWindow::FileBrowserOptions
 CNanoVG::GlyphPosition
 CIdleCallback
 CImage
 CLeakedObjectDetector< OwnerClass >
 CLine< T >
 CMidiEvent
 CMutex
 CNanoImage
 CNanoVG
 CNanoWidget
 CNanoVG::Paint
 CParameter
 CParameterEnumerationValue
 CParameterEnumerationValues
 CParameterRanges
 CPlugin
 CPoint< T >
 CPoint< float >
 CPoint< int >
 CRectangle< T >
 CRectangle< int >
 CRecursiveMutex
 CWidget::ResizeEvent
 CScopedPointer< ObjectType >
 CScopeLocker< Mutex >
 CScopeTryLocker< Mutex >
 CScopeUnlocker< Mutex >
 CSignal
 CSize< T >
 CSize< int >
 CSize< uint >
 CString
 CNanoVG::TextRow
 CThread
 CTimePosition
 CTriangle< T >
 CUIWidget
 CUI
 CWidget
 CImageAboutWindow
 CImageButton
 CImageKnob
 CImageSlider
 CImageSwitch
 CNanoWidget
 CWindow
 CImageAboutWindow
 CStandaloneWindow
diff --git a/index.html b/index.html index 5acdc2d1..55fd5563 100644 --- a/index.html +++ b/index.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: DISTRHO Plugin Framework + - @@ -21,7 +20,7 @@ - @@ -30,41 +29,26 @@
+
DISTRHO Plugin Framework
- + - + + + +
+
@@ -78,376 +62,39 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
DISTRHO Plugin Framework
-

DISTRHO Plugin Framework (or DPF for short) is a plugin framework designed to make development of new plugins an easy and enjoyable task.
-It allows developers to create plugins with custom UIs using a simple C++ API.
+

DISTRHO Plugin Framework (or DPF for short) is a plugin framework designed to make development of new plugins an easy and enjoyable task.
+It allows developers to create plugins with custom UIs using a simple C++ API.
The framework facilitates exporting various different plugin formats from the same code-base.

-

DPF can build for LADSPA, DSSI, LV2 and VST2 formats.
+

DPF can build for LADSPA, DSSI, LV2 and VST2 formats.
A JACK/Standalone mode is also available, allowing you to quickly test plugins.

Macros

-

You start by creating a "DistrhoPluginInfo.h" file describing the plugin via macros, see Plugin Macros.
+

You start by creating a "DistrhoPluginInfo.h" file describing the plugin via macros, see Plugin Macros.
This file is included in the main DPF code to select which features to activate for each plugin format.

-

For example, a plugin (with UI) that use states will require LV2 hosts to support Atom and Worker extensions for message passing from the UI to the plugin.
+

For example, a plugin (with UI) that use states will require LV2 hosts to support Atom and Worker extensions for message passing from the UI to the plugin.
If your plugin does not make use of states, the Worker extension is not set as a required feature.

Plugin

-

The next step is to create your plugin code by subclassing DPF's Plugin class.
+

The next step is to create your plugin code by subclassing DPF's Plugin class.
You need to pass the number of parameters in the constructor and also the number of programs and states, if any.

-

Here's an example of an audio plugin that simply mutes the host output:

-
class MutePlugin : public Plugin
-
{
-
public:
-
/**
-
Plugin class constructor.
-
*/
-
MutePlugin()
-
: Plugin(0, 0, 0) // 0 parameters, 0 programs and 0 states
-
{
-
}
-
-
protected:
-
/* ----------------------------------------------------------------------------------------
-
* Information */
-
-
/**
-
Get the plugin label.
-
This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.
-
*/
-
const char* getLabel() const override
-
{
-
return "Mute";
-
}
-
-
/**
-
Get the plugin author/maker.
-
*/
-
const char* getMaker() const override
-
{
-
return "DPF";
-
}
-
-
/**
-
Get the plugin license name (a single line of text).
-
For commercial plugins this should return some short copyright information.
-
*/
-
const char* getLicense() const override
-
{
-
return "MIT";
-
}
-
-
/**
-
Get the plugin version, in hexadecimal.
-
*/
-
uint32_t getVersion() const override
-
{
-
return d_version(1, 0, 0);
-
}
-
-
/**
-
Get the plugin unique Id.
-
This value is used by LADSPA, DSSI and VST plugin formats.
-
*/
-
int64_t getUniqueId() const override
-
{
-
return d_cconst('M', 'u', 't', 'e');
-
}
-
-
/* ----------------------------------------------------------------------------------------
-
* This example has no parameters, so skip parameter stuff */
-
-
void initParameter(uint32_t, Parameter&) override {}
-
float getParameterValue(uint32_t) const override { return 0.0f; }
-
void setParameterValue(uint32_t, float) override {}
-
-
/* ----------------------------------------------------------------------------------------
-
* Audio/MIDI Processing */
-
-
/**
-
Run/process function for plugins without MIDI input.
-
NOTE: Some parameters might be null if there are no audio inputs or outputs.
-
*/
-
void run(const float**, float** outputs, uint32_t frames) override
-
{
-
// get the left and right audio outputs
-
float* const outL = outputs[0];
-
float* const outR = outputs[1];
-
-
// mute audio
-
std::memset(outL, 0, sizeof(float)*frames);
-
std::memset(outR, 0, sizeof(float)*frames);
-
}
-
-
};
-

See the Plugin class for more information and to understand what each function does.

+

Here's an example of an audio plugin that simply mutes the host output:

class MutePlugin : public Plugin
{
public:
/**
Plugin class constructor.
*/
MutePlugin()
: Plugin(0, 0, 0) // 0 parameters, 0 programs and 0 states
{
}
protected:
/* ----------------------------------------------------------------------------------------
* Information */
/**
Get the plugin label.
This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.
*/
const char* getLabel() const override
{
return "Mute";
}
/**
Get the plugin author/maker.
*/
const char* getMaker() const override
{
return "DPF";
}
/**
Get the plugin license name (a single line of text).
For commercial plugins this should return some short copyright information.
*/
const char* getLicense() const override
{
return "MIT";
}
/**
Get the plugin version, in hexadecimal.
*/
uint32_t getVersion() const override
{
return d_version(1, 0, 0);
}
/**
Get the plugin unique Id.
This value is used by LADSPA, DSSI and VST plugin formats.
*/
int64_t getUniqueId() const override
{
return d_cconst('M', 'u', 't', 'e');
}
/* ----------------------------------------------------------------------------------------
* This example has no parameters, so skip parameter stuff */
void initParameter(uint32_t, Parameter&) override {}
float getParameterValue(uint32_t) const override { return 0.0f; }
void setParameterValue(uint32_t, float) override {}
/* ----------------------------------------------------------------------------------------
* Audio/MIDI Processing */
/**
Run/process function for plugins without MIDI input.
NOTE: Some parameters might be null if there are no audio inputs or outputs.
*/
void run(const float**, float** outputs, uint32_t frames) override
{
// get the left and right audio outputs
float* const outL = outputs[0];
float* const outR = outputs[1];
// mute audio
std::memset(outL, 0, sizeof(float)*frames);
std::memset(outR, 0, sizeof(float)*frames);
}
};

See the Plugin class for more information and to understand what each function does.

Parameters

-

A plugin is nothing without parameters.
-In DPF parameters can be inputs or outputs.
-They have hints to describe how they behave plus a name and a symbol identifying them.
+

A plugin is nothing without parameters.
+In DPF parameters can be inputs or outputs.
+They have hints to describe how they behave plus a name and a symbol identifying them.
Parameters also have 'ranges' – a minimum, maximum and default value.

-

Input parameters are "read-only": the plugin can read them but not change them. (the exception being when changing programs, more on that below)
+

Input parameters are "read-only": the plugin can read them but not change them. (the exception being when changing programs, more on that below)
It's the host responsibility to save, restore and set input parameters.

-

Output parameters can be changed at anytime by the plugin.
+

Output parameters can be changed at anytime by the plugin.
The host will simply read their values and not change them.

-

Here's an example of an audio plugin that has 1 input parameter:

-
class GainPlugin : public Plugin
-
{
-
public:
-
/**
-
Plugin class constructor.
-
You must set all parameter values to their defaults, matching ParameterRanges::def.
-
*/
-
GainPlugin()
-
: Plugin(1, 0, 0), // 1 parameter, 0 programs and 0 states
-
fGain(1.0f)
-
{
-
}
-
-
protected:
-
/* ----------------------------------------------------------------------------------------
-
* Information */
-
-
const char* getLabel() const override
-
{
-
return "Gain";
-
}
-
-
const char* getMaker() const override
-
{
-
return "DPF";
-
}
-
-
const char* getLicense() const override
-
{
-
return "MIT";
-
}
-
-
uint32_t getVersion() const override
-
{
-
return d_version(1, 0, 0);
-
}
-
-
int64_t getUniqueId() const override
-
{
-
return d_cconst('G', 'a', 'i', 'n');
-
}
-
-
/* ----------------------------------------------------------------------------------------
-
* Init */
-
-
/**
-
Initialize a parameter.
-
This function will be called once, shortly after the plugin is created.
-
*/
-
void initParameter(uint32_t index, Parameter& parameter) override
-
{
-
// we only have one parameter so we can skip checking the index
-
- -
parameter.name = "Gain";
-
parameter.symbol = "gain";
-
parameter.ranges.min = 0.0f;
-
parameter.ranges.max = 2.0f;
-
parameter.ranges.def = 1.0f;
-
}
-
-
/* ----------------------------------------------------------------------------------------
-
* Internal data */
-
-
/**
-
Get the current value of a parameter.
-
*/
-
float getParameterValue(uint32_t index) const override
-
{
-
// same as before, ignore index check
-
-
return fGain;
-
}
-
-
/**
-
Change a parameter value.
-
*/
-
void setParameterValue(uint32_t index, float value) override
-
{
-
// same as before, ignore index check
-
-
fGain = value;
-
}
-
-
/* ----------------------------------------------------------------------------------------
-
* Audio/MIDI Processing */
-
-
void run(const float**, float** outputs, uint32_t frames) override
-
{
-
// get the mono input and output
-
const float* const in = inputs[0];
-
/* */ float* const out = outputs[0];
-
-
// apply gain against all samples
-
for (uint32_t i=0; i < frames; ++i)
-
out[i] = in[i] * fGain;
-
}
-
-
private:
-
float fGain;
-
};
-

See the Parameter struct for more information about parameters.

+

Here's an example of an audio plugin that has 1 input parameter:

class GainPlugin : public Plugin
{
public:
/**
Plugin class constructor.
You must set all parameter values to their defaults, matching ParameterRanges::def.
*/
GainPlugin()
: Plugin(1, 0, 0), // 1 parameter, 0 programs and 0 states
fGain(1.0f)
{
}
protected:
/* ----------------------------------------------------------------------------------------
* Information */
const char* getLabel() const override
{
return "Gain";
}
const char* getMaker() const override
{
return "DPF";
}
const char* getLicense() const override
{
return "MIT";
}
uint32_t getVersion() const override
{
return d_version(1, 0, 0);
}
int64_t getUniqueId() const override
{
return d_cconst('G', 'a', 'i', 'n');
}
/* ----------------------------------------------------------------------------------------
* Init */
/**
Initialize a parameter.
This function will be called once, shortly after the plugin is created.
*/
void initParameter(uint32_t index, Parameter& parameter) override
{
// we only have one parameter so we can skip checking the index
parameter.name = "Gain";
parameter.symbol = "gain";
parameter.ranges.min = 0.0f;
parameter.ranges.max = 2.0f;
parameter.ranges.def = 1.0f;
}
/* ----------------------------------------------------------------------------------------
* Internal data */
/**
Get the current value of a parameter.
*/
float getParameterValue(uint32_t index) const override
{
// same as before, ignore index check
return fGain;
}
/**
Change a parameter value.
*/
void setParameterValue(uint32_t index, float value) override
{
// same as before, ignore index check
fGain = value;
}
/* ----------------------------------------------------------------------------------------
* Audio/MIDI Processing */
void run(const float**, float** outputs, uint32_t frames) override
{
// get the mono input and output
const float* const in = inputs[0];
/* */ float* const out = outputs[0];
// apply gain against all samples
for (uint32_t i=0; i < frames; ++i)
out[i] = in[i] * fGain;
}
private:
float fGain;
};

See the Parameter struct for more information about parameters.

Programs

Programs in DPF refer to plugin-side presets (usually called "factory presets"), an initial set of presets provided by plugin authors included in the actual plugin.

-

To use programs you must first enable them by setting DISTRHO_PLUGIN_WANT_PROGRAMS to 1 in your DistrhoPluginInfo.h file.
+

To use programs you must first enable them by setting DISTRHO_PLUGIN_WANT_PROGRAMS to 1 in your DistrhoPluginInfo.h file.
When enabled you'll need to override 2 new function in your plugin code, Plugin::initProgramName(uint32_t, String&) and Plugin::loadProgram(uint32_t).

-

Here's an example of a plugin with a "default" program:

-
class PluginWithPresets : public Plugin
-
{
-
public:
-
PluginWithPresets()
-
: Plugin(2, 1, 0), // 2 parameters, 1 program and 0 states
-
fGainL(1.0f),
-
fGainR(1.0f),
-
{
-
}
-
-
protected:
-
/* ----------------------------------------------------------------------------------------
-
* Information */
-
-
const char* getLabel() const override
-
{
-
return "Prog";
-
}
-
-
const char* getMaker() const override
-
{
-
return "DPF";
-
}
-
-
const char* getLicense() const override
-
{
-
return "MIT";
-
}
-
-
uint32_t getVersion() const override
-
{
-
return d_version(1, 0, 0);
-
}
-
-
int64_t getUniqueId() const override
-
{
-
return d_cconst('P', 'r', 'o', 'g');
-
}
-
-
/* ----------------------------------------------------------------------------------------
-
* Init */
-
-
/**
-
Initialize a parameter.
-
This function will be called once, shortly after the plugin is created.
-
*/
-
void initParameter(uint32_t index, Parameter& parameter) override
-
{
- -
parameter.ranges.min = 0.0f;
-
parameter.ranges.max = 2.0f;
-
parameter.ranges.def = 1.0f;
-
-
switch (index)
-
{
-
case 0;
-
parameter.name = "Gain Right";
-
parameter.symbol = "gainR";
-
break;
-
case 1;
-
parameter.name = "Gain Left";
-
parameter.symbol = "gainL";
-
break;
-
}
-
}
-
-
/**
-
Set the name of the program @a index.
-
This function will be called once, shortly after the plugin is created.
-
*/
-
void initProgramName(uint32_t index, String& programName)
-
{
-
switch(index)
-
{
-
case 0:
-
programName = "Default";
-
break;
-
}
-
}
-
-
/* ----------------------------------------------------------------------------------------
-
* Internal data */
-
-
/**
-
Get the current value of a parameter.
-
*/
-
float getParameterValue(uint32_t index) const override
-
{
-
switch (index)
-
{
-
case 0;
-
return fGainL;
-
case 1;
-
return fGainR;
-
}
-
}
-
-
/**
-
Change a parameter value.
-
*/
-
void setParameterValue(uint32_t index, float value) override
-
{
-
switch (index)
-
{
-
case 0;
-
fGainL = value;
-
break;
-
case 1;
-
fGainR = value;
-
break;
-
}
-
}
-
-
/**
-
Load a program.
-
*/
-
void loadProgram(uint32_t index)
-
{
-
switch(index)
-
{
-
case 0:
-
fGainL = 1.0f;
-
fGainR = 1.0f;
-
break;
-
}
-
}
-
-
/* ----------------------------------------------------------------------------------------
-
* Audio/MIDI Processing */
-
-
void run(const float**, float** outputs, uint32_t frames) override
-
{
-
// get the left and right audio buffers
-
const float* const inL = inputs[0];
-
const float* const inR = inputs[0];
-
/* */ float* const outL = outputs[0];
-
/* */ float* const outR = outputs[0];
-
-
// apply gain against all samples
-
for (uint32_t i=0; i < frames; ++i)
-
{
-
outL[i] = inL[i] * fGainL;
-
outR[i] = inR[i] * fGainR;
-
}
-
}
-
-
private:
-
float fGainL, fGainR;
-
};
-

+

Here's an example of a plugin with a "default" program:

class PluginWithPresets : public Plugin
{
public:
PluginWithPresets()
: Plugin(2, 1, 0), // 2 parameters, 1 program and 0 states
fGainL(1.0f),
fGainR(1.0f),
{
}
protected:
/* ----------------------------------------------------------------------------------------
* Information */
const char* getLabel() const override
{
return "Prog";
}
const char* getMaker() const override
{
return "DPF";
}
const char* getLicense() const override
{
return "MIT";
}
uint32_t getVersion() const override
{
return d_version(1, 0, 0);
}
int64_t getUniqueId() const override
{
return d_cconst('P', 'r', 'o', 'g');
}
/* ----------------------------------------------------------------------------------------
* Init */
/**
Initialize a parameter.
This function will be called once, shortly after the plugin is created.
*/
void initParameter(uint32_t index, Parameter& parameter) override
{
parameter.ranges.min = 0.0f;
parameter.ranges.max = 2.0f;
parameter.ranges.def = 1.0f;
switch (index)
{
case 0;
parameter.name = "Gain Right";
parameter.symbol = "gainR";
break;
case 1;
parameter.name = "Gain Left";
parameter.symbol = "gainL";
break;
}
}
/**
Set the name of the program @a index.
This function will be called once, shortly after the plugin is created.
*/
void initProgramName(uint32_t index, String& programName)
{
switch(index)
{
case 0:
programName = "Default";
break;
}
}
/* ----------------------------------------------------------------------------------------
* Internal data */
/**
Get the current value of a parameter.
*/
float getParameterValue(uint32_t index) const override
{
switch (index)
{
case 0;
return fGainL;
case 1;
return fGainR;
}
}
/**
Change a parameter value.
*/
void setParameterValue(uint32_t index, float value) override
{
switch (index)
{
case 0;
fGainL = value;
break;
case 1;
fGainR = value;
break;
}
}
/**
Load a program.
*/
void loadProgram(uint32_t index)
{
switch(index)
{
case 0:
fGainL = 1.0f;
fGainR = 1.0f;
break;
}
}
/* ----------------------------------------------------------------------------------------
* Audio/MIDI Processing */
void run(const float**, float** outputs, uint32_t frames) override
{
// get the left and right audio buffers
const float* const inL = inputs[0];
const float* const inR = inputs[0];
/* */ float* const outL = outputs[0];
/* */ float* const outR = outputs[0];
// apply gain against all samples
for (uint32_t i=0; i < frames; ++i)
{
outL[i] = inL[i] * fGainL;
outR[i] = inR[i] * fGainR;
}
}
private:
float fGainL, fGainR;
};

States

describe them

@@ -465,9 +112,9 @@ UI

diff --git a/jquery.js b/jquery.js index c197801c..f5343eda 100644 --- a/jquery.js +++ b/jquery.js @@ -13,19 +13,75 @@ * * Date: Mon Nov 21 21:11:03 2011 -0500 */ -(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; -if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); /*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ -(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 -},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/
","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av); -ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; -if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b -})}})(window); +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/
",""],legend:[1,"
","
"],thead:[1,"
","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' + + + +
+
+
ParameterEnumerationValue Member List
+
+
+ +

This is the complete list of members for ParameterEnumerationValue, including all inherited members.

+
+ + + + +
labelParameterEnumerationValue
ParameterEnumerationValue() noexceptParameterEnumerationValueinline
ParameterEnumerationValue(float v, const char *l) noexceptParameterEnumerationValueinline
valueParameterEnumerationValue
+ + + + diff --git a/structParameterEnumerationValue.html b/structParameterEnumerationValue.html new file mode 100644 index 00000000..b4e05d4f --- /dev/null +++ b/structParameterEnumerationValue.html @@ -0,0 +1,196 @@ + + + + + + + +DISTRHO Plugin Framework: ParameterEnumerationValue Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
DISTRHO Plugin Framework +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
ParameterEnumerationValue Struct Reference
+
+
+ +

#include <DistrhoPlugin.hpp>

+ + + + + + +

+Public Member Functions

 ParameterEnumerationValue () noexcept
 
 ParameterEnumerationValue (float v, const char *l) noexcept
 
+ + + + + +

+Public Attributes

float value
 
String label
 
+

Detailed Description

+

Parameter enumeration value.
+A string representation of a plugin parameter value.
+Used together can be used to give meaning to parameter values, working as an enumeration.

+

Constructor & Destructor Documentation

+ +

◆ ParameterEnumerationValue() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
ParameterEnumerationValue::ParameterEnumerationValue ()
+
+inlinenoexcept
+
+

Default constructor, using 0.0 as value and empty label.

+ +
+
+ +

◆ ParameterEnumerationValue() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
ParameterEnumerationValue::ParameterEnumerationValue (float v,
const char * l 
)
+
+inlinenoexcept
+
+

Constructor using custom values.

+ +
+
+

Member Data Documentation

+ +

◆ value

+ +
+
+ + + + +
float ParameterEnumerationValue::value
+
+

Parameter value.

+ +
+
+ +

◆ label

+ +
+
+ + + + +
String ParameterEnumerationValue::label
+
+

String representation of this value.

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/structParameterEnumerationValues-members.html b/structParameterEnumerationValues-members.html new file mode 100644 index 00000000..713e3943 --- /dev/null +++ b/structParameterEnumerationValues-members.html @@ -0,0 +1,82 @@ + + + + + + + +DISTRHO Plugin Framework: Member List + + + + + + + + + +
+
+ + + + + + +
+
DISTRHO Plugin Framework +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
ParameterEnumerationValues Member List
+
+
+ +

This is the complete list of members for ParameterEnumerationValues, including all inherited members.

+ + + + + + + +
countParameterEnumerationValues
ParameterEnumerationValues() noexceptParameterEnumerationValuesinline
ParameterEnumerationValues(uint32_t c, bool r, const ParameterEnumerationValue *v) noexceptParameterEnumerationValuesinline
restrictedModeParameterEnumerationValues
valuesParameterEnumerationValues
~ParameterEnumerationValues() noexcept (defined in ParameterEnumerationValues)ParameterEnumerationValuesinline
+ + + + diff --git a/structParameterEnumerationValues.html b/structParameterEnumerationValues.html new file mode 100644 index 00000000..3cbdaf58 --- /dev/null +++ b/structParameterEnumerationValues.html @@ -0,0 +1,221 @@ + + + + + + + +DISTRHO Plugin Framework: ParameterEnumerationValues Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
DISTRHO Plugin Framework +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
ParameterEnumerationValues Struct Reference
+
+
+ +

#include <DistrhoPlugin.hpp>

+ + + + + + +

+Public Member Functions

 ParameterEnumerationValues () noexcept
 
 ParameterEnumerationValues (uint32_t c, bool r, const ParameterEnumerationValue *v) noexcept
 
+ + + + + + + +

+Public Attributes

uint8_t count
 
bool restrictedMode
 
const ParameterEnumerationValuevalues
 
+

Detailed Description

+

Collection of parameter enumeration values.
+Handy class to handle the lifetime and count of all enumeration values.

+

Constructor & Destructor Documentation

+ +

◆ ParameterEnumerationValues() [1/2]

+ +
+
+ + + + + +
+ + + + + + + +
ParameterEnumerationValues::ParameterEnumerationValues ()
+
+inlinenoexcept
+
+

Default constructor, for zero enumeration values.

+ +
+
+ +

◆ ParameterEnumerationValues() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
ParameterEnumerationValues::ParameterEnumerationValues (uint32_t c,
bool r,
const ParameterEnumerationValuev 
)
+
+inlinenoexcept
+
+

Constructor using custom values.
+The pointer to must have been allocated on the heap with new.

+ +
+
+

Member Data Documentation

+ +

◆ count

+ +
+
+ + + + +
uint8_t ParameterEnumerationValues::count
+
+

Number of elements allocated in .

+ +
+
+ +

◆ restrictedMode

+ +
+
+ + + + +
bool ParameterEnumerationValues::restrictedMode
+
+

Wherever the host is to be restricted to only use enumeration values.

+
Note
This mode is only a hint! Not all hosts and plugin formats support this mode.
+ +
+
+ +

◆ values

+ +
+
+ + + + +
const ParameterEnumerationValue* ParameterEnumerationValues::values
+
+

Array of items.
+This pointer must be null or have been allocated on the heap with new.

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/structParameterRanges-members.html b/structParameterRanges-members.html index b287fe3d..9d0d2ef2 100644 --- a/structParameterRanges-members.html +++ b/structParameterRanges-members.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -103,9 +79,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structParameterRanges.html b/structParameterRanges.html index 17451abe..a1b90daa 100644 --- a/structParameterRanges.html +++ b/structParameterRanges.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: ParameterRanges Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -122,12 +98,14 @@ Public Attributes
 

Detailed Description

-

Parameter ranges.
+

Parameter ranges.
This is used to set the default, minimum and maximum values of a parameter.

-

By default a parameter has 0.0 as minimum, 1.0 as maximum and 0.0 as default.
+

By default a parameter has 0.0 as minimum, 1.0 as maximum and 0.0 as default.
When changing this struct values you must ensure maximum > minimum and default is within range.

Constructor & Destructor Documentation

- + +

◆ ParameterRanges() [1/2]

+
@@ -151,7 +129,9 @@ When changing this struct values you must ensure maximum > minimum and defaul - + +

◆ ParameterRanges() [2/2]

+
@@ -193,7 +173,9 @@ When changing this struct values you must ensure maximum > minimum and defaul

Member Function Documentation

- + +

◆ fixDefault()

+
@@ -217,7 +199,9 @@ When changing this struct values you must ensure maximum > minimum and defaul - + +

◆ fixValue()

+
@@ -242,7 +226,9 @@ When changing this struct values you must ensure maximum > minimum and defaul - + +

◆ getFixedValue()

+
@@ -267,7 +253,9 @@ When changing this struct values you must ensure maximum > minimum and defaul - + +

◆ getNormalizedValue()

+
@@ -292,7 +280,9 @@ When changing this struct values you must ensure maximum > minimum and defaul - + +

◆ getFixedAndNormalizedValue()

+
@@ -317,7 +307,9 @@ When changing this struct values you must ensure maximum > minimum and defaul - + +

◆ getUnnormalizedValue()

+
@@ -343,7 +335,9 @@ When changing this struct values you must ensure maximum > minimum and defaul

Member Data Documentation

- + +

◆ def

+
@@ -356,7 +350,9 @@ When changing this struct values you must ensure maximum > minimum and defaul - + +

◆ min

+
@@ -369,7 +365,9 @@ When changing this struct values you must ensure maximum > minimum and defaul - + +

◆ max

+
@@ -388,9 +386,9 @@ When changing this struct values you must ensure maximum > minimum and defaul diff --git a/structTimePosition-members.html b/structTimePosition-members.html index 4b099c85..03399228 100644 --- a/structTimePosition-members.html +++ b/structTimePosition-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -96,9 +72,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structTimePosition.html b/structTimePosition.html index 4a789cc5..3682af5c 100644 --- a/structTimePosition.html +++ b/structTimePosition.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: TimePosition Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -110,17 +86,19 @@ Public Attributes
 
uint64_t frame
 
+
struct TimePosition::BarBeatTick bbt
 

Detailed Description

-

Time position.
-The playing and frame values are always valid.
+

Time position.
+The playing and frame values are always valid.
BBT values are only valid when bbt.valid is true.

This struct is inspired by the JACK Transport API.

Constructor & Destructor Documentation

- + +

◆ TimePosition()

+
@@ -145,7 +123,9 @@ BBT values are only valid when bbt.valid is true.

Member Data Documentation

- + +

◆ playing

+
@@ -158,7 +138,9 @@ BBT values are only valid when bbt.valid is true.

- + +

◆ frame

+
@@ -177,9 +159,9 @@ BBT values are only valid when bbt.valid is true.

diff --git a/structTimePosition_1_1BarBeatTick-members.html b/structTimePosition_1_1BarBeatTick-members.html index 6861d151..5ac6e7bd 100644 --- a/structTimePosition_1_1BarBeatTick-members.html +++ b/structTimePosition_1_1BarBeatTick-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -106,9 +82,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structTimePosition_1_1BarBeatTick.html b/structTimePosition_1_1BarBeatTick.html index 8509670a..8507fec7 100644 --- a/structTimePosition_1_1BarBeatTick.html +++ b/structTimePosition_1_1BarBeatTick.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: TimePosition::BarBeatTick Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -126,7 +102,9 @@ Public Attributes
@@ -151,7 +129,9 @@ Public Attributes

Member Data Documentation

- + +

◆ valid

+
@@ -160,12 +140,14 @@ Public Attributes
-

Wherever the host transport is using BBT.
+

Wherever the host transport is using BBT.
If false you must not read from this struct.

- + +

◆ bar

+
@@ -174,13 +156,15 @@ If false you must not read from this struct.

-

Current bar.
-Should always be > 0.
+

Current bar.
+Should always be > 0.
The first bar is bar '1'.

- + +

◆ beat

+
@@ -189,13 +173,15 @@ The first bar is bar '1'.

-

Current beat within bar.
-Should always be > 0 and <= beatsPerBar.
+

Current beat within bar.
+Should always be > 0 and <= beatsPerBar.
The first beat is beat '1'.

- + +

◆ tick

+
@@ -204,13 +190,15 @@ The first beat is beat '1'.

-

Current tick within beat.
-Should always be > 0 and <= ticksPerBeat.
+

Current tick within beat.
+Should always be > 0 and <= ticksPerBeat.
The first tick is tick '0'.

- + +

◆ barStartTick

+
@@ -223,7 +211,9 @@ The first tick is tick '0'.

- + +

◆ beatsPerBar

+
@@ -236,7 +226,9 @@ The first tick is tick '0'.

- + +

◆ beatType

+
@@ -249,7 +241,9 @@ The first tick is tick '0'.

- + +

◆ ticksPerBeat

+
@@ -258,12 +252,14 @@ The first tick is tick '0'.

-

Number of ticks within a bar.
+

Number of ticks within a bar.
Usually a moderately large integer with many denominators, such as 1920.0.

- + +

◆ beatsPerMinute

+
@@ -282,9 +278,9 @@ Usually a moderately large integer with many denominators, such as 1920.0.

diff --git a/structWidget_1_1BaseEvent-members.html b/structWidget_1_1BaseEvent-members.html index ff2ec7a9..32ab2fd3 100644 --- a/structWidget_1_1BaseEvent-members.html +++ b/structWidget_1_1BaseEvent-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -100,9 +76,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWidget_1_1BaseEvent.html b/structWidget_1_1BaseEvent.html index 20ca39b8..a0afd61b 100644 --- a/structWidget_1_1BaseEvent.html +++ b/structWidget_1_1BaseEvent.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Widget::BaseEvent Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -119,18 +95,19 @@ Public Member Functions
- -

Public Attributes

+
uint mod
 
+
uint32_t time
 

Detailed Description

-

Base event data. mod The currently active keyboard modifiers,

-
See Also
Modifier. time The timestamp (if any).
+

Base event data. mod The currently active keyboard modifiers,

See also
Modifier. time The timestamp (if any).

Constructor & Destructor Documentation

- + +

◆ BaseEvent()

+
@@ -154,7 +131,9 @@ uint32_t  - + +

◆ ~BaseEvent()

+
time
@@ -184,9 +163,9 @@ uint32_t  diff --git a/structWidget_1_1KeyboardEvent-members.html b/structWidget_1_1KeyboardEvent-members.html index bac7ca40..9a51ce52 100644 --- a/structWidget_1_1KeyboardEvent-members.html +++ b/structWidget_1_1KeyboardEvent-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
time
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -103,9 +79,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWidget_1_1KeyboardEvent.html b/structWidget_1_1KeyboardEvent.html index 70a8f008..874c8d7d 100644 --- a/structWidget_1_1KeyboardEvent.html +++ b/structWidget_1_1KeyboardEvent.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Widget::KeyboardEvent Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -118,25 +94,26 @@ Public Member Functions
- - - -

Public Attributes

+
bool press
 
+
uint key
 
- Public Attributes inherited from Widget::BaseEvent
+
uint mod
 
+
uint32_t time
 

Detailed Description

-

Keyboard event. press True if the key was pressed, false if released. key Unicode point of the key pressed.

-
See Also
onKeyboard
+

Keyboard event. press True if the key was pressed, false if released. key Unicode point of the key pressed.

See also
onKeyboard

Constructor & Destructor Documentation

- + +

◆ KeyboardEvent()

+
@@ -166,9 +143,9 @@ uint32_t  diff --git a/structWidget_1_1MotionEvent-members.html b/structWidget_1_1MotionEvent-members.html index 13977823..09a1ded9 100644 --- a/structWidget_1_1MotionEvent-members.html +++ b/structWidget_1_1MotionEvent-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
time
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -102,9 +78,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWidget_1_1MotionEvent.html b/structWidget_1_1MotionEvent.html index 24c6f536..598b0bea 100644 --- a/structWidget_1_1MotionEvent.html +++ b/structWidget_1_1MotionEvent.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Widget::MotionEvent Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -118,22 +94,23 @@ Public Member Functions
- - -

Public Attributes

+
Point< int > pos
 
- Public Attributes inherited from Widget::BaseEvent
+
uint mod
 
+
uint32_t time
 

Detailed Description

-

Mouse motion event. pos The widget-relative coordinates of the pointer.

-
See Also
onMotion
+

Mouse motion event. pos The widget-relative coordinates of the pointer.

See also
onMotion

Constructor & Destructor Documentation

- + +

◆ MotionEvent()

+
@@ -163,9 +140,9 @@ uint32_t  diff --git a/structWidget_1_1MouseEvent-members.html b/structWidget_1_1MouseEvent-members.html index 7c453618..d20bee4c 100644 --- a/structWidget_1_1MouseEvent-members.html +++ b/structWidget_1_1MouseEvent-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
time
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -104,9 +80,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWidget_1_1MouseEvent.html b/structWidget_1_1MouseEvent.html index 075635bd..98913c50 100644 --- a/structWidget_1_1MouseEvent.html +++ b/structWidget_1_1MouseEvent.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Widget::MouseEvent Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -118,28 +94,29 @@ Public Member Functions
- - - - -

Public Attributes

+
int button
 
+
bool press
 
+
Point< int > pos
 
- Public Attributes inherited from Widget::BaseEvent
+
uint mod
 
+
uint32_t time
 

Detailed Description

-

Mouse event. button The button number (1 = left, 2 = middle, 3 = right). press True if the button was pressed, false if released. pos The widget-relative coordinates of the pointer.

-
See Also
onMouse
+

Mouse event. button The button number (1 = left, 2 = middle, 3 = right). press True if the button was pressed, false if released. pos The widget-relative coordinates of the pointer.

See also
onMouse

Constructor & Destructor Documentation

- + +

◆ MouseEvent()

+
@@ -169,9 +146,9 @@ uint32_t  diff --git a/structWidget_1_1ResizeEvent-members.html b/structWidget_1_1ResizeEvent-members.html index 016037dd..bc25c5ca 100644 --- a/structWidget_1_1ResizeEvent-members.html +++ b/structWidget_1_1ResizeEvent-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
time
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -99,9 +75,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWidget_1_1ResizeEvent.html b/structWidget_1_1ResizeEvent.html index 3a32c388..28634a54 100644 --- a/structWidget_1_1ResizeEvent.html +++ b/structWidget_1_1ResizeEvent.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Widget::ResizeEvent Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -104,18 +80,19 @@ Public Member Functions
- -

Public Attributes

+
Size< uint > size
 
+
Size< uint > oldSize
 

Detailed Description

-

Resize event. size The new widget size. oldSize The previous size, may be null.

-
See Also
onResize
+

Resize event. size The new widget size. oldSize The previous size, may be null.

See also
onResize

Constructor & Destructor Documentation

- + +

◆ ResizeEvent()

+
@@ -145,9 +122,9 @@ Public Attributes diff --git a/structWidget_1_1ScrollEvent-members.html b/structWidget_1_1ScrollEvent-members.html index 325e3dd1..c7f1c4f2 100644 --- a/structWidget_1_1ScrollEvent-members.html +++ b/structWidget_1_1ScrollEvent-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -103,9 +79,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWidget_1_1ScrollEvent.html b/structWidget_1_1ScrollEvent.html index 418fa661..54613291 100644 --- a/structWidget_1_1ScrollEvent.html +++ b/structWidget_1_1ScrollEvent.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Widget::ScrollEvent Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -118,25 +94,26 @@ Public Member Functions
- - - -

Public Attributes

+
Point< int > pos
 
+
Point< float > delta
 
- Public Attributes inherited from Widget::BaseEvent
+
uint mod
 
+
uint32_t time
 

Detailed Description

-

Mouse scroll event. pos The widget-relative coordinates of the pointer. delta The scroll distance.

-
See Also
onScroll
+

Mouse scroll event. pos The widget-relative coordinates of the pointer. delta The scroll distance.

See also
onScroll

Constructor & Destructor Documentation

- + +

◆ ScrollEvent()

+
@@ -166,9 +143,9 @@ uint32_t  diff --git a/structWidget_1_1SpecialEvent-members.html b/structWidget_1_1SpecialEvent-members.html index 18a350ca..b7e94d31 100644 --- a/structWidget_1_1SpecialEvent-members.html +++ b/structWidget_1_1SpecialEvent-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
time
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -103,9 +79,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWidget_1_1SpecialEvent.html b/structWidget_1_1SpecialEvent.html index 5aa0065b..37b57113 100644 --- a/structWidget_1_1SpecialEvent.html +++ b/structWidget_1_1SpecialEvent.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Widget::SpecialEvent Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -118,25 +94,26 @@ Public Member Functions
- - - -

Public Attributes

+
bool press
 
+
Key key
 
- Public Attributes inherited from Widget::BaseEvent
+
uint mod
 
+
uint32_t time
 

Detailed Description

-

Special keyboard event. press True if the key was pressed, false if released. key The key pressed.

-
See Also
onSpecial
+

Special keyboard event. press True if the key was pressed, false if released. key The key pressed.

See also
onSpecial

Constructor & Destructor Documentation

- + +

◆ SpecialEvent()

+
@@ -166,9 +143,9 @@ uint32_t  diff --git a/structWindow_1_1FileBrowserOptions-members.html b/structWindow_1_1FileBrowserOptions-members.html index e5640e0b..3ff6397a 100644 --- a/structWindow_1_1FileBrowserOptions-members.html +++ b/structWindow_1_1FileBrowserOptions-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
time
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -102,9 +78,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWindow_1_1FileBrowserOptions.html b/structWindow_1_1FileBrowserOptions.html index 9537b7b4..796f5c86 100644 --- a/structWindow_1_1FileBrowserOptions.html +++ b/structWindow_1_1FileBrowserOptions.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Window::FileBrowserOptions Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -110,27 +86,28 @@ Public Member Functions
- - - - - +

Public Attributes

+
const char * startDir
 
+
const char * title
 
+
uint width
 
+
uint height
 
-struct
-Window::FileBrowserOptions::Buttons 
buttons
+struct Window::FileBrowserOptions::Buttons buttons
 

Detailed Description

File browser options.

Constructor & Destructor Documentation

- + +

◆ FileBrowserOptions()

+
@@ -160,9 +137,9 @@ struct
diff --git a/structWindow_1_1FileBrowserOptions_1_1Buttons-members.html b/structWindow_1_1FileBrowserOptions_1_1Buttons-members.html index 269bd9de..0f89e51b 100644 --- a/structWindow_1_1FileBrowserOptions_1_1Buttons-members.html +++ b/structWindow_1_1FileBrowserOptions_1_1Buttons-members.html @@ -3,16 +3,15 @@ - + +DISTRHO Plugin Framework: Member List + - @@ -21,7 +20,7 @@
- @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -100,9 +76,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
diff --git a/structWindow_1_1FileBrowserOptions_1_1Buttons.html b/structWindow_1_1FileBrowserOptions_1_1Buttons.html index a9721fe7..b06fe865 100644 --- a/structWindow_1_1FileBrowserOptions_1_1Buttons.html +++ b/structWindow_1_1FileBrowserOptions_1_1Buttons.html @@ -3,16 +3,15 @@ - + + DISTRHO Plugin Framework: Window::FileBrowserOptions::Buttons Struct Reference + - @@ -21,7 +20,7 @@ - @@ -30,48 +29,25 @@
+
DISTRHO Plugin Framework
- + - - + + + + +
@@ -104,13 +80,13 @@ Public Member Functions
- - -

Public Attributes

+
uint listAllFiles
 
+
uint showHidden
 
+
uint showPlaces
 
@@ -118,7 +94,9 @@ uint 
showPlaces
@@ -148,9 +126,9 @@ uint  diff --git a/tabs.css b/tabs.css index 9cf578f2..bbde11ed 100644 --- a/tabs.css +++ b/tabs.css @@ -1,60 +1 @@ -.tabs, .tabs2, .tabs3 { - background-image: url('tab_b.png'); - width: 100%; - z-index: 101; - font-size: 13px; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; -} - -.tabs2 { - font-size: 10px; -} -.tabs3 { - font-size: 9px; -} - -.tablist { - margin: 0; - padding: 0; - display: table; -} - -.tablist li { - float: left; - display: table-cell; - background-image: url('tab_b.png'); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:url('tab_s.png'); - background-repeat:no-repeat; - background-position:right; - color: #283A5D; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: url('tab_h.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); - text-decoration: none; -} - -.tablist li.current a { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:transparent}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0px/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0px 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0px 1px 1px rgba(255,255,255,0.9);color:#283A5D;outline:none}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a.current{color:#D23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media (min-width: 768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283A5D transparent transparent transparent;background:transparent;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0px 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a:hover span.sub-arrow{border-color:#fff transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;border-radius:5px !important;box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent #fff}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #D23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#D23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}}
showPlaces