Browse Source

Remove some internal functions

pull/6/head
falkTX 6 years ago
parent
commit
90898bce5f
8 changed files with 10 additions and 37 deletions
  1. +0
    -1
      dgl/ImageSlider.hpp
  2. +3
    -3
      dgl/NanoVG.hpp
  3. +2
    -2
      dgl/StandaloneWindow.hpp
  4. +1
    -16
      dgl/Widget.hpp
  5. +3
    -3
      dgl/src/ImageSlider.cpp
  6. +0
    -10
      dgl/src/Widget.cpp
  7. +0
    -1
      distrho/DistrhoUI.hpp
  8. +1
    -1
      distrho/src/DistrhoUI.cpp

+ 0
- 1
dgl/ImageSlider.hpp View File

@@ -86,7 +86,6 @@ private:
void setAbsoluteY(int) const noexcept {}
void setAbsolutePos(int, int) const noexcept {}
void setAbsolutePos(const Point<int>&) const noexcept {}
void setNeedsFullViewport(bool) const noexcept {}

DISTRHO_LEAK_DETECTOR(ImageSlider)
};


+ 3
- 3
dgl/NanoVG.hpp View File

@@ -871,7 +871,7 @@ public:
NanoVG(flags),
leakDetector_NanoWidget()
{
setNeedsScaling(true);
fNeedsScaling = true;
}

/**
@@ -882,7 +882,7 @@ public:
NanoVG(flags),
leakDetector_NanoWidget()
{
setNeedsScaling(true);
fNeedsScaling = true;
}

/**
@@ -893,7 +893,7 @@ public:
NanoVG(groupWidget),
leakDetector_NanoWidget()
{
setNeedsScaling(true);
fNeedsScaling = true;
groupWidget->fNanoSubWidgets.push_back(this);
}



+ 2
- 2
dgl/StandaloneWindow.hpp View File

@@ -56,7 +56,7 @@ private:
if (fWidget == nullptr)
{
fWidget = widget;
fWidget->setNeedsFullViewport(true);
fWidget->fNeedsFullViewport = true;
}
Window::_addWidget(widget);
}
@@ -65,7 +65,7 @@ private:
{
if (fWidget == widget)
{
fWidget->setNeedsFullViewport(false);
fWidget->fNeedsFullViewport = false;
fWidget = nullptr;
}
Window::_removeWidget(widget);


+ 1
- 16
dgl/Widget.hpp View File

@@ -357,22 +357,6 @@ protected:
*/
virtual void onResize(const ResizeEvent&);

/**
Tell the parent window this widget needs the full viewport.
When enabled, the local widget coordinates are ignored.
@note This is an internal function;
You do not need it under normal circumstances.
*/
void setNeedsFullViewport(bool yesNo) noexcept;

/**
Tell the parent window this widget needs scaling.
When enabled, the widget viewport is scaled to match width and height.
@note This is an internal function;
You do not need it under normal circumstances.
*/
void setNeedsScaling(bool yesNo) noexcept;

private:
Window& fParent;
bool fNeedsFullViewport;
@@ -390,6 +374,7 @@ private:
/** @internal */
void _displaySubWidgets();

friend class ImageSlider;
friend class NanoWidget;
friend class Window;
friend class StandaloneWindow;


+ 3
- 3
dgl/src/ImageSlider.cpp View File

@@ -40,7 +40,7 @@ ImageSlider::ImageSlider(Window& parent, const Image& image) noexcept
fSliderArea(),
leakDetector_ImageSlider()
{
Widget::setNeedsFullViewport(true);
fNeedsFullViewport = true;
}

ImageSlider::ImageSlider(Widget* widget, const Image& image) noexcept
@@ -61,7 +61,7 @@ ImageSlider::ImageSlider(Widget* widget, const Image& image) noexcept
fSliderArea(),
leakDetector_ImageSlider()
{
Widget::setNeedsFullViewport(true);
fNeedsFullViewport = true;
}

ImageSlider::ImageSlider(const ImageSlider& imageSlider) noexcept
@@ -82,7 +82,7 @@ ImageSlider::ImageSlider(const ImageSlider& imageSlider) noexcept
fSliderArea(imageSlider.fSliderArea),
leakDetector_ImageSlider()
{
Widget::setNeedsFullViewport(true);
fNeedsFullViewport = true;
}

ImageSlider& ImageSlider::operator=(const ImageSlider& imageSlider) noexcept


+ 0
- 10
dgl/src/Widget.cpp View File

@@ -274,16 +274,6 @@ void Widget::onResize(const ResizeEvent&)
{
}

void Widget::setNeedsFullViewport(bool yesNo) noexcept
{
fNeedsFullViewport = yesNo;
}

void Widget::setNeedsScaling(bool yesNo) noexcept
{
fNeedsScaling = yesNo;
}

void Widget::_displaySubWidgets()
{
for (std::vector<Widget*>::iterator it = fSubWidgets.begin(); it != fSubWidgets.end(); ++it)


+ 0
- 1
distrho/DistrhoUI.hpp View File

@@ -181,7 +181,6 @@ private:
void setAbsoluteY(int) const noexcept {}
void setAbsolutePos(int, int) const noexcept {}
void setAbsolutePos(const DGL::Point<int>&) const noexcept {}
void setNeedsFullViewport(bool) const noexcept {}

DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(UI)
};


+ 1
- 1
distrho/src/DistrhoUI.cpp View File

@@ -32,7 +32,7 @@ UI::UI(uint width, uint height)
: UIWidget(*d_lastUiWindow),
pData(new PrivateData())
{
UIWidget::setNeedsFullViewport(true);
fNeedsFullViewport = true;

if (width > 0 && height > 0)
setSize(width, height);


Loading…
Cancel
Save