#==================================
#==================================
-
+ SET(USE_WT ON)
SET(LIBNAME $(wt))
INCLUDE_DIRECTORIES(
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
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
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
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
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
};
ComboBoxWidget::ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent,
int iSelection,
Wt::WString title,
- std::vector<std::string> lstIn,
int typeForm)
:
Wt::WContainerWidget(parent),
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() );
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);
void ComboBox::Process()
{
-
+ ComboBoxWidget *widget = (ComboBoxWidget *)bbGetOutputWidget();
+ widget->AddItems( bbGetInputIn() );
}
//=====
ComboBoxWidget *w = new ComboBoxWidget(
this,
- parent,
+ parent,
bbGetInputSelection() ,
bbGetInputTitle(),
- bbGetInputIn(),
+// bbGetInputIn(),
bbGetInputForm() );
bbSetOutputOut( bbGetInputSelection() );
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
};
ComboBoxWidget::ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent,
int iSelection,
Wt::WString title,
- std::vector<std::string> lstIn,
int typeForm)
:
Wt::WContainerWidget(parent),
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() );
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);
void ComboBox::Process()
{
-
+ ComboBoxWidget *widget = (ComboBoxWidget *)bbGetOutputWidget();
+ widget->AddItems( bbGetInputIn() );
}
//=====
ComboBoxWidget *w = new ComboBoxWidget(
this,
- parent,
+ parent,
bbGetInputSelection() ,
bbGetInputTitle(),
- bbGetInputIn(),
+// bbGetInputIn(),
bbGetInputForm() );
bbSetOutputOut( bbGetInputSelection() );
#ifndef __bbwtComboBox_h_INCLUDED__
#define __bbwtComboBox_h_INCLUDED__
#include "bbwt_EXPORT.h"
-#include "bbtkWxBlackBox.h"
+#include "bbtkWtBlackBox.h"
namespace bbwt
{
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
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
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
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
# NSIS code ...
")
-
-
ELSE(WIN32 AND NOT UNIX)
# SET(CPACK_STRIP_FILES "bin/bbi")