]> Creatis software - creaWT.git/blobdiff - wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~
#3037 creaWT Bug New Normal - AddMesh update
[creaWT.git] / wt / bbtk_wt_PKG / src / bbwtLayoutSplit.cxx~
index 3ad3832a663a6fa53b7bb896b852d0f57f83aac9..4769aaaf2b01e0358f4c6191a886a3119adf0a2b 100644 (file)
@@ -25,9 +25,12 @@ void LayoutSplit::Process()
 //===== 
 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,23 +38,42 @@ 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);
+  l->setResizable(0,true,Wt::WLength::Auto);
+       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();
+//     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(); }
 
-       if(orientation == 0){   w->setOrientation(Wt::Horizaontal);}
-       else{   w->setOrientation(Wt::Vertical);}
-    
+       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(200,200) ;
+    w2->resize(200,200) ;
 
+       l->addWidget(w1);
+       l->addWidget(w2);
+  w->addWidget(l);
+       //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)
 //=====