From 614882381fbe167d34a4f26aa90943553b30a67a Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 5 Apr 2013 21:54:51 +0200 Subject: [PATCH] [DEV] update to the new widget sizer (with no restriction of the X or Y --- sources/appl/MainWindows.cpp | 8 ++++---- sources/appl/MainWindows.h | 8 ++++---- sources/appl/TestButton.cpp | 20 ++++++++++---------- sources/appl/TestButton.h | 4 ++-- sources/appl/TestButtonColor.cpp | 18 +++++++++--------- sources/appl/TestButtonColor.h | 4 ++-- sources/appl/TestLabel.cpp | 16 ++++++++-------- sources/appl/TestLabel.h | 4 ++-- sources/appl/TestScene.cpp | 16 ++++++++-------- sources/appl/TestScene.h | 4 ++-- 10 files changed, 51 insertions(+), 51 deletions(-) diff --git a/sources/appl/MainWindows.cpp b/sources/appl/MainWindows.cpp index 4ae5394..89d322f 100644 --- a/sources/appl/MainWindows.cpp +++ b/sources/appl/MainWindows.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include @@ -42,17 +42,17 @@ MainWindows::MainWindows(void) : m_subWidget(NULL) { APPL_DEBUG("CREATE WINDOWS ... "); - widget::SizerHori* mySizerHori = NULL; + widget::Sizer* mySizerHori = NULL; widget::Button* myButton = NULL; - m_sizerVert = new widget::SizerVert(); + m_sizerVert = new widget::Sizer(widget::Sizer::modeVert); if (NULL == m_sizerVert) { APPL_DEBUG("Allocation error mySizerVert"); return; } SetSubWidget(m_sizerVert); - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; diff --git a/sources/appl/MainWindows.h b/sources/appl/MainWindows.h index b8de79d..373ceb6 100644 --- a/sources/appl/MainWindows.h +++ b/sources/appl/MainWindows.h @@ -12,16 +12,16 @@ #include #include #include -#include +#include #include #include class MainWindows : public ewol::Windows { private: - widget::SizerVert* m_sizerVert; - ewol::Widget* m_subWidget; - int32_t m_idWidget; + widget::Sizer* m_sizerVert; + ewol::Widget* m_subWidget; + int32_t m_idWidget; public: // Constructeur MainWindows(void); diff --git a/sources/appl/TestButton.cpp b/sources/appl/TestButton.cpp index daae845..b617269 100644 --- a/sources/appl/TestButton.cpp +++ b/sources/appl/TestButton.cpp @@ -12,8 +12,7 @@ #include #include -#include -#include +#include #include #include #include @@ -39,14 +38,15 @@ static const char * l_eventChangeImageToggle = "event-change-image-toggle"; #undef __class__ #define __class__ "TestButton" -TestButton::TestButton(void) +TestButton::TestButton(void) : + widget::Sizer(widget::Sizer::modeVert) { APPL_CRITICAL("Create "__class__" (start)"); - widget::SizerVert* mySizerVert2 = NULL; - widget::SizerHori* mySizerHori = NULL; + widget::Sizer* mySizerVert2 = NULL; + widget::Sizer* mySizerHori = NULL; widget::Button* myButton = NULL; - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; @@ -81,7 +81,7 @@ TestButton::TestButton(void) mySizerHori->SubWidgetAdd(myButton); } - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; @@ -131,7 +131,7 @@ TestButton::TestButton(void) SubWidgetAdd(mySpacer); } - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; @@ -197,7 +197,7 @@ TestButton::~TestButton(void) void TestButton::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data) { - widget::SizerVert::OnReceiveMessage(CallerObject, eventId, data); + widget::Sizer::OnReceiveMessage(CallerObject, eventId, data); //APPL_INFO("Receive Event from the main windows ... : \"" << eventId << "\" ==> data=\"" << data << "\"" ); if (m_testWidget == CallerObject) { @@ -313,7 +313,7 @@ void TestButton::OnReceiveMessage(ewol::EObject * CallerObject, const char * eve void TestButton::OnObjectRemove(ewol::EObject * removeObject) { - widget::SizerVert::OnObjectRemove(removeObject); + widget::Sizer::OnObjectRemove(removeObject); if (m_testWidget == removeObject) { m_testWidget = NULL; } diff --git a/sources/appl/TestButton.h b/sources/appl/TestButton.h index eaf4459..50ae812 100644 --- a/sources/appl/TestButton.h +++ b/sources/appl/TestButton.h @@ -13,9 +13,9 @@ #include #include #include -#include +#include -class TestButton : public widget::SizerVert +class TestButton : public widget::Sizer { private: widget::Button* m_testWidget; diff --git a/sources/appl/TestButtonColor.cpp b/sources/appl/TestButtonColor.cpp index 9e8f1a3..106f8a4 100644 --- a/sources/appl/TestButtonColor.cpp +++ b/sources/appl/TestButtonColor.cpp @@ -12,8 +12,7 @@ #include #include -#include -#include +#include #include #include #include @@ -34,14 +33,15 @@ static const char * l_eventChangeFillY = "event-change-fill-Y"; #undef __class__ #define __class__ "TestButton" -TestButtonColor::TestButtonColor(void) +TestButtonColor::TestButtonColor(void) : + widget::Sizer(widget::Sizer::modeVert) { APPL_DEBUG("CREATE "__class__" ... "); - widget::SizerVert* mySizerVert2 = NULL; - widget::SizerHori* mySizerHori = NULL; + widget::Sizer* mySizerVert2 = NULL; + widget::Sizer* mySizerHori = NULL; widget::Button* myButton = NULL; - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; @@ -87,7 +87,7 @@ TestButtonColor::TestButtonColor(void) SubWidgetAdd(mySpacer); } - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; @@ -147,7 +147,7 @@ TestButtonColor::~TestButtonColor(void) void TestButtonColor::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data) { - widget::SizerVert::OnReceiveMessage(CallerObject, eventId, data); + widget::Sizer::OnReceiveMessage(CallerObject, eventId, data); //APPL_INFO("Receive Event from the main windows ... : \"" << eventId << "\" ==> data=\"" << data << "\"" ); if (m_testWidget == CallerObject) { @@ -192,7 +192,7 @@ void TestButtonColor::OnReceiveMessage(ewol::EObject * CallerObject, const char void TestButtonColor::OnObjectRemove(ewol::EObject * removeObject) { - widget::SizerVert::OnObjectRemove(removeObject); + widget::Sizer::OnObjectRemove(removeObject); if (m_testWidget == removeObject) { m_testWidget = NULL; } diff --git a/sources/appl/TestButtonColor.h b/sources/appl/TestButtonColor.h index e09f7a2..d0f8b30 100644 --- a/sources/appl/TestButtonColor.h +++ b/sources/appl/TestButtonColor.h @@ -14,9 +14,9 @@ #include #include #include -#include +#include -class TestButtonColor : public widget::SizerVert +class TestButtonColor : public widget::Sizer { private: widget::ButtonColor* m_testWidget; diff --git a/sources/appl/TestLabel.cpp b/sources/appl/TestLabel.cpp index c59cf57..023973a 100644 --- a/sources/appl/TestLabel.cpp +++ b/sources/appl/TestLabel.cpp @@ -12,8 +12,7 @@ #include #include -#include -#include +#include #include #include #include @@ -37,14 +36,15 @@ static const char * l_eventChangeLabel = "event-change-label"; #define __class__ "TestButton" TestLabel::TestLabel(void) : + widget::Sizer(widget::Sizer::modeVert), m_labelId(0) { APPL_DEBUG("CREATE "__class__" ... "); - widget::SizerVert* mySizerVert2 = NULL; - widget::SizerHori* mySizerHori = NULL; + widget::Sizer* mySizerVert2 = NULL; + widget::Sizer* mySizerHori = NULL; widget::Button* myButton = NULL; - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; @@ -102,7 +102,7 @@ TestLabel::TestLabel(void) : SubWidgetAdd(mySpacer); } - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; @@ -162,7 +162,7 @@ TestLabel::~TestLabel(void) void TestLabel::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data) { - widget::SizerVert::OnReceiveMessage(CallerObject, eventId, data); + widget::Sizer::OnReceiveMessage(CallerObject, eventId, data); //APPL_INFO("Receive Event from the main windows ... : \"" << eventId << "\" ==> data=\"" << data << "\"" ); if (m_testWidget == CallerObject) { @@ -250,7 +250,7 @@ void TestLabel::OnReceiveMessage(ewol::EObject * CallerObject, const char * even void TestLabel::OnObjectRemove(ewol::EObject * removeObject) { - widget::SizerVert::OnObjectRemove(removeObject); + widget::Sizer::OnObjectRemove(removeObject); if (m_testWidget == removeObject) { m_testWidget = NULL; } diff --git a/sources/appl/TestLabel.h b/sources/appl/TestLabel.h index 68e656a..b4ada09 100644 --- a/sources/appl/TestLabel.h +++ b/sources/appl/TestLabel.h @@ -14,9 +14,9 @@ #include #include #include -#include +#include -class TestLabel : public widget::SizerVert +class TestLabel : public widget::Sizer { private: widget::Label* m_testWidget; diff --git a/sources/appl/TestScene.cpp b/sources/appl/TestScene.cpp index 47ae194..38c2bd4 100644 --- a/sources/appl/TestScene.cpp +++ b/sources/appl/TestScene.cpp @@ -13,8 +13,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -45,7 +44,8 @@ static const char * l_eventDown = "event-down"; #undef __class__ #define __class__ "TestScene" -TestScene::TestScene(void) +TestScene::TestScene(void) : + widget::Sizer(widget::Sizer::modeVert) { /* m_ground = new game::Element("DATA:grass.obj"); @@ -56,8 +56,8 @@ TestScene::TestScene(void) */ APPL_CRITICAL("Create "__class__" (start)"); - widget::SizerVert* mySizerVert2 = NULL; - widget::SizerHori* mySizerHori = NULL; + widget::Sizer* mySizerVert2 = NULL; + widget::Sizer* mySizerHori = NULL; widget::Button* myButton = NULL; /* mySizerHori = new widget::SizerHori(); @@ -149,7 +149,7 @@ TestScene::TestScene(void) SubWidgetAdd(mySpacer); } - mySizerHori = new widget::SizerHori(); + mySizerHori = new widget::Sizer(widget::Sizer::modeHori); if (NULL == mySizerHori) { APPL_DEBUG("Allocation error mySizerHori"); return; @@ -270,7 +270,7 @@ class stupidSphere : public game::Element void TestScene::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data) { - widget::SizerVert::OnReceiveMessage(CallerObject, eventId, data); + widget::Sizer::OnReceiveMessage(CallerObject, eventId, data); //APPL_INFO("Receive Event from the main windows ... : \"" << eventId << "\" ==> data=\"" << data << "\"" ); if (m_testWidget == CallerObject) { @@ -354,7 +354,7 @@ void TestScene::OnReceiveMessage(ewol::EObject * CallerObject, const char * even void TestScene::OnObjectRemove(ewol::EObject * removeObject) { - widget::SizerVert::OnObjectRemove(removeObject); + widget::Sizer::OnObjectRemove(removeObject); if (m_testWidget == removeObject) { m_testWidget = NULL; } diff --git a/sources/appl/TestScene.h b/sources/appl/TestScene.h index c81612a..8d69140 100644 --- a/sources/appl/TestScene.h +++ b/sources/appl/TestScene.h @@ -12,9 +12,9 @@ #include #include #include -#include +#include -class TestScene : public widget::SizerVert +class TestScene : public widget::Sizer { private: widget::Scene* m_testWidget;