Browse Source

Fix build

pull/6/head
falkTX 8 years ago
parent
commit
b5c4ef84bd
6 changed files with 41 additions and 76 deletions
  1. +1
    -2
      dgl/src/Application.cpp
  2. +16
    -32
      dgl/src/ImageWidgets.cpp
  3. +7
    -14
      dgl/src/NanoVG.cpp
  4. +2
    -4
      dgl/src/NanoWidgets.cpp
  5. +3
    -6
      dgl/src/Widget.cpp
  6. +12
    -18
      dgl/src/Window.cpp

+ 1
- 2
dgl/src/Application.cpp View File

@@ -22,8 +22,7 @@ START_NAMESPACE_DGL
// -----------------------------------------------------------------------

Application::Application()
: pData(new PrivateData()),
leakDetector_Application() {}
: pData(new PrivateData()) {}

Application::~Application()
{


+ 16
- 32
dgl/src/ImageWidgets.cpp View File

@@ -25,8 +25,7 @@ START_NAMESPACE_DGL
ImageAboutWindow::ImageAboutWindow(Window& parent, const Image& image)
: Window(parent.getApp(), parent),
Widget((Window&)*this),
fImgBackground(image),
leakDetector_ImageAboutWindow()
fImgBackground(image)
{
Window::setResizable(false);
Window::setSize(image.getSize());
@@ -36,8 +35,7 @@ ImageAboutWindow::ImageAboutWindow(Window& parent, const Image& image)
ImageAboutWindow::ImageAboutWindow(Widget* widget, const Image& image)
: Window(widget->getParentApp(), widget->getParentWindow()),
Widget((Window&)*this),
fImgBackground(image),
leakDetector_ImageAboutWindow()
fImgBackground(image)
{
Window::setResizable(false);
Window::setSize(image.getSize());
@@ -107,16 +105,14 @@ struct ImageButton::PrivateData {

ImageButton::ImageButton(Window& parent, const Image& image)
: Widget(parent),
pData(new PrivateData(this, image, image, image)),
leakDetector_ImageButton()
pData(new PrivateData(this, image, image, image))
{
setSize(image.getSize());
}

ImageButton::ImageButton(Window& parent, const Image& imageNormal, const Image& imageDown)
: Widget(parent),
pData(new PrivateData(this, imageNormal, imageNormal, imageDown)),
leakDetector_ImageButton()
pData(new PrivateData(this, imageNormal, imageNormal, imageDown))
{
DISTRHO_SAFE_ASSERT(imageNormal.getSize() == imageDown.getSize());

@@ -125,8 +121,7 @@ ImageButton::ImageButton(Window& parent, const Image& imageNormal, const Image&

ImageButton::ImageButton(Window& parent, const Image& imageNormal, const Image& imageHover, const Image& imageDown)
: Widget(parent),
pData(new PrivateData(this, imageNormal, imageHover, imageDown)),
leakDetector_ImageButton()
pData(new PrivateData(this, imageNormal, imageHover, imageDown))
{
DISTRHO_SAFE_ASSERT(imageNormal.getSize() == imageHover.getSize() && imageHover.getSize() == imageDown.getSize());

@@ -135,16 +130,14 @@ ImageButton::ImageButton(Window& parent, const Image& imageNormal, const Image&

ImageButton::ImageButton(Widget* widget, const Image& image)
: Widget(widget->getParentWindow()),
pData(new PrivateData(this, image, image, image)),
leakDetector_ImageButton()
pData(new PrivateData(this, image, image, image))
{
setSize(image.getSize());
}

ImageButton::ImageButton(Widget* widget, const Image& imageNormal, const Image& imageDown)
: Widget(widget->getParentWindow()),
pData(new PrivateData(this, imageNormal, imageNormal, imageDown)),
leakDetector_ImageButton()
pData(new PrivateData(this, imageNormal, imageNormal, imageDown))
{
DISTRHO_SAFE_ASSERT(imageNormal.getSize() == imageDown.getSize());

@@ -153,8 +146,7 @@ ImageButton::ImageButton(Widget* widget, const Image& imageNormal, const Image&

ImageButton::ImageButton(Widget* widget, const Image& imageNormal, const Image& imageHover, const Image& imageDown)
: Widget(widget->getParentWindow()),
pData(new PrivateData(this, imageNormal, imageHover, imageDown)),
leakDetector_ImageButton()
pData(new PrivateData(this, imageNormal, imageHover, imageDown))
{
DISTRHO_SAFE_ASSERT(imageNormal.getSize() == imageHover.getSize() && imageHover.getSize() == imageDown.getSize());

@@ -221,8 +213,7 @@ ImageKnob::ImageKnob(Window& parent, const Image& image, Orientation orientation
fImgLayerHeight(fImgLayerWidth),
fImgLayerCount(fIsImgVertical ? image.getHeight()/fImgLayerHeight : image.getWidth()/fImgLayerWidth),
fIsReady(false),
fTextureId(0),
leakDetector_ImageKnob()
fTextureId(0)
{
glGenTextures(1, &fTextureId);
setSize(fImgLayerWidth, fImgLayerHeight);
@@ -250,8 +241,7 @@ ImageKnob::ImageKnob(Widget* widget, const Image& image, Orientation orientation
fImgLayerHeight(fImgLayerWidth),
fImgLayerCount(fIsImgVertical ? image.getHeight()/fImgLayerHeight : image.getWidth()/fImgLayerWidth),
fIsReady(false),
fTextureId(0),
leakDetector_ImageKnob()
fTextureId(0)
{
glGenTextures(1, &fTextureId);
setSize(fImgLayerWidth, fImgLayerHeight);
@@ -279,8 +269,7 @@ ImageKnob::ImageKnob(const ImageKnob& imageKnob)
fImgLayerHeight(imageKnob.fImgLayerHeight),
fImgLayerCount(imageKnob.fImgLayerCount),
fIsReady(false),
fTextureId(0),
leakDetector_ImageKnob()
fTextureId(0)
{
glGenTextures(1, &fTextureId);
setSize(fImgLayerWidth, fImgLayerHeight);
@@ -670,8 +659,7 @@ ImageSlider::ImageSlider(Window& parent, const Image& image) noexcept
fCallback(nullptr),
fStartPos(),
fEndPos(),
fSliderArea(),
leakDetector_ImageSlider()
fSliderArea()
{
pData->needsFullViewport = true;
}
@@ -692,8 +680,7 @@ ImageSlider::ImageSlider(Widget* widget, const Image& image) noexcept
fCallback(nullptr),
fStartPos(),
fEndPos(),
fSliderArea(),
leakDetector_ImageSlider()
fSliderArea()
{
pData->needsFullViewport = true;
}
@@ -997,8 +984,7 @@ ImageSwitch::ImageSwitch(Window& parent, const Image& imageNormal, const Image&
fImageNormal(imageNormal),
fImageDown(imageDown),
fIsDown(false),
fCallback(nullptr),
leakDetector_ImageSwitch()
fCallback(nullptr)
{
DISTRHO_SAFE_ASSERT(fImageNormal.getSize() == fImageDown.getSize());

@@ -1010,8 +996,7 @@ ImageSwitch::ImageSwitch(Widget* widget, const Image& imageNormal, const Image&
fImageNormal(imageNormal),
fImageDown(imageDown),
fIsDown(false),
fCallback(nullptr),
leakDetector_ImageSwitch()
fCallback(nullptr)
{
DISTRHO_SAFE_ASSERT(fImageNormal.getSize() == fImageDown.getSize());

@@ -1023,8 +1008,7 @@ ImageSwitch::ImageSwitch(const ImageSwitch& imageSwitch) noexcept
fImageNormal(imageSwitch.fImageNormal),
fImageDown(imageSwitch.fImageDown),
fIsDown(imageSwitch.fIsDown),
fCallback(imageSwitch.fCallback),
leakDetector_ImageSwitch()
fCallback(imageSwitch.fCallback)
{
DISTRHO_SAFE_ASSERT(fImageNormal.getSize() == fImageDown.getSize());



+ 7
- 14
dgl/src/NanoVG.cpp View File

@@ -81,13 +81,11 @@ START_NAMESPACE_DGL

NanoImage::NanoImage()
: fHandle(),
fSize(),
leakDetector_NanoImage() {}
fSize() {}

NanoImage::NanoImage(const Handle& handle)
: fHandle(handle),
fSize(),
leakDetector_NanoImage()
fSize()
{
DISTRHO_SAFE_ASSERT_RETURN(fHandle.context != nullptr && fHandle.imageId != 0,);

@@ -176,8 +174,7 @@ NanoVG::Paint::operator NVGpaint() const noexcept
NanoVG::NanoVG(int flags)
: fContext(nvgCreateGL(flags)),
fInFrame(false),
fIsSubWidget(false),
leakDetector_NanoVG()
fIsSubWidget(false)
{
DISTRHO_SAFE_ASSERT_RETURN(fContext != nullptr,);
}
@@ -185,8 +182,7 @@ NanoVG::NanoVG(int flags)
NanoVG::NanoVG(NanoWidget* groupWidget)
: fContext(groupWidget->fContext),
fInFrame(false),
fIsSubWidget(true),
leakDetector_NanoVG()
fIsSubWidget(true)
{
}

@@ -876,8 +872,7 @@ struct NanoWidget::PrivateData {
NanoWidget::NanoWidget(Window& parent, int flags)
: Widget(parent),
NanoVG(flags),
nData(new PrivateData(this)),
leakDetector_NanoWidget()
nData(new PrivateData(this))
{
pData->needsScaling = true;
}
@@ -885,8 +880,7 @@ NanoWidget::NanoWidget(Window& parent, int flags)
NanoWidget::NanoWidget(Widget* groupWidget, int flags)
: Widget(groupWidget, true),
NanoVG(flags),
nData(new PrivateData(this)),
leakDetector_NanoWidget()
nData(new PrivateData(this))
{
pData->needsScaling = true;
}
@@ -894,8 +888,7 @@ NanoWidget::NanoWidget(Widget* groupWidget, int flags)
NanoWidget::NanoWidget(NanoWidget* groupWidget)
: Widget(groupWidget, false),
NanoVG(groupWidget),
nData(new PrivateData(this)),
leakDetector_NanoWidget()
nData(new PrivateData(this))
{
pData->needsScaling = true;
groupWidget->nData->subWidgets.push_back(this);


+ 2
- 4
dgl/src/NanoWidgets.cpp View File

@@ -56,8 +56,7 @@ struct BlendishButton::PrivateData {

BlendishButton::BlendishButton(Window& parent, const char* text, int iconId)
: NanoWidget(parent),
pData(new PrivateData(this, text, iconId)),
leakDetector_BlendishButton()
pData(new PrivateData(this, text, iconId))
{
registerBlendishResourcesIfNeeded(getContext());
_updateBounds();
@@ -65,8 +64,7 @@ BlendishButton::BlendishButton(Window& parent, const char* text, int iconId)

BlendishButton::BlendishButton(NanoWidget* widget, const char* text, int iconId)
: NanoWidget(widget),
pData(new PrivateData(this, text, iconId)),
leakDetector_BlendishButton()
pData(new PrivateData(this, text, iconId))
{
registerBlendishResourcesIfNeeded(getContext());
_updateBounds();


+ 3
- 6
dgl/src/Widget.cpp View File

@@ -22,22 +22,19 @@ START_NAMESPACE_DGL
// Widget

Widget::Widget(Window& parent)
: pData(new PrivateData(this, parent, nullptr, false)),
leakDetector_Widget()
: pData(new PrivateData(this, parent, nullptr, false))
{
parent._addWidget(this);
}

Widget::Widget(Widget* groupWidget)
: pData(new PrivateData(this, groupWidget->getParentWindow(), groupWidget, true)),
leakDetector_Widget()
: pData(new PrivateData(this, groupWidget->getParentWindow(), groupWidget, true))
{
pData->parent._addWidget(this);
}

Widget::Widget(Widget* groupWidget, bool addToSubWidgets)
: pData(new PrivateData(this, groupWidget->getParentWindow(), groupWidget, addToSubWidgets)),
leakDetector_Widget()
: pData(new PrivateData(this, groupWidget->getParentWindow(), groupWidget, addToSubWidgets))
{
pData->parent._addWidget(this);
}


+ 12
- 18
dgl/src/Window.cpp View File

@@ -80,16 +80,15 @@ struct Window::PrivateData {
fWidgets(),
fModal(),
#if defined(DISTRHO_OS_WINDOWS)
hwnd(0),
hwnd(0)
#elif defined(DISTRHO_OS_LINUX)
xDisplay(nullptr),
xWindow(0),
xWindow(0)
#elif defined(DISTRHO_OS_MAC)
fNeedsIdle(true),
mView(nullptr),
mWindow(nullptr),
mWindow(nullptr)
#endif
leakDetector_PrivateData()
{
DBG("Creating window without parent..."); DBGF;
init();
@@ -109,16 +108,15 @@ struct Window::PrivateData {
fWidgets(),
fModal(parent.pData),
#if defined(DISTRHO_OS_WINDOWS)
hwnd(0),
hwnd(0)
#elif defined(DISTRHO_OS_LINUX)
xDisplay(nullptr),
xWindow(0),
xWindow(0)
#elif defined(DISTRHO_OS_MAC)
fNeedsIdle(false),
mView(nullptr),
mWindow(nullptr),
mWindow(nullptr)
#endif
leakDetector_PrivateData()
{
DBG("Creating window with parent..."); DBGF;
init();
@@ -148,16 +146,15 @@ struct Window::PrivateData {
fWidgets(),
fModal(),
#if defined(DISTRHO_OS_WINDOWS)
hwnd(0),
hwnd(0)
#elif defined(DISTRHO_OS_LINUX)
xDisplay(nullptr),
xWindow(0),
xWindow(0)
#elif defined(DISTRHO_OS_MAC)
fNeedsIdle(parentId == 0),
mView(nullptr),
mWindow(nullptr),
mWindow(nullptr)
#endif
leakDetector_PrivateData()
{
if (fUsingEmbed)
{
@@ -941,16 +938,13 @@ struct Window::PrivateData {
// Window

Window::Window(Application& app)
: pData(new PrivateData(app, this)),
leakDetector_Window() {}
: pData(new PrivateData(app, this)) {}

Window::Window(Application& app, Window& parent)
: pData(new PrivateData(app, this, parent)),
leakDetector_Window() {}
: pData(new PrivateData(app, this, parent)) {}

Window::Window(Application& app, intptr_t parentId)
: pData(new PrivateData(app, this, parentId)),
leakDetector_Window() {}
: pData(new PrivateData(app, this, parentId)) {}

Window::~Window()
{


Loading…
Cancel
Save