From ad7ed17132393bcee7c68d084707e6df54fa2ced Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 19 Oct 2016 14:08:44 +0200 Subject: [PATCH] #3029 creaWT Feature New Normal - Documentation (config) --- wt/CMakeLists.txt | 2 +- .../bbs/appli/demoPresentacion1Boton03.bbg | 10 ++-- .../bbs/appli/demoPresentacion1Boton03.bbs | 2 +- wt/bbtk_wt_PKG/src/bbwtComboBox.cxx | 52 +++++++++---------- wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~ | 52 +++++++++---------- wt/bbtk_wt_PKG/src/bbwtComboBox.h~ | 2 +- wt/data/infoConf_server_fcgi/Readme.txt | 25 +++++++-- wt/install/CMakeLists.txt | 12 ++++- 8 files changed, 92 insertions(+), 65 deletions(-) diff --git a/wt/CMakeLists.txt b/wt/CMakeLists.txt index 31beed0..15d5330 100644 --- a/wt/CMakeLists.txt +++ b/wt/CMakeLists.txt @@ -152,7 +152,7 @@ ENDIF(WIN32) #================================== #================================== - + SET(USE_WT ON) SET(LIBNAME $(wt)) INCLUDE_DIRECTORIES( diff --git a/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbg b/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbg index 8c74e2f..2e806b0 100644 --- a/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbg +++ b/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbg @@ -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 diff --git a/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbs b/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbs index 86747cc..0afc311 100644 --- a/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbs +++ b/wt/bbtk_wt_PKG/bbs/appli/demoPresentacion1Boton03.bbs @@ -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 diff --git a/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx b/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx index 1f45ad8..2a4bf63 100644 --- a/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx +++ b/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx @@ -12,17 +12,17 @@ namespace bbwt ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent, int iSelection, Wt::WString title, - std::vector lstIn, int typeForm); ~ComboBoxWidget(); void OnComboBox(); + void AddItems( std::vector 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 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;iaddItem(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 lstIn ) + { + int i; + for (i=0;iaddItem(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() ); diff --git a/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~ b/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~ index 1f45ad8..2a4bf63 100644 --- a/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~ +++ b/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~ @@ -12,17 +12,17 @@ namespace bbwt ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent, int iSelection, Wt::WString title, - std::vector lstIn, int typeForm); ~ComboBoxWidget(); void OnComboBox(); + void AddItems( std::vector 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 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;iaddItem(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 lstIn ) + { + int i; + for (i=0;iaddItem(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() ); diff --git a/wt/bbtk_wt_PKG/src/bbwtComboBox.h~ b/wt/bbtk_wt_PKG/src/bbwtComboBox.h~ index 0f065cf..89bb1ad 100644 --- a/wt/bbtk_wt_PKG/src/bbwtComboBox.h~ +++ b/wt/bbtk_wt_PKG/src/bbwtComboBox.h~ @@ -5,7 +5,7 @@ #ifndef __bbwtComboBox_h_INCLUDED__ #define __bbwtComboBox_h_INCLUDED__ #include "bbwt_EXPORT.h" -#include "bbtkWxBlackBox.h" +#include "bbtkWtBlackBox.h" namespace bbwt { diff --git a/wt/data/infoConf_server_fcgi/Readme.txt b/wt/data/infoConf_server_fcgi/Readme.txt index ea5925f..d279c77 100644 --- a/wt/data/infoConf_server_fcgi/Readme.txt +++ b/wt/data/infoConf_server_fcgi/Readme.txt @@ -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 / chown apache:apache / mkdir //imagesTMP cp bbiWeb.php //. -ln -s /share/Wt/resources //resources -ln -s /wt/data/reosurcesXTK /resourcesXTK +ln -s /share/Wt/resources //resources +ln -s /share/data/reosurcesXTK /resourcesXTK ln -s /bin/bbiWeb.wt /bbiWeb.wt +7) To cofigure new Package in +/.bbtk/bbtk_config.xml +with + + /share/bbtk/bbs + + + OR /lib64/creatools + + + + -7) Call application from browser +8) Call application from browser http://localhost//bbiWeb.php diff --git a/wt/install/CMakeLists.txt b/wt/install/CMakeLists.txt index fedc221..0bbd9f6 100644 --- a/wt/install/CMakeLists.txt +++ b/wt/install/CMakeLists.txt @@ -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") -- 2.47.1