X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=wt%2Fbbtk_wt_PKG%2Fsrc%2FbbwtLayoutSplit.cxx~;h=e4cc8655aa77a1d3316b47a2fccc16134c0a849c;hb=9d4bfc78701cb1f302e09b0cd9595e006cd4b5fb;hp=3ad3832a663a6fa53b7bb896b852d0f57f83aac9;hpb=26116b2d4181a4ed3fffa07fbb75ef527d32d740;p=creaWT.git diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ b/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ index 3ad3832..e4cc865 100644 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ +++ b/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ @@ -23,11 +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::Ext::Splitter *w = new Wt::Ext::Splitter(parent); - + Wt::WContainerWidget* w = new Wt::WContainerWidget(parent); + Wt::WBoxLayout *l; + 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); @@ -35,18 +36,34 @@ void LayoutSplit::CreateWidget(Wt::WContainerWidget* parent) if (w1==NULL) { w1=new Wt::WContainerWidget(); } if (w2==NULL) { w2=new Wt::WContainerWidget(); } - int orientation=0; - if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { orientation=0; } - if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { orientation=1; } - w->addWidget(w1); - w->addWidget(w2); + l->addWidget(w1); + l->addWidget(w2); + + w->setLayout(l); + + 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(); } - if(orientation == 0){ w->setOrientation(Wt::Horizaontal);} - else{ w->setOrientation(Wt::Vertical);} - + l->addWidget(w1); + l->addWidget(w2); + //w->setLayout(l); bbSetOutputWidget( w );