]> Creatis software - creaWT.git/blobdiff - wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~
2498 BBTK FeatureNewNormal wt-version PackageWt
[creaWT.git] / wt / bbtk_wt_PKG / src / bbwtLayoutTab.cxx~
index 41d5b04a0f02a74fc7ac309b22a61335804a4852..a0437165ed6193666ccf3072af85e6b5ea73146b 100644 (file)
@@ -3,36 +3,47 @@
 //===== 
 #include "bbwtLayoutTab.h"
 #include "bbwtPackage.h"
+#include "bbtkUtilities.h"
+
 namespace bbwt
 {
 
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,LayoutTab)
-BBTK_BLACK_BOX_IMPLEMENTATION(LayoutTab,bbtk::WxBlackBox);
+BBTK_BLACK_BOX_IMPLEMENTATION(LayoutTab,bbtk::WtBlackBox);
 //===== 
 // 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 LayoutTab::Process()
 {
-
-   std::string msg;
-    if (bbGetInputTitle()!="")
-      {
-       msg = bbGetInputTitle()+": " + bbGetInputIn();
-      }
-    else
-      {
-       msg = bbGetInputIn();
-      }
-   ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) ); 
+       
   
 }
 //===== 
 // 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 LayoutTab::CreateWidget(wxWindow* parent)
+void LayoutTab::CreateWidget(Wt::WContainerWidget* parent)
 {
 
-   bbSetOutputWidget( new wxStaticText ( parent , -1 , _T("") ) );
+       
+       
+       
+       Wt::WContainerWidget *w = new Wt::WContainerWidget(parent);
+       Wt::WTabWidget* layout = new Wt::WTabWidget();
+       Wt::WContainerWidget *cw;
+
+  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()));}
+       if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0)  {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel5()));}
+       if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0)  {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel6()));}
+       if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0)  {layout->addTab(cw,bbtk::std2wt(bbGetInputLabel7()));}
+       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 );    
+
   
 }
 //===== 
@@ -40,7 +51,25 @@ void LayoutTab::CreateWidget(wxWindow* parent)
 //===== 
 void LayoutTab::bbUserSetDefaultValues()
 {
-
+       
+               bbSetInputWidget1(NULL);
+               bbSetInputWidget2(NULL);
+               bbSetInputWidget3(NULL);
+               bbSetInputWidget4(NULL);
+               bbSetInputWidget5(NULL);
+               bbSetInputWidget6(NULL);
+               bbSetInputWidget7(NULL);
+               bbSetInputWidget8(NULL);
+               bbSetInputWidget9(NULL);
+               bbSetInputLabel1("Tab 1");
+               bbSetInputLabel2("Tab 2");
+               bbSetInputLabel3("Tab 3");
+               bbSetInputLabel4("Tab 4");
+               bbSetInputLabel5("Tab 5");
+               bbSetInputLabel6("Tab 6");
+               bbSetInputLabel7("Tab 7");
+               bbSetInputLabel8("Tab 8");
+               bbSetInputLabel9("Tab 9");
 }
 //===== 
 // 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)