From ab0e791d8e06f3cfa10e46b486f98a946cb5ec41 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 5 May 2015 13:28:09 +0200 Subject: [PATCH] Cleanup --- dpf | 2 +- examples/app.cpp | 12 +++--------- examples/color.cpp | 7 +------ examples/demo-multi.cpp | 17 ++++------------- examples/demo-subwidgets.cpp | 10 +--------- examples/demo.cpp | 15 +++------------ examples/file-browser.cpp | 7 +------ examples/images.cpp | 2 +- examples/nanovg.cpp | 13 ++++--------- examples/nanovg2.cpp | 16 ++++------------ examples/ntk.cpp | 2 +- examples/ntk_res/DistrhoPluginInfo.h | 2 +- examples/qt-embed.cpp | 10 ++-------- examples/rectangles.cpp | 7 +------ examples/shapes.cpp | 7 +------ examples/tests/cairo.cpp | 11 +++-------- examples/tests/text.cpp | 2 +- examples/text.cpp | 7 +------ examples/widgets/ExampleColorWidget.hpp | 10 +--------- examples/widgets/ExampleImagesWidget.hpp | 11 +---------- examples/widgets/ExampleRectanglesWidget.hpp | 9 +-------- examples/widgets/ExampleShapesWidget.hpp | 11 +---------- examples/widgets/ExampleTextWidget.hpp | 8 +------- examples/widgets/NanoPerfWidget.hpp | 12 +----------- 24 files changed, 40 insertions(+), 170 deletions(-) diff --git a/dpf b/dpf index 8d66fbc..12061de 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 8d66fbcd2666624a01efa5f90048d7d868064976 +Subproject commit 12061de4cadc1e04572adcafe8c6cbfdb23cdb5c diff --git a/examples/app.cpp b/examples/app.cpp index cec66d1..1b15f13 100644 --- a/examples/app.cpp +++ b/examples/app.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -17,21 +17,15 @@ // ------------------------------------------------------ // DGL Stuff -#include "App.hpp" +#include "Application.hpp" #include "Window.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::App; -using DGL::Window; - // ------------------------------------------------------ // main entry point int main() { - App app; + Application app; Window win(app); win.setTitle("App"); diff --git a/examples/color.cpp b/examples/color.cpp index c3a3dc7..d2685ff 100644 --- a/examples/color.cpp +++ b/examples/color.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -20,11 +20,6 @@ #include "StandaloneWindow.hpp" #include "widgets/ExampleColorWidget.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::StandaloneWindow; - // ------------------------------------------------------ // main entry point diff --git a/examples/demo-multi.cpp b/examples/demo-multi.cpp index 3981d2c..d996bc7 100644 --- a/examples/demo-multi.cpp +++ b/examples/demo-multi.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -17,7 +17,6 @@ // ------------------------------------------------------ // DGL Stuff -#include "ImageButton.hpp" #include "StandaloneWindow.hpp" #include "widgets/ExampleColorWidget.hpp" #include "widgets/ExampleImagesWidget.hpp" @@ -32,14 +31,6 @@ #include "demo_res/DemoArtwork.cpp" #include "images_res/CatPics.cpp" -// ------------------------------------------------------ -// use namespace - -using DGL::App; -using DGL::ImageButton; -using DGL::Line; -using DGL::Size; - // ------------------------------------------------------ // Single Widget Window @@ -49,7 +40,7 @@ template class SingleWidgetWindow : public Window { public: - SingleWidgetWindow(App& app) + SingleWidgetWindow(Application& app) : Window(app), fWidget(*this), fIsMain(true) @@ -59,7 +50,7 @@ public: show(); } - SingleWidgetWindow(App& app, Window& parent) + SingleWidgetWindow(Application& app, Window& parent) : Window(app, parent), fWidget(*this), fIsMain(false) @@ -95,7 +86,7 @@ private: int main() { - App app; + Application app; SingleWidgetWindow wColor(app); SingleWidgetWindow wImages(app, wColor); SingleWidgetWindow wRects(app, wColor); diff --git a/examples/demo-subwidgets.cpp b/examples/demo-subwidgets.cpp index 42ff31d..bc7ca28 100644 --- a/examples/demo-subwidgets.cpp +++ b/examples/demo-subwidgets.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -23,14 +23,6 @@ #include "widgets/ExampleShapesWidget.hpp" #include "widgets/ExampleTextWidget.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::Size; -using DGL::StandaloneWindow; -using DGL::Widget; -using DGL::Window; - // ------------------------------------------------------ // SubWidgets diff --git a/examples/demo.cpp b/examples/demo.cpp index b72a2e0..a3e861b 100644 --- a/examples/demo.cpp +++ b/examples/demo.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -17,7 +17,6 @@ // ------------------------------------------------------ // DGL Stuff -#include "ImageButton.hpp" #include "StandaloneWindow.hpp" #include "widgets/ExampleColorWidget.hpp" #include "widgets/ExampleImagesWidget.hpp" @@ -32,14 +31,6 @@ #include "demo_res/DemoArtwork.cpp" #include "images_res/CatPics.cpp" -// ------------------------------------------------------ -// use namespace - -using DGL::App; -using DGL::ImageButton; -using DGL::Line; -using DGL::Size; - // ------------------------------------------------------ // Left side tab-like widget @@ -328,7 +319,7 @@ class DemoWindow : public Window, public LeftSideWidget::Callback { public: - DemoWindow(App& app) + DemoWindow(Application& app) : Window(app), wColor(*this), wImages(*this), @@ -429,7 +420,7 @@ private: int main() { - App app; + Application app; DemoWindow win(app); win.show(); diff --git a/examples/file-browser.cpp b/examples/file-browser.cpp index 6574a7c..7c24394 100644 --- a/examples/file-browser.cpp +++ b/examples/file-browser.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -19,11 +19,6 @@ #include "StandaloneWindow.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::StandaloneWindow; - // ------------------------------------------------------ // Test class diff --git a/examples/images.cpp b/examples/images.cpp index 6bfd46f..a4448bf 100644 --- a/examples/images.cpp +++ b/examples/images.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this diff --git a/examples/nanovg.cpp b/examples/nanovg.cpp index d7272f9..cf9f7f3 100644 --- a/examples/nanovg.cpp +++ b/examples/nanovg.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -25,11 +25,6 @@ #include "widgets/NanoPerfWidget.hpp" #include "nanovg_res/demo.h" -// ------------------------------------------------------ -// use namespace - -using namespace DGL; - // ------------------------------------------------------ // NanoVG Example Widget @@ -98,7 +93,7 @@ protected: switch (ev.key) { - case CHAR_ESCAPE: + case kCharEscape: getParentApp().quit(); break; case ' ': @@ -137,7 +132,7 @@ private: class NanoExampleWindow : public Window { public: - NanoExampleWindow(App& app) + NanoExampleWindow(Application& app) : Window(app), fDemo(*this), fPerf(*this, NanoPerfWidget::RENDER_FPS, "Frame Time") @@ -168,7 +163,7 @@ private: int main() { - App app; + Application app; NanoExampleWindow win(app); win.show(); diff --git a/examples/nanovg2.cpp b/examples/nanovg2.cpp index 18503b2..87c3b67 100644 --- a/examples/nanovg2.cpp +++ b/examples/nanovg2.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -25,14 +25,6 @@ #include "NanoVG.hpp" #include "widgets/NanoPerfWidget.hpp" -#include - -// ------------------------------------------------------ -// use namespace - -using namespace DGL; -using namespace DISTRHO; - // ------------------------------------------------------ // NanoVG Example Widget @@ -98,7 +90,7 @@ protected: switch (ev.key) { - case CHAR_ESCAPE: + case kCharEscape: getParentApp().quit(); break; case ' ': @@ -198,7 +190,7 @@ private: class NanoExampleWindow : public Window { public: - NanoExampleWindow(App& app) + NanoExampleWindow(Application& app) : Window(app), fDemo(*this), fPerf(*this, NanoPerfWidget::RENDER_FPS, "Frame Time") @@ -227,7 +219,7 @@ private: int main() { - App app; + Application app; NanoExampleWindow win(app); win.show(); diff --git a/examples/ntk.cpp b/examples/ntk.cpp index e0bdb0b..6d99a44 100644 --- a/examples/ntk.cpp +++ b/examples/ntk.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this diff --git a/examples/ntk_res/DistrhoPluginInfo.h b/examples/ntk_res/DistrhoPluginInfo.h index d5974ce..b30771c 100644 --- a/examples/ntk_res/DistrhoPluginInfo.h +++ b/examples/ntk_res/DistrhoPluginInfo.h @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this diff --git a/examples/qt-embed.cpp b/examples/qt-embed.cpp index 21965b2..0f97b43 100644 --- a/examples/qt-embed.cpp +++ b/examples/qt-embed.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -17,7 +17,7 @@ // ------------------------------------------------------ // DGL Stuff -#include "App.hpp" +#include "Application.hpp" #include "Window.hpp" #include "widgets/ExampleRectanglesWidget.hpp" @@ -40,12 +40,6 @@ typedef QMacCocoaViewContainer QWidgetContainer; typedef QWidget QWidgetContainer; #endif -// ------------------------------------------------------ -// use namespace - -using DGL::App; -using DGL::Window; - // ------------------------------------------------------ // Qt widget diff --git a/examples/rectangles.cpp b/examples/rectangles.cpp index f7099c2..ee743f0 100644 --- a/examples/rectangles.cpp +++ b/examples/rectangles.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -20,11 +20,6 @@ #include "StandaloneWindow.hpp" #include "widgets/ExampleRectanglesWidget.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::StandaloneWindow; - // ------------------------------------------------------ // main entry point diff --git a/examples/shapes.cpp b/examples/shapes.cpp index 61ce069..6eb5650 100644 --- a/examples/shapes.cpp +++ b/examples/shapes.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -20,11 +20,6 @@ #include "StandaloneWindow.hpp" #include "widgets/ExampleShapesWidget.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::StandaloneWindow; - // ------------------------------------------------------ // main entry point diff --git a/examples/tests/cairo.cpp b/examples/tests/cairo.cpp index 999e403..ae3b1f0 100644 --- a/examples/tests/cairo.cpp +++ b/examples/tests/cairo.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -17,17 +17,12 @@ // ------------------------------------------------------ // DGL Stuff -#include "App.hpp" +#include "Application.hpp" #include "CairoWidget.hpp" #include "Window.hpp" #include -// ------------------------------------------------------ -// use namespace - -using namespace DGL; - // ------------------------------------------------------ // Background widget (cairo will be painted on top) @@ -199,7 +194,7 @@ private: int main() { - App app; + Application app; CustomWindow win(app); win.setSize(300, 300); diff --git a/examples/tests/text.cpp b/examples/tests/text.cpp index d91e1e8..0622ffd 100644 --- a/examples/tests/text.cpp +++ b/examples/tests/text.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this diff --git a/examples/text.cpp b/examples/text.cpp index 14096df..6dccb88 100644 --- a/examples/text.cpp +++ b/examples/text.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -20,11 +20,6 @@ #include "StandaloneWindow.hpp" #include "widgets/ExampleTextWidget.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::StandaloneWindow; - // ------------------------------------------------------ // main entry point diff --git a/examples/widgets/ExampleColorWidget.hpp b/examples/widgets/ExampleColorWidget.hpp index e72f326..e237bcc 100644 --- a/examples/widgets/ExampleColorWidget.hpp +++ b/examples/widgets/ExampleColorWidget.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -23,14 +23,6 @@ #include "Widget.hpp" #include "Window.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::IdleCallback; -using DGL::Rectangle; -using DGL::Widget; -using DGL::Window; - // ------------------------------------------------------ // our widget diff --git a/examples/widgets/ExampleImagesWidget.hpp b/examples/widgets/ExampleImagesWidget.hpp index e867271..8c0a134 100644 --- a/examples/widgets/ExampleImagesWidget.hpp +++ b/examples/widgets/ExampleImagesWidget.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -29,15 +29,6 @@ #include "../images_res/CatPics.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::IdleCallback; -using DGL::Image; -using DGL::Rectangle; -using DGL::Widget; -using DGL::Window; - // ------------------------------------------------------ // our widget diff --git a/examples/widgets/ExampleRectanglesWidget.hpp b/examples/widgets/ExampleRectanglesWidget.hpp index e908607..8f705ca 100644 --- a/examples/widgets/ExampleRectanglesWidget.hpp +++ b/examples/widgets/ExampleRectanglesWidget.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -23,13 +23,6 @@ #include "Widget.hpp" #include "Window.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::Rectangle; -using DGL::Widget; -using DGL::Window; - // ------------------------------------------------------ // our widget diff --git a/examples/widgets/ExampleShapesWidget.hpp b/examples/widgets/ExampleShapesWidget.hpp index 8197f97..967bc43 100644 --- a/examples/widgets/ExampleShapesWidget.hpp +++ b/examples/widgets/ExampleShapesWidget.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -23,15 +23,6 @@ #include "Widget.hpp" #include "Window.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::Circle; -using DGL::Triangle; -using DGL::Rectangle; -using DGL::Widget; -using DGL::Window; - // ------------------------------------------------------ // our widget diff --git a/examples/widgets/ExampleTextWidget.hpp b/examples/widgets/ExampleTextWidget.hpp index 0dc7650..3d3bbca 100644 --- a/examples/widgets/ExampleTextWidget.hpp +++ b/examples/widgets/ExampleTextWidget.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -22,12 +22,6 @@ #include "NanoVG.hpp" -// ------------------------------------------------------ -// use namespace - -using DGL::NanoWidget; -using DGL::Window; - // ------------------------------------------------------ // our widget diff --git a/examples/widgets/NanoPerfWidget.hpp b/examples/widgets/NanoPerfWidget.hpp index ed117b8..6fb404a 100644 --- a/examples/widgets/NanoPerfWidget.hpp +++ b/examples/widgets/NanoPerfWidget.hpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2014 Filipe Coelho + * Copyright (C) 2012-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -23,16 +23,6 @@ #include "NanoVG.hpp" #include "../../dpf/distrho/extra/String.hpp" -// ------------------------------------------------------ -// use namespace - -using DISTRHO::String; -using DGL::IdleCallback; -using DGL::NanoVG; -using DGL::NanoWidget; -using DGL::Widget; -using DGL::Window; - // ------------------------------------------------------ // get time