From 9d4bfc78701cb1f302e09b0cd9595e006cd4b5fb Mon Sep 17 00:00:00 2001 From: Felipe Gonzalez Date: Tue, 7 Jul 2015 15:54:02 +0200 Subject: [PATCH] #2449 creaWeb Feature New Normal wt-version wtLibrary --- wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx | 27 ++++++++++++++++++- wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ | 29 +++++++++++++++++--- wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx | 2 +- wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~ | 6 ++--- wt/bbtk_wt_PKG/src/bbwtLayoutTab.h | 2 +- wt/bbtk_wt_PKG/src/bbwtLayoutTab.h~ | 36 ++++++++++++------------- 6 files changed, 75 insertions(+), 27 deletions(-) diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx b/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx index c6c8f9f..de0e755 100644 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx +++ b/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx @@ -23,7 +23,7 @@ void LayoutSplit::Process() //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== -void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) +/*void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) { Wt::WContainerWidget* w = new Wt::WContainerWidget(parent); Wt::WBoxLayout *l; @@ -45,6 +45,31 @@ void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) bbSetOutputWidget( w ); +}*/ +void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) +{ + Wt::WContainerWidget* w = new Wt::WContainerWidget(parent); + Wt::Ext::Splitter *l = new Wt::Ext::Splitter(w); +// if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { l = new Wt::WHBoxLayout(); } + // if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { l = new Wt::WVBoxLayout(); } + + Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w); + Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w); + + if (w1==NULL) { w1=new Wt::WContainerWidget(); } + if (w2==NULL) { w2=new Wt::WContainerWidget(); } + + w1->resize(Wt::WLength::Auto,Wt::WLength::Auto) ; + w2->resize(Wt::WLength::Auto,Wt::WLength::Auto) ; + + l->addWidget(w1); + l->addWidget(w2); + + //w->setLayout(l); + + bbSetOutputWidget( w ); + + } //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ b/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ index f7d6470..e4cc865 100644 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ +++ b/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ @@ -23,12 +23,12 @@ void LayoutSplit::Process() //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== -void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) +/*void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) { Wt::WContainerWidget* w = new Wt::WContainerWidget(parent); Wt::WBoxLayout *l; - if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { l = new Wt::WHBoxLayout(parent); } - if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { l = new Wt::WVBoxLayout(parent); } + if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { l = new Wt::WHBoxLayout(); } + if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { l = new Wt::WVBoxLayout(); } Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w); Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w); @@ -45,6 +45,29 @@ void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) bbSetOutputWidget( w ); +}*/ +void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) +{ + Wt::WContainerWidget* w = new Wt::WContainerWidget(parent); + Wt::Ext::Splitter *l = new Wt::Ext::Splitter(w); +// if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { l = new Wt::WHBoxLayout(); } + // if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { l = new Wt::WVBoxLayout(); } + + Wt::WContainerWidget* w1 = bbCreateWidgetOfInput("Widget1",w); + Wt::WContainerWidget* w2 = bbCreateWidgetOfInput("Widget2",w); + + if (w1==NULL) { w1=new Wt::WContainerWidget(); } + if (w2==NULL) { w2=new Wt::WContainerWidget(); } + + + l->addWidget(w1); + l->addWidget(w2); + + //w->setLayout(l); + + bbSetOutputWidget( w ); + + } //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx index e0d5947..00ed3f8 100644 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx +++ b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx @@ -45,7 +45,7 @@ void LayoutTab::CreateWidget(Wt::WContainerWidget* parent) bbSetOutputWidget( w ); -} +} //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~ b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~ index a043716..e0d5947 100644 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~ +++ b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~ @@ -28,10 +28,10 @@ void LayoutTab::CreateWidget(Wt::WContainerWidget* parent) Wt::WContainerWidget *w = new Wt::WContainerWidget(parent); - Wt::WTabWidget* layout = new Wt::WTabWidget(); + Wt::WTabWidget* layout = new Wt::WTabWidget(w); Wt::WContainerWidget *cw; - if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel1()));} + if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel1()));} if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel2()));} if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel3()));} if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel4()));} @@ -41,7 +41,7 @@ void LayoutTab::CreateWidget(Wt::WContainerWidget* parent) if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel8()));} if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0) {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel9()));} - w->setLayout(layout); + bbSetOutputWidget( w ); diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h index 18ae410..67c97c8 100644 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h +++ b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h @@ -72,7 +72,7 @@ BBTK_CATEGORY("__CategoryBlackBox__"); BBTK_INPUT(LayoutTab,Label6,"label 6",std::string,""); BBTK_INPUT(LayoutTab,Label7,"label 7",std::string,""); BBTK_INPUT(LayoutTab,Label8,"label 8",std::string,""); - BBTK_INPUT(LayoutTab,Label9,"label 9",std::string,""); + BBTK_INPUT(LayoutTab,Label9,"label 9",std::string,""); // BBTK_INPUT(LayoutTab,Orientation, // "Orientation (default T), 0=T=TOP , 1=R=RIGHT , 2=B=BOTTON , 3=L=LEFT " // ,std::string,""); diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h~ b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h~ index 5018bd9..18ae410 100644 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h~ +++ b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h~ @@ -20,15 +20,15 @@ class bbwt_EXPORT LayoutTab // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== - BBTK_DECLARE_INPUT(Widget1,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget2,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget3,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget4,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget5,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget6,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget7,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget8,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget9,Wt:WContainerWidget*); + BBTK_DECLARE_INPUT(Widget1,Wt::WContainerWidget*); + BBTK_DECLARE_INPUT(Widget2,Wt::WContainerWidget*); + BBTK_DECLARE_INPUT(Widget3,Wt::WContainerWidget*); + BBTK_DECLARE_INPUT(Widget4,Wt::WContainerWidget*); + BBTK_DECLARE_INPUT(Widget5,Wt::WContainerWidget*); + BBTK_DECLARE_INPUT(Widget6,Wt::WContainerWidget*); + BBTK_DECLARE_INPUT(Widget7,Wt::WContainerWidget*); + BBTK_DECLARE_INPUT(Widget8,Wt::WContainerWidget*); + BBTK_DECLARE_INPUT(Widget9,Wt::WContainerWidget*); BBTK_DECLARE_INPUT(Label1,std::string); BBTK_DECLARE_INPUT(Label2,std::string); BBTK_DECLARE_INPUT(Label3,std::string); @@ -55,15 +55,15 @@ BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - LayoutTab for wt web apps."); BBTK_CATEGORY("__CategoryBlackBox__"); BBTK_DESCRIPTION("LayoutTab widget The label of each 'note book' will be the name of the object it contains"); - BBTK_INPUT(LayoutTab,Widget1,"widget 1",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget2,"widget 2",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget3,"widget 3",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget4,"widget 4",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget5,"widget 5",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget6,"widget 6",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget7,"widget 7",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget8,"widget 8",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget9,"widget 9",Wt:WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget1,"widget 1",Wt::WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget2,"widget 2",Wt::WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget3,"widget 3",Wt::WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget4,"widget 4",Wt::WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget5,"widget 5",Wt::WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget6,"widget 6",Wt::WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget7,"widget 7",Wt::WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget8,"widget 8",Wt::WContainerWidget*,""); + BBTK_INPUT(LayoutTab,Widget9,"widget 9",Wt::WContainerWidget*,""); BBTK_INPUT(LayoutTab,Label1,"label 1",std::string,""); BBTK_INPUT(LayoutTab,Label2,"label 2",std::string,""); BBTK_INPUT(LayoutTab,Label3,"label 3",std::string,""); -- 2.47.1