From 7eb68dfa72c18bc60e2a7f36a67e68b95dbef9a3 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 7 Nov 2017 10:19:06 +0100 Subject: [PATCH] [DEBUG] build back tools & sample --- sample/CustomWidgets/appl/Main.cpp | 75 +++++------ .../appl/widget/VectorDisplay.hpp | 2 +- sample/HelloWord/appl/Main.cpp | 2 +- sample/wallpaper/appl/Main.cpp | 72 +++++----- sample/wallpaper/appl/WidgetDisplay.hpp | 4 +- tools/platform_test/appl/MainWindows.hpp | 2 +- tools/platform_test/appl/init.cpp | 124 +++++++++--------- tools/visual_test/appl/init.cpp | 124 +++++++++--------- 8 files changed, 203 insertions(+), 202 deletions(-) diff --git a/sample/CustomWidgets/appl/Main.cpp b/sample/CustomWidgets/appl/Main.cpp index 75e5d9ee..b4f5b8e1 100644 --- a/sample/CustomWidgets/appl/Main.cpp +++ b/sample/CustomWidgets/appl/Main.cpp @@ -16,45 +16,46 @@ #include #include - -class MainApplication : public ewol::context::Application { - public: - void onCreate(ewol::Context& _context) override { - APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); - for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { - etk::String tmpppp = _context.getCmd().get(iii); - if ( tmpppp == "-h" - || tmpppp == "--help") { - APPL_INFO(" -h/--help display this help" ); - exit(0); +namespace appl { + class MainApplication : public ewol::context::Application { + public: + void onCreate(ewol::Context& _context) override { + APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + etk::String tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -h/--help display this help" ); + exit(0); + } } + // TODO : Remove this : Move if in the windows properties + _context.setSize(vec2(800, 600)); + + // select internal data for font ... + _context.getFontDefault().setUseExternal(true); + _context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19); + + appl::widget::VectorDisplay::createManagerWidget(_context.getWidgetManager()); + + ewol::widget::WindowsShared basicWindows = appl::Windows::create(); + // create the specific windows + _context.setWindows(basicWindows); + APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); } - // TODO : Remove this : Move if in the windows properties - _context.setSize(vec2(800, 600)); - // select internal data for font ... - _context.getFontDefault().setUseExternal(true); - _context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19); - - appl::widget::VectorDisplay::createManagerWidget(_context.getWidgetManager()); - - ewol::widget::WindowsShared basicWindows = appl::Windows::create(); - // create the specific windows - _context.setWindows(basicWindows); - APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); - } - - void onStart(ewol::Context& _context) override { - APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); - // nothing to do ... - APPL_INFO("==> START ... " PROJECT_NAME " (END)"); - } - void onStop(ewol::Context& _context) override { - APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); - // nothing to do ... - APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); - } -}; + void onStart(ewol::Context& _context) override { + APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); + // nothing to do ... + APPL_INFO("==> START ... " PROJECT_NAME " (END)"); + } + void onStop(ewol::Context& _context) override { + APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); + // nothing to do ... + APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); + } + }; +} /** * @brief Main of the program (This can be set in every case, but it is not used in Andoid...). @@ -63,5 +64,5 @@ class MainApplication : public ewol::context::Application { */ int main(int _argc, const char *_argv[]) { // second possibility - return ewol::run(ETK_NEW(appl::MainApplication)(), _argc, _argv); + return ewol::run(ETK_NEW(appl::MainApplication), _argc, _argv); } \ No newline at end of file diff --git a/sample/CustomWidgets/appl/widget/VectorDisplay.hpp b/sample/CustomWidgets/appl/widget/VectorDisplay.hpp index f004c539..db2340da 100644 --- a/sample/CustomWidgets/appl/widget/VectorDisplay.hpp +++ b/sample/CustomWidgets/appl/widget/VectorDisplay.hpp @@ -19,7 +19,7 @@ namespace appl { protected: //! @brief constructor VectorDisplay(); - void init(); + void init() override; public: DECLARE_WIDGET_FACTORY(VectorDisplay, "VectorDisplay"); //! @brief destructor diff --git a/sample/HelloWord/appl/Main.cpp b/sample/HelloWord/appl/Main.cpp index e868c6de..a2e5dbaf 100644 --- a/sample/HelloWord/appl/Main.cpp +++ b/sample/HelloWord/appl/Main.cpp @@ -95,7 +95,7 @@ namespace appl { */ int main(int _argc, const char *_argv[]) { // second possibility - return ewol::run(ETK_NEW(appl::MainApplication)(), _argc, _argv); + return ewol::run(ETK_NEW(appl::MainApplication), _argc, _argv); } //! [ewol_sample_HW_main_main] diff --git a/sample/wallpaper/appl/Main.cpp b/sample/wallpaper/appl/Main.cpp index ccf865b7..d2558d0e 100644 --- a/sample/wallpaper/appl/Main.cpp +++ b/sample/wallpaper/appl/Main.cpp @@ -15,44 +15,44 @@ #include #include - -class MainApplication : public ewol::context::Application { - public: - void onCreate(ewol::Context& _context) override { - APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); - for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { - etk::String tmpppp = _context.getCmd().get(iii); - if ( tmpppp == "-h" - || tmpppp == "--help") { - APPL_INFO(" -h/--help display this help" ); - exit(0); +namespace appl { + class MainApplication : public ewol::context::Application { + public: + void onCreate(ewol::Context& _context) override { + APPL_INFO(" == > CREATE ... " << PROJECT_NAME << " v" << APPL_VERSION << " (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + etk::String tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -h/--help display this help" ); + exit(0); + } } + // TODO : Remove this : Move if in the windows properties + _context.setSize(vec2(800, 600)); + + // select internal data for font ... + _context.getFontDefault().setUseExternal(true); + _context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19); + + ewol::widget::WindowsShared basicWindows = appl::Windows::create(); + // create the specific windows + _context.setWindows(basicWindows); + APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); } - // TODO : Remove this : Move if in the windows properties - _context.setSize(vec2(800, 600)); - // select internal data for font ... - _context.getFontDefault().setUseExternal(true); - _context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19); - - ewol::widget::WindowsShared basicWindows = appl::Windows::create(); - // create the specific windows - _context.setWindows(basicWindows); - APPL_INFO("==> CREATE ... " PROJECT_NAME " (END)"); - } - - void onStart(ewol::Context& _context) override { - APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); - // nothing to do ... - APPL_INFO("==> START ... " PROJECT_NAME " (END)"); - } - void onStop(ewol::Context& _context) override { - APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); - // nothing to do ... - APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); - } -}; - + void onStart(ewol::Context& _context) override { + APPL_INFO("==> START ... " PROJECT_NAME " (BEGIN)"); + // nothing to do ... + APPL_INFO("==> START ... " PROJECT_NAME " (END)"); + } + void onStop(ewol::Context& _context) override { + APPL_INFO("==> STOP ... " PROJECT_NAME " (START)"); + // nothing to do ... + APPL_INFO("==> STOP ... " PROJECT_NAME " (END)"); + } + }; +} /** @@ -62,5 +62,5 @@ class MainApplication : public ewol::context::Application { */ int main(int _argc, const char *_argv[]) { // second possibility - return ewol::run(ETK_NEW(appl::MainApplication)(), _argc, _argv); + return ewol::run(ETK_NEW(appl::MainApplication), _argc, _argv); } \ No newline at end of file diff --git a/sample/wallpaper/appl/WidgetDisplay.hpp b/sample/wallpaper/appl/WidgetDisplay.hpp index f5f99e7c..aa5c91f0 100644 --- a/sample/wallpaper/appl/WidgetDisplay.hpp +++ b/sample/wallpaper/appl/WidgetDisplay.hpp @@ -30,14 +30,14 @@ namespace appl { }; protected: WidgetDisplay(); - void init(); + void init() override; public: DECLARE_FACTORY(WidgetDisplay); virtual ~WidgetDisplay(); ewol::compositing::Image m_compositing; etk::Vector m_elements; public: // Derived function - void onRegenerateDisplay(); + void onRegenerateDisplay() override; void periodicCall(const ewol::event::Time& _event); bool onEventInput(const ewol::event::Input& _event) override; void onDraw() override; diff --git a/tools/platform_test/appl/MainWindows.hpp b/tools/platform_test/appl/MainWindows.hpp index d69b2057..d72598ce 100644 --- a/tools/platform_test/appl/MainWindows.hpp +++ b/tools/platform_test/appl/MainWindows.hpp @@ -38,7 +38,7 @@ namespace appl { bool onEventInput(const ewol::event::Input& _event) override; bool onEventEntry(const ewol::event::Entry& _event) override; void forceFocusCall(const ewol::event::Time& _event); - virtual ewol::WidgetShared getWidgetAtPos(const vec2& _pos) { + virtual ewol::WidgetShared getWidgetAtPos(const vec2& _pos) override { ewol::WidgetShared wid = ewol::widget::Windows::getWidgetAtPos(_pos); if (wid != nullptr) { return wid; diff --git a/tools/platform_test/appl/init.cpp b/tools/platform_test/appl/init.cpp index a9266b32..e19966a5 100644 --- a/tools/platform_test/appl/init.cpp +++ b/tools/platform_test/appl/init.cpp @@ -15,72 +15,72 @@ #include #include #include - -class MainApplication : public ewol::context::Application { - public: - virtual void onCreate(ewol::Context& _context) { - APPL_INFO(" == > CREATE ... (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); - for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { - etk::String tmpppp = _context.getCmd().get(iii); - if ( tmpppp == "-h" - || tmpppp == "--help") { - APPL_INFO(" -t c-flags-file-name" ); - APPL_INFO(" -h/--help display this help" ); - exit(0); - } +namespace appl { + class MainApplication : public ewol::context::Application { + public: + virtual void onCreate(ewol::Context& _context) { + APPL_INFO(" == > CREATE ... (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + etk::String tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -t c-flags-file-name" ); + APPL_INFO(" -h/--help display this help" ); + exit(0); + } + } + //etk::theme::setName("COLOR", "color/black/"); + etk::theme::setName("COLOR", "color/white/"); + + _context.setSize(vec2(800, 600)); + + _context.setTitle("ewol-tools-visual-test"); + + // select internal data for font ... + _context.getFontDefault().setUseExternal(true); + #ifdef __TARGET_OS__Android + _context.getFontDefault().set("FreeSerif", 19); + #else + _context.getFontDefault().set("FreeSerif;DejaVuSansMono",14); + #endif + + // set the application icon ... + _context.setIcon("DATA:icon.png"); + + appl::widget::SizerColor::createManagerWidget(_context.getWidgetManager()); + + APPL_INFO("==> CREATE ... (END)"); } - //etk::theme::setName("COLOR", "color/black/"); - etk::theme::setName("COLOR", "color/white/"); - _context.setSize(vec2(800, 600)); - - _context.setTitle("ewol-tools-visual-test"); - - // select internal data for font ... - _context.getFontDefault().setUseExternal(true); - #ifdef __TARGET_OS__Android - _context.getFontDefault().set("FreeSerif", 19); - #else - _context.getFontDefault().set("FreeSerif;DejaVuSansMono",14); - #endif - - // set the application icon ... - _context.setIcon("DATA:icon.png"); - - appl::widget::SizerColor::createManagerWidget(_context.getWidgetManager()); - - APPL_INFO("==> CREATE ... (END)"); - } - - void onStart(ewol::Context& _context) { - APPL_INFO("==> START ... (BEGIN)"); - - ememory::SharedPtr basicWindows = appl::MainWindows::create(); - if (basicWindows == nullptr) { - APPL_ERROR("Can not allocate the basic windows"); - return; - } - // create the specific windows - _context.setWindows(basicWindows); - if (basicWindows == nullptr) { - APPL_ERROR("Can not allocate the basic windows"); - _context.exit(-1); + void onStart(ewol::Context& _context) { + APPL_INFO("==> START ... (BEGIN)"); + + ememory::SharedPtr basicWindows = appl::MainWindows::create(); + if (basicWindows == nullptr) { + APPL_ERROR("Can not allocate the basic windows"); + return; + } + // create the specific windows + _context.setWindows(basicWindows); + if (basicWindows == nullptr) { + APPL_ERROR("Can not allocate the basic windows"); + _context.exit(-1); + return; + } + + // create the specific windows + _context.setWindows(basicWindows); + + APPL_INFO("==> START ... (END)"); return; } - // create the specific windows - _context.setWindows(basicWindows); - - APPL_INFO("==> START ... (END)"); - return; - } - - void onStop(ewol::Context& _context) { - APPL_INFO("==> STOP ... (START)"); - APPL_INFO("==> STOP ... (END)"); - } -}; - + void onStop(ewol::Context& _context) { + APPL_INFO("==> STOP ... (START)"); + APPL_INFO("==> STOP ... (END)"); + } + }; +} /** @@ -90,7 +90,7 @@ class MainApplication : public ewol::context::Application { */ int main(int _argc, const char *_argv[]) { // second possibility - return ewol::run(ETK_NEW(appl::MainApplication)(), _argc, _argv); + return ewol::run(ETK_NEW(appl::MainApplication), _argc, _argv); } diff --git a/tools/visual_test/appl/init.cpp b/tools/visual_test/appl/init.cpp index a9266b32..e19966a5 100644 --- a/tools/visual_test/appl/init.cpp +++ b/tools/visual_test/appl/init.cpp @@ -15,72 +15,72 @@ #include #include #include - -class MainApplication : public ewol::context::Application { - public: - virtual void onCreate(ewol::Context& _context) { - APPL_INFO(" == > CREATE ... (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); - for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { - etk::String tmpppp = _context.getCmd().get(iii); - if ( tmpppp == "-h" - || tmpppp == "--help") { - APPL_INFO(" -t c-flags-file-name" ); - APPL_INFO(" -h/--help display this help" ); - exit(0); - } +namespace appl { + class MainApplication : public ewol::context::Application { + public: + virtual void onCreate(ewol::Context& _context) { + APPL_INFO(" == > CREATE ... (START) [" << gale::getBoardType() << "] (" << gale::getCompilationMode() << ") (BEGIN)"); + for( int32_t iii=0 ; iii<_context.getCmd().size(); iii++) { + etk::String tmpppp = _context.getCmd().get(iii); + if ( tmpppp == "-h" + || tmpppp == "--help") { + APPL_INFO(" -t c-flags-file-name" ); + APPL_INFO(" -h/--help display this help" ); + exit(0); + } + } + //etk::theme::setName("COLOR", "color/black/"); + etk::theme::setName("COLOR", "color/white/"); + + _context.setSize(vec2(800, 600)); + + _context.setTitle("ewol-tools-visual-test"); + + // select internal data for font ... + _context.getFontDefault().setUseExternal(true); + #ifdef __TARGET_OS__Android + _context.getFontDefault().set("FreeSerif", 19); + #else + _context.getFontDefault().set("FreeSerif;DejaVuSansMono",14); + #endif + + // set the application icon ... + _context.setIcon("DATA:icon.png"); + + appl::widget::SizerColor::createManagerWidget(_context.getWidgetManager()); + + APPL_INFO("==> CREATE ... (END)"); } - //etk::theme::setName("COLOR", "color/black/"); - etk::theme::setName("COLOR", "color/white/"); - _context.setSize(vec2(800, 600)); - - _context.setTitle("ewol-tools-visual-test"); - - // select internal data for font ... - _context.getFontDefault().setUseExternal(true); - #ifdef __TARGET_OS__Android - _context.getFontDefault().set("FreeSerif", 19); - #else - _context.getFontDefault().set("FreeSerif;DejaVuSansMono",14); - #endif - - // set the application icon ... - _context.setIcon("DATA:icon.png"); - - appl::widget::SizerColor::createManagerWidget(_context.getWidgetManager()); - - APPL_INFO("==> CREATE ... (END)"); - } - - void onStart(ewol::Context& _context) { - APPL_INFO("==> START ... (BEGIN)"); - - ememory::SharedPtr basicWindows = appl::MainWindows::create(); - if (basicWindows == nullptr) { - APPL_ERROR("Can not allocate the basic windows"); - return; - } - // create the specific windows - _context.setWindows(basicWindows); - if (basicWindows == nullptr) { - APPL_ERROR("Can not allocate the basic windows"); - _context.exit(-1); + void onStart(ewol::Context& _context) { + APPL_INFO("==> START ... (BEGIN)"); + + ememory::SharedPtr basicWindows = appl::MainWindows::create(); + if (basicWindows == nullptr) { + APPL_ERROR("Can not allocate the basic windows"); + return; + } + // create the specific windows + _context.setWindows(basicWindows); + if (basicWindows == nullptr) { + APPL_ERROR("Can not allocate the basic windows"); + _context.exit(-1); + return; + } + + // create the specific windows + _context.setWindows(basicWindows); + + APPL_INFO("==> START ... (END)"); return; } - // create the specific windows - _context.setWindows(basicWindows); - - APPL_INFO("==> START ... (END)"); - return; - } - - void onStop(ewol::Context& _context) { - APPL_INFO("==> STOP ... (START)"); - APPL_INFO("==> STOP ... (END)"); - } -}; - + void onStop(ewol::Context& _context) { + APPL_INFO("==> STOP ... (START)"); + APPL_INFO("==> STOP ... (END)"); + } + }; +} /** @@ -90,7 +90,7 @@ class MainApplication : public ewol::context::Application { */ int main(int _argc, const char *_argv[]) { // second possibility - return ewol::run(ETK_NEW(appl::MainApplication)(), _argc, _argv); + return ewol::run(ETK_NEW(appl::MainApplication), _argc, _argv); }