]> Creatis software - creaWT.git/commitdiff
#3029 creaWT Feature New Normal - Documentation (config)
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 19 Oct 2016 12:08:44 +0000 (14:08 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 19 Oct 2016 12:08:44 +0000 (14:08 +0200)
wt/CMakeLists.txt
wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbg
wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbs
wt/bbtk_wt_PKG/src/bbwtComboBox.cxx
wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~
wt/bbtk_wt_PKG/src/bbwtComboBox.h~
wt/data/infoConf_server_fcgi/Readme.txt
wt/install/CMakeLists.txt

index 31beed02c7301a4d6220a92d1438ee3aa50a5933..15d5330cd79056c9e50b9ce8082a0e9f04e0154f 100644 (file)
@@ -152,7 +152,7 @@ ENDIF(WIN32)
 #================================== 
 
 #==================================
-
+  SET(USE_WT     ON)
   SET(LIBNAME $(wt))
   
   INCLUDE_DIRECTORIES(
index 8c74e2f78b7e136680cd54f06aeb3959d7203393..2e806b01f4100b5ba67ec386df1e192d21e136da 100644 (file)
@@ -92,7 +92,7 @@ BOX
 wt:Slider:Box16
 ISEXEC:FALSE
 -163.108601:-79.545339:-900.000000
--114.788601:-89.545339:-900.000000
+-130.333601:-89.545339:-900.000000
 PORT
 In:"1500"
 PORT
@@ -134,7 +134,7 @@ BOX
 wt:Slider:Box31
 ISEXEC:FALSE
 -78.667210:-47.626578:-900.000000
--30.347210:-57.626578:-900.000000
+-45.892210:-57.626578:-900.000000
 PORT
 In:"1"
 PORT
@@ -179,10 +179,10 @@ FIN_BOX
 BOX
 wt:OutputText:Box25
 ISEXEC:FALSE
--194.819427:-148.967664:-900.000000
--149.244427:-158.967664:-900.000000
+-200.993777:-157.082523:-900.000000
+-155.418777:-167.082523:-900.000000
 PORT
-In:"ALT-left to refresh screen"
+In:"ZOOM  to refresh screen"
 FIN_BOX
 CONNECTIONS:22
 CONNECTION
index 86747cc93d6b5cbd7f98f6d8a68e2d204f8e650e..0afc311c31a8c91f4e5c27dd55953893c7f6689b 100644 (file)
@@ -84,7 +84,7 @@ new wt:LayoutSplit Box40
   set Box40.Orientation "h"
 
 new wt:OutputText Box25
-  set Box25.In "ALT-left to refresh screen"
+  set Box25.In "ZOOM  to refresh screen"
 
 
 connect Box00.Out Box02.In
index 1f45ad81ab60843b52bb67743d7124d92f564ce0..2a4bf63943863c8f31a9bf6615e63d55cbf77bd1 100644 (file)
@@ -12,17 +12,17 @@ namespace bbwt
       ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent,
                       int iSelection,
                       Wt::WString title,
-                      std::vector<std::string> lstIn,
                       int typeForm);
       ~ComboBoxWidget();
       void OnComboBox();
+         void AddItems( std::vector<std::string> lstIn );      
 
     private:
-      int mTypeForm;
-      ComboBox *mBox;
-      Wt::WComboBox *wtCmbBox;  
+      int                              mTypeForm;
+      ComboBox                         *mBox;
+      Wt::WComboBox    *wtCmbBox;  
       Wt::WSelectionBox *wtSlctBox;
-      Wt::WComboBox *selection;
+      Wt::WComboBox    *selection;
       //TODO choice
 
   };
@@ -35,7 +35,6 @@ namespace bbwt
   ComboBoxWidget::ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent,
                       int iSelection,
                       Wt::WString title,
-                      std::vector<std::string> lstIn,
                       int typeForm)
                  :
                       Wt::WContainerWidget(parent),
@@ -48,42 +47,31 @@ namespace bbwt
     int i;
     if(title!="")
     {
-      layout->addWidget(new Wt::WText(title),Wt::WBorderLayout::North);
-    
+      layout->addWidget(new Wt::WText(title),Wt::WBorderLayout::North);    
     }
     
-   
-    if(mTypeForm == 1)
+    if(mTypeForm == 0)
     {
-      wtCmbBox = new Wt::WComboBox();
+      wtCmbBox         = new Wt::WComboBox();
       selection = wtCmbBox;
-    }
-    else
-    {
+    } else {
       wtSlctBox = new Wt::WSelectionBox();
      // wtSlctBox->setSelectionMode(Wt::ExtendedSelection);
       selection = wtSlctBox;
     }
-    for (i=0;i<lstIn.size(); i++)
-    {
-      selection->addItem(bbtk::std2wt(lstIn[i]));
-    }
 
     selection->activated().connect(this,&ComboBoxWidget::OnComboBox);
 
     layout->addWidget(selection,Wt::WBorderLayout::Center);
     panel->setLayout(layout);
