[DEV] update to the new widget sizer (with no restriction of the X or Y
This commit is contained in:
parent
c811e32815
commit
614882381f
@ -12,7 +12,7 @@
|
||||
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
#include <ewol/widget/SizerHori.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Entry.h>
|
||||
#include <ewol/widget/List.h>
|
||||
@ -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;
|
||||
|
@ -12,16 +12,16 @@
|
||||
#include <appl/Debug.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/widget/Windows.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
|
||||
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);
|
||||
|
@ -12,8 +12,7 @@
|
||||
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
#include <ewol/widget/SizerHori.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Entry.h>
|
||||
#include <ewol/widget/List.h>
|
||||
@ -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;
|
||||
}
|
||||
|
@ -13,9 +13,9 @@
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
|
||||
class TestButton : public widget::SizerVert
|
||||
class TestButton : public widget::Sizer
|
||||
{
|
||||
private:
|
||||
widget::Button* m_testWidget;
|
||||
|
@ -12,8 +12,7 @@
|
||||
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
#include <ewol/widget/SizerHori.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Entry.h>
|
||||
#include <ewol/widget/List.h>
|
||||
@ -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;
|
||||
}
|
||||
|
@ -14,9 +14,9 @@
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/ButtonColor.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
|
||||
class TestButtonColor : public widget::SizerVert
|
||||
class TestButtonColor : public widget::Sizer
|
||||
{
|
||||
private:
|
||||
widget::ButtonColor* m_testWidget;
|
||||
|
@ -12,8 +12,7 @@
|
||||
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
#include <ewol/widget/SizerHori.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Entry.h>
|
||||
#include <ewol/widget/List.h>
|
||||
@ -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;
|
||||
}
|
||||
|
@ -14,9 +14,9 @@
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
|
||||
class TestLabel : public widget::SizerVert
|
||||
class TestLabel : public widget::Sizer
|
||||
{
|
||||
private:
|
||||
widget::Label* m_testWidget;
|
||||
|
@ -13,8 +13,7 @@
|
||||
#include <etk/tool.h>
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
#include <ewol/widget/SizerHori.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Entry.h>
|
||||
#include <ewol/widget/List.h>
|
||||
@ -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;
|
||||
}
|
||||
|
@ -12,9 +12,9 @@
|
||||
#include <appl/Debug.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/widget/Scene.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Sizer.h>
|
||||
|
||||
class TestScene : public widget::SizerVert
|
||||
class TestScene : public widget::Sizer
|
||||
{
|
||||
private:
|
||||
widget::Scene* m_testWidget;
|
||||
|
Loading…
Reference in New Issue
Block a user