Browse Source

Remove size/geometry dependency from NTK; Docs update

gh-pages
falkTX 10 years ago
parent
commit
ace05149be
4 changed files with 5 additions and 53 deletions
  1. +0
    -40
      dgl/ntk/NtkWidget.hpp
  2. +0
    -12
      dgl/ntk/NtkWindow.hpp
  3. +2
    -0
      distrho/DistrhoPlugin.hpp
  4. +3
    -1
      distrho/DistrhoUI.hpp

+ 0
- 40
dgl/ntk/NtkWidget.hpp View File

@@ -86,14 +86,6 @@ public:
return h();
}

/**
Get size.
*/
Size<int> getSize() const
{
return Size<int>(w(), h());
}

/**
Set width.
*/
@@ -118,14 +110,6 @@ public:
resize(x(), y(), width, height);
}

/**
Set size.
*/
void setSize(const Size<int>& size)
{
resize(x(), y(), size.getWidth(), size.getHeight());
}

/**
Get absolute X.
*/
@@ -142,14 +126,6 @@ public:
return y();
}

/**
Get absolute position.
*/
Point<int> getAbsolutePos() const
{
return Point<int>(x(), y());
}

/**
Set absolute X.
*/
@@ -174,14 +150,6 @@ public:
resize(x, y, w(), h());
}

/**
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().
@@ -207,14 +175,6 @@ public:
return (x >= 0 && y >= 0 && x < w() && y < h());
}

/**
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.
*/


+ 0
- 12
dgl/ntk/NtkWindow.hpp View File

@@ -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);


+ 2
- 0
distrho/DistrhoPlugin.hpp View File

@@ -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);



+ 3
- 1
distrho/DistrhoUI.hpp View File

@@ -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)
};


Loading…
Cancel
Save