-      
-    
   }
 
-  //-------------------------------------------------------------------------
-  
+//-------------------------------------------------------------------------  
   ComboBoxWidget::~ComboBoxWidget()
   {
   }
 
-    //--------------------------------------------------------------------------
+//--------------------------------------------------------------------------
   void ComboBoxWidget::OnComboBox()
   {
     mBox->bbSetInputSelection( selection->currentIndex() );
@@ -93,6 +81,17 @@ namespace bbwt
     mBox->bbSignalOutputModification("OutString");
   }
 
+//--------------------------------------------------------------------------
+  void ComboBoxWidget::AddItems( std::vector<std::string> lstIn )
+  {
+       int i;
+    for (i=0;i<lstIn.size(); i++)
+    {
+      selection->addItem(bbtk::std2wt(lstIn[i]));
+    }  // for i
+  }
+
+
   
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,ComboBox)
 BBTK_BLACK_BOX_IMPLEMENTATION(ComboBox,bbtk::WtBlackBox);
@@ -102,7 +101,8 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ComboBox,bbtk::WtBlackBox);
 void ComboBox::Process()
 {
 
-
+       ComboBoxWidget *widget = (ComboBoxWidget *)bbGetOutputWidget();
+       widget->AddItems( bbGetInputIn() );
   
 }
 //===== 
@@ -113,10 +113,10 @@ void ComboBox::CreateWidget(Wt::WContainerWidget* parent)
 
        ComboBoxWidget *w = new ComboBoxWidget(
                                this,
-                                                                       parent,
+                                                       parent,
                                bbGetInputSelection() ,
                                bbGetInputTitle(),
-                               bbGetInputIn(),
+//                             bbGetInputIn(),
                                bbGetInputForm() );
 
    bbSetOutputOut( bbGetInputSelection() );
index 1f45ad81ab60843b52bb67743d7124d92f564ce0..2a4bf63943863c8f31a9bf6615e63d55cbf77bd1 100644 (file)
@@ -12,17 +12,17 @@ namespace bbwt
       ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent,
                       int iSelection,
                       Wt::WString title,
-                      std::vector<std::string> lstIn,
                       int typeForm);
       ~ComboBoxWidget();
       void OnComboBox();
+         void AddItems( std::vector<std::string> lstIn );      
 
     private:
-      int mTypeForm;
-      ComboBox *mBox;
-      Wt::WComboBox *wtCmbBox;  
+      int                              mTypeForm;
+      ComboBox                         *mBox;
+      Wt::WComboBox    *wtCmbBox;  
       Wt::WSelectionBox *wtSlctBox;
-      Wt::WComboBox *selection;
+      Wt::WComboBox    *selection;
       //TODO choice
 
   };
@@ -35,7 +35,6 @@ namespace bbwt
   ComboBoxWidget::ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent,
                       int iSelection,
                       Wt::WString title,
-                      std::vector<std::string> lstIn,
                       int typeForm)
                  :
                       Wt::WContainerWidget(parent),
@@ -48,42 +47,31 @@ namespace bbwt
     int i;
     if(title!="")
     {
-      layout->addWidget(new Wt::WText(title),Wt::WBorderLayout::North);
-    
+      layout->addWidget(new Wt::WText(title),Wt::WBorderLayout::North);    
     }
     
-   
-    if(mTypeForm == 1)
+    if(mTypeForm == 0)
     {
-      wtCmbBox = new Wt::WComboBox();
+      wtCmbBox         = new Wt::WComboBox();
       selection = wtCmbBox;
-    }
-    else
-    {
+    } else {
       wtSlctBox = new Wt::WSelectionBox();
      // wtSlctBox->setSelectionMode(Wt::ExtendedSelection);
       selection = wtSlctBox;
     }
-    for (i=0;i<lstIn.size(); i++)
-    {
-      selection->addItem(bbtk::std2wt(lstIn[i]));
-    }
 
     selection->activated().connect(this,&ComboBoxWidget::OnComboBox);
 
     layout->addWidget(selection,Wt::WBorderLayout::Center);
     panel->setLayout(layout);
-      
-    
   }
 
-  //-------------------------------------------------------------------------
-  
+//-------------------------------------------------------------------------  
   ComboBoxWidget::~ComboBoxWidget()
   {
   }
 
-    //--------------------------------------------------------------------------
+//--------------------------------------------------------------------------
   void ComboBoxWidget::OnComboBox()
   {
     mBox->bbSetInputSelection( selection->currentIndex() );
@@ -93,6 +81,17 @@ namespace bbwt
     mBox->bbSignalOutputModification("OutString");
   }
 
