diff --git a/App_8hpp_source.html b/App_8hpp_source.html deleted file mode 100644 index 4f748356..00000000 --- a/App_8hpp_source.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: dgl/App.hpp Source File - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
- All Classes Functions Variables Modules Pages
- - -
- -
- - -
-
-
-
App.hpp
-
-
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2015 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  */
-
41 class App
-
42 {
-
43 public:
-
44  /**
-
45  Constructor.
-
46  */
-
47  App();
-
48 
-
49  /**
-
50  Destructor.
-
51  */
-
52  ~App();
-
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(App)
-
85 };
-
86 
-
87 // -----------------------------------------------------------------------
-
88 
-
89 END_NAMESPACE_DGL
-
90 
-
91 #endif // DGL_APP_HPP_INCLUDED
- -
void exec()
-
Definition: Window.hpp:30
-
~App()
-
bool isQuiting() const noexcept
-
void quit()
-
void idle()
-
Definition: App.hpp:41
-
- - - - diff --git a/Application_8hpp_source.html b/Application_8hpp_source.html index 93064a5a..c0438e8f 100644 --- a/Application_8hpp_source.html +++ b/Application_8hpp_source.html @@ -69,7 +69,7 @@ $(function() {
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  */
41 class Application
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
Application()
void quit()
void idle()
-
Definition: Window.hpp:34
+
Definition: Window.hpp:36
void exec(int idleTime=10)
bool isQuiting() const noexcept
virtual ~Application()
@@ -77,7 +77,7 @@ $(function() {
diff --git a/Base64_8hpp_source.html b/Base64_8hpp_source.html index 1dc67614..7b392c12 100644 --- a/Base64_8hpp_source.html +++ b/Base64_8hpp_source.html @@ -69,7 +69,7 @@ $(function() {
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 f104e35a..8094a25a 100644 --- a/Base_8hpp_source.html +++ b/Base_8hpp_source.html @@ -71,7 +71,7 @@ $(function() { diff --git a/Color_8hpp_source.html b/Color_8hpp_source.html index c2e880b3..4749a2f7 100644 --- a/Color_8hpp_source.html +++ b/Color_8hpp_source.html @@ -76,7 +76,7 @@ $(function() { diff --git a/DistrhoInfo_8hpp_source.html b/DistrhoInfo_8hpp_source.html index 7fdab092..6d9eb498 100644 --- a/DistrhoInfo_8hpp_source.html +++ b/DistrhoInfo_8hpp_source.html @@ -66,10 +66,10 @@ $(function() {
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-2019 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 implements the full state API.
548  When this macro is enabled, the plugin must implement a new getState(const char* key) function, which the host calls when saving its session/project.
549  This is useful for plugins that have custom internal values not exposed to the host as key-value state pairs or parameters.
550  Most simple effects and synths will not need this.
551  @note this macro is automatically enabled if a plugin has programs and state, as the key-value state pairs need to be updated when the current program changes.
552  @see Plugin::getState(const char*)
553  */
554 #define DISTRHO_PLUGIN_WANT_FULL_STATE 1
555 
556 /**
557  Wherever the plugin wants time position information from the host.
558  @see Plugin::getTimePosition()
559  */
560 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1
561 
562 /**
563  Wherever the %UI uses NanoVG for drawing instead of the default raw OpenGL calls.@n
564  When enabled your %UI instance will subclass @ref NanoWidget instead of @ref Widget.
565  */
566 #define DISTRHO_UI_USE_NANOVG 1
567 
568 /**
569  Wherever the %UI is resizable to any size by the user.@n
570  By default this is false, and resizing is only allowed under the plugin UI control,@n
571  Enabling this options makes it possible for the user to resize the plugin UI at anytime.
572  @see UI::setGeometryConstraints(uint, uint, bool, bool)
573  */
574 #define DISTRHO_UI_USER_RESIZABLE 1
575 
576 /**
577  The %UI URI when exporting in LV2 format.@n
578  By default this is set to @ref DISTRHO_PLUGIN_URI with "#UI" as suffix.
579  */
580 #define DISTRHO_UI_URI DISTRHO_PLUGIN_URI "#UI"
581 
582 /** @} */
583 
584 // -----------------------------------------------------------------------------------------------------------
585 
586 END_NAMESPACE_DISTRHO
587 
588 #endif // DOXYGEN
diff --git a/DistrhoPlugin_8hpp_source.html b/DistrhoPlugin_8hpp_source.html index cf0f4e1b..c47846fc 100644 --- a/DistrhoPlugin_8hpp_source.html +++ b/DistrhoPlugin_8hpp_source.html @@ -66,10 +66,10 @@ $(function() {
DistrhoPlugin.hpp
-
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
+
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 beat.@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 
594  /**
595  Reinitialize this position using the default null initialization.
596  */
597  void clear() noexcept
598  {
599  valid = false;
600  bar = 0;
601  beat = 0;
602  tick = 0;
603  barStartTick = 0.0;
604  beatsPerBar = 0.0f;
605  beatType = 0.0f;
606  ticksPerBeat = 0.0;
607  beatsPerMinute = 0.0;
608  }
609  } bbt;
610 
611  /**
612  Default constructor for a time position.
613  */
614  TimePosition() noexcept
615  : playing(false),
616  frame(0),
617  bbt() {}
618 
619  /**
620  Reinitialize this position using the default null initialization.
621  */
622  void clear() noexcept
623  {
624  playing = false;
625  frame = 0;
626  bbt.clear();
627  }
628 };
629 
630 /** @} */
631 
632 /* ------------------------------------------------------------------------------------------------------------
633  * DPF Plugin */
634 
635 /**
636  @defgroup MainClasses Main Classes
637  @{
638  */
639 
640 /**
641  DPF Plugin class from where plugin instances are created.
642 
643  The public methods (Host state) are called from the plugin to get or set host information.@n
644  They can be called from a plugin instance at anytime unless stated otherwise.@n
645  All other methods are to be implemented by the plugin and will be called by the host.
646 
647  Shortly after a plugin instance is created, the various init* functions will be called by the host.@n
648  Host will call activate() before run(), and deactivate() before the plugin instance is destroyed.@n
649  The host may call deactivate right after activate and vice-versa, but never activate/deactivate consecutively.@n
650  There is no limit on how many times run() is called, only that activate/deactivate will be called in between.
651 
652  The buffer size and sample rate values will remain constant between activate and deactivate.@n
653  Buffer size is only a hint though, the host might call run() with a higher or lower number of frames.
654 
655  Some of this class functions are only available according to some macros.
656 
657  DISTRHO_PLUGIN_WANT_PROGRAMS activates program related features.@n
658  When enabled you need to implement initProgramName() and loadProgram().
659 
660  DISTRHO_PLUGIN_WANT_STATE activates internal state features.@n
661  When enabled you need to implement initStateKey() and setState().
662 
663  The process function run() changes wherever DISTRHO_PLUGIN_WANT_MIDI_INPUT is enabled or not.@n
664  When enabled it provides midi input events.
665  */
666 class Plugin
667 {
668 public:
669  /**
670  Plugin class constructor.@n
671  You must set all parameter values to their defaults, matching ParameterRanges::def.
672  */
673  Plugin(uint32_t parameterCount, uint32_t programCount, uint32_t stateCount);
674 
675  /**
676  Destructor.
677  */
678  virtual ~Plugin();
679 
680  /* --------------------------------------------------------------------------------------------------------
681  * Host state */
682 
683  /**
684  Get the current buffer size that will probably be used during processing, in frames.@n
685  This value will remain constant between activate and deactivate.
686  @note This value is only a hint!@n
687  Hosts might call run() with a higher or lower number of frames.
688  @see bufferSizeChanged(uint32_t)
689  */
690  uint32_t getBufferSize() const noexcept;
691 
692  /**
693  Get the current sample rate that will be used during processing.@n
694  This value will remain constant between activate and deactivate.
695  @see sampleRateChanged(double)
696  */
697  double getSampleRate() const noexcept;
698 
699 #if DISTRHO_PLUGIN_WANT_TIMEPOS
700  /**
701  Get the current host transport time position.@n
702  This function should only be called during run().@n
703  You can call this during other times, but the returned position is not guaranteed to be in sync.
704  @note TimePosition is not supported in LADSPA and DSSI plugin formats.
705  */
706  const TimePosition& getTimePosition() const noexcept;
707 #endif
708 
709 #if DISTRHO_PLUGIN_WANT_LATENCY
710  /**
711  Change the plugin audio output latency to @a frames.@n
712  This function should only be called in the constructor, activate() and run().
713  @note This function is only available if DISTRHO_PLUGIN_WANT_LATENCY is enabled.
714  */
715  void setLatency(uint32_t frames) noexcept;
716 #endif
717 
718 #if DISTRHO_PLUGIN_WANT_MIDI_OUTPUT
719  /**
720  Write a MIDI output event.@n
721  This function must only be called during run().@n
722  Returns false when the host buffer is full, in which case do not call this again until the next run().
723  */
724  bool writeMidiEvent(const MidiEvent& midiEvent) noexcept;
725 #endif
726 
727 protected:
728  /* --------------------------------------------------------------------------------------------------------
729  * Information */
730 
731  /**
732  Get the plugin name.@n
733  Returns DISTRHO_PLUGIN_NAME by default.
734  */
735  virtual const char* getName() const { return DISTRHO_PLUGIN_NAME; }
736 
737  /**
738  Get the plugin label.@n
739  This label is a short restricted name consisting of only _, a-z, A-Z and 0-9 characters.
740  */
741  virtual const char* getLabel() const = 0;
742 
743  /**
744  Get an extensive comment/description about the plugin.@n
745  Optional, returns nothing by default.
746  */
747  virtual const char* getDescription() const { return ""; }
748 
749  /**
750  Get the plugin author/maker.
751  */
752  virtual const char* getMaker() const = 0;
753 
754  /**
755  Get the plugin homepage.@n
756  Optional, returns nothing by default.
757  */
758  virtual const char* getHomePage() const { return ""; }
759 
760  /**
761  Get the plugin license (a single line of text or a URL).@n
762  For commercial plugins this should return some short copyright information.
763  */
764  virtual const char* getLicense() const = 0;
765 
766  /**
767  Get the plugin version, in hexadecimal.
768  @see d_version()
769  */
770  virtual uint32_t getVersion() const = 0;
771 
772  /**
773  Get the plugin unique Id.@n
774  This value is used by LADSPA, DSSI and VST plugin formats.
775  @see d_cconst()
776  */
777  virtual int64_t getUniqueId() const = 0;
778 
779  /* --------------------------------------------------------------------------------------------------------
780  * Init */
781 
782  /**
783  Initialize the audio port @a index.@n
784  This function will be called once, shortly after the plugin is created.
785  */
786  virtual void initAudioPort(bool input, uint32_t index, AudioPort& port);
787 
788  /**
789  Initialize the parameter @a index.@n
790  This function will be called once, shortly after the plugin is created.
791  */
792  virtual void initParameter(uint32_t index, Parameter& parameter) = 0;
793 
794 #if DISTRHO_PLUGIN_WANT_PROGRAMS
795  /**
796  Set the name of the program @a index.@n
797  This function will be called once, shortly after the plugin is created.@n
798  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.
799  */
800  virtual void initProgramName(uint32_t index, String& programName) = 0;
801 #endif
802 
803 #if DISTRHO_PLUGIN_WANT_STATE
804  /**
805  Set the state key and default value of @a index.@n
806  This function will be called once, shortly after the plugin is created.@n
807  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.
808  */
809  virtual void initState(uint32_t index, String& stateKey, String& defaultStateValue) = 0;
810 #endif
811 
812  /* --------------------------------------------------------------------------------------------------------
813  * Internal data */
814 
815  /**
816  Get the current value of a parameter.@n
817  The host may call this function from any context, including realtime processing.
818  */
819  virtual float getParameterValue(uint32_t index) const = 0;
820 
821  /**
822  Change a parameter value.@n
823  The host may call this function from any context, including realtime processing.@n
824  When a parameter is marked as automable, you must ensure no non-realtime operations are performed.
825  @note This function will only be called for parameter inputs.
826  */
827  virtual void setParameterValue(uint32_t index, float value) = 0;
828 
829 #if DISTRHO_PLUGIN_WANT_PROGRAMS
830  /**
831  Load a program.@n
832  The host may call this function from any context, including realtime processing.@n
833  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_PROGRAMS is enabled.
834  */
835  virtual void loadProgram(uint32_t index) = 0;
836 #endif
837 
838 #if DISTRHO_PLUGIN_WANT_FULL_STATE
839  /**
840  Get the value of an internal state.@n
841  The host may call this function from any non-realtime context.@n
842  Must be implemented by your plugin class if DISTRHO_PLUGIN_WANT_FULL_STATE is enabled.
843  @note The use of this function breaks compatibility with the DSSI format.
844  */
845  virtual String getState(const char* key) const = 0;
846 #endif
847 
848 #if DISTRHO_PLUGIN_WANT_STATE
849  /**
850  Change an internal state @a key to @a value.@n
851  Must be implemented by your plugin class only if DISTRHO_PLUGIN_WANT_STATE is enabled.
852  */
853  virtual void setState(const char* key, const char* value) = 0;
854 #endif
855 
856  /* --------------------------------------------------------------------------------------------------------
857  * Audio/MIDI Processing */
858 
859  /**
860  Activate this plugin.
861  */
862  virtual void activate() {}
863 
864  /**
865  Deactivate this plugin.
866  */
867  virtual void deactivate() {}
868 
869 #if DISTRHO_PLUGIN_WANT_MIDI_INPUT
870  /**
871  Run/process function for plugins with MIDI input.
872  @note Some parameters might be null if there are no audio inputs/outputs or MIDI events.
873  */
874  virtual void run(const float** inputs, float** outputs, uint32_t frames,
875  const MidiEvent* midiEvents, uint32_t midiEventCount) = 0;
876 #else
877  /**
878  Run/process function for plugins without MIDI input.
879  @note Some parameters might be null if there are no audio inputs or outputs.
880  */
881  virtual void run(const float** inputs, float** outputs, uint32_t frames) = 0;
882 #endif
883 
884  /* --------------------------------------------------------------------------------------------------------
885  * Callbacks (optional) */
886 
887  /**
888  Optional callback to inform the plugin about a buffer size change.@n
889  This function will only be called when the plugin is deactivated.
890  @note This value is only a hint!@n
891  Hosts might call run() with a higher or lower number of frames.
892  @see getBufferSize()
893  */
894  virtual void bufferSizeChanged(uint32_t newBufferSize);
895 
896  /**
897  Optional callback to inform the plugin about a sample rate change.@n
898  This function will only be called when the plugin is deactivated.
899  @see getSampleRate()
900  */
901  virtual void sampleRateChanged(double newSampleRate);
902 
903  // -------------------------------------------------------------------------------------------------------
904 
905 private:
906  struct PrivateData;
907  PrivateData* const pData;
908  friend class PluginExporter;
909 
910  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Plugin)
911 };
912 
913 /** @} */
914 
915 /* ------------------------------------------------------------------------------------------------------------
916  * Create plugin, entry point */
917 
918 /**
919  @defgroup EntryPoints Entry Points
920  @{
921  */
922 
923 /**
924  TODO.
925  */
926 extern Plugin* createPlugin();
927 
928 /** @} */
929 
930 // -----------------------------------------------------------------------------------------------------------
931 
932 END_NAMESPACE_DISTRHO
933 
934 #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
+
virtual void activate()
Definition: DistrhoPlugin.hpp:862
void initDesignation(ParameterDesignation d) noexcept
Definition: DistrhoPlugin.hpp:456
uint8_t midiCC
Definition: DistrhoPlugin.hpp:425
Parameter() noexcept
Definition: DistrhoPlugin.hpp:430
@@ -78,10 +78,11 @@ $(function() {
uint32_t size
Definition: DistrhoPlugin.hpp:495
String name
Definition: DistrhoPlugin.hpp:126
String symbol
Definition: DistrhoPlugin.hpp:393
+
void clear() noexcept
Definition: DistrhoPlugin.hpp:622
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
+
virtual void deactivate()
Definition: DistrhoPlugin.hpp:867
Definition: DistrhoPlugin.hpp:159
ParameterEnumerationValues(uint32_t c, bool r, const ParameterEnumerationValue *v) noexcept
Definition: DistrhoPlugin.hpp:352
double ticksPerBeat
Definition: DistrhoPlugin.hpp:573
@@ -98,14 +99,15 @@ $(function() {
uint8_t count
Definition: DistrhoPlugin.hpp:325
float value
Definition: DistrhoPlugin.hpp:295
uint32_t hints
Definition: DistrhoPlugin.hpp:378
-
Definition: DistrhoPlugin.hpp:640
+
void clear() noexcept
Definition: DistrhoPlugin.hpp:597
+
Definition: DistrhoPlugin.hpp:666
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
+
virtual const char * getHomePage() const
Definition: DistrhoPlugin.hpp:758
+
TimePosition() noexcept
Definition: DistrhoPlugin.hpp:614
ParameterEnumerationValues enumValues
Definition: DistrhoPlugin.hpp:412
uint64_t frame
Definition: DistrhoPlugin.hpp:521
BarBeatTick() noexcept
Definition: DistrhoPlugin.hpp:583
@@ -120,13 +122,13 @@ $(function() {
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
+
virtual const char * getName() const
Definition: DistrhoPlugin.hpp:735
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:189
Definition: DistrhoPlugin.hpp:175
String label
Definition: DistrhoPlugin.hpp:300
-
virtual const char * getDescription() const
Definition: DistrhoPlugin.hpp:721
+
virtual const char * getDescription() const
Definition: DistrhoPlugin.hpp:747
String unit
Definition: DistrhoPlugin.hpp:400
static const uint32_t kParameterIsInteger
Definition: DistrhoPlugin.hpp:75
Definition: DistrhoPlugin.hpp:165
@@ -147,7 +149,7 @@ $(function() {
diff --git a/DistrhoUI_8hpp_source.html b/DistrhoUI_8hpp_source.html index df2024f1..f41aae03 100644 --- a/DistrhoUI_8hpp_source.html +++ b/DistrhoUI_8hpp_source.html @@ -66,10 +66,9 @@ $(function() {
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_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)
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2019 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 #if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
24 # include "../dgl/Base.hpp"
25 # include "extra/ExternalWindow.hpp"
26 typedef DISTRHO_NAMESPACE::ExternalWindow UIWidget;
27 #elif DISTRHO_UI_USE_NANOVG
28 # include "../dgl/NanoVG.hpp"
29 typedef DGL_NAMESPACE::NanoWidget UIWidget;
30 #else
31 # include "../dgl/Widget.hpp"
32 typedef DGL_NAMESPACE::Widget UIWidget;
33 #endif
34 
35 START_NAMESPACE_DISTRHO
36 
37 /* ------------------------------------------------------------------------------------------------------------
38  * DPF UI */
39 
40 /**
41  @addtogroup MainClasses
42  @{
43  */
44 
45 /**
46  DPF UI class from where UI instances are created.
47 
48  @note You must call setSize during construction,
49  @TODO Detailed information about this class.
50  */
51 class UI : public UIWidget
52 {
53 public:
54  /**
55  UI class constructor.
56  The UI should be initialized to a default state that matches the plugin side.
57  */
58  UI(uint width = 0, uint height = 0);
59 
60  /**
61  Destructor.
62  */
63  virtual ~UI();
64 
65 #if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI
66  /**
67  Set geometry constraints for the UI when resized by the user, and optionally scale UI automatically.
68  @see Window::setGeometryConstraints(uint,uint,bool)
69  @see Window::setScaling(double)
70  */
71  void setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale = false);
72 #endif
73 
74  /* --------------------------------------------------------------------------------------------------------
75  * Host state */
76 
77  /**
78  Get the current sample rate used in plugin processing.
79  @see sampleRateChanged(double)
80  */
81  double getSampleRate() const noexcept;
82 
83  /**
84  editParameter.
85  @TODO Document this.
86  */
87  void editParameter(uint32_t index, bool started);
88 
89  /**
90  setParameterValue.
91  @TODO Document this.
92  */
93  void setParameterValue(uint32_t index, float value);
94 
95 #if DISTRHO_PLUGIN_WANT_STATE
96  /**
97  setState.
98  @TODO Document this.
99  */
100  void setState(const char* key, const char* value);
101 #endif
102 
103 #if DISTRHO_PLUGIN_WANT_MIDI_INPUT
104  /**
105  sendNote.
106  @TODO Document this.
107  @note Work in progress. Implemented for DSSI and LV2 formats.
108  */
109  void sendNote(uint8_t channel, uint8_t note, uint8_t velocity);
110 #endif
111 
112 #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
113  /* --------------------------------------------------------------------------------------------------------
114  * Direct DSP access - DO NOT USE THIS UNLESS STRICTLY NECESSARY!! */
115 
116  /**
117  getPluginInstancePointer.
118  @TODO Document this.
119  */
120  void* getPluginInstancePointer() const noexcept;
121 #endif
122 
123 #if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
124  /* --------------------------------------------------------------------------------------------------------
125  * External UI helpers */
126 
127  /**
128  Get the bundle path that will be used for the next UI.
129  @note: This function is only valid during createUI(),
130  it will return null when called from anywhere else.
131  */
132  static const char* getNextBundlePath() noexcept;
133 
134 # if DISTRHO_PLUGIN_HAS_EMBED_UI
135  /**
136  Get the Window Id that will be used for the next created window.
137  @note: This function is only valid during createUI(),
138  it will return 0 when called from anywhere else.
139  */
140  static uintptr_t getNextWindowId() noexcept;
141 # endif
142 #endif
143 
144 protected:
145  /* --------------------------------------------------------------------------------------------------------
146  * DSP/Plugin Callbacks */
147 
148  /**
149  A parameter has changed on the plugin side.@n
150  This is called by the host to inform the UI about parameter changes.
151  */
152  virtual void parameterChanged(uint32_t index, float value) = 0;
153 
154 #if DISTRHO_PLUGIN_WANT_PROGRAMS
155  /**
156  A program has been loaded on the plugin side.@n
157  This is called by the host to inform the UI about program changes.
158  */
159  virtual void programLoaded(uint32_t index) = 0;
160 #endif
161 
162 #if DISTRHO_PLUGIN_WANT_STATE
163  /**
164  A state has changed on the plugin side.@n
165  This is called by the host to inform the UI about state changes.
166  */
167  virtual void stateChanged(const char* key, const char* value) = 0;
168 #endif
169 
170  /* --------------------------------------------------------------------------------------------------------
171  * DSP/Plugin Callbacks (optional) */
172 
173  /**
174  Optional callback to inform the UI about a sample rate change on the plugin side.
175  @see getSampleRate()
176  */
177  virtual void sampleRateChanged(double newSampleRate);
178 
179 #if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI
180  /* --------------------------------------------------------------------------------------------------------
181  * UI Callbacks (optional) */
182 
183  /**
184  uiIdle.
185  @TODO Document this.
186  */
187  virtual void uiIdle() {}
188 
189 # ifndef DGL_FILE_BROWSER_DISABLED
190  /**
191  File browser selected function.
192  @see Window::fileBrowserSelected(const char*)
193  */
194  virtual void uiFileBrowserSelected(const char* filename);
195 # endif
196 
197  /**
198  OpenGL window reshape function, called when parent window is resized.
199  You can reimplement this function for a custom OpenGL state.
200  @see Window::onReshape(uint,uint)
201  */
202  virtual void uiReshape(uint width, uint height);
203 
204  /* --------------------------------------------------------------------------------------------------------
205  * UI Resize Handling, internal */
206 
207  /**
208  OpenGL widget resize function, called when the widget is resized.
209  This is overriden here so the host knows when the UI is resized by you.
210  @see Widget::onResize(const ResizeEvent&)
211  */
212  void onResize(const ResizeEvent& ev) override;
213 #endif
214 
215  // -------------------------------------------------------------------------------------------------------
216 
217 private:
218  struct PrivateData;
219  PrivateData* const pData;
220  friend class UIExporter;
221  friend class UIExporterWindow;
222 
223 #if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI
224  // these should not be used
225  void setAbsoluteX(int) const noexcept {}
226  void setAbsoluteY(int) const noexcept {}
227  void setAbsolutePos(int, int) const noexcept {}
228  void setAbsolutePos(const DGL_NAMESPACE::Point<int>&) const noexcept {}
229 #endif
230 
231  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UI)
232 };
233 
234 /** @} */
235 
236 /* ------------------------------------------------------------------------------------------------------------
237  * Create UI, entry point */
238 
239 /**
240  @addtogroup EntryPoints
241  @{
242  */
243 
244 /**
245  createUI.
246  @TODO Document this.
247  */
248 extern UI* createUI();
249 
250 /** @} */
251 
252 // -----------------------------------------------------------------------------------------------------------
253 
254 END_NAMESPACE_DISTRHO
255 
256 #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
virtual ~UI()
void setParameterValue(uint32_t index, float value)
void * getPluginInstancePointer() const noexcept
@@ -82,14 +81,11 @@ $(function() {
virtual void stateChanged(const char *key, const char *value)=0
double getSampleRate() const noexcept
void setState(const char *key, const char *value)
-
virtual void uiFileBrowserSelected(const char *filename)
-
virtual void uiReshape(uint width, uint height)
-
Definition: DistrhoUI.hpp:50
-
virtual void uiIdle()
Definition: DistrhoUI.hpp:177
+
Definition: DistrhoUI.hpp:51
diff --git a/DistrhoUtils_8hpp_source.html b/DistrhoUtils_8hpp_source.html index a32ca1d6..0d9e7a9b 100644 --- a/DistrhoUtils_8hpp_source.html +++ b/DistrhoUtils_8hpp_source.html @@ -70,7 +70,7 @@ $(function() {
diff --git a/ExternalWindow_8hpp_source.html b/ExternalWindow_8hpp_source.html index 66a27b7d..7bf553a1 100644 --- a/ExternalWindow_8hpp_source.html +++ b/ExternalWindow_8hpp_source.html @@ -66,12 +66,12 @@ $(function() {
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  transientWinId(0),
44  visible(false),
45  pid(0) {}
46 
47  virtual ~ExternalWindow()
48  {
49  terminateAndWaitForProcess();
50  }
51 
52  uint getWidth() const noexcept
53  {
54  return width;
55  }
56 
57  uint getHeight() const noexcept
58  {
59  return height;
60  }
61 
62  const char* getTitle() const noexcept
63  {
64  return title;
65  }
66 
67  uintptr_t getTransientWinId() const noexcept
68  {
69  return transientWinId;
70  }
71 
72  bool isVisible() const noexcept
73  {
74  return visible;
75  }
76 
77  bool isRunning() noexcept
78  {
79  if (pid <= 0)
80  return false;
81 
82  const pid_t p = ::waitpid(pid, nullptr, WNOHANG);
83 
84  if (p == pid || (p == -1 && errno == ECHILD))
85  {
86  printf("NOTICE: Child process exited while idle\n");
87  pid = 0;
88  return false;
89  }
90 
91  return true;
92  }
93 
94  virtual void setSize(uint w, uint h)
95  {
96  width = w;
97  height = h;
98  }
99 
100  virtual void setTitle(const char* const t)
101  {
102  title = t;
103  }
104 
105  virtual void setTransientWinId(const uintptr_t winId)
106  {
107  transientWinId = winId;
108  }
109 
110  virtual void setVisible(const bool yesNo)
111  {
112  visible = yesNo;
113  }
114 
115 protected:
116  bool startExternalProcess(const char* args[])
117  {
118  terminateAndWaitForProcess();
119 
120  pid = vfork();
121 
122  switch (pid)
123  {
124  case 0:
125  execvp(args[0], (char**)args);
126  _exit(1);
127  return false;
128 
129  case -1:
130  printf("Could not start external ui\n");
131  return false;
132 
133  default:
134  return true;
135  }
136  }
137 
138  void terminateAndWaitForProcess()
139  {
140  if (pid <= 0)
141  return;
142 
143  printf("Waiting for previous process to stop,,,\n");
144 
145  bool sendTerm = true;
146 
147  for (pid_t p;;)
148  {
149  p = ::waitpid(pid, nullptr, WNOHANG);
150 
151  switch (p)
152  {
153  case 0:
154  if (sendTerm)
155  {
156  sendTerm = false;
157  ::kill(pid, SIGTERM);
158  }
159  break;
160 
161  case -1:
162  if (errno == ECHILD)
163  {
164  printf("Done! (no such process)\n");
165  pid = 0;
166  return;
167  }
168  break;
169 
170  default:
171  if (p == pid)
172  {
173  printf("Done! (clean wait)\n");
174  pid = 0;
175  return;
176  }
177  break;
178  }
179 
180  // 5 msec
181  usleep(5*1000);
182  }
183  }
184 
185 private:
186  uint width;
187  uint height;
188  String title;
189  uintptr_t transientWinId;
190  bool visible;
191  pid_t pid;
192 
193  friend class UIExporter;
194 
195  DISTRHO_DECLARE_NON_COPY_CLASS(ExternalWindow)
196 };
197 
198 // -----------------------------------------------------------------------
199 
200 END_NAMESPACE_DISTRHO
201 
202 #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 e3547acd..fa328ec3 100644 --- a/Geometry_8hpp_source.html +++ b/Geometry_8hpp_source.html @@ -84,7 +84,7 @@ $(function() {
diff --git a/ImageAboutWindow_8hpp_source.html b/ImageAboutWindow_8hpp_source.html deleted file mode 100644 index 0ad07839..00000000 --- a/ImageAboutWindow_8hpp_source.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: dgl/ImageAboutWindow.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- - -
-
-
-
ImageAboutWindow.hpp
-
-
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2015 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_ABOUT_WINDOW_HPP_INCLUDED
-
18 #define DGL_IMAGE_ABOUT_WINDOW_HPP_INCLUDED
-
19 
-
20 #warning This is a deprecated file, please include ImageWidgets.hpp instead.
-
21 #include "ImageWidgets.hpp"
-
22 
-
23 #endif // DGL_IMAGE_ABOUT_WINDOW_HPP_INCLUDED
-
- - - - diff --git a/ImageButton_8hpp_source.html b/ImageButton_8hpp_source.html deleted file mode 100644 index 42a4bda3..00000000 --- a/ImageButton_8hpp_source.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: dgl/ImageButton.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- - -
-
-
-
ImageButton.hpp
-
-
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2015 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_BUTTON_HPP_INCLUDED
-
18 #define DGL_IMAGE_BUTTON_HPP_INCLUDED
-
19 
-
20 #warning This is a deprecated file, please include ImageWidgets.hpp instead.
-
21 #include "ImageWidgets.hpp"
-
22 
-
23 #endif // DGL_IMAGE_BUTTON_HPP_INCLUDED
-
- - - - diff --git a/ImageKnob_8hpp_source.html b/ImageKnob_8hpp_source.html deleted file mode 100644 index 991d182d..00000000 --- a/ImageKnob_8hpp_source.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: dgl/ImageKnob.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- - -
-
-
-
ImageKnob.hpp
-
-
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2015 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_KNOB_HPP_INCLUDED
-
18 #define DGL_IMAGE_KNOB_HPP_INCLUDED
-
19 
-
20 #warning This is a deprecated file, please include ImageWidgets.hpp instead.
-
21 #include "ImageWidgets.hpp"
-
22 
-
23 #endif // DGL_IMAGE_KNOB_HPP_INCLUDED
-
- - - - diff --git a/ImageSlider_8hpp_source.html b/ImageSlider_8hpp_source.html deleted file mode 100644 index ab0dfa43..00000000 --- a/ImageSlider_8hpp_source.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: dgl/ImageSlider.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- - -
-
-
-
ImageSlider.hpp
-
-
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2015 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_SLIDER_HPP_INCLUDED
-
18 #define DGL_IMAGE_SLIDER_HPP_INCLUDED
-
19 
-
20 #warning This is a deprecated file, please include ImageWidgets.hpp instead.
-
21 #include "ImageWidgets.hpp"
-
22 
-
23 #endif // DGL_IMAGE_SLIDER_HPP_INCLUDED
-
- - - - diff --git a/ImageSwitch_8hpp_source.html b/ImageSwitch_8hpp_source.html deleted file mode 100644 index a490bd6b..00000000 --- a/ImageSwitch_8hpp_source.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: dgl/ImageSwitch.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- - -
-
-
-
ImageSwitch.hpp
-
-
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2015 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_SWITCH_HPP_INCLUDED
-
18 #define DGL_IMAGE_SWITCH_HPP_INCLUDED
-
19 
-
20 #warning This is a deprecated file, please include ImageWidgets.hpp instead.
-
21 #include "ImageWidgets.hpp"
-
22 
-
23 #endif // DGL_IMAGE_SWITCH_HPP_INCLUDED
-
- - - - diff --git a/ImageWidgets_8hpp_source.html b/ImageWidgets_8hpp_source.html index dd30b6e8..4f2256e3 100644 --- a/ImageWidgets_8hpp_source.html +++ b/ImageWidgets_8hpp_source.html @@ -66,36 +66,36 @@ $(function() {
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
+
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  void setDefault(float def) noexcept;
184 
185  void setStartPos(const Point<int>& startPos) noexcept;
186  void setStartPos(int x, int y) noexcept;
187  void setEndPos(const Point<int>& endPos) noexcept;
188  void setEndPos(int x, int y) noexcept;
189 
190  void setInverted(bool inverted) noexcept;
191  void setRange(float min, float max) noexcept;
192  void setStep(float step) noexcept;
193 
194  void setCallback(Callback* callback) noexcept;
195 
196 protected:
197  void onDisplay() override;
198  bool onMouse(const MouseEvent&) override;
199  bool onMotion(const MotionEvent&) override;
200 
201 private:
202  Image fImage;
203  float fMinimum;
204  float fMaximum;
205  float fStep;
206  float fValue;
207  float fValueDef;
208  float fValueTmp;
209  bool fUsingDefault;
210 
211  bool fDragging;
212  bool fInverted;
213  bool fValueIsSet;
214  int fStartedX;
215  int fStartedY;
216 
217  Callback* fCallback;
218 
219  Point<int> fStartPos;
220  Point<int> fEndPos;
221  Rectangle<int> fSliderArea;
222 
223  void _recheckArea() noexcept;
224 
225  // these should not be used
226  void setAbsoluteX(int) const noexcept {}
227  void setAbsoluteY(int) const noexcept {}
228  void setAbsolutePos(int, int) const noexcept {}
229  void setAbsolutePos(const Point<int>&) const noexcept {}
230 
231  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ImageSlider)
232 };
233 
234 // -----------------------------------------------------------------------
235 
236 class ImageSwitch : public Widget
237 {
238 public:
239  class Callback
240  {
241  public:
242  virtual ~Callback() {}
243  virtual void imageSwitchClicked(ImageSwitch* imageSwitch, bool down) = 0;
244  };
245 
246  explicit ImageSwitch(Window& parent, const Image& imageNormal, const Image& imageDown) noexcept;
247  explicit ImageSwitch(Widget* widget, const Image& imageNormal, const Image& imageDown) noexcept;
248  explicit ImageSwitch(const ImageSwitch& imageSwitch) noexcept;
249  ImageSwitch& operator=(const ImageSwitch& imageSwitch) noexcept;
250 
251  bool isDown() const noexcept;
252  void setDown(bool down) noexcept;
253 
254  void setCallback(Callback* callback) noexcept;
255 
256 protected:
257  void onDisplay() override;
258  bool onMouse(const MouseEvent&) override;
259 
260 private:
261  Image fImageNormal;
262  Image fImageDown;
263  bool fIsDown;
264 
265  Callback* fCallback;
266 
267  DISTRHO_LEAK_DETECTOR(ImageSwitch)
268 };
269 
270 // -----------------------------------------------------------------------
271 
272 END_NAMESPACE_DGL
273 
274 #endif // DGL_IMAGE_WIDGETS_HPP_INCLUDED
Definition: ImageWidgets.hpp:28
virtual bool onScroll(const ScrollEvent &)
-
Definition: Window.hpp:34
+
Definition: Window.hpp:36
Definition: ImageWidgets.hpp:169
Definition: ImageWidgets.hpp:51
-
Definition: Widget.hpp:83
+
Definition: Widget.hpp:85
void setAbsolutePos(int x, int y) noexcept
void setAbsoluteX(int x) noexcept
Definition: ImageWidgets.hpp:95
bool onKeyboard(const KeyboardEvent &) override
-
Definition: Widget.hpp:136
+
Definition: Widget.hpp:138
void setAbsoluteY(int y) noexcept
void onDisplay() override
virtual bool onMotion(const MotionEvent &)
-
Definition: Widget.hpp:59
-
Definition: Widget.hpp:118
+
Definition: Widget.hpp:61
+
Definition: Widget.hpp:120
bool onMouse(const MouseEvent &) override
Definition: Image.hpp:38
Definition: ImageWidgets.hpp:87
-
Definition: Widget.hpp:151
+
Definition: Widget.hpp:153
Definition: ImageWidgets.hpp:54
-
Definition: ImageWidgets.hpp:236
+
Definition: ImageWidgets.hpp:239
Definition: ImageWidgets.hpp:166
-
Definition: ImageWidgets.hpp:233
+
Definition: ImageWidgets.hpp:236
diff --git a/Image_8hpp_source.html b/Image_8hpp_source.html index 23f48da6..bba373c5 100644 --- a/Image_8hpp_source.html +++ b/Image_8hpp_source.html @@ -84,7 +84,7 @@ $(function() {
diff --git a/LeakDetector_8hpp_source.html b/LeakDetector_8hpp_source.html index 3df5de02..eb5d7e54 100644 --- a/LeakDetector_8hpp_source.html +++ b/LeakDetector_8hpp_source.html @@ -71,7 +71,7 @@ $(function() { diff --git a/Mutex_8hpp_source.html b/Mutex_8hpp_source.html index 7c13b4ac..4928a2b6 100644 --- a/Mutex_8hpp_source.html +++ b/Mutex_8hpp_source.html @@ -75,7 +75,7 @@ $(function() { diff --git a/NanoVG_8hpp_source.html b/NanoVG_8hpp_source.html index 89c160d1..835588a2 100644 --- a/NanoVG_8hpp_source.html +++ b/NanoVG_8hpp_source.html @@ -70,7 +70,7 @@ $(function() {
NanoVG::TextRow
Definition: NanoVG.hpp:288
NanoImage
Definition: NanoVG.hpp:47
NanoWidget
Definition: NanoVG.hpp:875
-
Window
Definition: Window.hpp:34
+
Window
Definition: Window.hpp:36
Color
Definition: Color.hpp:31
NanoImage::getTextureHandle
GLuint getTextureHandle() const
Size< uint >
@@ -81,14 +81,14 @@ $(function() {
NanoImage::getSize
Size< uint > getSize() const noexcept
NanoVG::GlyphPosition
Definition: NanoVG.hpp:282
NanoImage::NanoImage
NanoImage()
-
Widget
Definition: Widget.hpp:59
+
Widget
Definition: Widget.hpp:61
NanoImage::operator=
NanoImage & operator=(const Handle &handle)
NanoImage::isValid
bool isValid() const noexcept
NanoVG::CreateFlags
CreateFlags
Definition: NanoVG.hpp:208
diff --git a/NanoWidgets_8hpp_source.html b/NanoWidgets_8hpp_source.html deleted file mode 100644 index 16c47414..00000000 --- a/NanoWidgets_8hpp_source.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: dgl/NanoWidgets.hpp Source File - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- - -
-
-
-
NanoWidgets.hpp
-
-
-
1 /*
-
2  * DISTRHO Plugin Framework (DPF)
-
3  * Copyright (C) 2012-2015 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_WIDGETS_HPP_INCLUDED
-
18 #define DGL_NANO_WIDGETS_HPP_INCLUDED
-
19 
-
20 #include "NanoVG.hpp"
-
21 #include "../distrho/extra/String.hpp"
-
22 
-
23 START_NAMESPACE_DGL
-
24 
-
25 // -----------------------------------------------------------------------
-
26 
-
27 class BlendishButton : public NanoWidget
-
28 {
-
29 public:
-
30  class Callback
-
31  {
-
32  public:
-
33  virtual ~Callback() {}
-
34  virtual void blendishButtonClicked(BlendishButton* blendishButton, int button) = 0;
-
35  };
-
36 
-
37  explicit BlendishButton(Window& parent, const char* text = "", int iconId = -1);
-
38  explicit BlendishButton(NanoWidget* widget, const char* text = "", int iconId = -1);
-
39  ~BlendishButton() override;
-
40 
-
41  int getIconId() const noexcept;
-
42  void setIconId(int iconId) noexcept;
-
43 
-
44  const char* getText() const noexcept;
-
45  void setText(const char* text) noexcept;
-
46 
-
47  void setCallback(Callback* callback) noexcept;
-
48 
-
49 protected:
-
50  void onNanoDisplay() override;
-
51  bool onMouse(const MouseEvent&) override;
-
52  bool onMotion(const MotionEvent&) override;
-
53 
-
54 private:
-
55  struct PrivateData;
-
56  PrivateData* const pData;
-
57 
-
58  void _updateBounds();
-
59 
-
60  DISTRHO_LEAK_DETECTOR(BlendishButton)
-
61 };
-
62 
-
63 // -----------------------------------------------------------------------
-
64 
-
65 END_NAMESPACE_DGL
-
66 
-
67 #endif // DGL_NANO_WIDGETS_HPP_INCLUDED
-
bool onMouse(const MouseEvent &) override
-
Definition: NanoWidgets.hpp:30
-
Definition: NanoVG.hpp:862
-
Definition: Window.hpp:30
-
Definition: Widget.hpp:136
-
void onNanoDisplay() override
-
float text(float x, float y, const char *string, const char *end)
-
Definition: Widget.hpp:118
-
bool onMotion(const MotionEvent &) override
-
Definition: NanoWidgets.hpp:27
-
- - - - diff --git a/ScopedPointer_8hpp_source.html b/ScopedPointer_8hpp_source.html index 0c92d367..6f11efa0 100644 --- a/ScopedPointer_8hpp_source.html +++ b/ScopedPointer_8hpp_source.html @@ -80,7 +80,7 @@ $(function() { diff --git a/Sleep_8hpp_source.html b/Sleep_8hpp_source.html index ce0af567..849e7152 100644 --- a/Sleep_8hpp_source.html +++ b/Sleep_8hpp_source.html @@ -69,7 +69,7 @@ $(function() {
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 b2d79046..31538d7c 100644 --- a/StandaloneWindow_8hpp_source.html +++ b/StandaloneWindow_8hpp_source.html @@ -66,16 +66,16 @@ $(function() {
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:36
Definition: StandaloneWindow.hpp:28
Definition: Application.hpp:41
-
Definition: Widget.hpp:59
+
Definition: Widget.hpp:61
diff --git a/String_8hpp_source.html b/String_8hpp_source.html index 165775ae..9f9f5e03 100644 --- a/String_8hpp_source.html +++ b/String_8hpp_source.html @@ -70,7 +70,7 @@ $(function() {
diff --git a/Thread_8hpp_source.html b/Thread_8hpp_source.html index 2bf7f7ad..5cf1f8fc 100644 --- a/Thread_8hpp_source.html +++ b/Thread_8hpp_source.html @@ -74,7 +74,7 @@ $(function() { diff --git a/Widget_8hpp_source.html b/Widget_8hpp_source.html index 9a1f9725..1eefa06e 100644 --- a/Widget_8hpp_source.html +++ b/Widget_8hpp_source.html @@ -66,26 +66,27 @@ $(function() {
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 #ifdef DISTRHO_DEFINES_H_INCLUDED
28 START_NAMESPACE_DISTRHO
29 class UI;
30 END_NAMESPACE_DISTRHO
31 #endif
32 
33 START_NAMESPACE_DGL
34 
35 class Application;
36 class ImageSlider;
37 class NanoWidget;
38 class Window;
39 class StandaloneWindow;
40 
41 // -----------------------------------------------------------------------
42 
43 /**
44  Base DGL Widget class.
45 
46  This is the base Widget class, from which all widgets are built.
47 
48  All widgets have a parent Window where they'll be drawn.
49  This parent is never changed during the widget lifetime.
50 
51  Widgets receive events in relative coordinates.
52  (0, 0) means its top-left position.
53 
54  Windows paint widgets in the order they are constructed.
55  Early widgets are drawn first, at the bottom, then newer ones on top.
56  Events are sent in the inverse order so that the top-most widget gets
57  a chance to catch the event and stop its propagation.
58 
59  All widget event callbacks do nothing by default.
60  */
61 class Widget
62 {
63 public:
64  /**
65  Base event data.
66  @a mod The currently active keyboard modifiers, @see Modifier.
67  @a time The timestamp (if any).
68  */
69  struct BaseEvent {
70  uint mod;
71  uint32_t time;
72 
73  /** Constuctor */
74  BaseEvent() noexcept : mod(0x0), time(0) {}
75  /** Destuctor */
76  virtual ~BaseEvent() noexcept {}
77  };
78 
79  /**
80  Keyboard event.
81  @a press True if the key was pressed, false if released.
82  @a key Unicode point of the key pressed.
83  @see onKeyboard
84  */
86  bool press;
87  uint key;
88 
89  /** Constuctor */
90  KeyboardEvent() noexcept
91  : BaseEvent(),
92  press(false),
93  key(0) {}
94  };
95 
96  /**
97  Special keyboard event.
98  @a press True if the key was pressed, false if released.
99  @a key The key pressed.
100  @see onSpecial
101  */
103  bool press;
104  Key key;
105 
106  /** Constuctor */
107  SpecialEvent() noexcept
108  : BaseEvent(),
109  press(false),
110  key(Key(0)) {}
111  };
112 
113  /**
114  Mouse event.
115  @a button The button number (1 = left, 2 = middle, 3 = right).
116  @a press True if the button was pressed, false if released.
117  @a pos The widget-relative coordinates of the pointer.
118  @see onMouse
119  */
121  int button;
122  bool press;
123  Point<int> pos;
124 
125  /** Constuctor */
126  MouseEvent() noexcept
127  : BaseEvent(),
128  button(0),
129  press(false),
130  pos(0, 0) {}
131  };
132 
133  /**
134  Mouse motion event.
135  @a pos The widget-relative coordinates of the pointer.
136  @see onMotion
137  */
139  Point<int> pos;
140 
141  /** Constuctor */
142  MotionEvent() noexcept
143  : BaseEvent(),
144  pos(0, 0) {}
145  };
146 
147  /**
148  Mouse scroll event.
149  @a pos The widget-relative coordinates of the pointer.
150  @a delta The scroll distance.
151  @see onScroll
152  */
154  Point<int> pos;
155  Point<float> delta;
156 
157  /** Constuctor */
158  ScrollEvent() noexcept
159  : BaseEvent(),
160  pos(0, 0),
161  delta(0.0f, 0.0f) {}
162  };
163 
164  /**
165  Resize event.
166  @a size The new widget size.
167  @a oldSize The previous size, may be null.
168  @see onResize
169  */
170  struct ResizeEvent {
171  Size<uint> size;
172  Size<uint> oldSize;
173 
174  /** Constuctor */
175  ResizeEvent() noexcept
176  : size(0, 0),
177  oldSize(0, 0) {}
178  };
179 
180  /**
181  Widget position changed event.
182  @a pos The new absolute position of the widget.
183  @a oldPos The previous absolute position of the widget.
184  @see onPositionChanged
185  */
187  Point<int> pos;
188  Point<int> oldPos;
189 
190  /** Constuctor */
192  : pos(0, 0),
193  oldPos(0, 0) {}
194  };
195 
196  /**
197  Constructor.
198  */
199  explicit Widget(Window& parent);
200 
201  /**
202  Constructor for a subwidget.
203  */
204  explicit Widget(Widget* groupWidget);
205 
206  /**
207  Destructor.
208  */
209  virtual ~Widget();
210 
211  /**
212  Check if this widget is visible within its parent window.
213  Invisible widgets do not receive events except resize.
214  */
215  bool isVisible() const noexcept;
216 
217  /**
218  Set widget visible (or not) according to @a yesNo.
219  */
220  void setVisible(bool yesNo);
221 
222  /**
223  Show widget.
224  This is the same as calling setVisible(true).
225  */
226  void show();
227 
228  /**
229  Hide widget.
230  This is the same as calling setVisible(false).
231  */
232  void hide();
233 
234  /**
235  Get width.
236  */
237  uint getWidth() const noexcept;
238 
239  /**
240  Get height.
241  */
242  uint getHeight() const noexcept;
243 
244  /**
245  Get size.
246  */
247  const Size<uint>& getSize() const noexcept;
248 
249  /**
250  Set width.
251  */
252  void setWidth(uint width) noexcept;
253 
254  /**
255  Set height.
256  */
257  void setHeight(uint height) noexcept;
258 
259  /**
260  Set size using @a width and @a height values.
261  */
262  void setSize(uint width, uint height) noexcept;
263 
264  /**
265  Set size.
266  */
267  void setSize(const Size<uint>& size) noexcept;
268 
269  /**
270  Get absolute X.
271  */
272  int getAbsoluteX() const noexcept;
273 
274  /**
275  Get absolute Y.
276  */
277  int getAbsoluteY() const noexcept;
278 
279  /**
280  Get absolute position.
281  */
282  const Point<int>& getAbsolutePos() const noexcept;
283 
284  /**
285  Set absolute X.
286  */
287  void setAbsoluteX(int x) noexcept;
288 
289  /**
290  Set absolute Y.
291  */
292  void setAbsoluteY(int y) noexcept;
293 
294  /**
295  Set absolute position using @a x and @a y values.
296  */
297  void setAbsolutePos(int x, int y) noexcept;
298 
299  /**
300  Set absolute position.
301  */
302  void setAbsolutePos(const Point<int>& pos) noexcept;
303 
304  /**
305  Get this widget's window application.
306  Same as calling getParentWindow().getApp().
307  */
308  Application& getParentApp() const noexcept;
309 
310  /**
311  Get parent window, as passed in the constructor.
312  */
313  Window& getParentWindow() const noexcept;
314 
315  /**
316  Check if this widget contains the point defined by @a x and @a y.
317  */
318  bool contains(int x, int y) const noexcept;
319 
320  /**
321  Check if this widget contains the point @a pos.
322  */
323  bool contains(const Point<int>& pos) const noexcept;
324 
325  /**
326  Tell this widget's window to repaint itself.
327  */
328  void repaint() noexcept;
329 
330  /**
331  Get the Id associated with this widget.
332  @see setId
333  */
334  uint getId() const noexcept;
335 
336  /**
337  Set an Id to be associated with this widget.
338  @see getId
339  */
340  void setId(uint id) noexcept;
341 
342 protected:
343  /**
344  A function called to draw the view contents with OpenGL.
345  */
346  virtual void onDisplay() = 0;
347 
348  /**
349  A function called when a key is pressed or released.
350  @return True to stop event propagation, false otherwise.
351  */
352  virtual bool onKeyboard(const KeyboardEvent&);
353 
354  /**
355  A function called when a special key is pressed or released.
356  @return True to stop event propagation, false otherwise.
357  */
358  virtual bool onSpecial(const SpecialEvent&);
359 
360  /**
361  A function called when a mouse button is pressed or released.
362  @return True to stop event propagation, false otherwise.
363  */
364  virtual bool onMouse(const MouseEvent&);
365 
366  /**
367  A function called when the pointer moves.
368  @return True to stop event propagation, false otherwise.
369  */
370  virtual bool onMotion(const MotionEvent&);
371 
372  /**
373  A function called on scrolling (e.g. mouse wheel or track pad).
374  @return True to stop event propagation, false otherwise.
375  */
376  virtual bool onScroll(const ScrollEvent&);
377 
378  /**
379  A function called when the widget is resized.
380  */
381  virtual void onResize(const ResizeEvent&);
382 
383  /**
384  A function called when the widget's absolute position is changed.
385  */
386  virtual void onPositionChanged(const PositionChangedEvent&);
387 
388 private:
389  struct PrivateData;
390  PrivateData* const pData;
391 
392  /** @internal */
393  explicit Widget(Widget* groupWidget, bool addToSubWidgets);
394 
395  friend class ImageSlider;
396  friend class NanoWidget;
397  friend class Window;
398  friend class StandaloneWindow;
399 #ifdef DISTRHO_DEFINES_H_INCLUDED
400  friend class DISTRHO_NAMESPACE::UI;
401 #endif
402 
403  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Widget)
404 };
405 
406 // -----------------------------------------------------------------------
407 
408 END_NAMESPACE_DGL
409 
410 #endif // DGL_WIDGET_HPP_INCLUDED
PositionChangedEvent() noexcept
Definition: Widget.hpp:191
+
Window & getParentWindow() const noexcept
const Point< int > & getAbsolutePos() const noexcept
virtual bool onSpecial(const SpecialEvent &)
virtual bool onScroll(const ScrollEvent &)
virtual bool onMouse(const MouseEvent &)
-
MouseEvent() noexcept
Definition: Widget.hpp:124
-
Definition: Widget.hpp:100
-
ScrollEvent() noexcept
Definition: Widget.hpp:156
-
ResizeEvent() noexcept
Definition: Widget.hpp:173
+
MouseEvent() noexcept
Definition: Widget.hpp:126
+
Definition: Widget.hpp:102
+
ScrollEvent() noexcept
Definition: Widget.hpp:158
+
ResizeEvent() noexcept
Definition: Widget.hpp:175
void setId(uint id) noexcept
Definition: NanoVG.hpp:875
-
Definition: Window.hpp:34
+
Definition: Window.hpp:36
virtual void onDisplay()=0
uint getWidth() const noexcept
-
MotionEvent() noexcept
Definition: Widget.hpp:140
+
MotionEvent() noexcept
Definition: Widget.hpp:142
bool contains(int x, int y) const noexcept
void setSize(uint width, uint height) noexcept
-
KeyboardEvent() noexcept
Definition: Widget.hpp:88
-
Definition: Widget.hpp:83
+
KeyboardEvent() noexcept
Definition: Widget.hpp:90
+
Definition: Widget.hpp:85
void setAbsolutePos(int x, int y) noexcept
virtual ~Widget()
int getAbsoluteX() const noexcept
@@ -93,28 +94,30 @@ $(function() {
Definition: StandaloneWindow.hpp:28
virtual void onResize(const ResizeEvent &)
-
Definition: Widget.hpp:136
+
Definition: Widget.hpp:138
void setAbsoluteY(int y) noexcept
void setHeight(uint height) noexcept
const Size< uint > & getSize() const noexcept
bool isVisible() const noexcept
void hide()
Definition: Application.hpp:41
-
Definition: Widget.hpp:168
-
Definition: Widget.hpp:67
-
BaseEvent() noexcept
Definition: Widget.hpp:72
+
Definition: Widget.hpp:170
+
Definition: Widget.hpp:69
+
BaseEvent() noexcept
Definition: Widget.hpp:74
virtual bool onMotion(const MotionEvent &)
-
Definition: Widget.hpp:59
+
Definition: Widget.hpp:61
virtual bool onKeyboard(const KeyboardEvent &)
-
Definition: Widget.hpp:118
-
virtual ~BaseEvent() noexcept
Definition: Widget.hpp:74
+
Definition: Widget.hpp:120
+
virtual void onPositionChanged(const PositionChangedEvent &)
+
virtual ~BaseEvent() noexcept
Definition: Widget.hpp:76
uint getId() const noexcept
uint getHeight() const noexcept
-
Definition: Widget.hpp:151
+
Definition: Widget.hpp:153
+
Definition: Widget.hpp:186
Widget(Window &parent)
void setWidth(uint width) noexcept
-
SpecialEvent() noexcept
Definition: Widget.hpp:105
-
Definition: DistrhoUI.hpp:50
+
SpecialEvent() noexcept
Definition: Widget.hpp:107
+
Definition: DistrhoUI.hpp:51
void repaint() noexcept
Definition: ImageWidgets.hpp:166
void show()
@@ -124,7 +127,7 @@ $(function() {
diff --git a/Window_8hpp_source.html b/Window_8hpp_source.html index 4662bb31..9e85767b 100644 --- a/Window_8hpp_source.html +++ b/Window_8hpp_source.html @@ -66,20 +66,20 @@ $(function() {
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 #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:60
+
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2019 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 #ifdef DISTRHO_DEFINES_H_INCLUDED
23 START_NAMESPACE_DISTRHO
24 class UIExporter;
25 END_NAMESPACE_DISTRHO
26 #endif
27 
28 START_NAMESPACE_DGL
29 
30 // -----------------------------------------------------------------------
31 
32 class Application;
33 class Widget;
34 class StandaloneWindow;
35 
36 class Window
37 {
38 public:
39 #ifndef DGL_FILE_BROWSER_DISABLED
40  /**
41  File browser options.
42  */
44  const char* startDir;
45  const char* title;
46  uint width;
47  uint height;
48 
49  /**
50  File browser buttons.
51 
52  0 means hidden.
53  1 means visible and unchecked.
54  2 means visible and checked.
55  */
56  struct Buttons {
57  uint listAllFiles;
58  uint showHidden;
59  uint showPlaces;
60 
61  /** Constuctor for default values */
63  : listAllFiles(2),
64  showHidden(1),
65  showPlaces(1) {}
66  } buttons;
67 
68  /** Constuctor for default values */
70  : startDir(nullptr),
71  title(nullptr),
72  width(0),
73  height(0),
74  buttons() {}
75  };
76 #endif // DGL_FILE_BROWSER_DISABLED
77 
78  explicit Window(Application& app);
79  explicit Window(Application& app, Window& parent);
80  explicit Window(Application& app, intptr_t parentId, bool resizable);
81  virtual ~Window();
82 
83  void show();
84  void hide();
85  void close();
86  void exec(bool lockWait = false);
87 
88  void focus();
89  void repaint() noexcept;
90 
91 #ifndef DGL_FILE_BROWSER_DISABLED
92  bool openFileBrowser(const FileBrowserOptions& options);
93 #endif
94 
95  bool isEmbed() const noexcept;
96 
97  bool isVisible() const noexcept;
98  void setVisible(bool yesNo);
99 
100  bool isResizable() const noexcept;
101  void setResizable(bool yesNo);
102 
103  uint getWidth() const noexcept;
104  uint getHeight() const noexcept;
105  Size<uint> getSize() const noexcept;
106  void setSize(uint width, uint height);
107  void setSize(Size<uint> size);
108 
109  const char* getTitle() const noexcept;
110  void setTitle(const char* title);
111 
112  void setGeometryConstraints(uint width, uint height, bool aspect);
113  void setTransientWinId(uintptr_t winId);
114 
115  double getScaling() const noexcept;
116  void setScaling(double scaling) noexcept;
117 
118  bool getIgnoringKeyRepeat() const noexcept;
119  void setIgnoringKeyRepeat(bool ignore) noexcept;
120 
121  Application& getApp() const noexcept;
122  intptr_t getWindowId() const noexcept;
123 
124  void addIdleCallback(IdleCallback* const callback);
125  void removeIdleCallback(IdleCallback* const callback);
126 
127 protected:
128  virtual void onDisplayBefore();
129  virtual void onDisplayAfter();
130  virtual void onReshape(uint width, uint height);
131  virtual void onClose();
132 
133 #ifndef DGL_FILE_BROWSER_DISABLED
134  virtual void fileBrowserSelected(const char* filename);
135 #endif
136 
137 private:
138  struct PrivateData;
139  PrivateData* const pData;
140  friend class Application;
141  friend class Widget;
142  friend class StandaloneWindow;
143 #ifdef DISTRHO_DEFINES_H_INCLUDED
144  friend class DISTRHO_NAMESPACE::UIExporter;
145 #endif
146 
147  virtual void _addWidget(Widget* const widget);
148  virtual void _removeWidget(Widget* const widget);
149  void _idle();
150 
151  bool handlePluginKeyboard(const bool press, const uint key);
152  bool handlePluginSpecial(const bool press, const Key key);
153 
154  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Window)
155 };
156 
157 // -----------------------------------------------------------------------
158 
159 END_NAMESPACE_DGL
160 
161 #endif // DGL_WINDOW_HPP_INCLUDED
FileBrowserOptions()
Definition: Window.hpp:69
+
Definition: Window.hpp:36
+
Buttons()
Definition: Window.hpp:62
Definition: StandaloneWindow.hpp:28
-
Definition: Window.hpp:41
+
Definition: Window.hpp:43
Definition: Base.hpp:178
-
Definition: Window.hpp:54
+
Definition: Window.hpp:56
Definition: Application.hpp:41
-
Definition: Widget.hpp:59
+
Definition: Widget.hpp:61
diff --git a/annotated.html b/annotated.html index 300539de..c2a08b40 100644 --- a/annotated.html +++ b/annotated.html @@ -116,18 +116,19 @@ $(function() {  CKeyboardEvent  CMotionEvent  CMouseEvent - CResizeEvent - CScrollEvent - CSpecialEvent - CWindow - CFileBrowserOptions - CButtons + CPositionChangedEvent + CResizeEvent + CScrollEvent + CSpecialEvent + CWindow + CFileBrowserOptions + CButtons
diff --git a/arrowdown.png b/arrowdown.png deleted file mode 100644 index 0b63f6d3..00000000 Binary files a/arrowdown.png and /dev/null differ diff --git a/arrowright.png b/arrowright.png deleted file mode 100644 index c6ee22f9..00000000 Binary files a/arrowright.png and /dev/null differ diff --git a/classApp-members.html b/classApp-members.html deleted file mode 100644 index acf84340..00000000 --- a/classApp-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Member List - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
- All Classes Functions Variables Modules Pages
- - -
- -
- -
-
-
-
App Member List
-
-
- -

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

- - - - - - - - -
App()App
exec()App
idle()App
isQuiting() const noexceptApp
quit()App
Window (defined in App)Appfriend
~App()App
- - - - diff --git a/classApp.html b/classApp.html deleted file mode 100644 index d6d76e5f..00000000 --- a/classApp.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: App Class Reference - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
- All Classes Functions Variables Modules Pages
- - -
- -
- -
-
-
-Public Member Functions | -Friends | -List of all members
-
-
App Class Reference
-
-
- -

#include <App.hpp>

-
-Inheritance diagram for App:
-
-
- - -StandaloneWindow - -
- - - - - - - - - - - - - - -

-Public Member Functions

 App ()
 
 ~App ()
 
void idle ()
 
void exec ()
 
void quit ()
 
bool isQuiting () const noexcept
 
- - - -

-Friends

-class Window
 
-

Detailed Description

-

Base DGL Application class.

-

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

- -
-
- - - - - - - -
App::App ()
-
-

Constructor.

- -
-
- -
-
- - - - - - - -
App::~App ()
-
-

Destructor.

- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
void App::idle ()
-
-

Idle function. This runs the application event-loop once.

- -
-
- -
-
- - - - - - - -
void App::exec ()
-
-

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.
- -
-
- -
-
- - - - - - - -
void App::quit ()
-
-

Quit the application. This stops the event-loop and closes all Windows.

- -
-
- -
-
- - - - - -
- - - - - - - -
bool App::isQuiting () const
-
-noexcept
-
-

Check if the application is about to quit. Returning true means there's no event-loop running at the moment (or it's just about to stop).

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classApp.png b/classApp.png deleted file mode 100644 index ef4a557b..00000000 Binary files a/classApp.png and /dev/null differ diff --git a/classApplication-members.html b/classApplication-members.html index 5271a340..b9983d8d 100644 --- a/classApplication-members.html +++ b/classApplication-members.html @@ -75,7 +75,7 @@ $(function() { diff --git a/classApplication.html b/classApplication.html index eb4a4e83..20b1c485 100644 --- a/classApplication.html +++ b/classApplication.html @@ -236,7 +236,7 @@ class Window diff --git a/classBlendishButton-members.html b/classBlendishButton-members.html deleted file mode 100644 index a921d2ce..00000000 --- a/classBlendishButton-members.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Member List - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- -
-
-
-
BlendishButton Member List
-
-
- -

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Align enum name (defined in NanoVG)NanoVG
ALIGN_BASELINE enum value (defined in NanoVG)NanoVG
ALIGN_BOTTOM enum value (defined in NanoVG)NanoVG
ALIGN_CENTER enum value (defined in NanoVG)NanoVG
ALIGN_LEFT enum value (defined in NanoVG)NanoVG
ALIGN_MIDDLE enum value (defined in NanoVG)NanoVG
ALIGN_RIGHT enum value (defined in NanoVG)NanoVG
ALIGN_TOP enum value (defined in NanoVG)NanoVG
arc(float cx, float cy, float r, float a0, float a1, Winding dir)NanoVG
arcTo(float x1, float y1, float x2, float y2, float radius)NanoVG
beginPath()NanoVG
BEVEL enum value (defined in NanoVG)NanoVG
bezierTo(float c1x, float c1y, float c2x, float c2y, float x, float y)NanoVG
BlendishButton(Window &parent, const char *text="", int iconId=-1) (defined in BlendishButton)BlendishButtonexplicit
BlendishButton(NanoWidget *widget, const char *text="", int iconId=-1) (defined in BlendishButton)BlendishButtonexplicit
boxGradient(float x, float y, float w, float h, float r, float f, const Color &icol, const Color &ocol)NanoVG
BUTT enum value (defined in NanoVG)NanoVG
CCW enum value (defined in NanoVG)NanoVG
circle(float cx, float cy, float r)NanoVG
closePath()NanoVG
contains(int x, int y) const noexceptWidget
contains(const Point< int > &pos) const noexceptWidget
CREATE_ANTIALIAS enum valueNanoVG
CREATE_DEBUG enum valueNanoVG
CREATE_STENCIL_STROKES enum valueNanoVG
CreateFlags enum nameNanoVG
createFontFromFile(const char *name, const char *filename)NanoVG
createFontFromMemory(const char *name, const uchar *data, uint dataSize, bool freeData)NanoVG
createImageFromFile(const char *filename, ImageFlags imageFlags)NanoVG
createImageFromFile(const char *filename, int imageFlags)NanoVG
createImageFromMemory(uchar *data, uint dataSize, ImageFlags imageFlags)NanoVG
createImageFromMemory(uchar *data, uint dataSize, int imageFlags)NanoVG
createImageFromRGBA(uint w, uint h, const uchar *data, ImageFlags imageFlags)NanoVG
createImageFromRGBA(uint w, uint h, const uchar *data, int imageFlags)NanoVG
createImageFromTextureHandle(GLuint textureId, uint w, uint h, ImageFlags imageFlags, bool deleteTexture=false)NanoVG
createImageFromTextureHandle(GLuint textureId, uint w, uint h, int imageFlags, bool deleteTexture=false)NanoVG
currentTransform(float xform[6])NanoVG
CW enum value (defined in NanoVG)NanoVG
degToRad(float deg)NanoVGstatic
ellipse(float cx, float cy, float rx, float ry)NanoVG
fill()NanoVG
fillColor(const Color &color)NanoVG
fillColor(const int red, const int green, const int blue, const int alpha=255)NanoVG
fillColor(const float red, const float green, const float blue, const float alpha=1.0f)NanoVG
fillPaint(const Paint &paint)NanoVG
findFont(const char *name)NanoVG
fontBlur(float blur)NanoVG
fontFace(const char *font)NanoVG
fontFaceId(FontId font)NanoVG
FontId typedef (defined in NanoVG)NanoVG
fontSize(float size)NanoVG
getAbsolutePos() const noexceptWidget
getAbsoluteX() const noexceptWidget
getAbsoluteY() const noexceptWidget
getContext() const noexceptNanoVGinline
getHeight() const noexceptWidget
getIconId() const noexcept (defined in BlendishButton)BlendishButton
getId() const noexceptWidget
getParentApp() const noexceptWidget
getParentWindow() const noexceptWidget
getSize() const noexceptWidget
getText() const noexcept (defined in BlendishButton)BlendishButton
getWidth() const noexceptWidget
globalAlpha(float alpha)NanoVG
hide()Widget
HOLE enum value (defined in NanoVG)NanoVG
IMAGE_FLIP_Y enum value (defined in NanoVG)NanoVG
IMAGE_GENERATE_MIPMAPS enum value (defined in NanoVG)NanoVG
IMAGE_PREMULTIPLIED enum value (defined in NanoVG)NanoVG
IMAGE_REPEAT_X enum value (defined in NanoVG)NanoVG
IMAGE_REPEAT_Y enum value (defined in NanoVG)NanoVG
ImageFlags enum name (defined in NanoVG)NanoVG
imagePattern(float ox, float oy, float ex, float ey, float angle, const NanoImage &image, float alpha)NanoVG
intersectScissor(float x, float y, float w, float h)NanoVG
isVisible() const noexceptWidget
linearGradient(float sx, float sy, float ex, float ey, const Color &icol, const Color &ocol)NanoVG
lineCap(LineCap cap=BUTT)NanoVG
LineCap enum name (defined in NanoVG)NanoVG
lineJoin(LineCap join=MITER)NanoVG
lineTo(float x, float y)NanoVG
MITER enum value (defined in NanoVG)NanoVG
miterLimit(float limit)NanoVG
moveTo(float x, float y)NanoVG
NanoVG(int flags=CREATE_ANTIALIAS)NanoVG
NanoVG(NanoWidget *groupWidget)NanoVG
NanoWidget(Window &parent, int flags=CREATE_ANTIALIAS)NanoWidgetexplicit
NanoWidget(Widget *groupWidget, int flags=CREATE_ANTIALIAS)NanoWidgetexplicit
NanoWidget(NanoWidget *groupWidget)NanoWidgetexplicit
onKeyboard(const KeyboardEvent &)Widgetprotectedvirtual
onMotion(const MotionEvent &) overrideBlendishButtonprotectedvirtual
onMouse(const MouseEvent &) overrideBlendishButtonprotectedvirtual
onNanoDisplay() overrideBlendishButtonprotectedvirtual
onResize(const ResizeEvent &)Widgetprotectedvirtual
onScroll(const ScrollEvent &)Widgetprotectedvirtual
onSpecial(const SpecialEvent &)Widgetprotectedvirtual
pathWinding(Winding dir)NanoVG
quadTo(float cx, float cy, float x, float y)NanoVG
radialGradient(float cx, float cy, float inr, float outr, const Color &icol, const Color &ocol)NanoVG
radToDeg(float rad)NanoVGstatic
rect(float x, float y, float w, float h)NanoVG
repaint() noexceptWidget
reset()NanoVG
resetScissor()NanoVG
resetTransform()NanoVG
restore()NanoVG
rotate(float angle)NanoVG
ROUND enum value (defined in NanoVG)NanoVG
roundedRect(float x, float y, float w, float h, float r)NanoVG
save()NanoVG
scale(float x, float y)NanoVG
scissor(float x, float y, float w, float h)NanoVG
setAbsolutePos(int x, int y) noexceptWidget
setAbsolutePos(const Point< int > &pos) noexceptWidget
setAbsoluteX(int x) noexceptWidget
setAbsoluteY(int y) noexceptWidget
setCallback(Callback *callback) noexcept (defined in BlendishButton)BlendishButton
setHeight(uint height) noexceptWidget
setIconId(int iconId) noexcept (defined in BlendishButton)BlendishButton
setId(uint id) noexceptWidget
setSize(uint width, uint height) noexceptWidget
setSize(const Size< uint > &size) noexceptWidget
setText(const char *text) noexcept (defined in BlendishButton)BlendishButton
setVisible(bool yesNo)Widget
setWidth(uint width) noexceptWidget
show()Widget
skewX(float angle)NanoVG
skewY(float angle)NanoVG
SOLID enum value (defined in NanoVG)NanoVG
Solidity enum name (defined in NanoVG)NanoVG
SQUARE enum value (defined in NanoVG)NanoVG
stroke()NanoVG
strokeColor(const Color &color)NanoVG
strokeColor(const int red, const int green, const int blue, const int alpha=255)NanoVG
strokeColor(const float red, const float green, const float blue, const float alpha=1.0f)NanoVG
strokePaint(const Paint &paint)NanoVG
strokeWidth(float size)NanoVG
text(float x, float y, const char *string, const char *end)NanoVG
textAlign(Align align)NanoVG
textAlign(int align)NanoVG
textBounds(float x, float y, const char *string, const char *end, Rectangle< float > &bounds)NanoVG
textBox(float x, float y, float breakRowWidth, const char *string, const char *end=nullptr)NanoVG
textBoxBounds(float x, float y, float breakRowWidth, const char *string, const char *end, float bounds[4])NanoVG
textBreakLines(const char *string, const char *end, float breakRowWidth, TextRow &rows, int maxRows)NanoVG
textGlyphPositions(float x, float y, const char *string, const char *end, GlyphPosition &positions, int maxPositions)NanoVG
textLetterSpacing(float spacing)NanoVG
textLineHeight(float lineHeight)NanoVG
textMetrics(float *ascender, float *descender, float *lineh)NanoVG
transform(float a, float b, float c, float d, float e, float f)NanoVG
transformIdentity(float dst[6])NanoVGstatic
transformInverse(float dst[6], const float src[6])NanoVGstatic
transformMultiply(float dst[6], const float src[6])NanoVGstatic
transformPoint(float &dstx, float &dsty, const float xform[6], float srcx, float srcy)NanoVGstatic
transformPremultiply(float dst[6], const float src[6])NanoVGstatic
transformRotate(float dst[6], float a)NanoVGstatic
transformScale(float dst[6], float sx, float sy)NanoVGstatic
transformSkewX(float dst[6], float a)NanoVGstatic
transformSkewY(float dst[6], float a)NanoVGstatic
transformTranslate(float dst[6], float tx, float ty)NanoVGstatic
translate(float x, float y)NanoVG
Widget(Window &parent)Widgetexplicit
Widget(Widget *groupWidget)Widgetexplicit
Winding enum name (defined in NanoVG)NanoVG
~BlendishButton() override (defined in BlendishButton)BlendishButton
~NanoVG()NanoVGvirtual
~NanoWidget()NanoWidgetvirtual
~Widget()Widgetvirtual
- - - - diff --git a/classBlendishButton.html b/classBlendishButton.html deleted file mode 100644 index 937bd520..00000000 --- a/classBlendishButton.html +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: BlendishButton Class Reference - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- -
-
-
-Classes | -Public Member Functions | -Protected Member Functions | -List of all members
-
-
BlendishButton Class Reference
-
-
-
-Inheritance diagram for BlendishButton:
-
-
- - -NanoWidget -Widget -NanoVG - -
- - - - -

-Classes

class  Callback
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

BlendishButton (Window &parent, const char *text="", int iconId=-1)
 
BlendishButton (NanoWidget *widget, const char *text="", int iconId=-1)
 
-int getIconId () const noexcept
 
-void setIconId (int iconId) noexcept
 
-const char * getText () const noexcept
 
-void setText (const char *text) noexcept
 
-void setCallback (Callback *callback) noexcept
 
- Public Member Functions inherited from NanoWidget
 NanoWidget (Window &parent, int flags=CREATE_ANTIALIAS)
 
 NanoWidget (Widget *groupWidget, int flags=CREATE_ANTIALIAS)
 
 NanoWidget (NanoWidget *groupWidget)
 
virtual ~NanoWidget ()
 
- Public Member Functions inherited from Widget
 Widget (Window &parent)
 
 Widget (Widget *groupWidget)
 
virtual ~Widget ()
 
bool isVisible () const noexcept
 
void setVisible (bool yesNo)
 
void show ()
 
void hide ()
 
uint getWidth () const noexcept
 
uint getHeight () const noexcept
 
const Size< uint > & getSize () const noexcept
 
void setWidth (uint width) noexcept
 
void setHeight (uint height) noexcept
 
void setSize (uint width, uint height) noexcept
 
void setSize (const Size< uint > &size) noexcept
 
int getAbsoluteX () const noexcept
 
int getAbsoluteY () const noexcept
 
const Point< int > & getAbsolutePos () const noexcept
 
void setAbsoluteX (int x) noexcept
 
void setAbsoluteY (int y) noexcept
 
void setAbsolutePos (int x, int y) noexcept
 
void setAbsolutePos (const Point< int > &pos) noexcept
 
ApplicationgetParentApp () const noexcept
 
WindowgetParentWindow () const noexcept
 
bool contains (int x, int y) const noexcept
 
bool contains (const Point< int > &pos) const noexcept
 
void repaint () noexcept
 
uint getId () const noexcept
 
void setId (uint id) noexcept
 
- Public Member Functions inherited from NanoVG
 NanoVG (int flags=CREATE_ANTIALIAS)
 
 NanoVG (NanoWidget *groupWidget)
 
virtual ~NanoVG ()
 
NVGcontext * getContext () const noexcept
 
void beginFrame (const uint width, const uint height, const float scaleFactor=1.0f)
 
void beginFrame (Widget *const widget)
 
void cancelFrame ()
 
void endFrame ()
 
void save ()
 
void restore ()
 
void reset ()
 
void strokeColor (const Color &color)
 
void strokeColor (const int red, const int green, const int blue, const int alpha=255)
 
void strokeColor (const float red, const float green, const float blue, const float alpha=1.0f)
 
void strokePaint (const Paint &paint)
 
void fillColor (const Color &color)
 
void fillColor (const int red, const int green, const int blue, const int alpha=255)
 
void fillColor (const float red, const float green, const float blue, const float alpha=1.0f)
 
void fillPaint (const Paint &paint)
 
void miterLimit (float limit)
 
void strokeWidth (float size)
 
void lineCap (LineCap cap=BUTT)
 
void lineJoin (LineCap join=MITER)
 
void globalAlpha (float alpha)
 
void resetTransform ()
 
void transform (float a, float b, float c, float d, float e, float f)
 
void translate (float x, float y)
 
void rotate (float angle)
 
void skewX (float angle)
 
void skewY (float angle)
 
void scale (float x, float y)
 
void currentTransform (float xform[6])
 
NanoImage::Handle createImageFromFile (const char *filename, ImageFlags imageFlags)
 
NanoImage::Handle createImageFromFile (const char *filename, int imageFlags)
 
NanoImage::Handle createImageFromMemory (uchar *data, uint dataSize, ImageFlags imageFlags)
 
NanoImage::Handle createImageFromMemory (uchar *data, uint dataSize, int imageFlags)
 
NanoImage::Handle createImageFromRGBA (uint w, uint h, const uchar *data, ImageFlags imageFlags)
 
NanoImage::Handle createImageFromRGBA (uint w, uint h, const uchar *data, int imageFlags)
 
NanoImage::Handle createImageFromTextureHandle (GLuint textureId, uint w, uint h, ImageFlags imageFlags, bool deleteTexture=false)
 
NanoImage::Handle createImageFromTextureHandle (GLuint textureId, uint w, uint h, int imageFlags, bool deleteTexture=false)
 
Paint linearGradient (float sx, float sy, float ex, float ey, const Color &icol, const Color &ocol)
 
Paint boxGradient (float x, float y, float w, float h, float r, float f, const Color &icol, const Color &ocol)
 
Paint radialGradient (float cx, float cy, float inr, float outr, const Color &icol, const Color &ocol)
 
Paint imagePattern (float ox, float oy, float ex, float ey, float angle, const NanoImage &image, float alpha)
 
void scissor (float x, float y, float w, float h)
 
void intersectScissor (float x, float y, float w, float h)
 
void resetScissor ()
 
void beginPath ()
 
void moveTo (float x, float y)
 
void lineTo (float x, float y)
 
void bezierTo (float c1x, float c1y, float c2x, float c2y, float x, float y)
 
void quadTo (float cx, float cy, float x, float y)
 
void arcTo (float x1, float y1, float x2, float y2, float radius)
 
void closePath ()
 
void pathWinding (Winding dir)
 
void arc (float cx, float cy, float r, float a0, float a1, Winding dir)
 
void rect (float x, float y, float w, float h)
 
void roundedRect (float x, float y, float w, float h, float r)
 
void ellipse (float cx, float cy, float rx, float ry)
 
void circle (float cx, float cy, float r)
 
void fill ()
 
void stroke ()
 
FontId createFontFromFile (const char *name, const char *filename)
 
FontId createFontFromMemory (const char *name, const uchar *data, uint dataSize, bool freeData)
 
FontId findFont (const char *name)
 
void fontSize (float size)
 
void fontBlur (float blur)
 
void textLetterSpacing (float spacing)
 
void textLineHeight (float lineHeight)
 
void textAlign (Align align)
 
void textAlign (int align)
 
void fontFaceId (FontId font)
 
void fontFace (const char *font)
 
float text (float x, float y, const char *string, const char *end)
 
void textBox (float x, float y, float breakRowWidth, const char *string, const char *end=nullptr)
 
float textBounds (float x, float y, const char *string, const char *end, Rectangle< float > &bounds)
 
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)
 
void textMetrics (float *ascender, float *descender, float *lineh)
 
int textBreakLines (const char *string, const char *end, float breakRowWidth, TextRow &rows, int maxRows)
 
- - - - - - - - - - - - - - - - -

-Protected Member Functions

void onNanoDisplay () override
 
bool onMouse (const MouseEvent &) override
 
bool onMotion (const MotionEvent &) override
 
- Protected Member Functions inherited from Widget
virtual bool onKeyboard (const KeyboardEvent &)
 
virtual bool onSpecial (const SpecialEvent &)
 
virtual bool onScroll (const ScrollEvent &)
 
virtual void onResize (const ResizeEvent &)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Types inherited from NanoVG
enum  CreateFlags { CREATE_ANTIALIAS = 1 << 0, -CREATE_STENCIL_STROKES = 1 << 1, -CREATE_DEBUG = 1 << 2 - }
 
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 {
-  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 {
-  BUTT, -ROUND, -SQUARE, -BEVEL, -
-  MITER -
- }
 
enum  Solidity { SOLID = 1, -HOLE = 2 - }
 
enum  Winding { CCW = 1, -CW = 2 - }
 
-typedef int FontId
 
- Static Public Member Functions inherited from NanoVG
static void transformIdentity (float dst[6])
 
static void transformTranslate (float dst[6], float tx, float ty)
 
static void transformScale (float dst[6], float sx, float sy)
 
static void transformRotate (float dst[6], float a)
 
static void transformSkewX (float dst[6], float a)
 
static void transformSkewY (float dst[6], float a)
 
static void transformMultiply (float dst[6], const float src[6])
 
static void transformPremultiply (float dst[6], const float src[6])
 
static int transformInverse (float dst[6], const float src[6])
 
static void transformPoint (float &dstx, float &dsty, const float xform[6], float srcx, float srcy)
 
static float degToRad (float deg)
 
static float radToDeg (float rad)
 
-

Member Function Documentation

- -
-
- - - - - -
- - - - - - - -
void BlendishButton::onNanoDisplay ()
-
-overrideprotectedvirtual
-
-

New virtual onDisplay function.

See also
onDisplay
- -

Implements NanoWidget.

- -
-
- -
-
- - - - - -
- - - - - - - - -
bool BlendishButton::onMouse (const MouseEvent)
-
-overrideprotectedvirtual
-
-

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

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

Reimplemented from Widget.

- -
-
- -
-
- - - - - -
- - - - - - - - -
bool BlendishButton::onMotion (const MotionEvent)
-
-overrideprotectedvirtual
-
-

A function called when the pointer moves.

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

Reimplemented from Widget.

- -
-
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classBlendishButton.png b/classBlendishButton.png deleted file mode 100644 index 889325a1..00000000 Binary files a/classBlendishButton.png and /dev/null differ diff --git a/classBlendishButton_1_1Callback-members.html b/classBlendishButton_1_1Callback-members.html deleted file mode 100644 index 9ffaac9c..00000000 --- a/classBlendishButton_1_1Callback-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Member List - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- - -
-
-
-
BlendishButton::Callback Member List
-
-
- -

This is the complete list of members for BlendishButton::Callback, including all inherited members.

- - - -
blendishButtonClicked(BlendishButton *blendishButton, int button)=0 (defined in BlendishButton::Callback)BlendishButton::Callbackpure virtual
~Callback() (defined in BlendishButton::Callback)BlendishButton::Callbackinlinevirtual
- - - - diff --git a/classBlendishButton_1_1Callback.html b/classBlendishButton_1_1Callback.html deleted file mode 100644 index 44213396..00000000 --- a/classBlendishButton_1_1Callback.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: BlendishButton::Callback Class Reference - - - - - - - - - - -
-
- - - - - - -
-
DISTRHO Plugin Framework -
-
-
- - - - - - -
-
- - -
- -
- - -
-
-
-Public Member Functions | -List of all members
-
-
BlendishButton::Callback Class Referenceabstract
-
-
- - - - -

-Public Member Functions

-virtual void blendishButtonClicked (BlendishButton *blendishButton, int button)=0
 
-
The documentation for this class was generated from the following file: -
- - - - diff --git a/classCircle-members.html b/classCircle-members.html index de24501a..0e431b4a 100644 --- a/classCircle-members.html +++ b/classCircle-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classCircle.html b/classCircle.html index b455a354..bdef5c6d 100644 --- a/classCircle.html +++ b/classCircle.html @@ -622,7 +622,7 @@ template<typename T> diff --git a/classExternalWindow-members.html b/classExternalWindow-members.html index 701a2e78..60eb8c1e 100644 --- a/classExternalWindow-members.html +++ b/classExternalWindow-members.html @@ -68,16 +68,22 @@ $(function() { ExternalWindow(const uint w=1, const uint h=1, const char *const t="") (defined in ExternalWindow)ExternalWindowinline getHeight() const noexcept (defined in ExternalWindow)ExternalWindowinline getTitle() const noexcept (defined in ExternalWindow)ExternalWindowinline - getWidth() const noexcept (defined in ExternalWindow)ExternalWindowinline - isRunning() noexcept (defined in ExternalWindow)ExternalWindowinline - setTitle(const char *const t) noexcept (defined in ExternalWindow)ExternalWindowinline - startExternalProcess(const char *args[]) (defined in ExternalWindow)ExternalWindowinlineprotected + getTransientWinId() const noexcept (defined in ExternalWindow)ExternalWindowinline + getWidth() const noexcept (defined in ExternalWindow)ExternalWindowinline + isRunning() noexcept (defined in ExternalWindow)ExternalWindowinline + isVisible() const noexcept (defined in ExternalWindow)ExternalWindowinline + setSize(uint w, uint h) (defined in ExternalWindow)ExternalWindowinlinevirtual + setTitle(const char *const t) (defined in ExternalWindow)ExternalWindowinlinevirtual + setTransientWinId(const uintptr_t winId) (defined in ExternalWindow)ExternalWindowinlinevirtual + setVisible(const bool yesNo) (defined in ExternalWindow)ExternalWindowinlinevirtual + startExternalProcess(const char *args[]) (defined in ExternalWindow)ExternalWindowinlineprotected + terminateAndWaitForProcess() (defined in ExternalWindow)ExternalWindowinlineprotected UIExporter (defined in ExternalWindow)ExternalWindowfriend ~ExternalWindow() (defined in ExternalWindow)ExternalWindowinlinevirtual diff --git a/classExternalWindow.html b/classExternalWindow.html index 0fb1d498..784c5825 100644 --- a/classExternalWindow.html +++ b/classExternalWindow.html @@ -82,18 +82,36 @@ uint getHeight () cons const char * getTitle () const noexcept   - -void setTitle (const char *const t) noexcept -  + +uintptr_t getTransientWinId () const noexcept +  + +bool isVisible () const noexcept +  bool isRunning () noexcept   + +virtual void setSize (uint w, uint h) +  + +virtual void setTitle (const char *const t) +  + +virtual void setTransientWinId (const uintptr_t winId) +  + +virtual void setVisible (const bool yesNo) +  + +

Protected Member Functions

bool startExternalProcess (const char *args[])
 
+void terminateAndWaitForProcess ()
 
@@ -107,7 +125,7 @@ class < diff --git a/classIdleCallback-members.html b/classIdleCallback-members.html index 53ca6a5e..d37c34b7 100644 --- a/classIdleCallback-members.html +++ b/classIdleCallback-members.html @@ -70,7 +70,7 @@ $(function() {

Friends

UIExporter
diff --git a/classIdleCallback.html b/classIdleCallback.html index 64aff4cf..6cbc30df 100644 --- a/classIdleCallback.html +++ b/classIdleCallback.html @@ -82,7 +82,7 @@ virtual void idleCallback< diff --git a/classImage-members.html b/classImage-members.html index 4f90db7f..d83d9286 100644 --- a/classImage-members.html +++ b/classImage-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classImage.html b/classImage.html index 3102c712..7973e525 100644 --- a/classImage.html +++ b/classImage.html @@ -622,7 +622,7 @@ bool operator!= (const diff --git a/classImageAboutWindow-members.html b/classImageAboutWindow-members.html index 8d076e20..591af993 100644 --- a/classImageAboutWindow-members.html +++ b/classImageAboutWindow-members.html @@ -79,8 +79,10 @@ $(function() { getHeight() const noexcept (defined in Window)Window Widget::getHeight() const noexceptWidget getId() const noexceptWidget - getParentApp() const noexceptWidget - getParentWindow() const noexceptWidget + getIgnoringKeyRepeat() const noexcept (defined in Window)Window + getParentApp() const noexceptWidget + getParentWindow() const noexceptWidget + getScaling() const noexcept (defined in Window)Window getSize() const noexcept (defined in Window)Window Widget::getSize() const noexceptWidget getTitle() const noexcept (defined in Window)Window @@ -91,16 +93,18 @@ $(function() { Widget::hide()Widget ImageAboutWindow(Window &parent, const Image &image=Image()) (defined in ImageAboutWindow)ImageAboutWindowexplicit ImageAboutWindow(Widget *widget, const Image &image=Image()) (defined in ImageAboutWindow)ImageAboutWindowexplicit - isResizable() const noexcept (defined in Window)Window - isVisible() const noexcept (defined in Window)Window - Widget::isVisible() const noexceptWidget - onClose() (defined in Window)Windowprotectedvirtual - onDisplay() overrideImageAboutWindowprotectedvirtual - onDisplayAfter() (defined in Window)Windowprotectedvirtual - onDisplayBefore() (defined in Window)Windowprotectedvirtual - onKeyboard(const KeyboardEvent &) overrideImageAboutWindowprotectedvirtual - onMotion(const MotionEvent &)Widgetprotectedvirtual - onMouse(const MouseEvent &) overrideImageAboutWindowprotectedvirtual + isEmbed() const noexcept (defined in Window)Window + isResizable() const noexcept (defined in Window)Window + isVisible() const noexcept (defined in Window)Window + Widget::isVisible() const noexceptWidget + onClose() (defined in Window)Windowprotectedvirtual + onDisplay() overrideImageAboutWindowprotectedvirtual + onDisplayAfter() (defined in Window)Windowprotectedvirtual + onDisplayBefore() (defined in Window)Windowprotectedvirtual + onKeyboard(const KeyboardEvent &) overrideImageAboutWindowprotectedvirtual + onMotion(const MotionEvent &)Widgetprotectedvirtual + onMouse(const MouseEvent &) overrideImageAboutWindowprotectedvirtual + onPositionChanged(const PositionChangedEvent &)Widgetprotectedvirtual onReshape(uint width, uint height) override (defined in ImageAboutWindow)ImageAboutWindowprotectedvirtual onResize(const ResizeEvent &)Widgetprotectedvirtual onScroll(const ScrollEvent &)Widgetprotectedvirtual @@ -113,32 +117,35 @@ $(function() { setAbsolutePos(const Point< int > &pos) noexceptWidget setAbsoluteX(int x) noexceptWidget setAbsoluteY(int y) noexceptWidget - setHeight(uint height) noexceptWidget - setId(uint id) noexceptWidget + setGeometryConstraints(uint width, uint height, bool aspect) (defined in Window)Window + setHeight(uint height) noexceptWidget + setId(uint id) noexceptWidget + setIgnoringKeyRepeat(bool ignore) noexcept (defined in Window)Window setImage(const Image &image) (defined in ImageAboutWindow)ImageAboutWindow setResizable(bool yesNo) (defined in Window)Window - setSize(uint width, uint height) (defined in Window)Window - setSize(Size< uint > size) (defined in Window)Window - Widget::setSize(uint width, uint height) noexceptWidget - Widget::setSize(const Size< uint > &size) noexceptWidget - setTitle(const char *title) (defined in Window)Window - setTransientWinId(uintptr_t winId) (defined in Window)Window - setVisible(bool yesNo) (defined in Window)Window - Widget::setVisible(bool yesNo)Widget - setWidth(uint width) noexceptWidget - show() (defined in Window)Window - Widget::show()Widget - Widget(Window &parent)Widgetexplicit - Widget::Widget(Widget *groupWidget)Widgetexplicit - 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 - ~Widget()Widgetvirtual - ~Window() (defined in Window)Windowvirtual + setScaling(double scaling) noexcept (defined in Window)Window + setSize(uint width, uint height) (defined in Window)Window + setSize(Size< uint > size) (defined in Window)Window + Widget::setSize(uint width, uint height) noexceptWidget + Widget::setSize(const Size< uint > &size) noexceptWidget + setTitle(const char *title) (defined in Window)Window + setTransientWinId(uintptr_t winId) (defined in Window)Window + setVisible(bool yesNo) (defined in Window)Window + Widget::setVisible(bool yesNo)Widget + setWidth(uint width) noexceptWidget + show() (defined in Window)Window + Widget::show()Widget + Widget(Window &parent)Widgetexplicit + Widget::Widget(Widget *groupWidget)Widgetexplicit + Window(Application &app) (defined in Window)Windowexplicit + Window(Application &app, Window &parent) (defined in Window)Windowexplicit + Window(Application &app, intptr_t parentId, bool resizable) (defined in Window)Windowexplicit + ~Widget()Widgetvirtual + ~Window() (defined in Window)Windowvirtual diff --git a/classImageAboutWindow.html b/classImageAboutWindow.html index 3096a94a..ef951591 100644 --- a/classImageAboutWindow.html +++ b/classImageAboutWindow.html @@ -95,9 +95,9 @@ void setImage (const <  Window (Application &app, Window &parent)   -Window (Application &app, intptr_t parentId) -  +Window (Application &app, intptr_t parentId, bool resizable) +  void show ()   @@ -119,6 +119,9 @@ void repaint () noexce bool openFileBrowser (const FileBrowserOptions &options)   + +bool isEmbed () const noexcept +  bool isVisible () const noexcept   @@ -152,9 +155,24 @@ const char * getTitle void setTitle (const char *title)   + +void setGeometryConstraints (uint width, uint height, bool aspect) +  void setTransientWinId (uintptr_t winId)   + +double getScaling () const noexcept +  + +void setScaling (double scaling) noexcept +  + +bool getIgnoringKeyRepeat () const noexcept +  + +void setIgnoringKeyRepeat (bool ignore) noexcept +  ApplicationgetApp () const noexcept   @@ -258,6 +276,8 @@ virtual void fileBrowserSe   virtual void onResize (const ResizeEvent &)   +virtual void onPositionChanged (const PositionChangedEvent &) + 

Member Function Documentation

@@ -352,7 +372,7 @@ virtual void fileBrowserSe diff --git a/classImageButton-members.html b/classImageButton-members.html index 01267f61..f08d1242 100644 --- a/classImageButton-members.html +++ b/classImageButton-members.html @@ -88,30 +88,31 @@ $(function() { onKeyboard(const KeyboardEvent &)Widgetprotectedvirtual onMotion(const MotionEvent &) overrideImageButtonprotectedvirtual onMouse(const MouseEvent &) overrideImageButtonprotectedvirtual - onResize(const ResizeEvent &)Widgetprotectedvirtual - onScroll(const ScrollEvent &)Widgetprotectedvirtual - onSpecial(const SpecialEvent &)Widgetprotectedvirtual - repaint() noexceptWidget - setAbsolutePos(int x, int y) noexceptWidget - setAbsolutePos(const Point< int > &pos) noexceptWidget - setAbsoluteX(int x) noexceptWidget - setAbsoluteY(int y) noexceptWidget - setCallback(Callback *callback) noexcept (defined in ImageButton)ImageButton - setHeight(uint height) noexceptWidget - setId(uint id) noexceptWidget - setSize(uint width, uint height) noexceptWidget - setSize(const Size< uint > &size) noexceptWidget - setVisible(bool yesNo)Widget - setWidth(uint width) noexceptWidget - show()Widget - Widget(Window &parent)Widgetexplicit - Widget(Widget *groupWidget)Widgetexplicit - ~ImageButton() override (defined in ImageButton)ImageButton - ~Widget()Widgetvirtual + onPositionChanged(const PositionChangedEvent &)Widgetprotectedvirtual + onResize(const ResizeEvent &)Widgetprotectedvirtual + onScroll(const ScrollEvent &)Widgetprotectedvirtual + onSpecial(const SpecialEvent &)Widgetprotectedvirtual + repaint() noexceptWidget + setAbsolutePos(int x, int y) noexceptWidget + setAbsolutePos(const Point< int > &pos) noexceptWidget + setAbsoluteX(int x) noexceptWidget + setAbsoluteY(int y) noexceptWidget + setCallback(Callback *callback) noexcept (defined in ImageButton)ImageButton + setHeight(uint height) noexceptWidget + setId(uint id) noexceptWidget + setSize(uint width, uint height) noexceptWidget + setSize(const Size< uint > &size) noexceptWidget + setVisible(bool yesNo)Widget + setWidth(uint width) noexceptWidget + show()Widget + Widget(Window &parent)Widgetexplicit + Widget(Widget *groupWidget)Widgetexplicit + ~ImageButton() override (defined in ImageButton)ImageButton + ~Widget()Widgetvirtual diff --git a/classImageButton.html b/classImageButton.html index 3127b34f..c8c38d37 100644 --- a/classImageButton.html +++ b/classImageButton.html @@ -180,6 +180,8 @@ Protected Member Functions   virtual void onResize (const ResizeEvent &)   +virtual void onPositionChanged (const PositionChangedEvent &) + 

Member Function Documentation

@@ -274,7 +276,7 @@ Protected Member Functions diff --git a/classImageButton_1_1Callback-members.html b/classImageButton_1_1Callback-members.html index aa1e82ab..b2a0c926 100644 --- a/classImageButton_1_1Callback-members.html +++ b/classImageButton_1_1Callback-members.html @@ -74,7 +74,7 @@ $(function() { diff --git a/classImageButton_1_1Callback.html b/classImageButton_1_1Callback.html index 06db0032..e7829b8e 100644 --- a/classImageButton_1_1Callback.html +++ b/classImageButton_1_1Callback.html @@ -82,7 +82,7 @@ virtual void imageButtonCl diff --git a/classImageKnob-members.html b/classImageKnob-members.html index 480e7cc4..a8f4ad7e 100644 --- a/classImageKnob-members.html +++ b/classImageKnob-members.html @@ -87,41 +87,42 @@ $(function() { onKeyboard(const KeyboardEvent &)Widgetprotectedvirtual onMotion(const MotionEvent &) overrideImageKnobprotectedvirtual onMouse(const MouseEvent &) overrideImageKnobprotectedvirtual - onResize(const ResizeEvent &)Widgetprotectedvirtual - onScroll(const ScrollEvent &) overrideImageKnobprotectedvirtual - onSpecial(const SpecialEvent &)Widgetprotectedvirtual - operator=(const ImageKnob &imageKnob) (defined in ImageKnob)ImageKnob - Orientation enum name (defined in ImageKnob)ImageKnob - repaint() noexceptWidget - setAbsolutePos(int x, int y) noexceptWidget - setAbsolutePos(const Point< int > &pos) noexceptWidget - setAbsoluteX(int x) noexceptWidget - setAbsoluteY(int y) noexceptWidget - setCallback(Callback *callback) noexcept (defined in ImageKnob)ImageKnob - setDefault(float def) noexcept (defined in ImageKnob)ImageKnob - setHeight(uint height) noexceptWidget - setId(uint id) noexceptWidget - setImageLayerCount(uint count) noexcept (defined in ImageKnob)ImageKnob - setOrientation(Orientation orientation) noexcept (defined in ImageKnob)ImageKnob - setRange(float min, float max) noexcept (defined in ImageKnob)ImageKnob - setRotationAngle(int angle) (defined in ImageKnob)ImageKnob - setSize(uint width, uint height) noexceptWidget - setSize(const Size< uint > &size) noexceptWidget - setStep(float step) noexcept (defined in ImageKnob)ImageKnob - setUsingLogScale(bool yesNo) noexcept (defined in ImageKnob)ImageKnob - setValue(float value, bool sendCallback=false) noexcept (defined in ImageKnob)ImageKnob - setVisible(bool yesNo)Widget - setWidth(uint width) noexceptWidget - show()Widget - Vertical enum value (defined in ImageKnob)ImageKnob - Widget(Window &parent)Widgetexplicit - Widget(Widget *groupWidget)Widgetexplicit - ~ImageKnob() override (defined in ImageKnob)ImageKnob - ~Widget()Widgetvirtual + onPositionChanged(const PositionChangedEvent &)Widgetprotectedvirtual + onResize(const ResizeEvent &)Widgetprotectedvirtual + onScroll(const ScrollEvent &) overrideImageKnobprotectedvirtual + onSpecial(const SpecialEvent &)Widgetprotectedvirtual + operator=(const ImageKnob &imageKnob) (defined in ImageKnob)ImageKnob + Orientation enum name (defined in ImageKnob)ImageKnob + repaint() noexceptWidget + setAbsolutePos(int x, int y) noexceptWidget + setAbsolutePos(const Point< int > &pos) noexceptWidget + setAbsoluteX(int x) noexceptWidget + setAbsoluteY(int y) noexceptWidget + setCallback(Callback *callback) noexcept (defined in ImageKnob)ImageKnob + setDefault(float def) noexcept (defined in ImageKnob)ImageKnob + setHeight(uint height) noexceptWidget + setId(uint id) noexceptWidget + setImageLayerCount(uint count) noexcept (defined in ImageKnob)ImageKnob + setOrientation(Orientation orientation) noexcept (defined in ImageKnob)ImageKnob + setRange(float min, float max) noexcept (defined in ImageKnob)ImageKnob + setRotationAngle(int angle) (defined in ImageKnob)ImageKnob + setSize(uint width, uint height) noexceptWidget + setSize(const Size< uint > &size) noexceptWidget + setStep(float step) noexcept (defined in ImageKnob)ImageKnob + setUsingLogScale(bool yesNo) noexcept (defined in ImageKnob)ImageKnob + setValue(float value, bool sendCallback=false) noexcept (defined in ImageKnob)ImageKnob + setVisible(bool yesNo)Widget + setWidth(uint width) noexceptWidget + show()Widget + Vertical enum value (defined in ImageKnob)ImageKnob + Widget(Window &parent)Widgetexplicit + Widget(Widget *groupWidget)Widgetexplicit + ~ImageKnob() override (defined in ImageKnob)ImageKnob + ~Widget()Widgetvirtual diff --git a/classImageKnob.html b/classImageKnob.html index 70c6b489..864261cf 100644 --- a/classImageKnob.html +++ b/classImageKnob.html @@ -209,6 +209,8 @@ Protected Member Functions   virtual void onResize (const ResizeEvent &)   +virtual void onPositionChanged (const PositionChangedEvent &) + 

Member Function Documentation

@@ -332,7 +334,7 @@ Protected Member Functions diff --git a/classImageKnob_1_1Callback-members.html b/classImageKnob_1_1Callback-members.html index 537d2bf2..aaf760c0 100644 --- a/classImageKnob_1_1Callback-members.html +++ b/classImageKnob_1_1Callback-members.html @@ -76,7 +76,7 @@ $(function() { diff --git a/classImageKnob_1_1Callback.html b/classImageKnob_1_1Callback.html index 7ac0f1ad..cd92972a 100644 --- a/classImageKnob_1_1Callback.html +++ b/classImageKnob_1_1Callback.html @@ -88,7 +88,7 @@ virtual void imageKnobValu diff --git a/classImageSlider-members.html b/classImageSlider-members.html index 7efb0343..8abf4039 100644 --- a/classImageSlider-members.html +++ b/classImageSlider-members.html @@ -85,15 +85,17 @@ $(function() { onKeyboard(const KeyboardEvent &)Widgetprotectedvirtual onMotion(const MotionEvent &) overrideImageSliderprotectedvirtual onMouse(const MouseEvent &) overrideImageSliderprotectedvirtual - onResize(const ResizeEvent &)Widgetprotectedvirtual - onScroll(const ScrollEvent &)Widgetprotectedvirtual - onSpecial(const SpecialEvent &)Widgetprotectedvirtual - repaint() noexceptWidget - Widget::setAbsolutePos(int x, int y) noexceptWidget - Widget::setAbsolutePos(const Point< int > &pos) noexceptWidget - Widget::setAbsoluteX(int x) noexceptWidget - Widget::setAbsoluteY(int y) noexceptWidget - setCallback(Callback *callback) noexcept (defined in ImageSlider)ImageSlider + onPositionChanged(const PositionChangedEvent &)Widgetprotectedvirtual + onResize(const ResizeEvent &)Widgetprotectedvirtual + onScroll(const ScrollEvent &)Widgetprotectedvirtual + onSpecial(const SpecialEvent &)Widgetprotectedvirtual + repaint() noexceptWidget + Widget::setAbsolutePos(int x, int y) noexceptWidget + Widget::setAbsolutePos(const Point< int > &pos) noexceptWidget + Widget::setAbsoluteX(int x) noexceptWidget + Widget::setAbsoluteY(int y) noexceptWidget + setCallback(Callback *callback) noexcept (defined in ImageSlider)ImageSlider + setDefault(float def) noexcept (defined in ImageSlider)ImageSlider setEndPos(const Point< int > &endPos) noexcept (defined in ImageSlider)ImageSlider setEndPos(int x, int y) noexcept (defined in ImageSlider)ImageSlider setHeight(uint height) noexceptWidget @@ -115,7 +117,7 @@ $(function() { diff --git a/classImageSlider.html b/classImageSlider.html index 47f417f6..e4da80ad 100644 --- a/classImageSlider.html +++ b/classImageSlider.html @@ -96,6 +96,9 @@ float getValue () cons void setValue (float value, bool sendCallback=false) noexcept   + +void setDefault (float def) noexcept +  void setStartPos (const Point< int > &startPos) noexcept   @@ -195,6 +198,8 @@ Protected Member Functions   virtual void onResize (const ResizeEvent &)   +virtual void onPositionChanged (const PositionChangedEvent &) + 

Member Function Documentation

@@ -289,7 +294,7 @@ Protected Member Functions diff --git a/classImageSlider_1_1Callback-members.html b/classImageSlider_1_1Callback-members.html index 87fba8da..6d0fae77 100644 --- a/classImageSlider_1_1Callback-members.html +++ b/classImageSlider_1_1Callback-members.html @@ -76,7 +76,7 @@ $(function() { diff --git a/classImageSlider_1_1Callback.html b/classImageSlider_1_1Callback.html index 29ec7dd4..d6e9cd4c 100644 --- a/classImageSlider_1_1Callback.html +++ b/classImageSlider_1_1Callback.html @@ -88,7 +88,7 @@ virtual void imageSliderVa diff --git a/classImageSwitch-members.html b/classImageSwitch-members.html index 2bb2acbf..597edf2d 100644 --- a/classImageSwitch-members.html +++ b/classImageSwitch-members.html @@ -86,31 +86,32 @@ $(function() { onKeyboard(const KeyboardEvent &)Widgetprotectedvirtual onMotion(const MotionEvent &)Widgetprotectedvirtual onMouse(const MouseEvent &) overrideImageSwitchprotectedvirtual - onResize(const ResizeEvent &)Widgetprotectedvirtual - onScroll(const ScrollEvent &)Widgetprotectedvirtual - onSpecial(const SpecialEvent &)Widgetprotectedvirtual - operator=(const ImageSwitch &imageSwitch) noexcept (defined in ImageSwitch)ImageSwitch - repaint() noexceptWidget - setAbsolutePos(int x, int y) noexceptWidget - setAbsolutePos(const Point< int > &pos) noexceptWidget - setAbsoluteX(int x) noexceptWidget - setAbsoluteY(int y) noexceptWidget - setCallback(Callback *callback) noexcept (defined in ImageSwitch)ImageSwitch - setDown(bool down) noexcept (defined in ImageSwitch)ImageSwitch - setHeight(uint height) noexceptWidget - setId(uint id) noexceptWidget - setSize(uint width, uint height) noexceptWidget - setSize(const Size< uint > &size) noexceptWidget - setVisible(bool yesNo)Widget - setWidth(uint width) noexceptWidget - show()Widget - Widget(Window &parent)Widgetexplicit - Widget(Widget *groupWidget)Widgetexplicit - ~Widget()Widgetvirtual + onPositionChanged(const PositionChangedEvent &)Widgetprotectedvirtual + onResize(const ResizeEvent &)Widgetprotectedvirtual + onScroll(const ScrollEvent &)Widgetprotectedvirtual + onSpecial(const SpecialEvent &)Widgetprotectedvirtual + operator=(const ImageSwitch &imageSwitch) noexcept (defined in ImageSwitch)ImageSwitch + repaint() noexceptWidget + setAbsolutePos(int x, int y) noexceptWidget + setAbsolutePos(const Point< int > &pos) noexceptWidget + setAbsoluteX(int x) noexceptWidget + setAbsoluteY(int y) noexceptWidget + setCallback(Callback *callback) noexcept (defined in ImageSwitch)ImageSwitch + setDown(bool down) noexcept (defined in ImageSwitch)ImageSwitch + setHeight(uint height) noexceptWidget + setId(uint id) noexceptWidget + setSize(uint width, uint height) noexceptWidget + setSize(const Size< uint > &size) noexceptWidget + setVisible(bool yesNo)Widget + setWidth(uint width) noexceptWidget + show()Widget + Widget(Window &parent)Widgetexplicit + Widget(Widget *groupWidget)Widgetexplicit + ~Widget()Widgetvirtual diff --git a/classImageSwitch.html b/classImageSwitch.html index 3dfb9577..2d92b7a4 100644 --- a/classImageSwitch.html +++ b/classImageSwitch.html @@ -180,6 +180,8 @@ Protected Member Functions   virtual void onResize (const ResizeEvent &)   +virtual void onPositionChanged (const PositionChangedEvent &) + 

Member Function Documentation

@@ -245,7 +247,7 @@ Protected Member Functions diff --git a/classImageSwitch_1_1Callback-members.html b/classImageSwitch_1_1Callback-members.html index 33f34a9b..aceb12fc 100644 --- a/classImageSwitch_1_1Callback-members.html +++ b/classImageSwitch_1_1Callback-members.html @@ -69,12 +69,12 @@ $(function() {

This is the complete list of members for ImageSwitch::Callback, including all inherited members.

- +
imageSwitchClicked(ImageSwitch *imageButton, bool down)=0 (defined in ImageSwitch::Callback)ImageSwitch::Callbackpure virtual
imageSwitchClicked(ImageSwitch *imageSwitch, bool down)=0 (defined in ImageSwitch::Callback)ImageSwitch::Callbackpure virtual
~Callback() (defined in ImageSwitch::Callback)ImageSwitch::Callbackinlinevirtual
diff --git a/classImageSwitch_1_1Callback.html b/classImageSwitch_1_1Callback.html index 9120d049..365b8246 100644 --- a/classImageSwitch_1_1Callback.html +++ b/classImageSwitch_1_1Callback.html @@ -72,9 +72,9 @@ $(function() { - - + +

Public Member Functions

-virtual void imageSwitchClicked (ImageSwitch *imageButton, bool down)=0
 
+virtual void imageSwitchClicked (ImageSwitch *imageSwitch, bool down)=0
 

The documentation for this class was generated from the following file:
  • dgl/ImageWidgets.hpp
  • @@ -82,7 +82,7 @@ virtual void imageSwitchCl diff --git a/classLeakedObjectDetector-members.html b/classLeakedObjectDetector-members.html index b9ba2e27..97be8960 100644 --- a/classLeakedObjectDetector-members.html +++ b/classLeakedObjectDetector-members.html @@ -71,7 +71,7 @@ $(function() { diff --git a/classLeakedObjectDetector.html b/classLeakedObjectDetector.html index c67757d8..bcdae225 100644 --- a/classLeakedObjectDetector.html +++ b/classLeakedObjectDetector.html @@ -121,7 +121,7 @@ template<class OwnerClass > diff --git a/classLine-members.html b/classLine-members.html index b76b0777..8ba3e3ca 100644 --- a/classLine-members.html +++ b/classLine-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classLine.html b/classLine.html index 82ea4219..685d230e 100644 --- a/classLine.html +++ b/classLine.html @@ -945,7 +945,7 @@ template<typename T> diff --git a/classMutex-members.html b/classMutex-members.html index 1ca502a5..3e4ffb52 100644 --- a/classMutex-members.html +++ b/classMutex-members.html @@ -73,7 +73,7 @@ $(function() { diff --git a/classMutex.html b/classMutex.html index 9892ecf8..f396f746 100644 --- a/classMutex.html +++ b/classMutex.html @@ -87,7 +87,7 @@ void unlock () const n diff --git a/classNanoImage-members.html b/classNanoImage-members.html index 426d8f0f..e3531c71 100644 --- a/classNanoImage-members.html +++ b/classNanoImage-members.html @@ -76,7 +76,7 @@ $(function() { diff --git a/classNanoImage.html b/classNanoImage.html index 54a6cec2..9e28060e 100644 --- a/classNanoImage.html +++ b/classNanoImage.html @@ -248,7 +248,7 @@ class NanoVG diff --git a/classNanoVG-members.html b/classNanoVG-members.html index d799f377..e22f08fc 100644 --- a/classNanoVG-members.html +++ b/classNanoVG-members.html @@ -193,7 +193,7 @@ $(function() { diff --git a/classNanoVG.html b/classNanoVG.html index d58feda4..32b4388c 100644 --- a/classNanoVG.html +++ b/classNanoVG.html @@ -3358,7 +3358,7 @@ Text diff --git a/classNanoWidget-members.html b/classNanoWidget-members.html index ff9ddb33..78676a8c 100644 --- a/classNanoWidget-members.html +++ b/classNanoWidget-members.html @@ -154,80 +154,81 @@ $(function() { onMotion(const MotionEvent &)Widgetprotectedvirtual onMouse(const MouseEvent &)Widgetprotectedvirtual onNanoDisplay()=0NanoWidgetprotectedpure virtual - onResize(const ResizeEvent &)Widgetprotectedvirtual - onScroll(const ScrollEvent &)Widgetprotectedvirtual - onSpecial(const SpecialEvent &)Widgetprotectedvirtual - pathWinding(Winding dir)NanoVG - quadTo(float cx, float cy, float x, float y)NanoVG - radialGradient(float cx, float cy, float inr, float outr, const Color &icol, const Color &ocol)NanoVG - radToDeg(float rad)NanoVGstatic - rect(float x, float y, float w, float h)NanoVG - repaint() noexceptWidget - reset()NanoVG - resetScissor()NanoVG - resetTransform()NanoVG - restore()NanoVG - rotate(float angle)NanoVG - ROUND enum value (defined in NanoVG)NanoVG - roundedRect(float x, float y, float w, float h, float r)NanoVG - save()NanoVG - scale(float x, float y)NanoVG - scissor(float x, float y, float w, float h)NanoVG - setAbsolutePos(int x, int y) noexceptWidget - setAbsolutePos(const Point< int > &pos) noexceptWidget - setAbsoluteX(int x) noexceptWidget - setAbsoluteY(int y) noexceptWidget - setHeight(uint height) noexceptWidget - setId(uint id) noexceptWidget - setSize(uint width, uint height) noexceptWidget - setSize(const Size< uint > &size) noexceptWidget - setVisible(bool yesNo)Widget - setWidth(uint width) noexceptWidget - show()Widget - skewX(float angle)NanoVG - skewY(float angle)NanoVG - SOLID enum value (defined in NanoVG)NanoVG - Solidity enum name (defined in NanoVG)NanoVG - SQUARE enum value (defined in NanoVG)NanoVG - stroke()NanoVG - strokeColor(const Color &color)NanoVG - strokeColor(const int red, const int green, const int blue, const int alpha=255)NanoVG - strokeColor(const float red, const float green, const float blue, const float alpha=1.0f)NanoVG - strokePaint(const Paint &paint)NanoVG - strokeWidth(float size)NanoVG - text(float x, float y, const char *string, const char *end)NanoVG - textAlign(Align align)NanoVG - textAlign(int align)NanoVG - textBounds(float x, float y, const char *string, const char *end, Rectangle< float > &bounds)NanoVG - textBox(float x, float y, float breakRowWidth, const char *string, const char *end=nullptr)NanoVG - textBoxBounds(float x, float y, float breakRowWidth, const char *string, const char *end, float bounds[4])NanoVG - textBreakLines(const char *string, const char *end, float breakRowWidth, TextRow &rows, int maxRows)NanoVG - textGlyphPositions(float x, float y, const char *string, const char *end, GlyphPosition &positions, int maxPositions)NanoVG - textLetterSpacing(float spacing)NanoVG - textLineHeight(float lineHeight)NanoVG - textMetrics(float *ascender, float *descender, float *lineh)NanoVG - transform(float a, float b, float c, float d, float e, float f)NanoVG - transformIdentity(float dst[6])NanoVGstatic - transformInverse(float dst[6], const float src[6])NanoVGstatic - transformMultiply(float dst[6], const float src[6])NanoVGstatic - transformPoint(float &dstx, float &dsty, const float xform[6], float srcx, float srcy)NanoVGstatic - transformPremultiply(float dst[6], const float src[6])NanoVGstatic - transformRotate(float dst[6], float a)NanoVGstatic - transformScale(float dst[6], float sx, float sy)NanoVGstatic - transformSkewX(float dst[6], float a)NanoVGstatic - transformSkewY(float dst[6], float a)NanoVGstatic - transformTranslate(float dst[6], float tx, float ty)NanoVGstatic - translate(float x, float y)NanoVG - Widget(Window &parent)Widgetexplicit - Widget(Widget *groupWidget)Widgetexplicit - Winding enum name (defined in NanoVG)NanoVG - ~NanoVG()NanoVGvirtual - ~NanoWidget()NanoWidgetvirtual - ~Widget()Widgetvirtual + onPositionChanged(const PositionChangedEvent &)Widgetprotectedvirtual + onResize(const ResizeEvent &)Widgetprotectedvirtual + onScroll(const ScrollEvent &)Widgetprotectedvirtual + onSpecial(const SpecialEvent &)Widgetprotectedvirtual + pathWinding(Winding dir)NanoVG + quadTo(float cx, float cy, float x, float y)NanoVG + radialGradient(float cx, float cy, float inr, float outr, const Color &icol, const Color &ocol)NanoVG + radToDeg(float rad)NanoVGstatic + rect(float x, float y, float w, float h)NanoVG + repaint() noexceptWidget + reset()NanoVG + resetScissor()NanoVG + resetTransform()NanoVG + restore()NanoVG + rotate(float angle)NanoVG + ROUND enum value (defined in NanoVG)NanoVG + roundedRect(float x, float y, float w, float h, float r)NanoVG + save()NanoVG + scale(float x, float y)NanoVG + scissor(float x, float y, float w, float h)NanoVG + setAbsolutePos(int x, int y) noexceptWidget + setAbsolutePos(const Point< int > &pos) noexceptWidget + setAbsoluteX(int x) noexceptWidget + setAbsoluteY(int y) noexceptWidget + setHeight(uint height) noexceptWidget + setId(uint id) noexceptWidget + setSize(uint width, uint height) noexceptWidget + setSize(const Size< uint > &size) noexceptWidget + setVisible(bool yesNo)Widget + setWidth(uint width) noexceptWidget + show()Widget + skewX(float angle)NanoVG + skewY(float angle)NanoVG + SOLID enum value (defined in NanoVG)NanoVG + Solidity enum name (defined in NanoVG)NanoVG + SQUARE enum value (defined in NanoVG)NanoVG + stroke()NanoVG + strokeColor(const Color &color)NanoVG + strokeColor(const int red, const int green, const int blue, const int alpha=255)NanoVG + strokeColor(const float red, const float green, const float blue, const float alpha=1.0f)NanoVG + strokePaint(const Paint &paint)NanoVG + strokeWidth(float size)NanoVG + text(float x, float y, const char *string, const char *end)NanoVG + textAlign(Align align)NanoVG + textAlign(int align)NanoVG + textBounds(float x, float y, const char *string, const char *end, Rectangle< float > &bounds)NanoVG + textBox(float x, float y, float breakRowWidth, const char *string, const char *end=nullptr)NanoVG + textBoxBounds(float x, float y, float breakRowWidth, const char *string, const char *end, float bounds[4])NanoVG + textBreakLines(const char *string, const char *end, float breakRowWidth, TextRow &rows, int maxRows)NanoVG + textGlyphPositions(float x, float y, const char *string, const char *end, GlyphPosition &positions, int maxPositions)NanoVG + textLetterSpacing(float spacing)NanoVG + textLineHeight(float lineHeight)NanoVG + textMetrics(float *ascender, float *descender, float *lineh)NanoVG + transform(float a, float b, float c, float d, float e, float f)NanoVG + transformIdentity(float dst[6])NanoVGstatic + transformInverse(float dst[6], const float src[6])NanoVGstatic + transformMultiply(float dst[6], const float src[6])NanoVGstatic + transformPoint(float &dstx, float &dsty, const float xform[6], float srcx, float srcy)NanoVGstatic + transformPremultiply(float dst[6], const float src[6])NanoVGstatic + transformRotate(float dst[6], float a)NanoVGstatic + transformScale(float dst[6], float sx, float sy)NanoVGstatic + transformSkewX(float dst[6], float a)NanoVGstatic + transformSkewY(float dst[6], float a)NanoVGstatic + transformTranslate(float dst[6], float tx, float ty)NanoVGstatic + translate(float x, float y)NanoVG + Widget(Window &parent)Widgetexplicit + Widget(Widget *groupWidget)Widgetexplicit + Winding enum name (defined in NanoVG)NanoVG + ~NanoVG()NanoVGvirtual + ~NanoWidget()NanoWidgetvirtual + ~Widget()Widgetvirtual diff --git a/classNanoWidget.html b/classNanoWidget.html index 9df4891f..15f289b2 100644 --- a/classNanoWidget.html +++ b/classNanoWidget.html @@ -327,6 +327,8 @@ Protected Member Functions   virtual void onResize (const ResizeEvent &)   +virtual void onPositionChanged (const PositionChangedEvent &) +  @@ -569,7 +571,7 @@ typedef int  diff --git a/classPlugin-members.html b/classPlugin-members.html index 06ceb485..17e8e492 100644 --- a/classPlugin-members.html +++ b/classPlugin-members.html @@ -98,7 +98,7 @@ $(function() {

    Additional Inherited Members

    FontId
    diff --git a/classPlugin.html b/classPlugin.html index 227f4342..ecc5660b 100644 --- a/classPlugin.html +++ b/classPlugin.html @@ -1077,7 +1077,7 @@ This function will only be called when the plugin is deactivated.

    diff --git a/classPoint-members.html b/classPoint-members.html index bb69c9cd..cdbc911a 100644 --- a/classPoint-members.html +++ b/classPoint-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classPoint.html b/classPoint.html index b9503002..22fea1cf 100644 --- a/classPoint.html +++ b/classPoint.html @@ -554,7 +554,7 @@ template<typename T> diff --git a/classRectangle-members.html b/classRectangle-members.html index 84e374f6..eff6355c 100644 --- a/classRectangle-members.html +++ b/classRectangle-members.html @@ -105,7 +105,7 @@ $(function() { diff --git a/classRectangle.html b/classRectangle.html index d1e1b487..b810dd50 100644 --- a/classRectangle.html +++ b/classRectangle.html @@ -1181,7 +1181,7 @@ template<typename T> diff --git a/classRecursiveMutex-members.html b/classRecursiveMutex-members.html index c91942c3..6adc856b 100644 --- a/classRecursiveMutex-members.html +++ b/classRecursiveMutex-members.html @@ -73,7 +73,7 @@ $(function() { diff --git a/classRecursiveMutex.html b/classRecursiveMutex.html index f7b4f975..fec98191 100644 --- a/classRecursiveMutex.html +++ b/classRecursiveMutex.html @@ -84,7 +84,7 @@ void unlock () const n diff --git a/classScopeLocker-members.html b/classScopeLocker-members.html index db36c4ed..e67c4729 100644 --- a/classScopeLocker-members.html +++ b/classScopeLocker-members.html @@ -70,7 +70,7 @@ $(function() { diff --git a/classScopeLocker.html b/classScopeLocker.html index 3cdfffb0..aaf3ed3f 100644 --- a/classScopeLocker.html +++ b/classScopeLocker.html @@ -78,7 +78,7 @@ Public Member Functions diff --git a/classScopeTryLocker-members.html b/classScopeTryLocker-members.html index d582823c..0c5abe00 100644 --- a/classScopeTryLocker-members.html +++ b/classScopeTryLocker-members.html @@ -72,7 +72,7 @@ $(function() { diff --git a/classScopeTryLocker.html b/classScopeTryLocker.html index d1728395..1f14f07a 100644 --- a/classScopeTryLocker.html +++ b/classScopeTryLocker.html @@ -84,7 +84,7 @@ bool wasNotLocked () c diff --git a/classScopeUnlocker-members.html b/classScopeUnlocker-members.html index a831d165..434979a1 100644 --- a/classScopeUnlocker-members.html +++ b/classScopeUnlocker-members.html @@ -70,7 +70,7 @@ $(function() { diff --git a/classScopeUnlocker.html b/classScopeUnlocker.html index 69cdbe1e..93a07d26 100644 --- a/classScopeUnlocker.html +++ b/classScopeUnlocker.html @@ -78,7 +78,7 @@ Public Member Functions diff --git a/classScopedLocker-members.html b/classScopedLocker-members.html deleted file mode 100644 index dd37c5d8..00000000 --- a/classScopedLocker-members.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Member List - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    -
    -
    ScopedLocker< Mutex > Member List
    -
    -
    - -

    This is the complete list of members for ScopedLocker< Mutex >, including all inherited members.

    - - - -
    ScopedLocker(const Mutex &mutex) noexcept (defined in ScopedLocker< Mutex >)ScopedLocker< Mutex >inline
    ~ScopedLocker() noexcept (defined in ScopedLocker< Mutex >)ScopedLocker< Mutex >inline
    - - - - diff --git a/classScopedLocker.html b/classScopedLocker.html deleted file mode 100644 index 7e0f5628..00000000 --- a/classScopedLocker.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: ScopedLocker< Mutex > Class Template Reference - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    - -
    -
    ScopedLocker< Mutex > Class Template Reference
    -
    -
    - - - - -

    -Public Member Functions

    ScopedLocker (const Mutex &mutex) noexcept
     
    -
    The documentation for this class was generated from the following file: -
    - - - - diff --git a/classScopedPointer-members.html b/classScopedPointer-members.html index 7d93a192..6948e837 100644 --- a/classScopedPointer-members.html +++ b/classScopedPointer-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/classScopedPointer.html b/classScopedPointer.html index 2b2d88df..88fdc709 100644 --- a/classScopedPointer.html +++ b/classScopedPointer.html @@ -459,7 +459,7 @@ template<class ObjectType> diff --git a/classScopedUnlocker-members.html b/classScopedUnlocker-members.html deleted file mode 100644 index 4778b392..00000000 --- a/classScopedUnlocker-members.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Member List - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    -
    -
    ScopedUnlocker< Mutex > Member List
    -
    -
    - -

    This is the complete list of members for ScopedUnlocker< Mutex >, including all inherited members.

    - - - -
    ScopedUnlocker(const Mutex &mutex) noexcept (defined in ScopedUnlocker< Mutex >)ScopedUnlocker< Mutex >inline
    ~ScopedUnlocker() noexcept (defined in ScopedUnlocker< Mutex >)ScopedUnlocker< Mutex >inline
    - - - - diff --git a/classScopedUnlocker.html b/classScopedUnlocker.html deleted file mode 100644 index a693d763..00000000 --- a/classScopedUnlocker.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: ScopedUnlocker< Mutex > Class Template Reference - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    - -
    -
    ScopedUnlocker< Mutex > Class Template Reference
    -
    -
    - - - - -

    -Public Member Functions

    ScopedUnlocker (const Mutex &mutex) noexcept
     
    -
    The documentation for this class was generated from the following file: -
    - - - - diff --git a/classSignal-members.html b/classSignal-members.html index 03d88eaf..69cb1f8a 100644 --- a/classSignal-members.html +++ b/classSignal-members.html @@ -72,7 +72,7 @@ $(function() { diff --git a/classSignal.html b/classSignal.html index 59f74d86..df8a1f79 100644 --- a/classSignal.html +++ b/classSignal.html @@ -81,7 +81,7 @@ void signal () noexcep diff --git a/classSize-members.html b/classSize-members.html index 5e162ca3..b5b105cf 100644 --- a/classSize-members.html +++ b/classSize-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classSize.html b/classSize.html index f1a615fd..b72fcaf5 100644 --- a/classSize.html +++ b/classSize.html @@ -598,7 +598,7 @@ template<typename T> diff --git a/classStandaloneWindow-members.html b/classStandaloneWindow-members.html index c29aee39..1ec6d778 100644 --- a/classStandaloneWindow-members.html +++ b/classStandaloneWindow-members.html @@ -75,23 +75,29 @@ $(function() { focus() (defined in Window)Window getApp() const noexcept (defined in Window)Window getHeight() const noexcept (defined in Window)Window + getIgnoringKeyRepeat() const noexcept (defined in Window)Window + getScaling() 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 + isEmbed() const noexcept (defined in Window)Window + 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 + setGeometryConstraints(uint width, uint height, bool aspect) (defined in Window)Window + setIgnoringKeyRepeat(bool ignore) noexcept (defined in Window)Window + setResizable(bool yesNo) (defined in Window)Window + setScaling(double scaling) noexcept (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 @@ -101,13 +107,13 @@ $(function() { 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 + Window(Application &app, intptr_t parentId, bool resizable) (defined in Window)Windowexplicit ~Application()Applicationvirtual ~Window() (defined in Window)Windowvirtual diff --git a/classStandaloneWindow.html b/classStandaloneWindow.html index cd6d8550..ae822136 100644 --- a/classStandaloneWindow.html +++ b/classStandaloneWindow.html @@ -102,9 +102,9 @@ Public Member Functions  Window (Application &app, Window &parent)   -Window (Application &app, intptr_t parentId) -  +Window (Application &app, intptr_t parentId, bool resizable) +  void show ()   @@ -126,6 +126,9 @@ void repaint () noexce bool openFileBrowser (const FileBrowserOptions &options)   + +bool isEmbed () const noexcept +  bool isVisible () const noexcept   @@ -159,9 +162,24 @@ const char * getTitle void setTitle (const char *title)   + +void setGeometryConstraints (uint width, uint height, bool aspect) +  void setTransientWinId (uintptr_t winId)   + +double getScaling () const noexcept +  + +void setScaling (double scaling) noexcept +  + +bool getIgnoringKeyRepeat () const noexcept +  + +void setIgnoringKeyRepeat (bool ignore) noexcept +  ApplicationgetApp () const noexcept   @@ -235,7 +253,7 @@ virtual void fileBrowserSe diff --git a/classString-members.html b/classString-members.html index 3d32f907..ca347874 100644 --- a/classString-members.html +++ b/classString-members.html @@ -116,7 +116,7 @@ $(function() { diff --git a/classString.html b/classString.html index ec7d885e..5587f10d 100644 --- a/classString.html +++ b/classString.html @@ -217,7 +217,7 @@ static String  diff --git a/classThread-members.html b/classThread-members.html index 9207bf71..09e1fd5a 100644 --- a/classThread-members.html +++ b/classThread-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/classThread.html b/classThread.html index 2d260a71..b1544f54 100644 --- a/classThread.html +++ b/classThread.html @@ -110,7 +110,7 @@ virtual void run ()=0< diff --git a/classTriangle-members.html b/classTriangle-members.html index 5573508a..49b227a3 100644 --- a/classTriangle-members.html +++ b/classTriangle-members.html @@ -81,7 +81,7 @@ $(function() { diff --git a/classTriangle.html b/classTriangle.html index 39e18a87..02abd01b 100644 --- a/classTriangle.html +++ b/classTriangle.html @@ -431,7 +431,7 @@ template<typename T> diff --git a/classUI-members.html b/classUI-members.html index 6b08ac42..adb4854f 100644 --- a/classUI-members.html +++ b/classUI-members.html @@ -70,25 +70,21 @@ $(function() { getNextWindowId() noexceptUIstatic getPluginInstancePointer() const noexceptUI getSampleRate() const noexceptUI - onResize(const ResizeEvent &ev) overrideUIprotected - parameterChanged(uint32_t index, float value)=0UIprotectedpure virtual - programLoaded(uint32_t index)=0UIprotectedpure virtual - sampleRateChanged(double newSampleRate)UIprotectedvirtual - sendNote(uint8_t channel, uint8_t note, uint8_t velocity)UI - setParameterValue(uint32_t index, float value)UI - setState(const char *key, const char *value)UI - stateChanged(const char *key, const char *value)=0UIprotectedpure virtual - UI(uint width=0, uint height=0)UI - UIExporter (defined in UI)UIfriend - UIExporterWindow (defined in UI)UIfriend - uiFileBrowserSelected(const char *filename)UIprotectedvirtual - uiIdle()UIinlineprotectedvirtual - uiReshape(uint width, uint height)UIprotectedvirtual + parameterChanged(uint32_t index, float value)=0UIprotectedpure virtual + programLoaded(uint32_t index)=0UIprotectedpure virtual + sampleRateChanged(double newSampleRate)UIprotectedvirtual + sendNote(uint8_t channel, uint8_t note, uint8_t velocity)UI + setParameterValue(uint32_t index, float value)UI + setState(const char *key, const char *value)UI + stateChanged(const char *key, const char *value)=0UIprotectedpure virtual + UI(uint width=0, uint height=0)UI + UIExporter (defined in UI)UIfriend + UIExporterWindow (defined in UI)UIfriend ~UI()UIvirtual diff --git a/classUI.html b/classUI.html index f816279d..0aafe831 100644 --- a/classUI.html +++ b/classUI.html @@ -115,14 +115,6 @@ Protected Member Functions   virtual void sampleRateChanged (double newSampleRate)   -virtual void uiIdle () -  -virtual void uiFileBrowserSelected (const char *filename) -  -virtual void uiReshape (uint width, uint height) -  -void onResize (const ResizeEvent &ev) override -  @@ -548,123 +540,6 @@ 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()
    -
    - - -

    ◆ uiIdle()

    - -
    -
    -

    Friends

    - - - - -
    - - - - - - - -
    virtual void UI::uiIdle ()
    -
    -inlineprotectedvirtual
    -
    -

    uiIdle. Document this.

    - -
    - - -

    ◆ uiFileBrowserSelected()

    - -
    -
    - - - - - -
    - - - - - - - - -
    virtual void UI::uiFileBrowserSelected (const char * filename)
    -
    -protectedvirtual
    -
    -

    File browser selected function.

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

    ◆ uiReshape()

    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    virtual void UI::uiReshape (uint width,
    uint height 
    )
    -
    -protectedvirtual
    -
    -

    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()

    - -
    -
    - - - - - -
    - - - - - - - - -
    void UI::onResize (const ResizeEvent & ev)
    -
    -overrideprotected
    -
    -

    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&)
    -

    The documentation for this class was generated from the following file:
      @@ -673,7 +548,7 @@ This is called by the host to inform the UI diff --git a/classWidget-members.html b/classWidget-members.html index 954b2c0c..b4391bbf 100644 --- a/classWidget-members.html +++ b/classWidget-members.html @@ -67,24 +67,24 @@ $(function() { - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -108,7 +108,7 @@ $(function() {
      contains(int x, int y) const noexceptWidget
      contains(const Point< int > &pos) const noexceptWidget
      DISTRHO_NAMESPACE::UI (defined in Widget)Widgetfriend
      getAbsolutePos() const noexceptWidget
      getAbsoluteX() const noexceptWidget
      getAbsoluteY() const noexceptWidget
      getHeight() const noexceptWidget
      getId() const noexceptWidget
      getParentApp() const noexceptWidget
      getParentWindow() const noexceptWidget
      getSize() const noexceptWidget
      getWidth() const noexceptWidget
      hide()Widget
      ImageSlider (defined in Widget)Widgetfriend
      isVisible() const noexceptWidget
      NanoWidget (defined in Widget)Widgetfriend
      onDisplay()=0Widgetprotectedpure virtual
      onKeyboard(const KeyboardEvent &)Widgetprotectedvirtual
      onMotion(const MotionEvent &)Widgetprotectedvirtual
      onMouse(const MouseEvent &)Widgetprotectedvirtual
      getAbsolutePos() const noexceptWidget
      getAbsoluteX() const noexceptWidget
      getAbsoluteY() const noexceptWidget
      getHeight() const noexceptWidget
      getId() const noexceptWidget
      getParentApp() const noexceptWidget
      getParentWindow() const noexceptWidget
      getSize() const noexceptWidget
      getWidth() const noexceptWidget
      hide()Widget
      ImageSlider (defined in Widget)Widgetfriend
      isVisible() const noexceptWidget
      NanoWidget (defined in Widget)Widgetfriend
      onDisplay()=0Widgetprotectedpure virtual
      onKeyboard(const KeyboardEvent &)Widgetprotectedvirtual
      onMotion(const MotionEvent &)Widgetprotectedvirtual
      onMouse(const MouseEvent &)Widgetprotectedvirtual
      onPositionChanged(const PositionChangedEvent &)Widgetprotectedvirtual
      onResize(const ResizeEvent &)Widgetprotectedvirtual
      onScroll(const ScrollEvent &)Widgetprotectedvirtual
      onSpecial(const SpecialEvent &)Widgetprotectedvirtual
      diff --git a/classWidget.html b/classWidget.html index 5000605c..e72b846e 100644 --- a/classWidget.html +++ b/classWidget.html @@ -95,6 +95,8 @@ Classes   struct  MouseEvent   +struct  PositionChangedEvent +  struct  ResizeEvent   struct  ScrollEvent @@ -177,6 +179,8 @@ Protected Member Functions   virtual void onResize (const ResizeEvent &)   +virtual void onPositionChanged (const PositionChangedEvent &) +  @@ -192,9 +196,6 @@ class  - -

      Friends

      Window
      class StandaloneWindow
       
      -class DISTRHO_NAMESPACE::UI
       

      Detailed Description

      Base DGL Widget class.

      @@ -1149,6 +1150,33 @@ class DISTRHO_NAMESPACE::U

      A function called when the widget is resized.

      +
      + + +

      ◆ onPositionChanged()

      + +
      +
      + + + + + +
      + + + + + + + + +
      virtual void Widget::onPositionChanged (const PositionChangedEvent)
      +
      +protectedvirtual
      +
      +

      A function called when the widget's absolute position is changed.

      +

      The documentation for this class was generated from the following file:
        @@ -1157,7 +1185,7 @@ class DISTRHO_NAMESPACE::U diff --git a/classWindow-members.html b/classWindow-members.html index bb01dc52..97cd4212 100644 --- a/classWindow-members.html +++ b/classWindow-members.html @@ -68,17 +68,19 @@ $(function() { addIdleCallback(IdleCallback *const callback) (defined in Window)Window Application (defined in Window)Windowfriend close() (defined in Window)Window - DISTRHO_NAMESPACE::UIExporter (defined in Window)Windowfriend - 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 + 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 + getIgnoringKeyRepeat() const noexcept (defined in Window)Window + getScaling() 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 + isEmbed() const noexcept (defined in Window)Window isResizable() const noexcept (defined in Window)Window isVisible() const noexcept (defined in Window)Window onClose() (defined in Window)Windowprotectedvirtual @@ -88,23 +90,26 @@ $(function() { openFileBrowser(const FileBrowserOptions &options) (defined in Window)Window removeIdleCallback(IdleCallback *const callback) (defined in Window)Window repaint() noexcept (defined in Window)Window + setGeometryConstraints(uint width, uint height, bool aspect) (defined in Window)Window + setIgnoringKeyRepeat(bool ignore) 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 (defined in Window)Windowfriend - Widget (defined in Window)Windowfriend - 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 - ~Window() (defined in Window)Windowvirtual + setScaling(double scaling) noexcept (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 (defined in Window)Windowfriend + Widget (defined in Window)Windowfriend + Window(Application &app) (defined in Window)Windowexplicit + Window(Application &app, Window &parent) (defined in Window)Windowexplicit + Window(Application &app, intptr_t parentId, bool resizable) (defined in Window)Windowexplicit + ~Window() (defined in Window)Windowvirtual diff --git a/classWindow.html b/classWindow.html index 7553e85f..86851bd6 100644 --- a/classWindow.html +++ b/classWindow.html @@ -92,9 +92,9 @@ Public Member Functions  Window (Application &app, Window &parent)   -Window (Application &app, intptr_t parentId) -  +Window (Application &app, intptr_t parentId, bool resizable) +  void show ()   @@ -116,6 +116,9 @@ void repaint () noexce bool openFileBrowser (const FileBrowserOptions &options)   + +bool isEmbed () const noexcept +  bool isVisible () const noexcept   @@ -149,9 +152,24 @@ const char * getTitle void setTitle (const char *title)   + +void setGeometryConstraints (uint width, uint height, bool aspect) +  void setTransientWinId (uintptr_t winId)   + +double getScaling () const noexcept +  + +void setScaling (double scaling) noexcept +  + +bool getIgnoringKeyRepeat () const noexcept +  + +void setIgnoringKeyRepeat (bool ignore) noexcept +  ApplicationgetApp () const noexcept   @@ -194,9 +212,6 @@ class Widget class StandaloneWindow   - -class DISTRHO_NAMESPACE::UIExporter
        The documentation for this class was generated from the following file:
        • dgl/Window.hpp
        • @@ -204,7 +219,7 @@ class DISTRHO_NAMESPACE::U diff --git a/classd__string-members.html b/classd__string-members.html deleted file mode 100644 index 33f0f801..00000000 --- a/classd__string-members.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Member List - - - - - - - - - -
          -
          - - - - - - -
          -
          DISTRHO Plugin Framework -
          -
          -
          - - - - - - - - - -
          - -
          - -
          -
          -
          -
          d_string Member List
          -
          -
          - -

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

          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          buffer() const noexcept (defined in d_string)d_stringinline
          clear() noexcept (defined in d_string)d_stringinline
          contains(const char *const strBuf, const bool ignoreCase=false) const noexcept (defined in d_string)d_stringinline
          d_string() noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const char c) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(char *const strBuf) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const char *const strBuf) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const int value) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const unsigned int value, const bool hexadecimal=false) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const long value) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const unsigned long value, const bool hexadecimal=false) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const long long value) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const unsigned long long value, const bool hexadecimal=false) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const float value) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const double value) noexcept (defined in d_string)d_stringinlineexplicit
          d_string(const d_string &str) noexcept (defined in d_string)d_stringinline
          endsWith(const char c) const noexcept (defined in d_string)d_stringinline
          endsWith(const char *const suffix) const noexcept (defined in d_string)d_stringinline
          find(const char c, bool *const found=nullptr) const noexcept (defined in d_string)d_stringinline
          find(const char *const strBuf, bool *const found=nullptr) const noexcept (defined in d_string)d_stringinline
          isDigit(const size_t pos) const noexcept (defined in d_string)d_stringinline
          isEmpty() const noexcept (defined in d_string)d_stringinline
          isNotEmpty() const noexcept (defined in d_string)d_stringinline
          length() const noexcept (defined in d_string)d_stringinline
          operator const char *() const noexcept (defined in d_string)d_stringinline
          operator!=(const char *const strBuf) const noexcept (defined in d_string)d_stringinline
          operator!=(const d_string &str) const noexcept (defined in d_string)d_stringinline
          operator+(const char *const strBuf) noexcept (defined in d_string)d_stringinline
          operator+(const d_string &str) noexcept (defined in d_string)d_stringinline
          operator+=(const char *const strBuf) noexcept (defined in d_string)d_stringinline
          operator+=(const d_string &str) noexcept (defined in d_string)d_stringinline
          operator=(const char *const strBuf) noexcept (defined in d_string)d_stringinline
          operator=(const d_string &str) noexcept (defined in d_string)d_stringinline
          operator==(const char *const strBuf) const noexcept (defined in d_string)d_stringinline
          operator==(const d_string &str) const noexcept (defined in d_string)d_stringinline
          operator[](const size_t pos) const noexcept (defined in d_string)d_stringinline
          operator[](const size_t pos) noexcept (defined in d_string)d_stringinline
          replace(const char before, const char after) noexcept (defined in d_string)d_stringinline
          rfind(const char c, bool *const found=nullptr) const noexcept (defined in d_string)d_stringinline
          rfind(const char *const strBuf, bool *const found=nullptr) const noexcept (defined in d_string)d_stringinline
          startsWith(const char c) const noexcept (defined in d_string)d_stringinline
          startsWith(const char *const prefix) const noexcept (defined in d_string)d_stringinline
          toBasic() noexcept (defined in d_string)d_stringinline
          toLower() noexcept (defined in d_string)d_stringinline
          toUpper() noexcept (defined in d_string)d_stringinline
          truncate(const size_t n) noexcept (defined in d_string)d_stringinline
          ~d_string() noexcept (defined in d_string)d_stringinline
          - - - - diff --git a/classd__string.html b/classd__string.html deleted file mode 100644 index 4d5ab164..00000000 --- a/classd__string.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: d_string Class Reference - - - - - - - - - -
          -
          - - - - - - -
          -
          DISTRHO Plugin Framework -
          -
          -
          - - - - - - - - - -
          - -
          - -
          -
          - -
          -
          d_string Class Reference
          -
          -
          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

          -Public Member Functions

          d_string (const char c) noexcept
           
          d_string (char *const strBuf) noexcept
           
          d_string (const char *const strBuf) noexcept
           
          d_string (const int value) noexcept
           
          d_string (const unsigned int value, const bool hexadecimal=false) noexcept
           
          d_string (const long value) noexcept
           
          d_string (const unsigned long value, const bool hexadecimal=false) noexcept
           
          d_string (const long long value) noexcept
           
          d_string (const unsigned long long value, const bool hexadecimal=false) noexcept
           
          d_string (const float value) noexcept
           
          d_string (const double value) noexcept
           
          d_string (const d_string &str) noexcept
           
          -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 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
           
          -size_t find (const char c, bool *const found=nullptr) const noexcept
           
          -size_t find (const char *const strBuf, bool *const found=nullptr) const noexcept
           
          -size_t rfind (const char c, bool *const found=nullptr) const noexcept
           
          -size_t rfind (const char *const strBuf, bool *const found=nullptr) const noexcept
           
          -void clear () noexcept
           
          -void replace (const char before, const char after) noexcept
           
          -void truncate (const size_t n) noexcept
           
          -void toBasic () noexcept
           
          -void toLower () noexcept
           
          -void toUpper () noexcept
           
          -const char * buffer () const noexcept
           
          operator const char * () const noexcept
           
          -char operator[] (const size_t pos) const noexcept
           
          -char & operator[] (const size_t pos) noexcept
           
          -bool operator== (const char *const strBuf) const noexcept
           
          -bool operator== (const d_string &str) const noexcept
           
          -bool operator!= (const char *const strBuf) const noexcept
           
          -bool operator!= (const d_string &str) const noexcept
           
          -d_stringoperator= (const char *const strBuf) noexcept
           
          -d_stringoperator= (const d_string &str) noexcept
           
          -d_stringoperator+= (const char *const strBuf) noexcept
           
          -d_stringoperator+= (const d_string &str) noexcept
           
          -d_string operator+ (const char *const strBuf) noexcept
           
          -d_string operator+ (const d_string &str) noexcept
           
          -
          The documentation for this class was generated from the following file: -
          - - - - diff --git a/classes.html b/classes.html index 27bd1314..be13670d 100644 --- a/classes.html +++ b/classes.html @@ -66,40 +66,40 @@ $(function() { + - + + + - + + + + - + - - + - - + + + - + + + + @@ -108,7 +108,7 @@ $(function() { diff --git a/d__leakdetector_8hpp_source.html b/d__leakdetector_8hpp_source.html deleted file mode 100644 index 69bc67f3..00000000 --- a/d__leakdetector_8hpp_source.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: distrho/extra/d_leakdetector.hpp Source File - - - - - - - - - -
          -
          -
            a  
            f  
          -
          Line   Plugin   
            t  
          -
          Line   Plugin   String   
            m  
          -
          Point   
          Application   Window::FileBrowserOptions   
            r  
          -
          NanoVG::TextRow   
          Point   
            t  
          +
          Application   Window::FileBrowserOptions   Widget::PositionChangedEvent   
          AudioPort   
            g  
          -
          MidiEvent   Thread   
          MidiEvent   
            r  
          +
          NanoVG::TextRow   
            b  
          -
          Widget::MotionEvent   Rectangle   TimePosition   
          NanoVG::GlyphPosition   Widget::MouseEvent   RecursiveMutex   Triangle   
          Widget::MotionEvent   Thread   
          NanoVG::GlyphPosition   Widget::MouseEvent   Rectangle   TimePosition   
          TimePosition::BarBeatTick   
            i  
          -
          Mutex   Widget::ResizeEvent   
            u  
          -
          Mutex   RecursiveMutex   Triangle   
          Widget::BaseEvent   
            n  
          -
            s  
          +
          Widget::ResizeEvent   
            u  
          +
          Window::FileBrowserOptions::Buttons   IdleCallback   
            s  
          Window::FileBrowserOptions::Buttons   IdleCallback   UI   
            c  
          -
          Image   NanoImage   ScopedPointer   
            w  
          +
          Image   NanoImage   UI   
          ImageAboutWindow   NanoVG   ScopedPointer   
            w  
          ImageAboutWindow   NanoVG   ScopeLocker   
          ImageButton::Callback   ImageButton   NanoWidget   ScopeTryLocker   Widget   
          ImageButton::Callback   ImageButton   NanoWidget   ScopeLocker   
          ImageKnob::Callback   ImageKnob   
            p  
          -
          ScopeUnlocker   Window   
          ImageSlider::Callback   ImageSlider   Widget::ScrollEvent   
          ImageSwitch::Callback   ImageSwitch   NanoVG::Paint   Signal   
          ScopeTryLocker   Widget   
          ImageSlider::Callback   ImageSlider   ScopeUnlocker   Window   
          ImageSwitch::Callback   ImageSwitch   NanoVG::Paint   Widget::ScrollEvent   
          Circle   
            k  
          -
          Parameter   Size   
          Color   ParameterEnumerationValue   Widget::SpecialEvent   
          Parameter   Signal   
          Color   ParameterEnumerationValue   Size   
            e  
          -
          Widget::KeyboardEvent   ParameterEnumerationValues   StandaloneWindow   
          Widget::KeyboardEvent   ParameterEnumerationValues   Widget::SpecialEvent   
            l  
          -
          ParameterRanges   String   
          ParameterRanges   StandaloneWindow   
          ExternalWindow   
          LeakedObjectDetector   
          - - - - - -
          -
          DISTRHO Plugin Framework -
          -
          - - - - - - - - - - -
          - -
          - - - -
          -
          -
          d_leakdetector.hpp
          -
          -
          -
          1 /*
          -
          2  * DISTRHO Plugin Framework (DPF)
          -
          3  * Copyright (C) 2012-2014 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 /** This macro lets you embed a leak-detecting object inside a class.\n
          -
          36  To use it, simply declare a DISTRHO_LEAK_DETECTOR(YourClassName) inside a private section
          -
          37  of the class declaration. E.g.
          -
          38  \code
          -
          39  class MyClass
          -
          40  {
          -
          41  public:
          -
          42  MyClass();
          -
          43  void blahBlah();
          -
          44 
          -
          45  private:
          -
          46  DISTRHO_LEAK_DETECTOR(MyClass)
          -
          47  };
          -
          48  \endcode
          -
          49 */
          -
          50 #define DISTRHO_LEAK_DETECTOR(ClassName) \
          -
          51  friend class DISTRHO_NAMESPACE::LeakedObjectDetector<ClassName>; \
          -
          52  static const char* getLeakedObjectClassName() noexcept { return #ClassName; } \
          -
          53  DISTRHO_NAMESPACE::LeakedObjectDetector<ClassName> DISTRHO_JOIN_MACRO(leakDetector_, ClassName);
          -
          54 
          -
          55 #define DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \
          -
          56  DISTRHO_DECLARE_NON_COPY_CLASS(ClassName) \
          -
          57  DISTRHO_LEAK_DETECTOR(ClassName)
          -
          58 
          -
          59 //==============================================================================
          -
          60 /**
          -
          61  Embedding an instance of this class inside another class can be used as a low-overhead
          -
          62  way of detecting leaked instances.
          -
          63 
          -
          64  This class keeps an internal static count of the number of instances that are
          -
          65  active, so that when the app is shutdown and the static destructors are called,
          -
          66  it can check whether there are any left-over instances that may have been leaked.
          -
          67 
          -
          68  To use it, use the DISTRHO_LEAK_DETECTOR macro as a simple way to put one in your
          -
          69  class declaration.
          -
          70 */
          -
          71 template<class OwnerClass>
          - -
          73 {
          -
          74 public:
          -
          75  //==============================================================================
          -
          76  LeakedObjectDetector() noexcept { ++(getCounter().numObjects); }
          -
          77  LeakedObjectDetector(const LeakedObjectDetector&) noexcept { ++(getCounter().numObjects); }
          -
          78 
          - -
          80  {
          -
          81  if (--(getCounter().numObjects) < 0)
          -
          82  {
          -
          83  /** If you hit this, then you've managed to delete more instances of this class than you've
          -
          84  created.. That indicates that you're deleting some dangling pointers.
          -
          85 
          -
          86  Note that although this assertion will have been triggered during a destructor, it might
          -
          87  not be this particular deletion that's at fault - the incorrect one may have happened
          -
          88  at an earlier point in the program, and simply not been detected until now.
          -
          89 
          -
          90  Most errors like this are caused by using old-fashioned, non-RAII techniques for
          -
          91  your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,
          -
          92  ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
          -
          93  */
          -
          94  d_stderr2("*** Dangling pointer deletion! Class: '%s', Count: %i", getLeakedObjectClassName(), getCounter().numObjects);
          -
          95  }
          -
          96  }
          -
          97 
          -
          98 private:
          -
          99  //==============================================================================
          -
          100  class LeakCounter
          -
          101  {
          -
          102  public:
          -
          103  LeakCounter() noexcept
          -
          104  : numObjects(0) {}
          -
          105 
          -
          106  ~LeakCounter() noexcept
          -
          107  {
          -
          108  if (numObjects > 0)
          -
          109  {
          -
          110  /** If you hit this, then you've leaked one or more objects of the type specified by
          -
          111  the 'OwnerClass' template parameter - the name should have been printed by the line above.
          -
          112 
          -
          113  If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for
          -
          114  your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,
          -
          115  ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
          -
          116  */
          -
          117  d_stderr2("*** Leaked objects detected: %i instance(s) of class '%s'", numObjects, getLeakedObjectClassName());
          -
          118  }
          -
          119  }
          -
          120 
          -
          121  // this should be an atomic...
          -
          122  volatile int numObjects;
          -
          123  };
          -
          124 
          -
          125  static const char* getLeakedObjectClassName() noexcept
          -
          126  {
          -
          127  return OwnerClass::getLeakedObjectClassName();
          -
          128  }
          -
          129 
          -
          130  static LeakCounter& getCounter() noexcept
          -
          131  {
          -
          132  static LeakCounter counter;
          -
          133  return counter;
          -
          134  }
          -
          135 };
          -
          136 
          -
          137 // -----------------------------------------------------------------------
          -
          138 
          -
          139 END_NAMESPACE_DISTRHO
          -
          140 
          -
          141 #endif // DISTRHO_LEAK_DETECTOR_HPP_INCLUDED
          -
          Definition: d_leakdetector.hpp:72
          -
          ~LeakedObjectDetector() noexcept
          Definition: d_leakdetector.hpp:79
          -
          - - - - diff --git a/d__mutex_8hpp_source.html b/d__mutex_8hpp_source.html deleted file mode 100644 index 1a077c78..00000000 --- a/d__mutex_8hpp_source.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: distrho/extra/d_mutex.hpp Source File - - - - - - - - - -
          -
          - - - - - - -
          -
          DISTRHO Plugin Framework -
          -
          -
          - - - - - - - - - -
          - -
          - - -
          -
          -
          -
          d_mutex.hpp
          -
          -
          -
          1 /*
          -
          2  * DISTRHO Plugin Framework (DPF)
          -
          3  * Copyright (C) 2012-2014 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 // -----------------------------------------------------------------------
          -
          32 // Mutex class
          -
          33 
          -
          34 class Mutex
          -
          35 {
          -
          36 public:
          -
          37  /*
          -
          38  * Constructor.
          -
          39  */
          -
          40  Mutex() noexcept
          -
          41  {
          -
          42  pthread_mutex_init(&fMutex, nullptr);
          -
          43  }
          -
          44 
          -
          45  /*
          -
          46  * Destructor.
          -
          47  */
          -
          48  ~Mutex() noexcept
          -
          49  {
          -
          50  pthread_mutex_destroy(&fMutex);
          -
          51  }
          -
          52 
          -
          53  /*
          -
          54  * Lock the mutex.
          -
          55  */
          -
          56  void lock() const noexcept
          -
          57  {
          -
          58  pthread_mutex_lock(&fMutex);
          -
          59  }
          -
          60 
          -
          61  /*
          -
          62  * Try to lock the mutex.
          -
          63  * Returns true if successful.
          -
          64  */
          -
          65  bool tryLock() const noexcept
          -
          66  {
          -
          67  return (pthread_mutex_trylock(&fMutex) == 0);
          -
          68  }
          -
          69 
          -
          70  /*
          -
          71  * Unlock the mutex.
          -
          72  */
          -
          73  void unlock() const noexcept
          -
          74  {
          -
          75  pthread_mutex_unlock(&fMutex);
          -
          76  }
          -
          77 
          -
          78 private:
          -
          79  mutable pthread_mutex_t fMutex;
          -
          80 
          -
          81  DISTRHO_PREVENT_HEAP_ALLOCATION
          -
          82  DISTRHO_DECLARE_NON_COPY_CLASS(Mutex)
          -
          83 };
          -
          84 
          -
          85 // -----------------------------------------------------------------------
          -
          86 // RecursiveMutex class
          -
          87 
          - -
          89 {
          -
          90 public:
          -
          91  /*
          -
          92  * Constructor.
          -
          93  */
          -
          94  RecursiveMutex() noexcept
          -
          95  {
          -
          96 #ifdef DISTRHO_OS_WINDOWS
          -
          97  InitializeCriticalSection(&fSection);
          -
          98 #else
          -
          99  pthread_mutexattr_t atts;
          -
          100  pthread_mutexattr_init(&atts);
          -
          101  pthread_mutexattr_settype(&atts, PTHREAD_MUTEX_RECURSIVE);
          -
          102  pthread_mutex_init(&fMutex, &atts);
          -
          103  pthread_mutexattr_destroy(&atts);
          -
          104 #endif
          -
          105  }
          -
          106 
          -
          107  /*
          -
          108  * Destructor.
          -
          109  */
          -
          110  ~RecursiveMutex() noexcept
          -
          111  {
          -
          112 #ifdef DISTRHO_OS_WINDOWS
          -
          113  DeleteCriticalSection(&fSection);
          -
          114 #else
          -
          115  pthread_mutex_destroy(&fMutex);
          -
          116 #endif
          -
          117  }
          -
          118 
          -
          119  /*
          -
          120  * Lock the mutex.
          -
          121  */
          -
          122  void lock() const noexcept
          -
          123  {
          -
          124 #ifdef DISTRHO_OS_WINDOWS
          -
          125  EnterCriticalSection(&fSection);
          -
          126 #else
          -
          127  pthread_mutex_lock(&fMutex);
          -
          128 #endif
          -
          129  }
          -
          130 
          -
          131  /*
          -
          132  * Try to lock the mutex.
          -
          133  * Returns true if successful.
          -
          134  */
          -
          135  bool tryLock() const noexcept
          -
          136  {
          -
          137 #ifdef DISTRHO_OS_WINDOWS
          -
          138  return (TryEnterCriticalSection(&fSection) != FALSE);
          -
          139 #else
          -
          140  return (pthread_mutex_trylock(&fMutex) == 0);
          -
          141 #endif
          -
          142  }
          -
          143 
          -
          144  /*
          -
          145  * Unlock the mutex.
          -
          146  */
          -
          147  void unlock() const noexcept
          -
          148  {
          -
          149 #ifdef DISTRHO_OS_WINDOWS
          -
          150  LeaveCriticalSection(&fSection);
          -
          151 #else
          -
          152  pthread_mutex_unlock(&fMutex);
          -
          153 #endif
          -
          154  }
          -
          155 
          -
          156 private:
          -
          157 #ifdef DISTRHO_OS_WINDOWS
          -
          158  mutable CRITICAL_SECTION fSection;
          -
          159 #else
          -
          160  mutable pthread_mutex_t fMutex;
          -
          161 #endif
          -
          162 
          -
          163  DISTRHO_PREVENT_HEAP_ALLOCATION
          -
          164  DISTRHO_DECLARE_NON_COPY_CLASS(RecursiveMutex)
          -
          165 };
          -
          166 
          -
          167 // -----------------------------------------------------------------------
          -
          168 // Helper class to lock&unlock a mutex during a function scope.
          -
          169 
          -
          170 template <class Mutex>
          - -
          172 {
          -
          173 public:
          -
          174  ScopedLocker(const Mutex& mutex) noexcept
          -
          175  : fMutex(mutex)
          -
          176  {
          -
          177  fMutex.lock();
          -
          178  }
          -
          179 
          -
          180  ~ScopedLocker() noexcept
          -
          181  {
          -
          182  fMutex.unlock();
          -
          183  }
          -
          184 
          -
          185 private:
          -
          186  const Mutex& fMutex;
          -
          187 
          -
          188  DISTRHO_PREVENT_HEAP_ALLOCATION
          -
          189  DISTRHO_DECLARE_NON_COPY_CLASS(ScopedLocker)
          -
          190 };
          -
          191 
          -
          192 // -----------------------------------------------------------------------
          -
          193 // Helper class to unlock&lock a mutex during a function scope.
          -
          194 
          -
          195 template <class Mutex>
          - -
          197 {
          -
          198 public:
          -
          199  ScopedUnlocker(const Mutex& mutex) noexcept
          -
          200  : fMutex(mutex)
          -
          201  {
          -
          202  fMutex.unlock();
          -
          203  }
          -
          204 
          -
          205  ~ScopedUnlocker() noexcept
          -
          206  {
          -
          207  fMutex.lock();
          -
          208  }
          -
          209 
          -
          210 private:
          -
          211  const Mutex& fMutex;
          -
          212 
          -
          213  DISTRHO_PREVENT_HEAP_ALLOCATION
          -
          214  DISTRHO_DECLARE_NON_COPY_CLASS(ScopedUnlocker)
          -
          215 };
          -
          216 
          -
          217 // -----------------------------------------------------------------------
          -
          218 // Define types
          -
          219 
          - - -
          222 
          - - -
          225 
          -
          226 // -----------------------------------------------------------------------
          -
          227 
          -
          228 END_NAMESPACE_DISTRHO
          -
          229 
          -
          230 #endif // DISTRHO_MUTEX_HPP_INCLUDED
          -
          Definition: d_mutex.hpp:88
          -
          Definition: d_mutex.hpp:196
          -
          Definition: d_mutex.hpp:34
          -
          Definition: d_mutex.hpp:171
          -
          - - - - diff --git a/d__scopedpointer_8hpp_source.html b/d__scopedpointer_8hpp_source.html deleted file mode 100644 index 3c58f9a6..00000000 --- a/d__scopedpointer_8hpp_source.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: distrho/extra/d_scopedpointer.hpp Source File - - - - - - - - - -
          -
          - - - - - - -
          -
          DISTRHO Plugin Framework -
          -
          -
          - - - - - - - - - -
          - -
          - - -
          -
          -
          -
          d_scopedpointer.hpp
          -
          -
          -
          1 /*
          -
          2  * DISTRHO Plugin Framework (DPF)
          -
          3  * Copyright (C) 2012-2014 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  Used by container classes as an indirect way to delete an object of a
          -
          32  particular type.
          -
          33 
          -
          34  The generic implementation of this class simply calls 'delete', but you can
          -
          35  create a specialised version of it for a particular class if you need to
          -
          36  delete that type of object in a more appropriate way.
          -
          37 */
          -
          38 template<typename ObjectType>
          - -
          40 {
          -
          41  static void destroy(ObjectType* const object)
          -
          42  {
          -
          43  delete object;
          -
          44  }
          -
          45 };
          -
          46 
          -
          47 //==============================================================================
          -
          48 /**
          -
          49  This class holds a pointer which is automatically deleted when this object goes
          -
          50  out of scope.
          -
          51 
          -
          52  Once a pointer has been passed to a ScopedPointer, it will make sure that the pointer
          -
          53  gets deleted when the ScopedPointer is deleted. Using the ScopedPointer on the stack or
          -
          54  as member variables is a good way to use RAII to avoid accidentally leaking dynamically
          -
          55  created objects.
          -
          56 
          -
          57  A ScopedPointer can be used in pretty much the same way that you'd use a normal pointer
          -
          58  to an object. If you use the assignment operator to assign a different object to a
          -
          59  ScopedPointer, the old one will be automatically deleted.
          -
          60 
          -
          61  A const ScopedPointer is guaranteed not to lose ownership of its object or change the
          -
          62  object to which it points during its lifetime. This means that making a copy of a const
          -
          63  ScopedPointer is impossible, as that would involve the new copy taking ownership from the
          -
          64  old one.
          -
          65 
          -
          66  If you need to get a pointer out of a ScopedPointer without it being deleted, you
          -
          67  can use the release() method.
          -
          68 
          -
          69  Something to note is the main difference between this class and the std::auto_ptr class,
          -
          70  which is that ScopedPointer provides a cast-to-object operator, wheras std::auto_ptr
          -
          71  requires that you always call get() to retrieve the pointer. The advantages of providing
          -
          72  the cast is that you don't need to call get(), so can use the ScopedPointer in pretty much
          -
          73  exactly the same way as a raw pointer. The disadvantage is that the compiler is free to
          -
          74  use the cast in unexpected and sometimes dangerous ways - in particular, it becomes difficult
          -
          75  to return a ScopedPointer as the result of a function. To avoid this causing errors,
          -
          76  ScopedPointer contains an overloaded constructor that should cause a syntax error in these
          -
          77  circumstances, but it does mean that instead of returning a ScopedPointer from a function,
          -
          78  you'd need to return a raw pointer (or use a std::auto_ptr instead).
          -
          79 */
          -
          80 template<class ObjectType>
          - -
          82 {
          -
          83 public:
          -
          84  //==============================================================================
          -
          85  /** Creates a ScopedPointer containing a null pointer. */
          -
          86  ScopedPointer() noexcept
          -
          87  : object(nullptr) {}
          -
          88 
          -
          89  /** Creates a ScopedPointer that owns the specified object. */
          -
          90  ScopedPointer(ObjectType* const objectToTakePossessionOf) noexcept
          -
          91  : object(objectToTakePossessionOf) {}
          -
          92 
          -
          93  /** Creates a ScopedPointer that takes its pointer from another ScopedPointer.
          -
          94 
          -
          95  Because a pointer can only belong to one ScopedPointer, this transfers
          -
          96  the pointer from the other object to this one, and the other object is reset to
          -
          97  be a null pointer.
          -
          98  */
          -
          99  ScopedPointer(ScopedPointer& objectToTransferFrom) noexcept
          -
          100  : object(objectToTransferFrom.object)
          -
          101  {
          -
          102  objectToTransferFrom.object = nullptr;
          -
          103  }
          -
          104 
          -
          105  /** Destructor.
          -
          106  This will delete the object that this ScopedPointer currently refers to.
          -
          107  */
          - -
          109  {
          - -
          111  }
          -
          112 
          -
          113  /** Changes this ScopedPointer to point to a new object.
          -
          114 
          -
          115  Because a pointer can only belong to one ScopedPointer, this transfers
          -
          116  the pointer from the other object to this one, and the other object is reset to
          -
          117  be a null pointer.
          -
          118 
          -
          119  If this ScopedPointer already points to an object, that object
          -
          120  will first be deleted.
          -
          121  */
          -
          122  ScopedPointer& operator=(ScopedPointer& objectToTransferFrom)
          -
          123  {
          -
          124  if (this != objectToTransferFrom.getAddress())
          -
          125  {
          -
          126  // Two ScopedPointers should never be able to refer to the same object - if
          -
          127  // this happens, you must have done something dodgy!
          -
          128  DISTRHO_SAFE_ASSERT_RETURN(object == nullptr || object != objectToTransferFrom.object, *this);
          -
          129 
          -
          130  ObjectType* const oldObject = object;
          -
          131  object = objectToTransferFrom.object;
          -
          132  objectToTransferFrom.object = nullptr;
          - -
          134  }
          -
          135 
          -
          136  return *this;
          -
          137  }
          -
          138 
          -
          139  /** Changes this ScopedPointer to point to a new object.
          -
          140 
          -
          141  If this ScopedPointer already points to an object, that object
          -
          142  will first be deleted.
          -
          143 
          -
          144  The pointer that you pass in may be a nullptr.
          -
          145  */
          -
          146  ScopedPointer& operator=(ObjectType* const newObjectToTakePossessionOf)
          -
          147  {
          -
          148  if (object != newObjectToTakePossessionOf)
          -
          149  {
          -
          150  ObjectType* const oldObject = object;
          -
          151  object = newObjectToTakePossessionOf;
          - -
          153  }
          -
          154 
          -
          155  return *this;
          -
          156  }
          -
          157 
          -
          158  //==============================================================================
          -
          159  /** Returns the object that this ScopedPointer refers to. */
          -
          160  operator ObjectType*() const noexcept { return object; }
          -
          161 
          -
          162  /** Returns the object that this ScopedPointer refers to. */
          -
          163  ObjectType* get() const noexcept { return object; }
          -
          164 
          -
          165  /** Returns the object that this ScopedPointer refers to. */
          -
          166  ObjectType& operator*() const noexcept { return *object; }
          -
          167 
          -
          168  /** Lets you access methods and properties of the object that this ScopedPointer refers to. */
          -
          169  ObjectType* operator->() const noexcept { return object; }
          -
          170 
          -
          171  //==============================================================================
          -
          172  /** Removes the current object from this ScopedPointer without deleting it.
          -
          173  This will return the current object, and set the ScopedPointer to a null pointer.
          -
          174  */
          -
          175  ObjectType* release() noexcept { ObjectType* const o = object; object = nullptr; return o; }
          -
          176 
          -
          177  //==============================================================================
          -
          178  /** Swaps this object with that of another ScopedPointer.
          -
          179  The two objects simply exchange their pointers.
          -
          180  */
          -
          181  void swapWith(ScopedPointer<ObjectType>& other) noexcept
          -
          182  {
          -
          183  // Two ScopedPointers should never be able to refer to the same object - if
          -
          184  // this happens, you must have done something dodgy!
          -
          185  DISTRHO_SAFE_ASSERT_RETURN(object != other.object || this == other.getAddress() || object == nullptr,);
          -
          186 
          -
          187  std::swap(object, other.object);
          -
          188  }
          -
          189 
          -
          190 private:
          -
          191  //==============================================================================
          -
          192  ObjectType* object;
          -
          193 
          -
          194  // (Required as an alternative to the overloaded & operator).
          -
          195  const ScopedPointer* getAddress() const noexcept { return this; }
          -
          196 
          -
          197 #ifndef _MSC_VER // (MSVC can't deal with multiple copy constructors)
          -
          198  /* The copy constructors are private to stop people accidentally copying a const ScopedPointer
          -
          199  (the compiler would let you do so by implicitly casting the source to its raw object pointer).
          -
          200 
          -
          201  A side effect of this is that in a compiler that doesn't support C++11, you may hit an
          -
          202  error when you write something like this:
          -
          203 
          -
          204  ScopedPointer<MyClass> m = new MyClass(); // Compile error: copy constructor is private.
          -
          205 
          -
          206  Even though the compiler would normally ignore the assignment here, it can't do so when the
          -
          207  copy constructor is private. It's very easy to fix though - just write it like this:
          -
          208 
          -
          209  ScopedPointer<MyClass> m (new MyClass()); // Compiles OK
          -
          210 
          -
          211  It's probably best to use the latter form when writing your object declarations anyway, as
          -
          212  this is a better representation of the code that you actually want the compiler to produce.
          -
          213  */
          -
          214 # ifdef DISTRHO_PROPER_CPP11_SUPPORT
          -
          215  ScopedPointer(const ScopedPointer&) = delete;
          -
          216  ScopedPointer& operator=(const ScopedPointer&) = delete;
          -
          217 # else
          - - -
          220 # endif
          -
          221 #endif
          -
          222 };
          -
          223 
          -
          224 //==============================================================================
          -
          225 /** Compares a ScopedPointer with another pointer.
          -
          226  This can be handy for checking whether this is a null pointer.
          -
          227 */
          -
          228 template<class ObjectType>
          -
          229 bool operator==(const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
          -
          230 {
          -
          231  return static_cast<ObjectType*>(pointer1) == pointer2;
          -
          232 }
          -
          233 
          -
          234 /** Compares a ScopedPointer with another pointer.
          -
          235  This can be handy for checking whether this is a null pointer.
          -
          236 */
          -
          237 template<class ObjectType>
          -
          238 bool operator!=(const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
          -
          239 {
          -
          240  return static_cast<ObjectType*>(pointer1) != pointer2;
          -
          241 }
          -
          242 
          -
          243 // -----------------------------------------------------------------------
          -
          244 
          -
          245 END_NAMESPACE_DISTRHO
          -
          246 
          -
          247 #endif // DISTRHO_SCOPED_POINTER_HPP_INCLUDED
          -
          ObjectType * release() noexcept
          Definition: d_scopedpointer.hpp:175
          -
          ~ScopedPointer()
          Definition: d_scopedpointer.hpp:108
          -
          ObjectType & operator*() const noexcept
          Definition: d_scopedpointer.hpp:166
          -
          ScopedPointer(ObjectType *const objectToTakePossessionOf) noexcept
          Definition: d_scopedpointer.hpp:90
          -
          ObjectType * operator->() const noexcept
          Definition: d_scopedpointer.hpp:169
          -
          ScopedPointer(ScopedPointer &objectToTransferFrom) noexcept
          Definition: d_scopedpointer.hpp:99
          -
          void swapWith(ScopedPointer< ObjectType > &other) noexcept
          Definition: d_scopedpointer.hpp:181
          -
          Definition: d_scopedpointer.hpp:81
          -
          ScopedPointer() noexcept
          Definition: d_scopedpointer.hpp:86
          -
          Definition: d_scopedpointer.hpp:39
          -
          ScopedPointer & operator=(ObjectType *const newObjectToTakePossessionOf)
          Definition: d_scopedpointer.hpp:146
          -
          ScopedPointer & operator=(ScopedPointer &objectToTransferFrom)
          Definition: d_scopedpointer.hpp:122
          -
          - - - - diff --git a/d__sleep_8hpp_source.html b/d__sleep_8hpp_source.html deleted file mode 100644 index 3b3b5913..00000000 --- a/d__sleep_8hpp_source.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: distrho/extra/d_sleep.hpp Source File - - - - - - - - - -
          -
          - - - - - - -
          -
          DISTRHO Plugin Framework -
          -
          -
          - - - - - - - - - -
          - -
          - - -
          -
          -
          -
          d_sleep.hpp
          -
          -
          -
          1 /*
          -
          2  * DISTRHO Plugin Framework (DPF)
          -
          3  * Copyright (C) 2012-2014 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 static inline
          -
          33 void d_sleep(const uint secs) noexcept
          -
          34 {
          -
          35  DISTRHO_SAFE_ASSERT_RETURN(secs > 0,);
          -
          36 
          -
          37  try {
          -
          38 #ifdef DISTRHO_OS_WINDOWS
          -
          39  ::Sleep(secs * 1000);
          -
          40 #else
          -
          41  ::sleep(secs);
          -
          42 #endif
          -
          43  } DISTRHO_SAFE_EXCEPTION("d_sleep");
          -
          44 }
          -
          45 
          -
          46 static inline
          -
          47 void d_msleep(const uint msecs) noexcept
          -
          48 {
          -
          49  DISTRHO_SAFE_ASSERT_RETURN(msecs > 0,);
          -
          50 
          -
          51  try {
          -
          52 #ifdef DISTRHO_OS_WINDOWS
          -
          53  ::Sleep(msecs);
          -
          54 #else
          -
          55  ::usleep(msecs * 1000);
          -
          56 #endif
          -
          57  } DISTRHO_SAFE_EXCEPTION("d_msleep");
          -
          58 }
          -
          59 
          -
          60 // -----------------------------------------------------------------------
          -
          61 
          -
          62 #endif // DISTRHO_SLEEP_HPP_INCLUDED
          -
          - - - - diff --git a/d__string_8hpp_source.html b/d__string_8hpp_source.html deleted file mode 100644 index 65de612a..00000000 --- a/d__string_8hpp_source.html +++ /dev/null @@ -1,849 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: distrho/extra/d_string.hpp Source File - - - - - - - - - -
          -
          - - - - - - -
          -
          DISTRHO Plugin Framework -
          -
          -
          - - - - - - - - - -
          - -
          - - -
          -
          -
          -
          d_string.hpp
          -
          -
          -
          1 /*
          -
          2  * DISTRHO Plugin Framework (DPF)
          -
          3  * Copyright (C) 2012-2014 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 "d_leakdetector.hpp"
          -
          21 
          -
          22 START_NAMESPACE_DISTRHO
          -
          23 
          -
          24 // -----------------------------------------------------------------------
          -
          25 // d_string class
          -
          26 
          -
          27 class d_string
          -
          28 {
          -
          29 public:
          -
          30  // -------------------------------------------------------------------
          -
          31  // constructors (no explicit conversions allowed)
          -
          32 
          -
          33  /*
          -
          34  * Empty string.
          -
          35  */
          -
          36  explicit d_string() noexcept
          -
          37  {
          -
          38  _init();
          -
          39  }
          -
          40 
          -
          41  /*
          -
          42  * Simple character.
          -
          43  */
          -
          44  explicit d_string(const char c) noexcept
          -
          45  {
          -
          46  char ch[2];
          -
          47  ch[0] = c;
          -
          48  ch[1] = '\0';
          -
          49 
          -
          50  _init();
          -
          51  _dup(ch);
          -
          52  }
          -
          53 
          -
          54  /*
          -
          55  * Simple char string.
          -
          56  */
          -
          57  explicit d_string(char* const strBuf) noexcept
          -
          58  {
          -
          59  _init();
          -
          60  _dup(strBuf);
          -
          61  }
          -
          62 
          -
          63  /*
          -
          64  * Simple const char string.
          -
          65  */
          -
          66  explicit d_string(const char* const strBuf) noexcept
          -
          67  {
          -
          68  _init();
          -
          69  _dup(strBuf);
          -
          70  }
          -
          71 
          -
          72  /*
          -
          73  * Integer.
          -
          74  */
          -
          75  explicit d_string(const int value) noexcept
          -
          76  {
          -
          77  char strBuf[0xff+1];
          -
          78  std::snprintf(strBuf, 0xff, "%d", value);
          -
          79  strBuf[0xff] = '\0';
          -
          80 
          -
          81  _init();
          -
          82  _dup(strBuf);
          -
          83  }
          -
          84 
          -
          85  /*
          -
          86  * Unsigned integer, possibly in hexadecimal.
          -
          87  */
          -
          88  explicit d_string(const unsigned int value, const bool hexadecimal = false) noexcept
          -
          89  {
          -
          90  char strBuf[0xff+1];
          -
          91  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%x" : "%u", value);
          -
          92  strBuf[0xff] = '\0';
          -
          93 
          -
          94  _init();
          -
          95  _dup(strBuf);
          -
          96  }
          -
          97 
          -
          98  /*
          -
          99  * Long integer.
          -
          100  */
          -
          101  explicit d_string(const long value) noexcept
          -
          102  {
          -
          103  char strBuf[0xff+1];
          -
          104  std::snprintf(strBuf, 0xff, "%ld", value);
          -
          105  strBuf[0xff] = '\0';
          -
          106 
          -
          107  _init();
          -
          108  _dup(strBuf);
          -
          109  }
          -
          110 
          -
          111  /*
          -
          112  * Long unsigned integer, possibly hexadecimal.
          -
          113  */
          -
          114  explicit d_string(const unsigned long value, const bool hexadecimal = false) noexcept
          -
          115  {
          -
          116  char strBuf[0xff+1];
          -
          117  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%lx" : "%lu", value);
          -
          118  strBuf[0xff] = '\0';
          -
          119 
          -
          120  _init();
          -
          121  _dup(strBuf);
          -
          122  }
          -
          123 
          -
          124  /*
          -
          125  * Long long integer.
          -
          126  */
          -
          127  explicit d_string(const long long value) noexcept
          -
          128  {
          -
          129  char strBuf[0xff+1];
          -
          130  std::snprintf(strBuf, 0xff, "%lld", value);
          -
          131  strBuf[0xff] = '\0';
          -
          132 
          -
          133  _init();
          -
          134  _dup(strBuf);
          -
          135  }
          -
          136 
          -
          137  /*
          -
          138  * Long long unsigned integer, possibly hexadecimal.
          -
          139  */
          -
          140  explicit d_string(const unsigned long long value, const bool hexadecimal = false) noexcept
          -
          141  {
          -
          142  char strBuf[0xff+1];
          -
          143  std::snprintf(strBuf, 0xff, hexadecimal ? "0x%llx" : "%llu", value);
          -
          144  strBuf[0xff] = '\0';
          -
          145 
          -
          146  _init();
          -
          147  _dup(strBuf);
          -
          148  }
          -
          149 
          -
          150  /*
          -
          151  * Single-precision floating point number.
          -
          152  */
          -
          153  explicit d_string(const float value) noexcept
          -
          154  {
          -
          155  char strBuf[0xff+1];
          -
          156  std::snprintf(strBuf, 0xff, "%f", value);
          -
          157  strBuf[0xff] = '\0';
          -
          158 
          -
          159  _init();
          -
          160  _dup(strBuf);
          -
          161  }
          -
          162 
          -
          163  /*
          -
          164  * Double-precision floating point number.
          -
          165  */
          -
          166  explicit d_string(const double value) noexcept
          -
          167  {
          -
          168  char strBuf[0xff+1];
          -
          169  std::snprintf(strBuf, 0xff, "%g", value);
          -
          170  strBuf[0xff] = '\0';
          -
          171 
          -
          172  _init();
          -
          173  _dup(strBuf);
          -
          174  }
          -
          175 
          -
          176  // -------------------------------------------------------------------
          -
          177  // non-explicit constructor
          -
          178 
          -
          179  /*
          -
          180  * Create string from another string.
          -
          181  */
          -
          182  d_string(const d_string& str) noexcept
          -
          183  {
          -
          184  _init();
          -
          185  _dup(str.fBuffer);
          -
          186  }
          -
          187 
          -
          188  // -------------------------------------------------------------------
          -
          189  // destructor
          -
          190 
          -
          191  /*
          -
          192  * Destructor.
          -
          193  */
          -
          194  ~d_string() noexcept
          -
          195  {
          -
          196  DISTRHO_SAFE_ASSERT_RETURN(fBuffer != nullptr,);
          -
          197 
          -
          198  if (fBuffer == _null())
          -
          199  return;
          -
          200 
          -
          201  std::free(fBuffer);
          -
          202 
          -
          203  fBuffer = nullptr;
          -
          204  fBufferLen = 0;
          -
          205  }
          -
          206 
          -
          207  // -------------------------------------------------------------------
          -
          208  // public methods
          -
          209 
          -
          210  /*
          -
          211  * Get length of the string.
          -
          212  */
          -
          213  size_t length() const noexcept
          -
          214  {
          -
          215  return fBufferLen;
          -
          216  }
          -
          217 
          -
          218  /*
          -
          219  * Check if the string is empty.
          -
          220  */
          -
          221  bool isEmpty() const noexcept
          -
          222  {
          -
          223  return (fBufferLen == 0);
          -
          224  }
          -
          225 
          -
          226  /*
          -
          227  * Check if the string is not empty.
          -
          228  */
          -
          229  bool isNotEmpty() const noexcept
          -
          230  {
          -
          231  return (fBufferLen != 0);
          -
          232  }
          -
          233 
          -
          234  /*
          -
          235  * Check if the string contains another string, optionally ignoring case.
          -
          236  */
          -
          237  bool contains(const char* const strBuf, const bool ignoreCase = false) const noexcept
          -
          238  {
          -
          239  DISTRHO_SAFE_ASSERT_RETURN(strBuf != nullptr, false);
          -
          240 
          -
          241  if (ignoreCase)
          -
          242  {
          -
          243 #ifdef __USE_GNU
          -
          244  return (strcasestr(fBuffer, strBuf) != nullptr);
          -
          245 #else
          -
          246  d_string tmp1(fBuffer), tmp2(strBuf);
          -
          247 
          -
          248  // memory allocation failed or empty string(s)
          -
          249  if (tmp1.fBuffer == _null() || tmp2.fBuffer == _null())
          -
          250  return false;
          -
          251 
          -
          252  tmp1.toLower();
          -
          253  tmp2.toLower();
          -
          254  return (std::strstr(tmp1, tmp2) != nullptr);
          -
          255 #endif
          -
          256  }
          -
          257 
          -
          258  return (std::strstr(fBuffer, strBuf) != nullptr);
          -
          259  }
          -
          260 
          -
          261  /*
          -
          262  * Check if character at 'pos' is a digit.
          -
          263  */
          -
          264  bool isDigit(const size_t pos) const noexcept
          -
          265  {
          -
          266  DISTRHO_SAFE_ASSERT_RETURN(pos < fBufferLen, false);
          -
          267 
          -
          268  return (fBuffer[pos] >= '0' && fBuffer[pos] <= '9');
          -
          269  }
          -
          270 
          -
          271  /*
          -
          272  * Check if the string starts with the character 'c'.
          -
          273  */
          -
          274  bool startsWith(const char c) const noexcept
          -
          275  {
          -
          276  DISTRHO_SAFE_ASSERT_RETURN(c != '\0', false);
          -
          277 
          -
          278  return (fBufferLen > 0 && fBuffer[0] == c);
          -
          279  }
          -
          280 
          -
          281  /*
          -
          282  * Check if the string starts with the string 'prefix'.
          -
          283  */
          -
          284  bool startsWith(const char* const prefix) const noexcept
          -
          285  {
          -
          286  DISTRHO_SAFE_ASSERT_RETURN(prefix != nullptr, false);
          -
          287 
          -
          288  const size_t prefixLen(std::strlen(prefix));
          -
          289 
          -
          290  if (fBufferLen < prefixLen)
          -
          291  return false;
          -
          292 
          -
          293  return (std::strncmp(fBuffer, prefix, prefixLen) == 0);
          -
          294  }
          -
          295 
          -
          296  /*
          -
          297  * Check if the string ends with the character 'c'.
          -
          298  */
          -
          299  bool endsWith(const char c) const noexcept
          -
          300  {
          -
          301  DISTRHO_SAFE_ASSERT_RETURN(c != '\0', false);
          -
          302 
          -
          303  return (fBufferLen > 0 && fBuffer[fBufferLen-1] == c);
          -
          304  }
          -
          305 
          -
          306  /*
          -
          307  * Check if the string ends with the string 'suffix'.
          -
          308  */
          -
          309  bool endsWith(const char* const suffix) const noexcept
          -
          310  {
          -
          311  DISTRHO_SAFE_ASSERT_RETURN(suffix != nullptr, false);
          -
          312 
          -
          313  const size_t suffixLen(std::strlen(suffix));
          -
          314 
          -
          315  if (fBufferLen < suffixLen)
          -
          316  return false;
          -
          317 
          -
          318  return (std::strncmp(fBuffer + (fBufferLen-suffixLen), suffix, suffixLen) == 0);
          -
          319  }
          -
          320 
          -
          321  /*
          -
          322  * Find the first occurrence of character 'c' in the string.
          -
          323  * Returns "length()" if the character is not found.
          -
          324  */
          -
          325  size_t find(const char c, bool* const found = nullptr) const noexcept
          -
          326  {
          -
          327  if (fBufferLen == 0 || c == '\0')
          -
          328  {
          -
          329  if (found != nullptr)
          -
          330  *found = false;
          -
          331  return fBufferLen;
          -
          332  }
          -
          333 
          -
          334  for (size_t i=0; i < fBufferLen; ++i)
          -
          335  {
          -
          336  if (fBuffer[i] == c)
          -
          337  {
          -
          338  if (found != nullptr)
          -
          339  *found = true;
          -
          340  return i;
          -
          341  }
          -
          342  }
          -
          343 
          -
          344  if (found != nullptr)
          -
          345  *found = false;
          -
          346  return fBufferLen;
          -
          347  }
          -
          348 
          -
          349  /*
          -
          350  * Find the first occurrence of string 'strBuf' in the string.
          -
          351  * Returns "length()" if the string is not found.
          -
          352  */
          -
          353  size_t find(const char* const strBuf, bool* const found = nullptr) const noexcept
          -
          354  {
          -
          355  if (fBufferLen == 0 || strBuf == nullptr || strBuf[0] == '\0')
          -
          356  {
          -
          357  if (found != nullptr)
          -
          358  *found = false;
          -
          359  return fBufferLen;
          -
          360  }
          -
          361 
          -
          362  if (char* const subStrBuf = std::strstr(fBuffer, strBuf))
          -
          363  {
          -
          364  const ssize_t ret(subStrBuf - fBuffer);
          -
          365 
          -
          366  if (ret < 0)
          -
          367  {
          -
          368  // should never happen!
          -
          369  d_safe_assert("ret >= 0", __FILE__, __LINE__);
          -
          370 
          -
          371  if (found != nullptr)
          -
          372  *found = false;
          -
          373  return fBufferLen;
          -
          374  }
          -
          375 
          -
          376  if (found != nullptr)
          -
          377  *found = true;
          -
          378  return static_cast<size_t>(ret);
          -
          379  }
          -
          380 
          -
          381  if (found != nullptr)
          -
          382  *found = false;
          -
          383  return fBufferLen;
          -
          384  }
          -
          385 
          -
          386  /*
          -
          387  * Find the last occurrence of character 'c' in the string.
          -
          388  * Returns "length()" if the character is not found.
          -
          389  */
          -
          390  size_t rfind(const char c, bool* const found = nullptr) const noexcept
          -
          391  {
          -
          392  if (fBufferLen == 0 || c == '\0')
          -
          393  {
          -
          394  if (found != nullptr)
          -
          395  *found = false;
          -
          396  return fBufferLen;
          -
          397  }
          -
          398 
          -
          399  for (size_t i=fBufferLen; i > 0; --i)
          -
          400  {
          -
          401  if (fBuffer[i-1] == c)
          -
          402  {
          -
          403  if (found != nullptr)
          -
          404  *found = true;
          -
          405  return i-1;
          -
          406  }
          -
          407  }
          -
          408 
          -
          409  if (found != nullptr)
          -
          410  *found = false;
          -
          411  return fBufferLen;
          -
          412  }
          -
          413 
          -
          414  /*
          -
          415  * Find the last occurrence of string 'strBuf' in the string.
          -
          416  * Returns "length()" if the string is not found.
          -
          417  */
          -
          418  size_t rfind(const char* const strBuf, bool* const found = nullptr) const noexcept
          -
          419  {
          -
          420  if (found != nullptr)
          -
          421  *found = false;
          -
          422 
          -
          423  if (fBufferLen == 0 || strBuf == nullptr || strBuf[0] == '\0')
          -
          424  return fBufferLen;
          -
          425 
          -
          426  const size_t strBufLen(std::strlen(strBuf));
          -
          427 
          -
          428  size_t ret = fBufferLen;
          -
          429  const char* tmpBuf = fBuffer;
          -
          430 
          -
          431  for (size_t i=0; i < fBufferLen; ++i)
          -
          432  {
          -
          433  if (std::strstr(tmpBuf+1, strBuf) == nullptr && std::strncmp(tmpBuf, strBuf, strBufLen) == 0)
          -
          434  {
          -
          435  if (found != nullptr)
          -
          436  *found = true;
          -
          437  break;
          -
          438  }
          -
          439 
          -
          440  --ret;
          -
          441  ++tmpBuf;
          -
          442  }
          -
          443 
          -
          444  return fBufferLen-ret;
          -
          445  }
          -
          446 
          -
          447  /*
          -
          448  * Clear the string.
          -
          449  */
          -
          450  void clear() noexcept
          -
          451  {
          -
          452  truncate(0);
          -
          453  }
          -
          454 
          -
          455  /*
          -
          456  * Replace all occurrences of character 'before' with character 'after'.
          -
          457  */
          -
          458  void replace(const char before, const char after) noexcept
          -
          459  {
          -
          460  DISTRHO_SAFE_ASSERT_RETURN(before != '\0' && after != '\0',);
          -
          461 
          -
          462  for (size_t i=0; i < fBufferLen; ++i)
          -
          463  {
          -
          464  if (fBuffer[i] == before)
          -
          465  fBuffer[i] = after;
          -
          466  }
          -
          467  }
          -
          468 
          -
          469  /*
          -
          470  * Truncate the string to size 'n'.
          -
          471  */
          -
          472  void truncate(const size_t n) noexcept
          -
          473  {
          -
          474  if (n >= fBufferLen)
          -
          475  return;
          -
          476 
          -
          477  for (size_t i=n; i < fBufferLen; ++i)
          -
          478  fBuffer[i] = '\0';
          -
          479 
          -
          480  fBufferLen = n;
          -
          481  }
          -
          482 
          -
          483  /*
          -
          484  * Convert all non-basic characters to '_'.
          -
          485  */
          -
          486  void toBasic() noexcept
          -
          487  {
          -
          488  for (size_t i=0; i < fBufferLen; ++i)
          -
          489  {
          -
          490  if (fBuffer[i] >= '0' && fBuffer[i] <= '9')
          -
          491  continue;
          -
          492  if (fBuffer[i] >= 'A' && fBuffer[i] <= 'Z')
          -
          493  continue;
          -
          494  if (fBuffer[i] >= 'a' && fBuffer[i] <= 'z')
          -
          495  continue;
          -
          496  if (fBuffer[i] == '_')
          -
          497  continue;
          -
          498 
          -
          499  fBuffer[i] = '_';
          -
          500  }
          -
          501  }
          -
          502 
          -
          503  /*
          -
          504  * Convert to all ascii characters to lowercase.
          -
          505  */
          -
          506  void toLower() noexcept
          -
          507  {
          -
          508  static const char kCharDiff('a' - 'A');
          -
          509 
          -
          510  for (size_t i=0; i < fBufferLen; ++i)
          -
          511  {
          -
          512  if (fBuffer[i] >= 'A' && fBuffer[i] <= 'Z')
          -
          513  fBuffer[i] = static_cast<char>(fBuffer[i] + kCharDiff);
          -
          514  }
          -
          515  }
          -
          516 
          -
          517  /*
          -
          518  * Convert to all ascii characters to uppercase.
          -
          519  */
          -
          520  void toUpper() noexcept
          -
          521  {
          -
          522  static const char kCharDiff('a' - 'A');
          -
          523 
          -
          524  for (size_t i=0; i < fBufferLen; ++i)
          -
          525  {
          -
          526  if (fBuffer[i] >= 'a' && fBuffer[i] <= 'z')
          -
          527  fBuffer[i] = static_cast<char>(fBuffer[i] - kCharDiff);
          -
          528  }
          -
          529  }
          -
          530 
          -
          531  /*
          -
          532  * Direct access to the string buffer (read-only).
          -
          533  */
          -
          534  const char* buffer() const noexcept
          -
          535  {
          -
          536  return fBuffer;
          -
          537  }
          -
          538 
          -
          539  // -------------------------------------------------------------------
          -
          540  // public operators
          -
          541 
          -
          542  operator const char*() const noexcept
          -
          543  {
          -
          544  return fBuffer;
          -
          545  }
          -
          546 
          -
          547  char operator[](const size_t pos) const noexcept
          -
          548  {
          -
          549  if (pos < fBufferLen)
          -
          550  return fBuffer[pos];
          -
          551 
          -
          552  d_safe_assert("pos < fBufferLen", __FILE__, __LINE__);
          -
          553 
          -
          554  static char fallback;
          -
          555  fallback = '\0';
          -
          556  return fallback;
          -
          557  }
          -
          558 
          -
          559  char& operator[](const size_t pos) noexcept
          -
          560  {
          -
          561  if (pos < fBufferLen)
          -
          562  return fBuffer[pos];
          -
          563 
          -
          564  d_safe_assert("pos < fBufferLen", __FILE__, __LINE__);
          -
          565 
          -
          566  static char fallback;
          -
          567  fallback = '\0';
          -
          568  return fallback;
          -
          569  }
          -
          570 
          -
          571  bool operator==(const char* const strBuf) const noexcept
          -
          572  {
          -
          573  return (strBuf != nullptr && std::strcmp(fBuffer, strBuf) == 0);
          -
          574  }
          -
          575 
          -
          576  bool operator==(const d_string& str) const noexcept
          -
          577  {
          -
          578  return operator==(str.fBuffer);
          -
          579  }
          -
          580 
          -
          581  bool operator!=(const char* const strBuf) const noexcept
          -
          582  {
          -
          583  return !operator==(strBuf);
          -
          584  }
          -
          585 
          -
          586  bool operator!=(const d_string& str) const noexcept
          -
          587  {
          -
          588  return !operator==(str.fBuffer);
          -
          589  }
          -
          590 
          -
          591  d_string& operator=(const char* const strBuf) noexcept
          -
          592  {
          -
          593  _dup(strBuf);
          -
          594 
          -
          595  return *this;
          -
          596  }
          -
          597 
          -
          598  d_string& operator=(const d_string& str) noexcept
          -
          599  {
          -
          600  _dup(str.fBuffer);
          -
          601 
          -
          602  return *this;
          -
          603  }
          -
          604 
          -
          605  d_string& operator+=(const char* const strBuf) noexcept
          -
          606  {
          -
          607  if (strBuf == nullptr)
          -
          608  return *this;
          -
          609 
          -
          610  const size_t newBufSize = fBufferLen + std::strlen(strBuf) + 1;
          -
          611  char newBuf[newBufSize];
          -
          612 
          -
          613  std::strcpy(newBuf, fBuffer);
          -
          614  std::strcat(newBuf, strBuf);
          -
          615 
          -
          616  _dup(newBuf, newBufSize-1);
          -
          617 
          -
          618  return *this;
          -
          619  }
          -
          620 
          -
          621  d_string& operator+=(const d_string& str) noexcept
          -
          622  {
          -
          623  return operator+=(str.fBuffer);
          -
          624  }
          -
          625 
          -
          626  d_string operator+(const char* const strBuf) noexcept
          -
          627  {
          -
          628  const size_t newBufSize = fBufferLen + ((strBuf != nullptr) ? std::strlen(strBuf) : 0) + 1;
          -
          629  char newBuf[newBufSize];
          -
          630 
          -
          631  std::strcpy(newBuf, fBuffer);
          -
          632 
          -
          633  if (strBuf != nullptr)
          -
          634  std::strcat(newBuf, strBuf);
          -
          635 
          -
          636  return d_string(newBuf);
          -
          637  }
          -
          638 
          -
          639  d_string operator+(const d_string& str) noexcept
          -
          640  {
          -
          641  return operator+(str.fBuffer);
          -
          642  }
          -
          643 
          -
          644  // -------------------------------------------------------------------
          -
          645 
          -
          646 private:
          -
          647  char* fBuffer; // the actual string buffer
          -
          648  size_t fBufferLen; // string length
          -
          649 
          -
          650  /*
          -
          651  * Static null string.
          -
          652  * Prevents allocation for new and/or empty strings.
          -
          653  */
          -
          654  static char* _null() noexcept
          -
          655  {
          -
          656  static char sNull = '\0';
          -
          657  return &sNull;
          -
          658  }
          -
          659 
          -
          660  /*
          -
          661  * Shared init function.
          -
          662  * Called on all constructors.
          -
          663  */
          -
          664  void _init() noexcept
          -
          665  {
          -
          666  fBuffer = _null();
          -
          667  fBufferLen = 0;
          -
          668  }
          -
          669 
          -
          670  /*
          -
          671  * Helper function.
          -
          672  * Called whenever the string needs to be allocated.
          -
          673  *
          -
          674  * Notes:
          -
          675  * - Allocates string only if 'strBuf' is not null and new string contents are different
          -
          676  * - If 'strBuf' is null, 'size' must be 0
          -
          677  */
          -
          678  void _dup(const char* const strBuf, const size_t size = 0) noexcept
          -
          679  {
          -
          680  if (strBuf != nullptr)
          -
          681  {
          -
          682  // don't recreate string if contents match
          -
          683  if (std::strcmp(fBuffer, strBuf) == 0)
          -
          684  return;
          -
          685 
          -
          686  if (fBuffer != _null())
          -
          687  std::free(fBuffer);
          -
          688 
          -
          689  fBufferLen = (size > 0) ? size : std::strlen(strBuf);
          -
          690  fBuffer = (char*)std::malloc(fBufferLen+1);
          -
          691 
          -
          692  if (fBuffer == nullptr)
          -
          693  return _init();
          -
          694 
          -
          695  std::strcpy(fBuffer, strBuf);
          -
          696 
          -
          697  fBuffer[fBufferLen] = '\0';
          -
          698  }
          -
          699  else
          -
          700  {
          -
          701  DISTRHO_SAFE_ASSERT(size == 0);
          -
          702 
          -
          703  // don't recreate null string
          -
          704  if (fBuffer == _null())
          -
          705  return;
          -
          706 
          -
          707  DISTRHO_SAFE_ASSERT(fBuffer != nullptr);
          -
          708  std::free(fBuffer);
          -
          709 
          -
          710  _init();
          -
          711  }
          -
          712  }
          -
          713 
          -
          714  DISTRHO_LEAK_DETECTOR(d_string)
          -
          715  DISTRHO_PREVENT_HEAP_ALLOCATION
          -
          716 };
          -
          717 
          -
          718 // -----------------------------------------------------------------------
          -
          719 
          -
          720 static inline
          -
          721 d_string operator+(const d_string& strBefore, const char* const strBufAfter) noexcept
          -
          722 {
          -
          723  const char* const strBufBefore = strBefore.buffer();
          -
          724  const size_t newBufSize = strBefore.length() + ((strBufAfter != nullptr) ? std::strlen(strBufAfter) : 0) + 1;
          -
          725  char newBuf[newBufSize];
          -
          726 
          -
          727  std::strcpy(newBuf, strBufBefore);
          -
          728  std::strcat(newBuf, strBufAfter);
          -
          729 
          -
          730  return d_string(newBuf);
          -
          731 }
          -
          732 
          -
          733 static inline
          -
          734 d_string operator+(const char* const strBufBefore, const d_string& strAfter) noexcept
          -
          735 {
          -
          736  const char* const strBufAfter = strAfter.buffer();
          -
          737  const size_t newBufSize = ((strBufBefore != nullptr) ? std::strlen(strBufBefore) : 0) + strAfter.length() + 1;
          -
          738  char newBuf[newBufSize];
          -
          739 
          -
          740  std::strcpy(newBuf, strBufBefore);
          -
          741  std::strcat(newBuf, strBufAfter);
          -
          742 
          -
          743  return d_string(newBuf);
          -
          744 }
          -
          745 
          -
          746 // -----------------------------------------------------------------------
          -
          747 
          -
          748 END_NAMESPACE_DISTRHO
          -
          749 
          -
          750 #endif // DISTRHO_STRING_HPP_INCLUDED
          -
          Definition: d_string.hpp:27
          -
          - - - - diff --git a/d__thread_8hpp_source.html b/d__thread_8hpp_source.html deleted file mode 100644 index 56415df6..00000000 --- a/d__thread_8hpp_source.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: distrho/extra/d_thread.hpp Source File - - - - - - - - - -
          -
          - - - - - - -
          -
          DISTRHO Plugin Framework -
          -
          -
          - - - - - - - - - -
          - -
          - - -
          -
          -
          -
          d_thread.hpp
          -
          -
          -
          1 /*
          -
          2  * DISTRHO Plugin Framework (DPF)
          -
          3  * Copyright (C) 2012-2014 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 "d_mutex.hpp"
          -
          21 #include "d_sleep.hpp"
          -
          22 #include "d_string.hpp"
          -
          23 
          -
          24 #if defined(__GLIBC__) && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
          -
          25 // has pthread_setname_np
          -
          26 #elif defined(DISTRHO_OS_LINUX)
          -
          27 # include <sys/prctl.h>
          -
          28 #endif
          -
          29 
          -
          30 START_NAMESPACE_DISTRHO
          -
          31 
          -
          32 // -----------------------------------------------------------------------
          -
          33 // Thread class
          -
          34 
          -
          35 class Thread
          -
          36 {
          -
          37 protected:
          -
          38  /*
          -
          39  * Constructor.
          -
          40  */
          -
          41  Thread(const char* const threadName = nullptr) noexcept
          -
          42  : fLock(),
          -
          43  fName(threadName),
          -
          44 #ifdef PTW32_DLLPORT
          -
          45  fHandle({nullptr, 0}),
          -
          46 #else
          -
          47  fHandle(0),
          -
          48 #endif
          -
          49  fShouldExit(false) {}
          -
          50 
          -
          51  /*
          -
          52  * Destructor.
          -
          53  */
          -
          54  virtual ~Thread() /*noexcept*/
          -
          55  {
          -
          56  DISTRHO_SAFE_ASSERT(! isThreadRunning());
          -
          57 
          -
          58  stopThread(-1);
          -
          59  }
          -
          60 
          -
          61  /*
          -
          62  * Virtual function to be implemented by the subclass.
          -
          63  */
          -
          64  virtual void run() = 0;
          -
          65 
          -
          66  // -------------------------------------------------------------------
          -
          67 
          -
          68 public:
          -
          69  /*
          -
          70  * Check if the thread is running.
          -
          71  */
          -
          72  bool isThreadRunning() const noexcept
          -
          73  {
          -
          74 #ifdef PTW32_DLLPORT
          -
          75  return (fHandle.p != nullptr);
          -
          76 #else
          -
          77  return (fHandle != 0);
          -
          78 #endif
          -
          79  }
          -
          80 
          -
          81  /*
          -
          82  * Check if the thread should exit.
          -
          83  */
          -
          84  bool shouldThreadExit() const noexcept
          -
          85  {
          -
          86  return fShouldExit;
          -
          87  }
          -
          88 
          -
          89  /*
          -
          90  * Start the thread.
          -
          91  */
          -
          92  bool startThread() noexcept
          -
          93  {
          -
          94  // check if already running
          -
          95  DISTRHO_SAFE_ASSERT_RETURN(! isThreadRunning(), true);
          -
          96 
          -
          97  const MutexLocker cml(fLock);
          -
          98 
          -
          99  fShouldExit = false;
          -
          100 
          -
          101  pthread_t handle;
          -
          102 
          -
          103  if (pthread_create(&handle, nullptr, _entryPoint, this) == 0)
          -
          104  {
          -
          105 #ifdef PTW32_DLLPORT
          -
          106  DISTRHO_SAFE_ASSERT_RETURN(handle.p != nullptr, false);
          -
          107 #else
          -
          108  DISTRHO_SAFE_ASSERT_RETURN(handle != 0, false);
          -
          109 #endif
          -
          110  pthread_detach(handle);
          -
          111  _copyFrom(handle);
          -
          112 
          -
          113  // wait for thread to start
          -
          114  fLock.lock();
          -
          115 
          -
          116  return true;
          -
          117  }
          -
          118 
          -
          119  return false;
          -
          120  }
          -
          121 
          -
          122  /*
          -
          123  * Stop the thread.
          -
          124  * In the 'timeOutMilliseconds':
          -
          125  * = 0 -> no wait
          -
          126  * > 0 -> wait timeout value
          -
          127  * < 0 -> wait forever
          -
          128  */
          -
          129  bool stopThread(const int timeOutMilliseconds) noexcept
          -
          130  {
          -
          131  const MutexLocker cml(fLock);
          -
          132 
          -
          133  if (isThreadRunning())
          -
          134  {
          -
          135  signalThreadShouldExit();
          -
          136 
          -
          137  if (timeOutMilliseconds != 0)
          -
          138  {
          -
          139  // Wait for the thread to stop
          -
          140  int timeOutCheck = (timeOutMilliseconds == 1 || timeOutMilliseconds == -1) ? timeOutMilliseconds : timeOutMilliseconds/2;
          -
          141 
          -
          142  for (; isThreadRunning();)
          -
          143  {
          -
          144  d_msleep(2);
          -
          145 
          -
          146  if (timeOutCheck < 0)
          -
          147  continue;
          -
          148 
          -
          149  if (timeOutCheck > 0)
          -
          150  timeOutCheck -= 1;
          -
          151  else
          -
          152  break;
          -
          153  }
          -
          154  }
          -
          155 
          -
          156  if (isThreadRunning())
          -
          157  {
          -
          158  // should never happen!
          -
          159  d_stderr2("Carla assertion failure: \"! isThreadRunning()\" in file %s, line %i", __FILE__, __LINE__);
          -
          160 
          -
          161  // copy thread id so we can clear our one
          -
          162  pthread_t threadId;
          -
          163  _copyTo(threadId);
          -
          164  _init();
          -
          165 
          -
          166  try {
          -
          167  pthread_cancel(threadId);
          -
          168  } DISTRHO_SAFE_EXCEPTION("pthread_cancel");
          -
          169 
          -
          170  return false;
          -
          171  }
          -
          172  }
          -
          173 
          -
          174  return true;
          -
          175  }
          -
          176 
          -
          177  /*
          -
          178  * Tell the thread to stop as soon as possible.
          -
          179  */
          -
          180  void signalThreadShouldExit() noexcept
          -
          181  {
          -
          182  fShouldExit = true;
          -
          183  }
          -
          184 
          -
          185  // -------------------------------------------------------------------
          -
          186 
          -
          187  /*
          -
          188  * Returns the name of the thread.
          -
          189  * This is the name that gets set in the constructor.
          -
          190  */
          -
          191  const d_string& getThreadName() const noexcept
          -
          192  {
          -
          193  return fName;
          -
          194  }
          -
          195 
          -
          196  /*
          -
          197  * Changes the name of the caller thread.
          -
          198  */
          -
          199  static void setCurrentThreadName(const char* const name) noexcept
          -
          200  {
          -
          201  DISTRHO_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',);
          -
          202 
          -
          203 #if defined(__GLIBC__) && (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
          -
          204  pthread_setname_np(pthread_self(), name);
          -
          205 #elif defined(DISTRHO_OS_LINUX)
          -
          206  prctl(PR_SET_NAME, name, 0, 0, 0);
          -
          207 #endif
          -
          208  }
          -
          209 
          -
          210  // -------------------------------------------------------------------
          -
          211 
          -
          212 private:
          -
          213  Mutex fLock; // Thread lock
          -
          214  const d_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  // report ready
          -
          263  fLock.unlock();
          -
          264 
          -
          265  setCurrentThreadName(fName);
          -
          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: d_mutex.hpp:34
          -
          Definition: d_mutex.hpp:171
          -
          Definition: d_thread.hpp:35
          -
          Definition: d_string.hpp:27
          -
          - - - - diff --git a/dir_37257469cca17bab24b582e18a78eb75.html b/dir_37257469cca17bab24b582e18a78eb75.html index f918def6..f9ffed2b 100644 --- a/dir_37257469cca17bab24b582e18a78eb75.html +++ b/dir_37257469cca17bab24b582e18a78eb75.html @@ -73,7 +73,7 @@ Directories diff --git a/dir_99893ac99dd47c2a73745483a12a725f.html b/dir_99893ac99dd47c2a73745483a12a725f.html index 620a22dc..ec07ddd4 100644 --- a/dir_99893ac99dd47c2a73745483a12a725f.html +++ b/dir_99893ac99dd47c2a73745483a12a725f.html @@ -69,7 +69,7 @@ $(function() { diff --git a/dir_b1be46be7d80596b116b2b4ac973f2f0.html b/dir_b1be46be7d80596b116b2b4ac973f2f0.html index b1275142..b4f2fae2 100644 --- a/dir_b1be46be7d80596b116b2b4ac973f2f0.html +++ b/dir_b1be46be7d80596b116b2b4ac973f2f0.html @@ -69,7 +69,7 @@ $(function() { diff --git a/doxygen_sqlite3.db b/doxygen_sqlite3.db deleted file mode 100644 index 32f103d7..00000000 Binary files a/doxygen_sqlite3.db and /dev/null differ diff --git a/files.html b/files.html index 1b24c25a..ac5a1ace 100644 --- a/files.html +++ b/files.html @@ -94,7 +94,7 @@ $(function() { diff --git a/ftv2blank.png b/ftv2blank.png deleted file mode 100644 index 63c605bb..00000000 Binary files a/ftv2blank.png and /dev/null differ diff --git a/ftv2cl.png b/ftv2cl.png deleted file mode 100644 index 132f6577..00000000 Binary files a/ftv2cl.png and /dev/null differ diff --git a/ftv2doc.png b/ftv2doc.png deleted file mode 100644 index 17edabff..00000000 Binary files a/ftv2doc.png and /dev/null differ diff --git a/ftv2folderclosed.png b/ftv2folderclosed.png deleted file mode 100644 index bb8ab35e..00000000 Binary files a/ftv2folderclosed.png and /dev/null differ diff --git a/ftv2folderopen.png b/ftv2folderopen.png deleted file mode 100644 index d6c7f676..00000000 Binary files a/ftv2folderopen.png and /dev/null differ diff --git a/ftv2lastnode.png b/ftv2lastnode.png deleted file mode 100644 index 63c605bb..00000000 Binary files a/ftv2lastnode.png and /dev/null differ diff --git a/ftv2link.png b/ftv2link.png deleted file mode 100644 index 17edabff..00000000 Binary files a/ftv2link.png and /dev/null differ diff --git a/ftv2mlastnode.png b/ftv2mlastnode.png deleted file mode 100644 index 0b63f6d3..00000000 Binary files a/ftv2mlastnode.png and /dev/null differ diff --git a/ftv2mnode.png b/ftv2mnode.png deleted file mode 100644 index 0b63f6d3..00000000 Binary files a/ftv2mnode.png and /dev/null differ diff --git a/ftv2mo.png b/ftv2mo.png deleted file mode 100644 index 4bfb80f7..00000000 Binary files a/ftv2mo.png and /dev/null differ diff --git a/ftv2node.png b/ftv2node.png deleted file mode 100644 index 63c605bb..00000000 Binary files a/ftv2node.png and /dev/null differ diff --git a/ftv2ns.png b/ftv2ns.png deleted file mode 100644 index 72e3d71c..00000000 Binary files a/ftv2ns.png and /dev/null differ diff --git a/ftv2plastnode.png b/ftv2plastnode.png deleted file mode 100644 index c6ee22f9..00000000 Binary files a/ftv2plastnode.png and /dev/null differ diff --git a/ftv2pnode.png b/ftv2pnode.png deleted file mode 100644 index c6ee22f9..00000000 Binary files a/ftv2pnode.png and /dev/null differ diff --git a/ftv2splitbar.png b/ftv2splitbar.png deleted file mode 100644 index fe895f2c..00000000 Binary files a/ftv2splitbar.png and /dev/null differ diff --git a/ftv2vertline.png b/ftv2vertline.png deleted file mode 100644 index 63c605bb..00000000 Binary files a/ftv2vertline.png and /dev/null differ diff --git a/functions.html b/functions.html index 8efd87e7..446534e3 100644 --- a/functions.html +++ b/functions.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_0x7e.html b/functions_0x7e.html index 7e9880eb..c7e714ea 100644 --- a/functions_0x7e.html +++ b/functions_0x7e.html @@ -98,7 +98,7 @@ $(function() { diff --git a/functions_b.html b/functions_b.html index 87b3b6dd..681a6b82 100644 --- a/functions_b.html +++ b/functions_b.html @@ -107,7 +107,7 @@ $(function() { diff --git a/functions_c.html b/functions_c.html index da128c73..343f5ad8 100644 --- a/functions_c.html +++ b/functions_c.html @@ -70,6 +70,10 @@ $(function() {
        • circle() : NanoVG
        • +
        • clear() +: TimePosition::BarBeatTick +, TimePosition +
        • closePath() : NanoVG
        • @@ -77,8 +81,8 @@ $(function() { : Color
        • contains() -: Rectangle< T > -, Widget +: Rectangle< T > +, Widget
        • containsX() : Rectangle< T > @@ -108,16 +112,16 @@ $(function() { : NanoVG
        • createImageFromFile() -: NanoVG +: NanoVG
        • createImageFromMemory() -: NanoVG +: NanoVG
        • createImageFromRGBA() : NanoVG
        • createImageFromTextureHandle() -: NanoVG +: NanoVG
        • currentTransform() : NanoVG @@ -126,7 +130,7 @@ $(function() { diff --git a/functions_d.html b/functions_d.html index 2c642f94..0911768d 100644 --- a/functions_d.html +++ b/functions_d.html @@ -95,7 +95,7 @@ $(function() { diff --git a/functions_e.html b/functions_e.html index f2e56fd9..1a518c58 100644 --- a/functions_e.html +++ b/functions_e.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_enum.html b/functions_enum.html index 9045f04d..70362aec 100644 --- a/functions_enum.html +++ b/functions_enum.html @@ -66,7 +66,7 @@ $(function() { diff --git a/functions_eval.html b/functions_eval.html index 9e38938e..af7be1d2 100644 --- a/functions_eval.html +++ b/functions_eval.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_f.html b/functions_f.html index 7370c12b..27692d5c 100644 --- a/functions_f.html +++ b/functions_f.html @@ -111,7 +111,7 @@ $(function() { diff --git a/functions_func.html b/functions_func.html index 883aca21..c54f22b9 100644 --- a/functions_func.html +++ b/functions_func.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_0x7e.html b/functions_func_0x7e.html index 6c547cf5..3f898a3c 100644 --- a/functions_func_0x7e.html +++ b/functions_func_0x7e.html @@ -98,7 +98,7 @@ $(function() { diff --git a/functions_func_b.html b/functions_func_b.html index e893eeb3..cdec3889 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -89,7 +89,7 @@ $(function() { diff --git a/functions_func_c.html b/functions_func_c.html index fcb6b2fe..7a0cb02f 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -70,6 +70,10 @@ $(function() {
        • circle() : NanoVG
        • +
        • clear() +: TimePosition::BarBeatTick +, TimePosition +
        • closePath() : NanoVG
        • @@ -77,8 +81,8 @@ $(function() { : Color
        • contains() -: Rectangle< T > -, Widget +: Rectangle< T > +, Widget
        • containsX() : Rectangle< T > @@ -93,16 +97,16 @@ $(function() { : NanoVG
        • createImageFromFile() -: NanoVG +: NanoVG
        • createImageFromMemory() : NanoVG
        • createImageFromRGBA() -: NanoVG +: NanoVG
        • createImageFromTextureHandle() -: NanoVG +: NanoVG
        • currentTransform() : NanoVG @@ -111,7 +115,7 @@ $(function() { diff --git a/functions_func_d.html b/functions_func_d.html index 12c2495b..bdf889db 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -86,7 +86,7 @@ $(function() { diff --git a/functions_func_e.html b/functions_func_e.html index c3e8d916..1d667cef 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_func_f.html b/functions_func_f.html index 3457a498..dd496f2b 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -107,7 +107,7 @@ $(function() { diff --git a/functions_func_g.html b/functions_func_g.html index 79ed30d2..e8383df2 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -223,7 +223,7 @@ $(function() { diff --git a/functions_func_h.html b/functions_func_h.html index 83aee834..879f334f 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -68,7 +68,7 @@ $(function() { diff --git a/functions_func_i.html b/functions_func_i.html index c785d55e..4b6235f6 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -130,7 +130,7 @@ $(function() { diff --git a/functions_func_k.html b/functions_func_k.html index b3045029..5231f4a6 100644 --- a/functions_func_k.html +++ b/functions_func_k.html @@ -68,7 +68,7 @@ $(function() { diff --git a/functions_func_l.html b/functions_func_l.html index 9df348d3..197c4d78 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -89,7 +89,7 @@ $(function() { diff --git a/functions_func_m.html b/functions_func_m.html index d1bfff22..1311a72e 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_func_n.html b/functions_func_n.html index b66f8d51..e47948ad 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -74,7 +74,7 @@ $(function() { diff --git a/functions_func_o.html b/functions_func_o.html index 65788633..e3b66446 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -90,9 +90,11 @@ $(function() {
        • onNanoDisplay() : NanoWidget
        • +
        • onPositionChanged() +: Widget +
        • onResize() -: UI -, Widget +: Widget
        • onScroll() : ImageKnob @@ -118,7 +120,7 @@ $(function() { diff --git a/functions_func_p.html b/functions_func_p.html index 0d09e6b3..2ec49efd 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -83,7 +83,10 @@ $(function() { : Plugin
        • Point() -: Point< T > +: Point< T > +
        • +
        • PositionChangedEvent() +: Widget::PositionChangedEvent
        • programLoaded() : UI @@ -92,7 +95,7 @@ $(function() { diff --git a/functions_func_q.html b/functions_func_q.html index 2a01521a..1fb80f3f 100644 --- a/functions_func_q.html +++ b/functions_func_q.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_func_r.html b/functions_func_r.html index 2d459323..a8cce68b 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -107,7 +107,7 @@ $(function() { diff --git a/functions_func_s.html b/functions_func_s.html index bd6b3387..b3d464e5 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -208,7 +208,7 @@ $(function() { diff --git a/functions_func_t.html b/functions_func_t.html index d0d4bcb7..1729e3c1 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -137,7 +137,7 @@ $(function() { diff --git a/functions_func_u.html b/functions_func_u.html index ca2a379b..830fc7d4 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -64,20 +64,11 @@ $(function() {
        • UI() : UI
        • -
        • uiFileBrowserSelected() -: UI -
        • -
        • uiIdle() -: UI -
        • -
        • uiReshape() -: UI -
        diff --git a/functions_func_w.html b/functions_func_w.html index 82b5f941..b9778a0c 100644 --- a/functions_func_w.html +++ b/functions_func_w.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_func_~.html b/functions_func_~.html deleted file mode 100644 index ff7ed313..00000000 --- a/functions_func_~.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Class Members - Functions - - - - - - - - - -
        -
        - - - - - - -
        -
        DISTRHO Plugin Framework -
        -
        -
        - - - - - - - -
        - - - - -
        - -
        - -
        -  - -

        - ~ -

        -
        - - - - diff --git a/functions_g.html b/functions_g.html index 22637219..dc991aa8 100644 --- a/functions_g.html +++ b/functions_g.html @@ -223,7 +223,7 @@ $(function() { diff --git a/functions_h.html b/functions_h.html index 8ea6ab02..f895c27b 100644 --- a/functions_h.html +++ b/functions_h.html @@ -72,7 +72,7 @@ $(function() { diff --git a/functions_i.html b/functions_i.html index 733dbc95..a8f981fc 100644 --- a/functions_i.html +++ b/functions_i.html @@ -130,7 +130,7 @@ $(function() { diff --git a/functions_k.html b/functions_k.html index 9f1c8346..b866b932 100644 --- a/functions_k.html +++ b/functions_k.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_l.html b/functions_l.html index 892b0ece..0dd71992 100644 --- a/functions_l.html +++ b/functions_l.html @@ -92,7 +92,7 @@ $(function() { diff --git a/functions_m.html b/functions_m.html index ae61a2e2..774508b9 100644 --- a/functions_m.html +++ b/functions_m.html @@ -91,7 +91,7 @@ $(function() { diff --git a/functions_n.html b/functions_n.html index e3cad232..2bda42b7 100644 --- a/functions_n.html +++ b/functions_n.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_o.html b/functions_o.html index 0845feec..eb501ce3 100644 --- a/functions_o.html +++ b/functions_o.html @@ -90,9 +90,11 @@ $(function() {
      • onNanoDisplay() : NanoWidget
      • +
      • onPositionChanged() +: Widget +
      • onResize() -: UI -, Widget +: Widget
      • onScroll() : ImageKnob @@ -118,7 +120,7 @@ $(function() { diff --git a/functions_p.html b/functions_p.html index f5460548..75b6bf2f 100644 --- a/functions_p.html +++ b/functions_p.html @@ -86,7 +86,10 @@ $(function() { : Plugin
      • Point() -: Point< T > +: Point< T > +
      • +
      • PositionChangedEvent() +: Widget::PositionChangedEvent
      • programLoaded() : UI @@ -95,7 +98,7 @@ $(function() { diff --git a/functions_q.html b/functions_q.html index 6ebaf812..45bb1197 100644 --- a/functions_q.html +++ b/functions_q.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_r.html b/functions_r.html index f9880760..1f323bd1 100644 --- a/functions_r.html +++ b/functions_r.html @@ -113,7 +113,7 @@ $(function() { diff --git a/functions_s.html b/functions_s.html index 3e9c199f..b8bba066 100644 --- a/functions_s.html +++ b/functions_s.html @@ -175,7 +175,7 @@ $(function() { : MidiEvent
      • Size() -: Size< T > +: Size< T >
      • skewX() : NanoVG @@ -215,7 +215,7 @@ $(function() { diff --git a/functions_t.html b/functions_t.html index 6c40aa62..b1df0a45 100644 --- a/functions_t.html +++ b/functions_t.html @@ -143,7 +143,7 @@ $(function() { diff --git a/functions_u.html b/functions_u.html index 2e70d9a6..057bb3cd 100644 --- a/functions_u.html +++ b/functions_u.html @@ -64,15 +64,6 @@ $(function() {
      • UI() : UI
      • -
      • uiFileBrowserSelected() -: UI -
      • -
      • uiIdle() -: UI -
      • -
      • uiReshape() -: UI -
      • unit : Parameter
      • @@ -80,7 +71,7 @@ $(function() { diff --git a/functions_v.html b/functions_v.html index 893acc0f..2f98869b 100644 --- a/functions_v.html +++ b/functions_v.html @@ -74,7 +74,7 @@ $(function() { diff --git a/functions_vars.html b/functions_vars.html index 0c98c854..e034548e 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -219,7 +219,7 @@ $(function() { diff --git a/functions_w.html b/functions_w.html index 98961cad..f9f09acd 100644 --- a/functions_w.html +++ b/functions_w.html @@ -71,7 +71,7 @@ $(function() { diff --git a/functions_~.html b/functions_~.html deleted file mode 100644 index a2901b8d..00000000 --- a/functions_~.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Class Members - - - - - - - - - -
        -
        - - - - - - -
        -
        DISTRHO Plugin Framework -
        -
        -
        - - - - - - - -
        - - - - -
        - -
        - -
        -
        Here is a list of all documented class members with links to the class documentation for each member:
        - -

        - ~ -

        -
        - - - - diff --git a/group__AudioPortHints.html b/group__AudioPortHints.html index f5a47b4c..7ff609af 100644 --- a/group__AudioPortHints.html +++ b/group__AudioPortHints.html @@ -124,7 +124,7 @@ Variables diff --git a/group__BasePluginStructs.html b/group__BasePluginStructs.html index 84d160b8..53b2ae3f 100644 --- a/group__BasePluginStructs.html +++ b/group__BasePluginStructs.html @@ -122,7 +122,7 @@ When on (> 0.5f), it means the plugin must run in a bypassed state.

        diff --git a/group__BaseStructs.html b/group__BaseStructs.html deleted file mode 100644 index f1d47cf9..00000000 --- a/group__BaseStructs.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Base Structs - - - - - - - - - -
        -
        - - - - - - -
        -
        DISTRHO Plugin Framework -
        -
        -
        - - - - -
        - - - - -
        - -
        - -
        - -
        -
        Base Structs
        -
        -
        - - - - - - - - - - - - - - -

        -Classes

        struct  AudioPort
         
        struct  ParameterRanges
         
        struct  Parameter
         
        struct  MidiEvent
         
        struct  TimePosition
         
        struct  TimePosition::BarBeatTick
         
        -

        Detailed Description

        -
        - - - - diff --git a/group__EntryPoints.html b/group__EntryPoints.html index 43c5305d..ebe153e2 100644 --- a/group__EntryPoints.html +++ b/group__EntryPoints.html @@ -113,7 +113,7 @@ Functions diff --git a/group__MainClasses.html b/group__MainClasses.html index 81d8ea52..da9d6f1f 100644 --- a/group__MainClasses.html +++ b/group__MainClasses.html @@ -76,7 +76,7 @@ Classes diff --git a/group__ParameterHints.html b/group__ParameterHints.html index 8fd5c06f..3848507f 100644 --- a/group__ParameterHints.html +++ b/group__ParameterHints.html @@ -232,7 +232,7 @@ Cannot be used for output parameters.

        diff --git a/group__PluginMacros.html b/group__PluginMacros.html index b393374f..4b0a1100 100644 --- a/group__PluginMacros.html +++ b/group__PluginMacros.html @@ -93,10 +93,14 @@ Macros   #define DISTRHO_PLUGIN_WANT_STATE   1   +#define DISTRHO_PLUGIN_WANT_FULL_STATE   1 +  #define DISTRHO_PLUGIN_WANT_TIMEPOS   1   #define DISTRHO_UI_USE_NANOVG   1   +#define DISTRHO_UI_USER_RESIZABLE   1 +  #define DISTRHO_UI_URI   DISTRHO_PLUGIN_URI "#UI"   @@ -319,6 +323,22 @@ This is automatically enabled if Plugin::setState(const char*, const char*)
    + + + +

    ◆ DISTRHO_PLUGIN_WANT_FULL_STATE

    + +
    +
    + + + + +
    #define DISTRHO_PLUGIN_WANT_FULL_STATE   1
    +
    +

    Wherever the plugin implements the full state API. When this macro is enabled, the plugin must implement a new getState(const char* key) function, which the host calls when saving its session/project. This is useful for plugins that have custom internal values not exposed to the host as key-value state pairs or parameters. Most simple effects and synths will not need this.

    Note
    this macro is automatically enabled if a plugin has programs and state, as the key-value state pairs need to be updated when the current program changes.
    +
    See also
    Plugin::getState(const char*)
    +
    @@ -350,6 +370,23 @@ This is automatically enabled if NanoVG for drawing instead of the default raw OpenGL calls.
    When enabled your UI instance will subclass NanoWidget instead of Widget.

    + + + +

    ◆ DISTRHO_UI_USER_RESIZABLE

    + +
    +
    + + + + +
    #define DISTRHO_UI_USER_RESIZABLE   1
    +
    +

    Wherever the UI is resizable to any size by the user.
    +By default this is false, and resizing is only allowed under the plugin UI control,
    +Enabling this options makes it possible for the user to resize the plugin UI at anytime.

    See also
    UI::setGeometryConstraints(uint, uint, bool, bool)
    +
    @@ -371,7 +408,7 @@ By default this is set to diff --git a/hierarchy.html b/hierarchy.html index 60c82e5b..024c4150 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -102,41 +102,42 @@ $(function() {  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 + CWidget::PositionChangedEvent + 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 - CStandaloneWindow + CImageButton + CImageKnob + CImageSlider + CImageSwitch + CNanoWidget + CWindow + CImageAboutWindow + CStandaloneWindow diff --git a/index.html b/index.html index 55fd5563..905e1ea7 100644 --- a/index.html +++ b/index.html @@ -112,7 +112,7 @@ UI diff --git a/modules.html b/modules.html index 40f14570..a66541e0 100644 --- a/modules.html +++ b/modules.html @@ -75,7 +75,7 @@ $(function() { diff --git a/search/all_11.js b/search/all_11.js index 384c8b4e..c8bde941 100644 --- a/search/all_11.js +++ b/search/all_11.js @@ -35,7 +35,7 @@ var searchData= ['show',['show',['../classWidget.html#a25ff178539e226b5f30ef0335d060f2b',1,'Widget']]], ['shrinkby',['shrinkBy',['../classSize.html#abbcf98f504b23679162cab3b6f818949',1,'Size::shrinkBy()'],['../classRectangle.html#a22e5029d09c7eac8ebee0e079dab075f',1,'Rectangle::shrinkBy()']]], ['signal',['Signal',['../classSignal.html',1,'']]], - ['size',['Size',['../classSize.html',1,'Size< T >'],['../classSize.html#ada0c1f75029742b2514ede5466993776',1,'Size::Size() noexcept'],['../classSize.html#ac3096253937df7e318a02838c48bf941',1,'Size::Size(const T &width, const T &height) noexcept'],['../classSize.html#a90ab9513f96f3642def121d2fbd92593',1,'Size::Size(const Size< T > &size) noexcept'],['../structMidiEvent.html#a48b420a6dbca6502113b92c336a3041e',1,'MidiEvent::size()']]], + ['size',['Size',['../classSize.html',1,'Size< T >'],['../structMidiEvent.html#a48b420a6dbca6502113b92c336a3041e',1,'MidiEvent::size()'],['../classSize.html#ada0c1f75029742b2514ede5466993776',1,'Size::Size() noexcept'],['../classSize.html#ac3096253937df7e318a02838c48bf941',1,'Size::Size(const T &width, const T &height) noexcept'],['../classSize.html#a90ab9513f96f3642def121d2fbd92593',1,'Size::Size(const Size< T > &size) noexcept']]], ['size_3c_20int_20_3e',['Size< int >',['../classSize.html',1,'']]], ['size_3c_20uint_20_3e',['Size< uint >',['../classSize.html',1,'']]], ['skewx',['skewX',['../classNanoVG.html#a4f45e3cf465060491e73427e5868573f',1,'NanoVG']]], diff --git a/search/all_13.js b/search/all_13.js index 19ab6b31..0238aa66 100644 --- a/search/all_13.js +++ b/search/all_13.js @@ -1,8 +1,5 @@ var searchData= [ ['ui',['UI',['../classUI.html',1,'UI'],['../classUI.html#ad3425075e4a23234a8568d1893b54f22',1,'UI::UI()']]], - ['uifilebrowserselected',['uiFileBrowserSelected',['../classUI.html#a6d4697296129d3a6bc34fc810d6297ac',1,'UI']]], - ['uiidle',['uiIdle',['../classUI.html#af8de639088f3b2d42c266a2d2d6719da',1,'UI']]], - ['uireshape',['uiReshape',['../classUI.html#ab6861389e1bb01268a189dadbeb4fbcc',1,'UI']]], ['unit',['unit',['../structParameter.html#a2f79574998d34504e3a694163b4599a1',1,'Parameter']]] ]; diff --git a/search/all_2.js b/search/all_2.js index fff09d73..ed85dbf1 100644 --- a/search/all_2.js +++ b/search/all_2.js @@ -3,6 +3,7 @@ var searchData= ['callback',['Callback',['../classImageButton_1_1Callback.html',1,'ImageButton::Callback'],['../classImageKnob_1_1Callback.html',1,'ImageKnob::Callback'],['../classImageSlider_1_1Callback.html',1,'ImageSlider::Callback'],['../classImageSwitch_1_1Callback.html',1,'ImageSwitch::Callback']]], ['cancelframe',['cancelFrame',['../classNanoVG.html#a5c47888aaa114b8ca9a0431383c1c0f1',1,'NanoVG']]], ['circle',['Circle',['../classCircle.html',1,'Circle< T >'],['../classCircle.html#a69bf0ddae80047ef3e9b230930eb1ba6',1,'Circle::Circle() noexcept'],['../classCircle.html#a391892aed07c5239153a038fea80423b',1,'Circle::Circle(const T &x, const T &y, const float size, const uint numSegments=300)'],['../classCircle.html#ab0e9f6bedf3dfa9fd958c573eca46368',1,'Circle::Circle(const Point< T > &pos, const float size, const uint numSegments=300)'],['../classCircle.html#aeee15927ea13e9114aa53a8c26c5e1df',1,'Circle::Circle(const Circle< T > &cir) noexcept'],['../classNanoVG.html#aa3230d48ce48f050d3ad636fc2ff4235',1,'NanoVG::circle()']]], + ['clear',['clear',['../structTimePosition_1_1BarBeatTick.html#ae6ea776260b58800bff63f515351bd3a',1,'TimePosition::BarBeatTick::clear()'],['../structTimePosition.html#acd89e79032d748ee7fc01d55a2c518bb',1,'TimePosition::clear()']]], ['closepath',['closePath',['../classNanoVG.html#a74ae13eec498c0afb9fa20199eecbd48',1,'NanoVG']]], ['color',['Color',['../structColor.html',1,'Color'],['../structColor.html#acbbdba6661c2bbd987ef27de59813b47',1,'Color::Color() noexcept'],['../structColor.html#a6539e54d79570ad579207289d087af70',1,'Color::Color(int red, int green, int blue, int alpha=255) noexcept'],['../structColor.html#a77dd2b8f997aaf034c790ffd4ffe64bc',1,'Color::Color(float red, float green, float blue, float alpha=1.0f) noexcept'],['../structColor.html#a7ac8018890423379bf8cdce2c6bc9d7e',1,'Color::Color(const Color &color) noexcept'],['../structColor.html#a8d51b3f9457c1d9524ad67c94152b99a',1,'Color::Color(const Color &color1, const Color &color2, float u) noexcept']]], ['contains',['contains',['../classRectangle.html#a08b0741e6259e88552106136cdbff489',1,'Rectangle::contains(const T &x, const T &y) const noexcept'],['../classRectangle.html#a4420a73414a0fd1b85abd468a2c890d3',1,'Rectangle::contains(const Point< T > &pos) const noexcept'],['../classWidget.html#a655f9dac3838b52a3deec1a4b9e6001b',1,'Widget::contains(int x, int y) const noexcept'],['../classWidget.html#a9dc3a8c1c7fe1dd0ffa28577f1eaa5fd',1,'Widget::contains(const Point< int > &pos) const noexcept']]], diff --git a/search/all_3.js b/search/all_3.js index d15fc014..2ceb9e51 100644 --- a/search/all_3.js +++ b/search/all_3.js @@ -13,6 +13,7 @@ var searchData= ['distrho_5fplugin_5fnum_5foutputs',['DISTRHO_PLUGIN_NUM_OUTPUTS',['../group__PluginMacros.html#ga917195804ebcb2bb48c9fad52b20b3ca',1,'DistrhoInfo.hpp']]], ['distrho_5fplugin_5furi',['DISTRHO_PLUGIN_URI',['../group__PluginMacros.html#ga9cc186448134e6a1956474b3878c97a8',1,'DistrhoInfo.hpp']]], ['distrho_5fplugin_5fwant_5fdirect_5faccess',['DISTRHO_PLUGIN_WANT_DIRECT_ACCESS',['../group__PluginMacros.html#gac6873a3950f52f3fde8e386af63b69a1',1,'DistrhoInfo.hpp']]], + ['distrho_5fplugin_5fwant_5ffull_5fstate',['DISTRHO_PLUGIN_WANT_FULL_STATE',['../group__PluginMacros.html#gac022d3d0a8782d632d7a801bc9cf721e',1,'DistrhoInfo.hpp']]], ['distrho_5fplugin_5fwant_5flatency',['DISTRHO_PLUGIN_WANT_LATENCY',['../group__PluginMacros.html#gad6b0ebf10e048f4742f29735da4d4930',1,'DistrhoInfo.hpp']]], ['distrho_5fplugin_5fwant_5fmidi_5finput',['DISTRHO_PLUGIN_WANT_MIDI_INPUT',['../group__PluginMacros.html#gadf2e2eb7550e4116001c816adfb04a70',1,'DistrhoInfo.hpp']]], ['distrho_5fplugin_5fwant_5fmidi_5foutput',['DISTRHO_PLUGIN_WANT_MIDI_OUTPUT',['../group__PluginMacros.html#ga548522eb91344a45841a5a95ff4f8073',1,'DistrhoInfo.hpp']]], @@ -21,6 +22,7 @@ var searchData= ['distrho_5fplugin_5fwant_5ftimepos',['DISTRHO_PLUGIN_WANT_TIMEPOS',['../group__PluginMacros.html#ga496610b956d931b1940d07da48d123f2',1,'DistrhoInfo.hpp']]], ['distrho_5fui_5furi',['DISTRHO_UI_URI',['../group__PluginMacros.html#ga420a88022da249b9f38a6046998dbd7c',1,'DistrhoInfo.hpp']]], ['distrho_5fui_5fuse_5fnanovg',['DISTRHO_UI_USE_NANOVG',['../group__PluginMacros.html#gad49e79936a2aa5afa089cbc051426ccd',1,'DistrhoInfo.hpp']]], + ['distrho_5fui_5fuser_5fresizable',['DISTRHO_UI_USER_RESIZABLE',['../group__PluginMacros.html#gabadb9d9ba7f479df39b3963ee60b7a4b',1,'DistrhoInfo.hpp']]], ['draw',['draw',['../classLine.html#af3eebf8905576276741caab216516949',1,'Line::draw()'],['../classCircle.html#ae1006bb2486c75b45e43675783521915',1,'Circle::draw()'],['../classTriangle.html#a5dd94312d41f36fb149e03d90800bb53',1,'Triangle::draw()'],['../classRectangle.html#a415da25901ad63d87e3bac7755535cda',1,'Rectangle::draw()'],['../classImage.html#ae1e16dcef3072e4e49ec2887a9c1245a',1,'Image::draw()']]], ['drawat',['drawAt',['../classImage.html#ab63094dc07e6d62624827bca904b5cdd',1,'Image::drawAt(const int x, const int y)'],['../classImage.html#aed2dc99624de978eade8124d2c099cfa',1,'Image::drawAt(const Point< int > &pos)']]], ['drawoutline',['drawOutline',['../classCircle.html#a59ad688a9f13a2e639502a8adc979111',1,'Circle::drawOutline()'],['../classTriangle.html#a93cda515489108aa6c14b0b1ab8cff11',1,'Triangle::drawOutline()'],['../classRectangle.html#a562e46203701309da8748dcc5277373e',1,'Rectangle::drawOutline()']]], diff --git a/search/all_d.js b/search/all_d.js index 349311d3..5dfcff32 100644 --- a/search/all_d.js +++ b/search/all_d.js @@ -5,7 +5,8 @@ var searchData= ['onmotion',['onMotion',['../classImageButton.html#a53676b7a0cc31f78a371ef363344f7ba',1,'ImageButton::onMotion()'],['../classImageKnob.html#a299a1721471747dc173633f21bd75b1f',1,'ImageKnob::onMotion()'],['../classImageSlider.html#a2950b1058ae7c6d20397135615b4583c',1,'ImageSlider::onMotion()'],['../classWidget.html#a655569fb78a598652e9f24cefa1fe4a5',1,'Widget::onMotion()']]], ['onmouse',['onMouse',['../classImageAboutWindow.html#a5af153208057de4baf7264c9a7bd30cd',1,'ImageAboutWindow::onMouse()'],['../classImageButton.html#acea33c4a730d0dce4f87a67cc290d747',1,'ImageButton::onMouse()'],['../classImageKnob.html#a473247914d3751d629dd8690f74af07b',1,'ImageKnob::onMouse()'],['../classImageSlider.html#a6ffe0c5b79ef8e397876154b904f0981',1,'ImageSlider::onMouse()'],['../classImageSwitch.html#aa2371a540211636f96ac3a3a161ee563',1,'ImageSwitch::onMouse()'],['../classWidget.html#a097ec1d56a06bdc9e0a4e54880def378',1,'Widget::onMouse()']]], ['onnanodisplay',['onNanoDisplay',['../classNanoWidget.html#a50c53f68d816358fdb6abad250917372',1,'NanoWidget']]], - ['onresize',['onResize',['../classUI.html#a8de15be030bbdf0eb81461349cb1cc77',1,'UI::onResize()'],['../classWidget.html#acc0365ec4b9245bdffb8d0285be55dea',1,'Widget::onResize()']]], + ['onpositionchanged',['onPositionChanged',['../classWidget.html#a883b70a0d434534e4179b916320dd87f',1,'Widget']]], + ['onresize',['onResize',['../classWidget.html#acc0365ec4b9245bdffb8d0285be55dea',1,'Widget']]], ['onscroll',['onScroll',['../classImageKnob.html#a2cdc26028611554458a74b32740ac33b',1,'ImageKnob::onScroll()'],['../classWidget.html#a0d78d28bd4a98c3a016a38091b2d4185',1,'Widget::onScroll()']]], ['onspecial',['onSpecial',['../classWidget.html#a3b42652fcb2f95c6f86bdd43a1727507',1,'Widget']]], ['operator_20objecttype_20_2a',['operator ObjectType *',['../classScopedPointer.html#af7c241c736d79754fd6f8d305cce8bc3',1,'ScopedPointer']]], diff --git a/search/all_e.js b/search/all_e.js index 57d5a380..491e1e30 100644 --- a/search/all_e.js +++ b/search/all_e.js @@ -15,5 +15,6 @@ var searchData= ['point',['Point',['../classPoint.html',1,'Point< T >'],['../classPoint.html#ada3e3f5f840cf70db3c7f884843a3d01',1,'Point::Point() noexcept'],['../classPoint.html#a273b90bf5380bacd6e58582ef9ce35f7',1,'Point::Point(const T &x, const T &y) noexcept'],['../classPoint.html#a31393ac57c0140243e8723f9cd9106bb',1,'Point::Point(const Point< T > &pos) noexcept']]], ['point_3c_20float_20_3e',['Point< float >',['../classPoint.html',1,'']]], ['point_3c_20int_20_3e',['Point< int >',['../classPoint.html',1,'']]], + ['positionchangedevent',['PositionChangedEvent',['../structWidget_1_1PositionChangedEvent.html',1,'Widget::PositionChangedEvent'],['../structWidget_1_1PositionChangedEvent.html#aa6360f57c0314621b04d049708bea45c',1,'Widget::PositionChangedEvent::PositionChangedEvent()']]], ['programloaded',['programLoaded',['../classUI.html#a2f043dd1b2e179248a19918c5483cfae',1,'UI']]] ]; diff --git a/search/classes_b.js b/search/classes_b.js index 9cecb96a..7efd1e54 100644 --- a/search/classes_b.js +++ b/search/classes_b.js @@ -8,5 +8,6 @@ var searchData= ['plugin',['Plugin',['../classPlugin.html',1,'']]], ['point',['Point',['../classPoint.html',1,'']]], ['point_3c_20float_20_3e',['Point< float >',['../classPoint.html',1,'']]], - ['point_3c_20int_20_3e',['Point< int >',['../classPoint.html',1,'']]] + ['point_3c_20int_20_3e',['Point< int >',['../classPoint.html',1,'']]], + ['positionchangedevent',['PositionChangedEvent',['../structWidget_1_1PositionChangedEvent.html',1,'Widget']]] ]; diff --git a/search/functions_13.js b/search/functions_13.js index d057d8b6..c17c0582 100644 --- a/search/functions_13.js +++ b/search/functions_13.js @@ -1,7 +1,4 @@ var searchData= [ - ['ui',['UI',['../classUI.html#ad3425075e4a23234a8568d1893b54f22',1,'UI']]], - ['uifilebrowserselected',['uiFileBrowserSelected',['../classUI.html#a6d4697296129d3a6bc34fc810d6297ac',1,'UI']]], - ['uiidle',['uiIdle',['../classUI.html#af8de639088f3b2d42c266a2d2d6719da',1,'UI']]], - ['uireshape',['uiReshape',['../classUI.html#ab6861389e1bb01268a189dadbeb4fbcc',1,'UI']]] + ['ui',['UI',['../classUI.html#ad3425075e4a23234a8568d1893b54f22',1,'UI']]] ]; diff --git a/search/functions_2.js b/search/functions_2.js index 5006de0e..3cd8cd32 100644 --- a/search/functions_2.js +++ b/search/functions_2.js @@ -2,6 +2,7 @@ var searchData= [ ['cancelframe',['cancelFrame',['../classNanoVG.html#a5c47888aaa114b8ca9a0431383c1c0f1',1,'NanoVG']]], ['circle',['Circle',['../classCircle.html#a69bf0ddae80047ef3e9b230930eb1ba6',1,'Circle::Circle() noexcept'],['../classCircle.html#a391892aed07c5239153a038fea80423b',1,'Circle::Circle(const T &x, const T &y, const float size, const uint numSegments=300)'],['../classCircle.html#ab0e9f6bedf3dfa9fd958c573eca46368',1,'Circle::Circle(const Point< T > &pos, const float size, const uint numSegments=300)'],['../classCircle.html#aeee15927ea13e9114aa53a8c26c5e1df',1,'Circle::Circle(const Circle< T > &cir) noexcept'],['../classNanoVG.html#aa3230d48ce48f050d3ad636fc2ff4235',1,'NanoVG::circle()']]], + ['clear',['clear',['../structTimePosition_1_1BarBeatTick.html#ae6ea776260b58800bff63f515351bd3a',1,'TimePosition::BarBeatTick::clear()'],['../structTimePosition.html#acd89e79032d748ee7fc01d55a2c518bb',1,'TimePosition::clear()']]], ['closepath',['closePath',['../classNanoVG.html#a74ae13eec498c0afb9fa20199eecbd48',1,'NanoVG']]], ['color',['Color',['../structColor.html#acbbdba6661c2bbd987ef27de59813b47',1,'Color::Color() noexcept'],['../structColor.html#a6539e54d79570ad579207289d087af70',1,'Color::Color(int red, int green, int blue, int alpha=255) noexcept'],['../structColor.html#a77dd2b8f997aaf034c790ffd4ffe64bc',1,'Color::Color(float red, float green, float blue, float alpha=1.0f) noexcept'],['../structColor.html#a7ac8018890423379bf8cdce2c6bc9d7e',1,'Color::Color(const Color &color) noexcept'],['../structColor.html#a8d51b3f9457c1d9524ad67c94152b99a',1,'Color::Color(const Color &color1, const Color &color2, float u) noexcept']]], ['contains',['contains',['../classRectangle.html#a08b0741e6259e88552106136cdbff489',1,'Rectangle::contains(const T &x, const T &y) const noexcept'],['../classRectangle.html#a4420a73414a0fd1b85abd468a2c890d3',1,'Rectangle::contains(const Point< T > &pos) const noexcept'],['../classWidget.html#a655f9dac3838b52a3deec1a4b9e6001b',1,'Widget::contains(int x, int y) const noexcept'],['../classWidget.html#a9dc3a8c1c7fe1dd0ffa28577f1eaa5fd',1,'Widget::contains(const Point< int > &pos) const noexcept']]], diff --git a/search/functions_d.js b/search/functions_d.js index 349311d3..5dfcff32 100644 --- a/search/functions_d.js +++ b/search/functions_d.js @@ -5,7 +5,8 @@ var searchData= ['onmotion',['onMotion',['../classImageButton.html#a53676b7a0cc31f78a371ef363344f7ba',1,'ImageButton::onMotion()'],['../classImageKnob.html#a299a1721471747dc173633f21bd75b1f',1,'ImageKnob::onMotion()'],['../classImageSlider.html#a2950b1058ae7c6d20397135615b4583c',1,'ImageSlider::onMotion()'],['../classWidget.html#a655569fb78a598652e9f24cefa1fe4a5',1,'Widget::onMotion()']]], ['onmouse',['onMouse',['../classImageAboutWindow.html#a5af153208057de4baf7264c9a7bd30cd',1,'ImageAboutWindow::onMouse()'],['../classImageButton.html#acea33c4a730d0dce4f87a67cc290d747',1,'ImageButton::onMouse()'],['../classImageKnob.html#a473247914d3751d629dd8690f74af07b',1,'ImageKnob::onMouse()'],['../classImageSlider.html#a6ffe0c5b79ef8e397876154b904f0981',1,'ImageSlider::onMouse()'],['../classImageSwitch.html#aa2371a540211636f96ac3a3a161ee563',1,'ImageSwitch::onMouse()'],['../classWidget.html#a097ec1d56a06bdc9e0a4e54880def378',1,'Widget::onMouse()']]], ['onnanodisplay',['onNanoDisplay',['../classNanoWidget.html#a50c53f68d816358fdb6abad250917372',1,'NanoWidget']]], - ['onresize',['onResize',['../classUI.html#a8de15be030bbdf0eb81461349cb1cc77',1,'UI::onResize()'],['../classWidget.html#acc0365ec4b9245bdffb8d0285be55dea',1,'Widget::onResize()']]], + ['onpositionchanged',['onPositionChanged',['../classWidget.html#a883b70a0d434534e4179b916320dd87f',1,'Widget']]], + ['onresize',['onResize',['../classWidget.html#acc0365ec4b9245bdffb8d0285be55dea',1,'Widget']]], ['onscroll',['onScroll',['../classImageKnob.html#a2cdc26028611554458a74b32740ac33b',1,'ImageKnob::onScroll()'],['../classWidget.html#a0d78d28bd4a98c3a016a38091b2d4185',1,'Widget::onScroll()']]], ['onspecial',['onSpecial',['../classWidget.html#a3b42652fcb2f95c6f86bdd43a1727507',1,'Widget']]], ['operator_20objecttype_20_2a',['operator ObjectType *',['../classScopedPointer.html#af7c241c736d79754fd6f8d305cce8bc3',1,'ScopedPointer']]], diff --git a/search/functions_e.js b/search/functions_e.js index a39d1274..ca9163f8 100644 --- a/search/functions_e.js +++ b/search/functions_e.js @@ -8,5 +8,6 @@ var searchData= ['pathwinding',['pathWinding',['../classNanoVG.html#aaf7f45fc45cf920d261a8b2cfebf9026',1,'NanoVG']]], ['plugin',['Plugin',['../classPlugin.html#acb5a3632da5a5c4110172a3a78e1fd32',1,'Plugin']]], ['point',['Point',['../classPoint.html#ada3e3f5f840cf70db3c7f884843a3d01',1,'Point::Point() noexcept'],['../classPoint.html#a273b90bf5380bacd6e58582ef9ce35f7',1,'Point::Point(const T &x, const T &y) noexcept'],['../classPoint.html#a31393ac57c0140243e8723f9cd9106bb',1,'Point::Point(const Point< T > &pos) noexcept']]], + ['positionchangedevent',['PositionChangedEvent',['../structWidget_1_1PositionChangedEvent.html#aa6360f57c0314621b04d049708bea45c',1,'Widget::PositionChangedEvent']]], ['programloaded',['programLoaded',['../classUI.html#a2f043dd1b2e179248a19918c5483cfae',1,'UI']]] ]; diff --git a/singletonCircle.html b/singletonCircle.html deleted file mode 100644 index dd0955b2..00000000 --- a/singletonCircle.html +++ /dev/null @@ -1,620 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Circle< T > Class Template Reference - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    - -
    -
    Circle< T > Class Template Reference
    -
    -
    - -

    #include <Geometry.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -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< 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 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

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    Circle< T >::Circle ()
    -
    -noexcept
    -
    -

    Constructor for a null circle.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Circle< T >::Circle (const T & x,
    const T & y,
    const float size,
    const uint numSegments = 300 
    )
    -
    -

    Constructor using custom X, Y and size values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Circle< T >::Circle (const Point< T > & pos,
    const float size,
    const uint numSegments = 300 
    )
    -
    -

    Constructor using custom position and size values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    Circle< T >::Circle (const Circle< T > & cir)
    -
    -noexcept
    -
    -

    Constructor using another Circle class values.

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const T& Circle< T >::getX () const
    -
    -noexcept
    -
    -

    Get X value.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const T& Circle< T >::getY () const
    -
    -noexcept
    -
    -

    Get Y value.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const Point<T>& Circle< T >::getPos () const
    -
    -noexcept
    -
    -

    Get position.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Circle< T >::setX (const T & x)
    -
    -noexcept
    -
    -

    Set X value to x.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Circle< T >::setY (const T & y)
    -
    -noexcept
    -
    -

    Set Y value to y.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    void Circle< T >::setPos (const T & x,
    const T & y 
    )
    -
    -noexcept
    -
    -

    Set X and Y values to x and y respectively.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Circle< T >::setPos (const Point< T > & pos)
    -
    -noexcept
    -
    -

    Set X and Y values according to pos.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    float Circle< T >::getSize () const
    -
    -noexcept
    -
    -

    Get size.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Circle< T >::setSize (const float size)
    -
    -noexcept
    -
    -

    Set size.

    Note
    Must always be > 0
    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    uint Circle< T >::getNumSegments () const
    -
    -noexcept
    -
    -

    Get the current number of line segments that make this circle.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - - - - -
    void Circle< T >::setNumSegments (const uint num)
    -
    -

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

    Note
    Must always be >= 3
    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    void Circle< T >::draw ()
    -
    -

    Draw this circle using the current OpenGL state.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    void Circle< T >::drawOutline ()
    -
    -

    Draw lines (outline of this circle) using the current OpenGL state.

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    - - - - diff --git a/singletonLine.html b/singletonLine.html deleted file mode 100644 index 005d71b1..00000000 --- a/singletonLine.html +++ /dev/null @@ -1,927 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Line< T > Class Template Reference - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    - -
    -
    Line< T > Class Template Reference
    -
    -
    - -

    #include <Geometry.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -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< 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 T>
    -class Line< T >

    - -

    DGL Line class.

    -

    This class describes a line, defined by two points.

    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    Line< T >::Line ()
    -
    -noexcept
    -
    -

    Constructor for a null line ([0,0] to [0,0]).

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Line< T >::Line (const T & startX,
    const T & startY,
    const T & endX,
    const T & endY 
    )
    -
    -noexcept
    -
    -

    Constructor using custom start X, start Y, end X and end Y values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Line< T >::Line (const T & startX,
    const T & startY,
    const Point< T > & endPos 
    )
    -
    -noexcept
    -
    -

    Constructor using custom start X, start Y and end pos values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Line< T >::Line (const Point< T > & startPos,
    const T & endX,
    const T & endY 
    )
    -
    -noexcept
    -
    -

    Constructor using custom start pos, end X and end Y values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    Line< T >::Line (const Point< T > & startPos,
    const Point< T > & endPos 
    )
    -
    -noexcept
    -
    -

    Constructor using custom start and end pos values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    Line< T >::Line (const Line< T > & line)
    -
    -noexcept
    -
    -

    Constructor using another Line class values.

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const T& Line< T >::getStartX () const
    -
    -noexcept
    -
    -

    Get start X value.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const T& Line< T >::getStartY () const
    -
    -noexcept
    -
    -

    Get start Y value.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const T& Line< T >::getEndX () const
    -
    -noexcept
    -
    -

    Get end X value.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const T& Line< T >::getEndY () const
    -
    -noexcept
    -
    -

    Get end Y value.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const Point<T>& Line< T >::getStartPos () const
    -
    -noexcept
    -
    -

    Get start position.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    const Point<T>& Line< T >::getEndPos () const
    -
    -noexcept
    -
    -

    Get end position.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Line< T >::setStartX (const T & x)
    -
    -noexcept
    -
    -

    Set start X value to x.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Line< T >::setStartY (const T & y)
    -
    -noexcept
    -
    -

    Set start Y value to y.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    void Line< T >::setStartPos (const T & x,
    const T & y 
    )
    -
    -noexcept
    -
    -

    Set start X and Y values to x and y respectively.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Line< T >::setStartPos (const Point< T > & pos)
    -
    -noexcept
    -
    -

    Set start X and Y values according to pos.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Line< T >::setEndX (const T & x)
    -
    -noexcept
    -
    -

    Set end X value to x.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Line< T >::setEndY (const T & y)
    -
    -noexcept
    -
    -

    Set end Y value to y.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    void Line< T >::setEndPos (const T & x,
    const T & y 
    )
    -
    -noexcept
    -
    -

    Set end X and Y values to x and y respectively.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Line< T >::setEndPos (const Point< T > & pos)
    -
    -noexcept
    -
    -

    Set end X and Y values according to pos.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    void Line< T >::moveBy (const T & x,
    const T & y 
    )
    -
    -noexcept
    -
    -

    Move this line by x and y values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    void Line< T >::moveBy (const Point< T > & pos)
    -
    -noexcept
    -
    -

    Move this line by pos.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    void Line< T >::draw ()
    -
    -

    Draw this line using the current OpenGL state.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    bool Line< T >::isNull () const
    -
    -noexcept
    -
    -

    Return true if line is null (start and end pos are equal).

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    bool Line< T >::isNotNull () const
    -
    -noexcept
    -
    -

    Return true if line is not null (start and end pos are different).

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    - - - - diff --git a/singletonRectangle.html b/singletonRectangle.html deleted file mode 100644 index 1c2803c5..00000000 --- a/singletonRectangle.html +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Rectangle< T > Class Template Reference - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    - -
    -
    Rectangle< T > Class Template Reference
    -
    -
    - -

    #include <Geometry.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -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< 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 T>
    -class Rectangle< T >

    - -

    DGL Rectangle class.

    -

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

    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    Rectangle< T >::Rectangle ()
    -
    -noexcept
    -
    -

    Constructor for a null rectangle.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Rectangle< T >::Rectangle (const T & x,
    const T & y,
    const T & width,
    const T & height 
    )
    -
    -noexcept
    -
    -

    Constructor using custom X, Y, width and height values.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Rectangle< T >::Rectangle (const T & x,
    const T & y,
    const Size< T > & size 
    )
    -
    -noexcept
    -
    -

    Constructor using custom X, Y and size values.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Rectangle< T >::Rectangle (const Point< T > & pos,
    const T & width,
    const T & height 
    )
    -
    -noexcept
    -
    -

    Constructor using custom pos, width and height values.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    Rectangle< T >::Rectangle (const Point< T > & pos,
    const Size< T > & size 
    )
    -
    -noexcept
    -
    -

    Constructor using custom position and size.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    Rectangle< T >::Rectangle (const Rectangle< T > & rect)
    -
    -noexcept
    -
    -

    Constructor using another Rectangle class values.

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    const T& Rectangle< T >::getX () const
    -
    -noexcept
    -
    -

    Get X value.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    const T& Rectangle< T >::getY () const
    -
    -noexcept
    -
    -

    Get Y value.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    const T& Rectangle< T >::getWidth () const
    -
    -noexcept
    -
    -

    Get width.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    const T& Rectangle< T >::getHeight () const
    -
    -noexcept
    -
    -

    Get height.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    const Point<T>& Rectangle< T >::getPos () const
    -
    -noexcept
    -
    -

    Get position.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - -
    const Size<T>& Rectangle< T >::getSize () const
    -
    -noexcept
    -
    -

    Get size.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::setX (const T & x)
    -
    -noexcept
    -
    -

    Set X value as x.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::setY (const T & y)
    -
    -noexcept
    -
    -

    Set Y value as y.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    void Rectangle< T >::setPos (const T & x,
    const T & y 
    )
    -
    -noexcept
    -
    -

    Set X and Y values as x and y respectively.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::setPos (const Point< T > & pos)
    -
    -noexcept
    -
    -

    Set X and Y values according to pos.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    void Rectangle< T >::moveBy (const T & x,
    const T & y 
    )
    -
    -noexcept
    -
    -

    Move this rectangle by x and y values.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::moveBy (const Point< T > & pos)
    -
    -noexcept
    -
    -

    Move this rectangle by pos.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::setWidth (const T & width)
    -
    -noexcept
    -
    -

    Set width.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::setHeight (const T & height)
    -
    -noexcept
    -
    -

    Set height.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    void Rectangle< T >::setSize (const T & width,
    const T & height 
    )
    -
    -noexcept
    -
    -

    Set size using width and height.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::setSize (const Size< T > & size)
    -
    -noexcept
    -
    -

    Set size.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::growBy (double multiplier)
    -
    -noexcept
    -
    -

    Grow size by multiplier.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::shrinkBy (double divider)
    -
    -noexcept
    -
    -

    Shrink size by divider.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    void Rectangle< T >::setRectangle (const Point< T > & pos,
    const Size< T > & size 
    )
    -
    -noexcept
    -
    -

    Set rectangle using pos and size.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    void Rectangle< T >::setRectangle (const Rectangle< T > & rect)
    -
    -noexcept
    -
    -

    Set rectangle.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    bool Rectangle< T >::contains (const T & x,
    const T & y 
    ) const
    -
    -noexcept
    -
    -

    Check if this rectangle contains the point defined by X and Y.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    bool Rectangle< T >::contains (const Point< T > & pos) const
    -
    -noexcept
    -
    -

    Check if this rectangle contains the point pos.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    bool Rectangle< T >::containsX (const T & x) const
    -
    -noexcept
    -
    -

    Check if this rectangle contains X.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - -
    - - - - - - - - -
    bool Rectangle< T >::containsY (const T & y) const
    -
    -noexcept
    -
    -

    Check if this rectangle contains Y.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - - - -
    void Rectangle< T >::draw ()
    -
    -

    Draw this rectangle using the current OpenGL state.

    - -
    -
    - -
    -
    -
    -template<typename T>
    - - - - - - - -
    void Rectangle< T >::drawOutline ()
    -
    -

    Draw lines (outline of this rectangle) using the current OpenGL state.

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    - - - - diff --git a/singletonTriangle.html b/singletonTriangle.html deleted file mode 100644 index 15a0a79b..00000000 --- a/singletonTriangle.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Triangle< T > Class Template Reference - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    - -
    -
    Triangle< T > Class Template Reference
    -
    -
    - -

    #include <Geometry.hpp>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -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< 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 T>
    -class Triangle< T >

    - -

    DGL Triangle class.

    -

    This class describes a triangle, defined by 3 points.

    -

    Constructor & Destructor Documentation

    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    Triangle< T >::Triangle ()
    -
    -noexcept
    -
    -

    Constructor for a null triangle.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Triangle< T >::Triangle (const T & x1,
    const T & y1,
    const T & x2,
    const T & y2,
    const T & x3,
    const T & y3 
    )
    -
    -noexcept
    -
    -

    Constructor using custom X and Y values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Triangle< T >::Triangle (const Point< T > & pos1,
    const Point< T > & pos2,
    const Point< T > & pos3 
    )
    -
    -noexcept
    -
    -

    Constructor using custom position values.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - - -
    Triangle< T >::Triangle (const Triangle< T > & tri)
    -
    -noexcept
    -
    -

    Constructor using another Triangle class values.

    - -
    -
    -

    Member Function Documentation

    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    void Triangle< T >::draw ()
    -
    -

    Draw this triangle using the current OpenGL state.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - - - -
    void Triangle< T >::drawOutline ()
    -
    -

    Draw lines (outline of this triangle) using the current OpenGL state.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    bool Triangle< T >::isNull () const
    -
    -noexcept
    -
    -

    Return true if triangle is null (all its points are equal). An null triangle is also invalid.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    bool Triangle< T >::isNotNull () const
    -
    -noexcept
    -
    -

    Return true if triangle is not null (one its points is different from the others). A non-null triangle is still invalid if two of its points are equal.

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    bool Triangle< T >::isValid () const
    -
    -noexcept
    -
    -

    Return true if triangle is valid (all its points are different).

    - -
    -
    - -
    -
    -
    -template<typename T >
    - - - - - -
    - - - - - - - -
    bool Triangle< T >::isInvalid () const
    -
    -noexcept
    -
    -

    Return true if triangle is invalid (one or two of its points are equal). An invalid triangle might not be null under some circumstances.

    - -
    -
    -
    The documentation for this class was generated from the following file: -
    - - - - diff --git a/structAudioPort-members.html b/structAudioPort-members.html index fc4fc586..a1382ba3 100644 --- a/structAudioPort-members.html +++ b/structAudioPort-members.html @@ -72,7 +72,7 @@ $(function() { diff --git a/structAudioPort.html b/structAudioPort.html index 9bb7629b..760051d8 100644 --- a/structAudioPort.html +++ b/structAudioPort.html @@ -168,7 +168,7 @@ The first character must be one of _, a-z or A-Z and subsequent characters can b diff --git a/structColor-members.html b/structColor-members.html index da8eb32b..caebead3 100644 --- a/structColor-members.html +++ b/structColor-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/structColor.html b/structColor.html index f34fca01..f30a17d9 100644 --- a/structColor.html +++ b/structColor.html @@ -545,7 +545,7 @@ Public Attributes diff --git a/structContainerDeletePolicy-members.html b/structContainerDeletePolicy-members.html deleted file mode 100644 index 8e21c517..00000000 --- a/structContainerDeletePolicy-members.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: Member List - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    -
    -
    ContainerDeletePolicy< ObjectType > Member List
    -
    -
    - -

    This is the complete list of members for ContainerDeletePolicy< ObjectType >, including all inherited members.

    - - -
    destroy(ObjectType *const object) (defined in ContainerDeletePolicy< ObjectType >)ContainerDeletePolicy< ObjectType >inlinestatic
    - - - - diff --git a/structContainerDeletePolicy.html b/structContainerDeletePolicy.html deleted file mode 100644 index 74e13a09..00000000 --- a/structContainerDeletePolicy.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - -DISTRHO Plugin Framework: ContainerDeletePolicy< ObjectType > Struct Template Reference - - - - - - - - - -
    -
    - - - - - - -
    -
    DISTRHO Plugin Framework -
    -
    -
    - - - - - - - - - -
    - -
    - -
    -
    - -
    -
    ContainerDeletePolicy< ObjectType > Struct Template Reference
    -
    -
    - -

    #include <d_scopedpointer.hpp>

    - - - - -

    -Static Public Member Functions

    -static void destroy (ObjectType *const object)
     
    -

    Detailed Description

    -

    template<typename ObjectType>
    -struct ContainerDeletePolicy< ObjectType >

    - -

    Used by container classes as an indirect way to delete an object of a particular type.

    -

    The generic implementation of this class simply calls 'delete', but you can create a specialised version of it for a particular class if you need to delete that type of object in a more appropriate way.

    -

    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/structMidiEvent-members.html b/structMidiEvent-members.html index 4a57ae97..f145d588 100644 --- a/structMidiEvent-members.html +++ b/structMidiEvent-members.html @@ -73,7 +73,7 @@ $(function() { diff --git a/structMidiEvent.html b/structMidiEvent.html index e8ceacda..1e195fc2 100644 --- a/structMidiEvent.html +++ b/structMidiEvent.html @@ -164,7 +164,7 @@ If size > kDataSize, dataExt is used (otherwise null).

    diff --git a/structNanoVG_1_1GlyphPosition-members.html b/structNanoVG_1_1GlyphPosition-members.html index 45789640..8fc8fd15 100644 --- a/structNanoVG_1_1GlyphPosition-members.html +++ b/structNanoVG_1_1GlyphPosition-members.html @@ -76,7 +76,7 @@ $(function() { diff --git a/structNanoVG_1_1GlyphPosition.html b/structNanoVG_1_1GlyphPosition.html index 5214d03d..388d07a6 100644 --- a/structNanoVG_1_1GlyphPosition.html +++ b/structNanoVG_1_1GlyphPosition.html @@ -91,7 +91,7 @@ float maxx diff --git a/structNanoVG_1_1Paint-members.html b/structNanoVG_1_1Paint-members.html index 8c1f38d8..843b7099 100644 --- a/structNanoVG_1_1Paint-members.html +++ b/structNanoVG_1_1Paint-members.html @@ -82,7 +82,7 @@ $(function() { diff --git a/structNanoVG_1_1Paint.html b/structNanoVG_1_1Paint.html index 97492f2d..b583f23f 100644 --- a/structNanoVG_1_1Paint.html +++ b/structNanoVG_1_1Paint.html @@ -110,7 +110,7 @@ int imageId diff --git a/structNanoVG_1_1TextRow-members.html b/structNanoVG_1_1TextRow-members.html index ada7f557..56cfc2bb 100644 --- a/structNanoVG_1_1TextRow-members.html +++ b/structNanoVG_1_1TextRow-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/structNanoVG_1_1TextRow.html b/structNanoVG_1_1TextRow.html index 02e0cf9e..feedf0fa 100644 --- a/structNanoVG_1_1TextRow.html +++ b/structNanoVG_1_1TextRow.html @@ -97,7 +97,7 @@ float maxx diff --git a/structParameter-members.html b/structParameter-members.html index 1b961745..0840a838 100644 --- a/structParameter-members.html +++ b/structParameter-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/structParameter.html b/structParameter.html index a9b0c5b3..1bde47f6 100644 --- a/structParameter.html +++ b/structParameter.html @@ -358,7 +358,7 @@ Must also be less or equal to 120.

    Note
    diff --git a/structParameterEnumerationValue-members.html b/structParameterEnumerationValue-members.html index e8261ea9..6722c3fa 100644 --- a/structParameterEnumerationValue-members.html +++ b/structParameterEnumerationValue-members.html @@ -72,7 +72,7 @@ $(function() { diff --git a/structParameterEnumerationValue.html b/structParameterEnumerationValue.html index b4e05d4f..133441c8 100644 --- a/structParameterEnumerationValue.html +++ b/structParameterEnumerationValue.html @@ -188,7 +188,7 @@ Used together can be used to give meaning to parameter values, working as an enu diff --git a/structParameterEnumerationValues-members.html b/structParameterEnumerationValues-members.html index 713e3943..b67563b6 100644 --- a/structParameterEnumerationValues-members.html +++ b/structParameterEnumerationValues-members.html @@ -74,7 +74,7 @@ $(function() { diff --git a/structParameterEnumerationValues.html b/structParameterEnumerationValues.html index 3cbdaf58..456111fe 100644 --- a/structParameterEnumerationValues.html +++ b/structParameterEnumerationValues.html @@ -213,7 +213,7 @@ This pointer must be null or have been allocated on the heap with new diff --git a/structParameterRanges-members.html b/structParameterRanges-members.html index 9d0d2ef2..071519ba 100644 --- a/structParameterRanges-members.html +++ b/structParameterRanges-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/structParameterRanges.html b/structParameterRanges.html index a1b90daa..187c73ab 100644 --- a/structParameterRanges.html +++ b/structParameterRanges.html @@ -386,7 +386,7 @@ When changing this struct values you must ensure maximum > minimum and defaul diff --git a/structTimePosition-members.html b/structTimePosition-members.html index 03399228..2d2b1269 100644 --- a/structTimePosition-members.html +++ b/structTimePosition-members.html @@ -66,13 +66,14 @@ $(function() {

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

    - - - + + + +
    bbt (defined in TimePosition)TimePosition
    frameTimePosition
    playingTimePosition
    TimePosition() noexceptTimePositioninline
    clear() noexceptTimePositioninline
    frameTimePosition
    playingTimePosition
    TimePosition() noexceptTimePositioninline
    diff --git a/structTimePosition.html b/structTimePosition.html index 3682af5c..b39e951b 100644 --- a/structTimePosition.html +++ b/structTimePosition.html @@ -79,6 +79,8 @@ Classes Public Member Functions  TimePosition () noexcept   +void clear () noexcept +  @@ -120,6 +122,33 @@ BBT values are only valid when bbt.valid is true.

    Default constructor for a time position.

    +
    + +

    Member Function Documentation

    + +

    ◆ clear()

    + +
    +
    +

    Public Attributes

    + + + + +
    + + + + + + + +
    void TimePosition::clear ()
    +
    +inlinenoexcept
    +
    +

    Reinitialize this position using the default null initialization.

    +

    Member Data Documentation

    @@ -159,7 +188,7 @@ 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 5ac6e7bd..9e8a26e2 100644 --- a/structTimePosition_1_1BarBeatTick-members.html +++ b/structTimePosition_1_1BarBeatTick-members.html @@ -76,13 +76,14 @@ $(function() { beatsPerBarTimePosition::BarBeatTick beatsPerMinuteTimePosition::BarBeatTick beatTypeTimePosition::BarBeatTick - tickTimePosition::BarBeatTick - ticksPerBeatTimePosition::BarBeatTick - validTimePosition::BarBeatTick + clear() noexceptTimePosition::BarBeatTickinline + tickTimePosition::BarBeatTick + ticksPerBeatTimePosition::BarBeatTick + validTimePosition::BarBeatTick diff --git a/structTimePosition_1_1BarBeatTick.html b/structTimePosition_1_1BarBeatTick.html index 8507fec7..4f953fe6 100644 --- a/structTimePosition_1_1BarBeatTick.html +++ b/structTimePosition_1_1BarBeatTick.html @@ -77,6 +77,8 @@ $(function() { Public Member Functions  BarBeatTick () noexcept   +void clear () noexcept +  @@ -126,6 +128,33 @@ Public Attributes

    Default constructor for a null BBT time position.

    +
    + +

    Member Function Documentation

    + +

    ◆ clear()

    + +
    +
    +

    Public Attributes

    + + + + +
    + + + + + + + +
    void TimePosition::BarBeatTick::clear ()
    +
    +inlinenoexcept
    +
    +

    Reinitialize this position using the default null initialization.

    +

    Member Data Documentation

    @@ -191,7 +220,7 @@ The first beat is beat '1'.

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

    @@ -252,7 +281,7 @@ The first tick is tick '0'.

    -

    Number of ticks within a bar.
    +

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

    @@ -278,7 +307,7 @@ 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 32ab2fd3..af2b1046 100644 --- a/structWidget_1_1BaseEvent-members.html +++ b/structWidget_1_1BaseEvent-members.html @@ -76,7 +76,7 @@ $(function() { diff --git a/structWidget_1_1BaseEvent.html b/structWidget_1_1BaseEvent.html index a0afd61b..538d1f54 100644 --- a/structWidget_1_1BaseEvent.html +++ b/structWidget_1_1BaseEvent.html @@ -163,7 +163,7 @@ uint32_t time diff --git a/structWidget_1_1KeyboardEvent-members.html b/structWidget_1_1KeyboardEvent-members.html index 9a51ce52..adfe0543 100644 --- a/structWidget_1_1KeyboardEvent-members.html +++ b/structWidget_1_1KeyboardEvent-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/structWidget_1_1KeyboardEvent.html b/structWidget_1_1KeyboardEvent.html index 874c8d7d..d7550aee 100644 --- a/structWidget_1_1KeyboardEvent.html +++ b/structWidget_1_1KeyboardEvent.html @@ -143,7 +143,7 @@ uint32_t time diff --git a/structWidget_1_1MotionEvent-members.html b/structWidget_1_1MotionEvent-members.html index 09a1ded9..ef2ed377 100644 --- a/structWidget_1_1MotionEvent-members.html +++ b/structWidget_1_1MotionEvent-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/structWidget_1_1MotionEvent.html b/structWidget_1_1MotionEvent.html index 598b0bea..7abe21f0 100644 --- a/structWidget_1_1MotionEvent.html +++ b/structWidget_1_1MotionEvent.html @@ -140,7 +140,7 @@ uint32_t time diff --git a/structWidget_1_1MouseEvent-members.html b/structWidget_1_1MouseEvent-members.html index d20bee4c..14d6fdf5 100644 --- a/structWidget_1_1MouseEvent-members.html +++ b/structWidget_1_1MouseEvent-members.html @@ -80,7 +80,7 @@ $(function() { diff --git a/structWidget_1_1MouseEvent.html b/structWidget_1_1MouseEvent.html index 98913c50..b9bffd5f 100644 --- a/structWidget_1_1MouseEvent.html +++ b/structWidget_1_1MouseEvent.html @@ -146,7 +146,7 @@ uint32_t time diff --git a/structWidget_1_1PositionChangedEvent-members.html b/structWidget_1_1PositionChangedEvent-members.html new file mode 100644 index 00000000..1481eb39 --- /dev/null +++ b/structWidget_1_1PositionChangedEvent-members.html @@ -0,0 +1,83 @@ + + + + + + + +DISTRHO Plugin Framework: Member List + + + + + + + + + +
    +
    + + + + + + +
    +
    DISTRHO Plugin Framework +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    Widget::PositionChangedEvent Member List
    +
    +
    + +

    This is the complete list of members for Widget::PositionChangedEvent, including all inherited members.

    + + + + +
    oldPos (defined in Widget::PositionChangedEvent)Widget::PositionChangedEvent
    pos (defined in Widget::PositionChangedEvent)Widget::PositionChangedEvent
    PositionChangedEvent() noexceptWidget::PositionChangedEventinline
    + + + + diff --git a/structWidget_1_1PositionChangedEvent.html b/structWidget_1_1PositionChangedEvent.html new file mode 100644 index 00000000..9d859850 --- /dev/null +++ b/structWidget_1_1PositionChangedEvent.html @@ -0,0 +1,130 @@ + + + + + + + +DISTRHO Plugin Framework: Widget::PositionChangedEvent Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    DISTRHO Plugin Framework +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    Widget::PositionChangedEvent Struct Reference
    +
    +
    + +

    #include <Widget.hpp>

    + + + + +

    +Public Member Functions

     PositionChangedEvent () noexcept
     
    + + + + + +

    +Public Attributes

    +Point< int > pos
     
    +Point< int > oldPos
     
    +

    Detailed Description

    +

    Widget position changed event. pos The new absolute position of the widget. oldPos The previous absolute position of the widget.

    See also
    onPositionChanged
    +

    Constructor & Destructor Documentation

    + +

    ◆ PositionChangedEvent()

    + +
    +
    + + + + + +
    + + + + + + + +
    Widget::PositionChangedEvent::PositionChangedEvent ()
    +
    +inlinenoexcept
    +
    +

    Constuctor

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/structWidget_1_1ResizeEvent-members.html b/structWidget_1_1ResizeEvent-members.html index bc25c5ca..9e5ac6ca 100644 --- a/structWidget_1_1ResizeEvent-members.html +++ b/structWidget_1_1ResizeEvent-members.html @@ -75,7 +75,7 @@ $(function() { diff --git a/structWidget_1_1ResizeEvent.html b/structWidget_1_1ResizeEvent.html index 28634a54..d2f6ed72 100644 --- a/structWidget_1_1ResizeEvent.html +++ b/structWidget_1_1ResizeEvent.html @@ -122,7 +122,7 @@ Public Attributes diff --git a/structWidget_1_1ScrollEvent-members.html b/structWidget_1_1ScrollEvent-members.html index c7f1c4f2..e7d819c8 100644 --- a/structWidget_1_1ScrollEvent-members.html +++ b/structWidget_1_1ScrollEvent-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/structWidget_1_1ScrollEvent.html b/structWidget_1_1ScrollEvent.html index 54613291..e92ba312 100644 --- a/structWidget_1_1ScrollEvent.html +++ b/structWidget_1_1ScrollEvent.html @@ -143,7 +143,7 @@ uint32_t time diff --git a/structWidget_1_1SpecialEvent-members.html b/structWidget_1_1SpecialEvent-members.html index b7e94d31..5caab0bc 100644 --- a/structWidget_1_1SpecialEvent-members.html +++ b/structWidget_1_1SpecialEvent-members.html @@ -79,7 +79,7 @@ $(function() { diff --git a/structWidget_1_1SpecialEvent.html b/structWidget_1_1SpecialEvent.html index 37b57113..5fd1f479 100644 --- a/structWidget_1_1SpecialEvent.html +++ b/structWidget_1_1SpecialEvent.html @@ -143,7 +143,7 @@ uint32_t time diff --git a/structWindow_1_1FileBrowserOptions-members.html b/structWindow_1_1FileBrowserOptions-members.html index 3ff6397a..873560f7 100644 --- a/structWindow_1_1FileBrowserOptions-members.html +++ b/structWindow_1_1FileBrowserOptions-members.html @@ -78,7 +78,7 @@ $(function() { diff --git a/structWindow_1_1FileBrowserOptions.html b/structWindow_1_1FileBrowserOptions.html index 796f5c86..6d350af1 100644 --- a/structWindow_1_1FileBrowserOptions.html +++ b/structWindow_1_1FileBrowserOptions.html @@ -137,7 +137,7 @@ struct W diff --git a/structWindow_1_1FileBrowserOptions_1_1Buttons-members.html b/structWindow_1_1FileBrowserOptions_1_1Buttons-members.html index 0f89e51b..ef903765 100644 --- a/structWindow_1_1FileBrowserOptions_1_1Buttons-members.html +++ b/structWindow_1_1FileBrowserOptions_1_1Buttons-members.html @@ -76,7 +76,7 @@ $(function() { diff --git a/structWindow_1_1FileBrowserOptions_1_1Buttons.html b/structWindow_1_1FileBrowserOptions_1_1Buttons.html index b06fe865..697f70e5 100644 --- a/structWindow_1_1FileBrowserOptions_1_1Buttons.html +++ b/structWindow_1_1FileBrowserOptions_1_1Buttons.html @@ -126,7 +126,7 @@ uint showPlaces