DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit ace05149be2b05387f1625bc0145346d934e1001
parent 8480503cd7c047fd20e7c047d5cad89b2cdf7b61
Author: falkTX <falktx@gmail.com>
Date:   Thu, 21 Aug 2014 00:31:25 +0100

Remove size/geometry dependency from NTK; Docs update

Diffstat:
Mdgl/ntk/NtkWidget.hpp | 40----------------------------------------
Mdgl/ntk/NtkWindow.hpp | 12------------
Mdistrho/DistrhoPlugin.hpp | 2++
Mdistrho/DistrhoUI.hpp | 4+++-
4 files changed, 5 insertions(+), 53 deletions(-)

diff --git a/dgl/ntk/NtkWidget.hpp b/dgl/ntk/NtkWidget.hpp @@ -87,14 +87,6 @@ public: } /** - Get size. - */ - Size<int> getSize() const - { - return Size<int>(w(), h()); - } - - /** Set width. */ void setWidth(int width) @@ -119,14 +111,6 @@ public: } /** - Set size. - */ - void setSize(const Size<int>& size) - { - resize(x(), y(), size.getWidth(), size.getHeight()); - } - - /** Get absolute X. */ int getAbsoluteX() const @@ -143,14 +127,6 @@ public: } /** - Get absolute position. - */ - Point<int> getAbsolutePos() const - { - return Point<int>(x(), y()); - } - - /** Set absolute X. */ void setAbsoluteX(int x) @@ -175,14 +151,6 @@ public: } /** - Set absolute position. - */ - void setAbsolutePos(const Point<int>& pos) - { - resize(pos.getX(), pos.getY(), w(), h()); - } - - /** Get this widget's window application. Same as calling getParentWindow().getApp(). */ @@ -208,14 +176,6 @@ public: } /** - Check if this widget contains the point @a pos. - */ - bool contains(const Point<int>& pos) const - { - return contains(pos.getX(), pos.getY()); - } - - /** Tell this widget's window to repaint itself. */ void repaint() diff --git a/dgl/ntk/NtkWindow.hpp b/dgl/ntk/NtkWindow.hpp @@ -19,8 +19,6 @@ #include "NtkApp.hpp" -#include "../Geometry.hpp" - START_NAMESPACE_DGL class NtkWidget; @@ -130,21 +128,11 @@ public: return h(); } - Size<uint> getSize() const noexcept - { - return Size<uint>(w(), h()); - } - void setSize(uint width, uint height) { resize(x(), y(), width, height); } - void setSize(Size<uint> size) - { - resize(x(), y(), size.getWidth(), size.getHeight()); - } - void setTitle(const char* title) { label(title); diff --git a/distrho/DistrhoPlugin.hpp b/distrho/DistrhoPlugin.hpp @@ -409,6 +409,8 @@ class Plugin public: /** Plugin class constructor. + You must set all parameter values to their defaults, matching ParameterRanges::def. + If you're using states you must also set them to their defaults by calling d_setState(). */ Plugin(const uint32_t parameterCount, const uint32_t programCount, const uint32_t stateCount); diff --git a/distrho/DistrhoUI.hpp b/distrho/DistrhoUI.hpp @@ -182,8 +182,10 @@ private: void setAbsoluteX(int) const noexcept {} void setAbsoluteY(int) const noexcept {} void setAbsolutePos(int, int) const noexcept {} - void setAbsolutePos(const DGL::Point<int>&) const noexcept {} void setNeedsFullViewport(bool) const noexcept {} +#if ! DISTRHO_UI_USE_NTK + void setAbsolutePos(const DGL::Point<int>&) const noexcept {} +#endif DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UI) };