+//--------------------------------------------------------------------------
+  void ComboBoxWidget::AddItems( std::vector<std::string> lstIn )
+  {
+       int i;
+    for (i=0;i<lstIn.size(); i++)
+    {
+      selection->addItem(bbtk::std2wt(lstIn[i]));
+    }  // for i
+  }
+
+
   
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,ComboBox)
 BBTK_BLACK_BOX_IMPLEMENTATION(ComboBox,bbtk::WtBlackBox);
@@ -102,7 +101,8 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ComboBox,bbtk::WtBlackBox);
 void ComboBox::Process()
 {
 
-
+       ComboBoxWidget *widget = (ComboBoxWidget *)bbGetOutputWidget();
+       widget->AddItems( bbGetInputIn() );
   
 }
 //===== 
@@ -113,10 +113,10 @@ void ComboBox::CreateWidget(Wt::WContainerWidget* parent)
 
        ComboBoxWidget *w = new ComboBoxWidget(
                                this,
-                                                                       parent,
+                                                       parent,
                                bbGetInputSelection() ,
                                bbGetInputTitle(),
-                               bbGetInputIn(),
+//                             bbGetInputIn(),
                                bbGetInputForm() );
 
    bbSetOutputOut( bbGetInputSelection() );
index 0f065cf3af09c3fb07c1f43942a5de187366f7a6..89bb1adbb5bcbe627ff3cbd3301e6daab0c09e5c 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef __bbwtComboBox_h_INCLUDED__
 #define __bbwtComboBox_h_INCLUDED__
 #include "bbwt_EXPORT.h"
-#include "bbtkWxBlackBox.h"
+#include "bbtkWtBlackBox.h"
 
 namespace bbwt
 {
index ea5925f7b1f7fefe8cffba4f1dc0146131f01622..d279c770906ceccbe3906802abee4b0780d6bc3e 100644 (file)
@@ -1,14 +1,21 @@
 
 As root or with sudo command:
 
+-1)
+Compile bbtk with the cmake option USE_WT
+
 0)
 yum install fcgi-devel
 yum install mod_fcgid
 
 1) ld configuration
 cp bbtk.conf  /etc/ld.so.conf.d/.
+1.1) check the path of the file  /etc/ld.so.conf.d/bbtk.conf
+1.2) execute :
 ldconfig
 
+1.2) Check the paths of the file
+
 2) Create virtual site apache
 mkdir /var/www/testwtdbg
 mkdir /var/www/testwtdbg/docroot
@@ -34,12 +41,24 @@ mkdir <rootBbtkWt>/<appliBtkWt>
 chown apache:apache <rootBbtkWt>/<appliBtkWt>
 mkdir <rootBbtkWt>/<appliBtkWt>/imagesTMP
 cp bbiWeb.php <rootBbtkWt>/<appliBtkWt>/.
-ln -s <INSTALATION_WT>/share/Wt/resources <rootBbtkWt>/<appliBbtkWt>/resources
-ln -s <INSTALATION_creaWT>/wt/data/reosurcesXTK <rootBbtkWt>/resourcesXTK
+ln -s <INSTALATION_BBTK>/share/Wt/resources <rootBbtkWt>/<appliBbtkWt>/resources
+ln -s <INSTALATION_creaWTInstall>/share/data/reosurcesXTK <rootBbtkWt>/resourcesXTK
 ln -s <INSTALATION_BBTK>/bin/bbiWeb.wt <rootBbtkWt>/bbiWeb.wt
 
+7) To cofigure new Package in 
+<rootBbtkWt>/.bbtk/bbtk_config.xml
+with 
+       <bbs_path>
+               <creaWTInstall>/share/bbtk/bbs
+       </bbs_path>
+       <package_path>
+               <creaWTbin>   OR    <creaWTInstall>/lib64/creatools
+       </package_path>
+
+
+
 
-7) Call application from browser
+8) Call application from browser
 http://localhost/<appliBbtkWt>/bbiWeb.php
 
 
index fedc221838aacd3fa5fe40e0334677f1e3cfc70b..0bbd9f637bf95b65023c3fc8e2321e17c0bf6b4d 100644 (file)
@@ -57,6 +57,16 @@ ELSE(WIN32)
 ENDIF(WIN32)
   
 
+SET(DATA_DIR ${PROJECT_SOURCE_DIR}/data/resourcesXTK )
+FILE(GLOB DATA_FILES "${DATA_DIR}/*")
+FOREACH( iLST  ${DATA_FILES} )
+   INSTALL( 
+       FILES ${iLST}
+       DESTINATION share/data/resourcesXTK
+   )
+ENDFOREACH(iLST)
+
+
 
 IF(WIN32 AND NOT UNIX)
   # There is a bug in NSI that does not handle full unix paths properly. Make
@@ -76,8 +86,6 @@ IF(WIN32 AND NOT UNIX)
        SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS  "
          # NSIS code ...
        ")
-   
-
   
 ELSE(WIN32 AND NOT UNIX)
 #  SET(CPACK_STRIP_FILES "bin/bbi")