From: Eduardo DAVILA Date: Thu, 17 Nov 2016 13:38:27 +0000 (+0100) Subject: clean files tmp X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=creaWT.git;a=commitdiff_plain;h=5bdd6bc07e285c2dc485dd053aaee47356d8689b clean files tmp --- diff --git a/wt/bbtk_wt_PKG/src/bbwtCheckBox.cxx~ b/wt/bbtk_wt_PKG/src/bbwtCheckBox.cxx~ deleted file mode 100644 index 217132d..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtCheckBox.cxx~ +++ /dev/null @@ -1,143 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtCheckBox.h" -#include "bbwtPackage.h" -namespace bbwt -{ - - class CheckBoxWidget : public Wt::WContainerWidget - { - public: - /// Ctor with the two first params the parent window and the creator box - /// which must be passed to the WxBlackBoxWidget constructor. - /// The other params initialize the widget - CheckBoxWidget(CheckBox* box, Wt::WContainerWidget *parent, - Wt::WString title, - bool value, int reactiveOnKeyStroke - ); - ~CheckBoxWidget(); - - bool GetValue(){return mwtCheckBox->isChecked();} - void SetValue(bool val); - void OnCheckBoxClick(); - - private: - CheckBox* mBox; - Wt::WCheckBox *mwtCheckBox; - int _reactiveOnKeyStroke; - bool val; - - }; - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - - CheckBoxWidget::CheckBoxWidget(CheckBox* box, Wt::WContainerWidget *parent, - Wt::WString title, - bool value, int reactiveOnKeyStroke - ) - : - Wt::WContainerWidget(parent), - mBox(box), - _reactiveOnKeyStroke(reactiveOnKeyStroke), - val(value) - { - - - Wt::WContainerWidget * panel = this; - panel->setPadding(2); - panel->setContentAlignment(Wt::AlignCenter|Wt::AlignMiddle); - //The definition of wt checkbox determines that there is a possible tristate, - mwtCheckBox = new Wt::WCheckBox(title,panel); - mwtCheckBox->clicked().connect(this,&CheckBoxWidget::OnCheckBoxClick); - - - } - //------------------------------------------------------------------------- - - - //------------------------------------------------------------------------- - void CheckBoxWidget::OnCheckBoxClick() - { - // When user clicks the box - // we update the output of the box - mBox->bbSetOutputOut( mwtCheckBox->isChecked() ); - mBox->bbSetInputIn( mwtCheckBox->isChecked() ); - // and signal that the output has changed - //if(_reactiveOnKeyStroke==1){ - mBox->bbSignalOutputModification(std::string("Out")); - //} - } - - //------------------------------------------------------------------------- - - - //------------------------------------------------------------------------- - CheckBoxWidget::~CheckBoxWidget() - { - } - //------------------------------------------------------------------------- - - - //------------------------------------------------------------------------- - void CheckBoxWidget::SetValue(bool value) - { - this->val=value; - mwtCheckBox->setChecked(value); - } - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,CheckBox) -BBTK_BLACK_BOX_IMPLEMENTATION(CheckBox,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 CheckBox::Process() -{ - - bbSetOutputOut( bbGetInputIn() ); - -} -//===== -// 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 CheckBox::CreateWidget(Wt::WContainerWidget* parent) -{ - - CheckBoxWidget *w = new CheckBoxWidget(this, - parent, - bbtk::std2wt( bbGetInputTitle() ), - bbGetInputIn(), - bbGetInputReactiveOnKeystroke() - ); - 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) -//===== -void CheckBox::bbUserSetDefaultValues() -{ - - bbSetInputIn(false); - bbSetInputReactiveOnKeystroke(1); - bbSetOutputOut(false); -} -//===== -// 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 CheckBox::bbUserInitializeProcessing() -{ - -} -//===== -// 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 CheckBox::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtCheckBox.h~ b/wt/bbtk_wt_PKG/src/bbwtCheckBox.h~ deleted file mode 100644 index 36f3ad0..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtCheckBox.h~ +++ /dev/null @@ -1,50 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtwtCheckBox_h_INCLUDED__ -#define __bbwtwtCheckBox_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT CheckBox - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(CheckBox,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) -//===== - BBTK_DECLARE_INPUT(In,bool); - BBTK_DECLARE_INPUT(Title,std::string); - BBTK_DECLARE_OUTPUT(Out,bool); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(CheckBox,bbtk::WtBlackBox); -BBTK_NAME("CheckBox"); -BBTK_AUTHOR("JohannGONZALEZ"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - Checkbox web widget implemented in wt"); -BBTK_CATEGORY("__CategoryBlackBox__"); -BBTK_INPUT(CheckBox, Title,"Title shown above the CheckBox (default '') ", std::string,""); -BBTK_INPUT(CheckBox,In,"Initial Value",bool,""); -BBTK_OUTPUT(CheckBox,Out,"Current Value",bool,""); -BBTK_END_DESCRIBE_BLACK_BOX(CheckBox); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtwtCheckBox_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~ b/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~ deleted file mode 100644 index 2a4bf63..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtComboBox.cxx~ +++ /dev/null @@ -1,153 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtComboBox.h" -#include "bbwtPackage.h" -namespace bbwt -{ - - class ComboBoxWidget : public Wt::WContainerWidget - { - public: - ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent, - int iSelection, - Wt::WString title, - int typeForm); - ~ComboBoxWidget(); - void OnComboBox(); - void AddItems( std::vector lstIn ); - - private: - int mTypeForm; - ComboBox *mBox; - Wt::WComboBox *wtCmbBox; - Wt::WSelectionBox *wtSlctBox; - Wt::WComboBox *selection; - //TODO choice - - }; - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - - - ComboBoxWidget::ComboBoxWidget(ComboBox* box, Wt::WContainerWidget *parent, - int iSelection, - Wt::WString title, - int typeForm) - : - Wt::WContainerWidget(parent), - mBox(box), - mTypeForm(typeForm) - { - - Wt::WContainerWidget *panel = this; - Wt::WBorderLayout *layout = new Wt::WBorderLayout(); - int i; - if(title!="") - { - layout->addWidget(new Wt::WText(title),Wt::WBorderLayout::North); - } - - if(mTypeForm == 0) - { - wtCmbBox = new Wt::WComboBox(); - selection = wtCmbBox; - } else { - wtSlctBox = new Wt::WSelectionBox(); - // wtSlctBox->setSelectionMode(Wt::ExtendedSelection); - selection = wtSlctBox; - } - - 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->bbSetOutputOut( selection->currentIndex() ); - mBox->bbSetOutputOutString( bbtk::wt2std( selection->valueText() ) ); - mBox->bbSignalOutputModification("Out"); - 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); -//===== -// 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 ComboBox::Process() -{ - - ComboBoxWidget *widget = (ComboBoxWidget *)bbGetOutputWidget(); - widget->AddItems( bbGetInputIn() ); - -} -//===== -// 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 ComboBox::CreateWidget(Wt::WContainerWidget* parent) -{ - - ComboBoxWidget *w = new ComboBoxWidget( - this, - parent, - bbGetInputSelection() , - bbGetInputTitle(), -// bbGetInputIn(), - bbGetInputForm() ); - - bbSetOutputOut( bbGetInputSelection() ); - bbSetOutputOutString( bbGetInputIn()[ bbGetInputSelection() ] ); - 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) -//===== -void ComboBox::bbUserSetDefaultValues() -{ - bbSetInputSelection(0); - bbSetInputTitle(""); - bbSetInputForm(0); -} -//===== -// 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 ComboBox::bbUserInitializeProcessing() -{ - -} -//===== -// 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 ComboBox::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtComboBox.h~ b/wt/bbtk_wt_PKG/src/bbwtComboBox.h~ deleted file mode 100644 index 89bb1ad..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtComboBox.h~ +++ /dev/null @@ -1,58 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtComboBox_h_INCLUDED__ -#define __bbwtComboBox_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT ComboBox - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(ComboBox,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) -//===== - BBTK_DECLARE_INPUT(Title,std::string); - BBTK_DECLARE_INPUT(Selection, int ); - BBTK_DECLARE_INPUT(In,std::vector< std::string >); - BBTK_DECLARE_INPUT(Form,int); - BBTK_DECLARE_OUTPUT(Out, int ); - BBTK_DECLARE_OUTPUT(OutString, std::string ); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(ComboBox,bbtk::WtBlackBox); -BBTK_NAME("ComboBox"); -BBTK_AUTHOR("JohannGonzalez"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - ComboBox widget for wt webapps."); -BBTK_CATEGORY("__CategoryBlackBox__"); - BBTK_INPUT(ComboBox,Title,"Title prepended to the text",std::string,""); - BBTK_INPUT(ComboBox,Selection,"i element to be selected (default 0)",int,""); - BBTK_INPUT(ComboBox,In,"Vector of strings",std::vector< std::string >,""); - BBTK_INPUT(ComboBox,Form,"0 Combobox, 1 List (default 0)",int,""); - - BBTK_OUTPUT(ComboBox,Out,"i Item selected",int,""); - BBTK_OUTPUT(ComboBox,OutString,"string Item selected",std::string,""); - -BBTK_END_DESCRIBE_BLACK_BOX(ComboBox); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtComboBox_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtCommandButton.cxx~ b/wt/bbtk_wt_PKG/src/bbwtCommandButton.cxx~ deleted file mode 100644 index 1b526af..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtCommandButton.cxx~ +++ /dev/null @@ -1,183 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtCommandButton.h" -#include "bbwtPackage.h" -#include "bbtkInterpreter.h" -#include "bbtkExecuter.h" -namespace bbwt -{ - - //--------------------------------------------------------------------------------- - class CommandButtonWidget : public Wt::WContainerWidget - { - public: - CommandButtonWidget(CommandButton* box, - Wt::WContainerWidget *parent, - Wt::WString label); - ~CommandButtonWidget(); - void OnCommandButton(); - void SetLabel(Wt::WString nLabel); - - - - private: - CommandButton* mBox; - Wt::WPushButton *mwtPushButton; - }; - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - CommandButtonWidget::CommandButtonWidget(CommandButton* box, - Wt::WContainerWidget *parent, - Wt::WString label) - : - Wt::WContainerWidget(parent), - mBox(box) - { - Wt::WContainerWidget *container = this; - mwtPushButton = new Wt::WPushButton(label,parent); - mwtPushButton->setMinimumSize(170,30); - mwtPushButton->clicked().connect(this, &CommandButtonWidget::OnCommandButton); - container->addWidget(mwtPushButton); - } - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - CommandButtonWidget::~CommandButtonWidget() - { - } - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - void CommandButtonWidget::OnCommandButton() - { - bbtk::Interpreter::Pointer I; - bbtk::VirtualExec::Pointer E; - if (mBox->bbGetParent() != 0) - { - bbtk::Factory::Pointer f = boost::dynamic_pointer_cast(mBox->bbGetParent()->bbGetDescriptor())->GetFactory(); - if ((f != 0)&& - (f->GetExecuter())) - { - E = f->GetExecuter(); - I = E->GetInterpreter(); - } - } - if (I==0) - { - // bbtkError("CommandButton::DoProcess() : could not find interpreter"); - if (E==0) - { - // If no executer : create a totally independant interpreter - I = bbtk::Interpreter::New(); - } - else - { - // If executer : create an interpreter using E - I = bbtk::Interpreter::New(E); - } - } - - std::string commandstr(mBox->bbGetInputIn()); - - // bbtk::Interpreter::mGlobalInterpreter->InterpretLine( commandstr ); - unsigned int i; - bool ok=true; - int pos1=0,pos2; - pos2 = commandstr.find(";",pos1); - std::string ccommand; - while (ok==true) - { - if (pos2==-1) - { - ok=false; - ccommand=commandstr.substr(pos1,commandstr.length()-pos1 ); - } - else - { - ccommand=commandstr.substr(pos1,pos2-pos1); - } - for ( i=0 ; i < ccommand.length() ; i++) - { - if (ccommand[i]==39) // ' - { - ccommand[i]=34; // " - } - } - I->InterpretLine( ccommand ); - pos1=pos2+1; - pos2 = commandstr.find(";",pos2+1); - - } - mBox->UpdateLabel(); - mBox->bbSignalOutputModification(); - - } - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - void CommandButtonWidget::SetLabel(Wt::WString nLabel) - { - mwtPushButton->setText(nLabel); - } - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,CommandButton) -BBTK_BLACK_BOX_IMPLEMENTATION(CommandButton,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 CommandButton::Process() -{ - - CommandButtonWidget* w = (CommandButtonWidget*)bbGetOutputWidget(); - if (w) - { - UpdateLabel(); - } - -} -//===== -// 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 CommandButton::CreateWidget(Wt::WContainerWidget* parent) -{ - - bbSetOutputWidget( new CommandButtonWidget(this, - parent, - bbtk::std2wt(bbGetInputLabel()) - ) - ); - -} -//-------------------------------------------------------------------------------------- - void CommandButton::UpdateLabel() - { - CommandButtonWidget* wtWidget = (CommandButtonWidget*)bbGetOutputWidget(); - wtWidget->SetLabel( bbtk::std2wt( bbGetInputLabel() ) ); - } - -//===== -// 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 CommandButton::bbUserSetDefaultValues() -{ - bbSetInputIn(""); - bbSetInputLabel(""); - bbSetOutputWidget(0); - -} -//===== -// 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 CommandButton::bbUserInitializeProcessing() -{ - -} -//===== -// 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 CommandButton::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtCommandButton.h~ b/wt/bbtk_wt_PKG/src/bbwtCommandButton.h~ deleted file mode 100644 index 2db518b..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtCommandButton.h~ +++ /dev/null @@ -1,52 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtCommandButton_h_INCLUDED__ -#define __bbwtCommandButton_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT CommandButton - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(CommandButton,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) -//===== - BBTK_DECLARE_INPUT(Label,std::string); - BBTK_DECLARE_INPUT(In,std::string); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== - - private: - void UpdateLabel(); - -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(CommandButton,bbtk::WtBlackBox); -BBTK_NAME("CommandButton"); -BBTK_AUTHOR("JohannGONZALEZ"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - Command button implemented for web apps with wt library."); -BBTK_CATEGORY("__CategoryBlackBox__"); -BBTK_INPUT(CommandButton,Label,"Label prepended to the button",std::string,""); -BBTK_INPUT(CommandButton,In,"Text",std::string,""); -BBTK_END_DESCRIBE_BLACK_BOX(CommandButton); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtCommandButton_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtInputText.cxx~ b/wt/bbtk_wt_PKG/src/bbwtInputText.cxx~ deleted file mode 100644 index ac66505..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtInputText.cxx~ +++ /dev/null @@ -1,189 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtInputText.h" -#include "bbwtPackage.h" -namespace bbwt -{ - //-------------------------------------------------------------------------- - class InputTextWidget : public Wt::WContainerWidget - { - public: - InputTextWidget(InputText* box, - Wt::WContainerWidget *parent, - Wt::WString In, - Wt::WString title - ); - ~InputTextWidget(); - - std::string GetValue(); - void SetValue(std::string value); - - void OnTextEnter(); - void OnTextUpdate(const Wt::WKeyEvent e); - - void SetTitle(Wt::WString); - - private: - InputText *mBox; - Wt::WLineEdit *mwtLineEdit; - Wt::WText *mwtTitle; - }; - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - - InputTextWidget::InputTextWidget(InputText* box, - Wt::WContainerWidget *parent, - Wt::WString In, - Wt::WString title) - : - Wt::WContainerWidget(parent), - mBox(box) - { - Wt::WContainerWidget *panel = this; - Wt::WBorderLayout *layout = new Wt::WBorderLayout(); - - - mwtLineEdit = new Wt::WLineEdit(); - - mwtLineEdit->changed().connect(this,&InputTextWidget::OnTextEnter); - mwtLineEdit->keyWentUp().connect(this, &InputTextWidget::OnTextUpdate); - - - mwtTitle = new Wt::WText(title); - - layout->addWidget(mwtTitle,Wt::WBorderLayout::North); - layout->addWidget(mwtLineEdit,Wt::WBorderLayout::Center); - - panel->setLayout(layout); - - } - //------------------------------------------------------------------------- - - InputTextWidget::~InputTextWidget() - { - } - - //------------------------------------------------------------------------- - - - void InputTextWidget::SetTitle(Wt::WString s) - { - mwtTitle->setText(s); - } - - //------------------------------------------------------------------------- - std::string InputTextWidget::GetValue() - { - return bbtk::wt2std ( mwtLineEdit->text() ); - } - - void InputTextWidget::SetValue(std::string value) - { - mwtLineEdit->setText( bbtk::std2wt(value) ) ; - } - - //-------------------------------------------------------------------------- - void InputTextWidget::OnTextEnter() - { - std::cout<<"bbwtInputText.cxx -> OnTextEnter pre if"<bbGetInputReactiveOnKeystroke()==1) - { - std::cout<<"bbwtInputText.cxx -> OnTextEnter if"<bbSetOutputOut( GetValue() ); - mBox->bbSetInputIn( GetValue() ); - mBox->bbSignalOutputModification("Out"); - } - } - - //-------------------------------------------------------------------------- - void InputTextWidget::OnTextUpdate(const Wt::WKeyEvent e) - { - std::cout<<"bbwtInputText.cxx -> pre If ...OnTextUpdate VALUE : "< pre If ...OnTextUpdate presionado : "< OnTextUpdate pre if"<bbGetInputReactiveOnKeystroke()==2 && e.key() != Wt::Key_Enter)||((mBox->bbGetInputReactiveOnKeystroke()==1 && e.key() == Wt::Key_Enter) )) - { - std::cout<<"bbwtInputText.cxx -> OnTextUpdate if"< OnTextUpdate VALUE : "<bbSetOutputOut( GetValue() + bbtk::wt2std(e.text()) ); - mBox->bbSetInputIn( GetValue() ); - mBox->bbSignalOutputModification("Out"); - } - - } - - - //-------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,InputText) -BBTK_BLACK_BOX_IMPLEMENTATION(InputText,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 InputText::Process() -{ - - InputTextWidget *w=(InputTextWidget *)bbGetOutputWidget(); - if (w) - { - if (firsttime==true) - { - firsttime=false; - w->SetValue( bbGetInputIn().c_str() ); - } - w->SetTitle( bbtk::std2wt ( bbGetInputTitle() ) ); - bbSetOutputOut( w->GetValue() ); - } - else - { - bbSetOutputOut( "" ); - } -} -//===== -// 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 InputText::CreateWidget(Wt::WContainerWidget* parent) -{ - - bbSetOutputWidget - ( new InputTextWidget(this, //bbGetWxParent(), - parent, - bbtk::std2wt ( bbGetInputIn() ) , - bbtk::std2wt ( bbGetInputTitle() ) ) ); - Process(); -} -//===== -// 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 InputText::bbUserSetDefaultValues() -{ - firsttime=true; - bbSetInputTitle(""); - bbSetInputIn(""); - bbSetOutputWidget(0); - bbSetInputReactiveOnKeystroke(2); - -} -//===== -// 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 InputText::bbUserInitializeProcessing() -{ - -} -//===== -// 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 InputText::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtInputText.h~ b/wt/bbtk_wt_PKG/src/bbwtInputText.h~ deleted file mode 100644 index 3633b98..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtInputText.h~ +++ /dev/null @@ -1,56 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtInputText_h_INCLUDED__ -#define __bbwtInputText_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT InputText - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(InputText,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) -//===== - BBTK_DECLARE_INPUT(Title,std::string); - BBTK_DECLARE_INPUT(In,std::string); - BBTK_DECLARE_INPUT(ReactiveOnKeystroke,int); - BBTK_DECLARE_OUTPUT(Out,std::string); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== - private: - bool firsttime; -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(InputText,bbtk::WtBlackBox); - BBTK_NAME("InputText"); - BBTK_AUTHOR("JohannGONZALEZ"); - BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - InputText widget implemented with wt."); - BBTK_CATEGORY("__CategoryBlackBox__"); - BBTK_INPUT(InputText,Title,"Title prepended to the text",std::string,""); - - BBTK_INPUT(InputText,In,"Text",std::string,""); - BBTK_INPUT(InputText,ReactiveOnKeystroke,"0 not event generated, 1 Enter event genereated, 2 All keys, (default '2') ", int,""); - - BBTK_OUTPUT(InputText,Out,"Current text",std::string,""); -BBTK_END_DESCRIBE_BLACK_BOX(InputText); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtInputText_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutLine.cxx~ b/wt/bbtk_wt_PKG/src/bbwtLayoutLine.cxx~ deleted file mode 100644 index 04250e5..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutLine.cxx~ +++ /dev/null @@ -1,138 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#include "bbwtLayoutLine.h" -#include "bbwtPackage.h" -#include "bbtkUtilities.h" -#include -namespace bbwt -{ - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,LayoutLine) -BBTK_BLACK_BOX_IMPLEMENTATION(LayoutLine,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 LayoutLine::Process() -{ - - - -} -//===== -// 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 LayoutLine::CreateWidget(Wt::WContainerWidget* parent) -{ - - Wt::WContainerWidget *w = new Wt::WContainerWidget(parent); - int count = 0; - Wt::WLayout *layout; - Wt::WContainerWidget *cw; - if (bbtk::Utilities::loosematch(bbGetInputOrientation(), - "0|H|HORIZONTAL")==true) - { - layout = new Wt::WHBoxLayout(); - if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0) {layout->addWidget(cw);} - - } - if (bbtk::Utilities::loosematch(bbGetInputOrientation(), - "1|V|VERTICAL")==true) - { - - layout = new Wt::WVBoxLayout(); - if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0) {layout->addWidget(cw);} - } - -/* - Wt::WContainerWidget *w = new Wt::WContainerWidget(parent); - int count = 0; - Wt::WGridLayout *layout = new Wt::WGridLayout(0); - Wt::WContainerWidget *cw; - if (bbtk::Utilities::loosematch(bbGetInputOrientation(), - "0|H|HORIZONTAL")==true) - { - - if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) {layout->addWidget(cw,0,count++);} - if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0) {layout->addWidget(cw,0,count++);} - if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0) {layout->addWidget(cw,0,count++);} - if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0) {layout->addWidget(cw,0,count++);} - if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0) {layout->addWidget(cw,0,count++);} - if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0) {layout->addWidget(cw,0,count++);} - if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0) {layout->addWidget(cw,0,count++);} - if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0) {layout->addWidget(cw,0,count++);} - if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0) {layout->addWidget(cw,0,count++);} - - } - if (bbtk::Utilities::loosematch(bbGetInputOrientation(), - "1|V|VERTICAL")==true) - { - if ((cw=bbCreateWidgetOfInput("Widget1",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget2",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget3",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget4",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget5",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget6",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget7",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget8",w)) != 0) {layout->addWidget(cw);} - if ((cw=bbCreateWidgetOfInput("Widget9",w)) != 0) {layout->addWidget(cw);} - } - -*/ - w->setLayout(layout); - 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) -//===== -void LayoutLine::bbUserSetDefaultValues() -{ - bbSetInputOrientation("VERTICAL"); - bbSetInputWidget1(NULL); - bbSetInputWidget2(NULL); - bbSetInputWidget3(NULL); - bbSetInputWidget4(NULL); - bbSetInputWidget5(NULL); - bbSetInputWidget6(NULL); - bbSetInputWidget7(NULL); - bbSetInputWidget8(NULL); - bbSetInputWidget9(NULL); - -} -//===== -// 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 LayoutLine::bbUserInitializeProcessing() -{ - -} -//===== -// 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 LayoutLine::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutLine.h~ b/wt/bbtk_wt_PKG/src/bbwtLayoutLine.h~ deleted file mode 100644 index bf4ca02..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutLine.h~ +++ /dev/null @@ -1,65 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtLayoutLine_h_INCLUDED__ -#define __bbwtLayoutLine_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT LayoutLine - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(LayoutLine,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) -//===== - BBTK_BLACK_BOX_INTERFACE(LayoutLine,bbtk::WtBlackBox); - BBTK_DECLARE_INPUT(Widget1,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget2,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget3,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget4,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget5,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget6,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget7,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget8,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget9,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Orientation,std::string); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== -}; - - BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutLine,bbtk::WtBlackBox); - BBTK_NAME("LayoutLine"); - BBTK_AUTHOR("JohannGONZALEZ"); - BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - LayoutLine for web app implemented with wt"); - BBTK_CATEGORY("__CategoryBlackBox__"); - BBTK_INPUT(LayoutLine,Widget1,"widget 1",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Widget2,"widget 2",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Widget3,"widget 3",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Widget4,"widget 4",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Widget5,"widget 5",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Widget6,"widget 6",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Widget7,"widget 7",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Widget8,"widget 8",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Widget9,"widget 9",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutLine,Orientation,"Orientation (default V), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,""); - BBTK_END_DESCRIBE_BLACK_BOX(LayoutLine); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtLayoutLine_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ b/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ deleted file mode 100644 index 4769aaa..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.cxx~ +++ /dev/null @@ -1,104 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtLayoutSplit.h" -#include "bbwtPackage.h" -#include "bbtkUtilities.h" - - -namespace bbwt -{ - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,LayoutSplit) -BBTK_BLACK_BOX_IMPLEMENTATION(LayoutSplit,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 LayoutSplit::Process() -{ - - - -} -//===== -// 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 LayoutSplit::CreateWidget(Wt::WContainerWidget* 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); - - if (w1==NULL) { w1=new Wt::WContainerWidget(); } - if (w2==NULL) { w2=new Wt::WContainerWidget(); } - - - 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(); } - - 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) -//===== -void LayoutSplit::bbUserSetDefaultValues() -{ - bbSetInputOrientation("VERTICAL"); - bbSetInputProportion(50); - bbSetInputWidget1(NULL); - bbSetInputWidget2(NULL); -} -//===== -// 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 LayoutSplit::bbUserInitializeProcessing() -{ - -} -//===== -// 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 LayoutSplit::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.h~ b/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.h~ deleted file mode 100644 index 858eaa8..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutSplit.h~ +++ /dev/null @@ -1,52 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtLayoutSplit_h_INCLUDED__ -#define __bbwtLayoutSplit_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT LayoutSplit - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(LayoutSplit,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) -//===== -BBTK_DECLARE_INPUT(Widget1,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Widget2,Wt::WContainerWidget*); - BBTK_DECLARE_INPUT(Orientation,std::string); - BBTK_DECLARE_INPUT(Proportion,int); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutSplit,bbtk::WtBlackBox); -BBTK_NAME("LayoutSplit"); -BBTK_AUTHOR("JohannGONZALEZ"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - Split Layout for wt web apps"); -BBTK_CATEGORY("__CategoryBlackBox__"); - BBTK_INPUT(LayoutSplit,Widget1,"Upper or left widget",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutSplit,Widget2,"Lower or right widget",Wt::WContainerWidget*,""); - BBTK_INPUT(LayoutSplit,Orientation,"Orientation (default H), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,""); - BBTK_INPUT(LayoutSplit,Proportion,"Proportion (in percent) of the first children in the window",int,""); -BBTK_END_DESCRIBE_BLACK_BOX(LayoutSplit); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtLayoutSplit_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~ b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~ deleted file mode 100644 index a043716..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.cxx~ +++ /dev/null @@ -1,91 +0,0 @@ -//===== -// 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) -//===== -#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::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() -{ - - -} -//===== -// 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(Wt::WContainerWidget* parent) -{ - - - - - 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 ); - - -} -//===== -// 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::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) -//===== -void LayoutTab::bbUserInitializeProcessing() -{ - -} -//===== -// 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::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h~ b/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h~ deleted file mode 100644 index 5018bd9..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtLayoutTab.h~ +++ /dev/null @@ -1,88 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtLayoutTab_h_INCLUDED__ -#define __bbwtLayoutTab_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - - -namespace bbwt -{ - -class bbwt_EXPORT LayoutTab - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(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) -//===== - - BBTK_DECLARE_INPUT(Widget1,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget2,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget3,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget4,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget5,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget6,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget7,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget8,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Widget9,Wt:WContainerWidget*); - BBTK_DECLARE_INPUT(Label1,std::string); - BBTK_DECLARE_INPUT(Label2,std::string); - BBTK_DECLARE_INPUT(Label3,std::string); - BBTK_DECLARE_INPUT(Label4,std::string); - BBTK_DECLARE_INPUT(Label5,std::string); - BBTK_DECLARE_INPUT(Label6,std::string); - BBTK_DECLARE_INPUT(Label7,std::string); - BBTK_DECLARE_INPUT(Label8,std::string); - BBTK_DECLARE_INPUT(Label9,std::string); - // BBTK_DECLARE_INPUT(Orientation,std::string); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutTab,bbtk::WtBlackBox); -BBTK_NAME("LayoutTab"); -BBTK_AUTHOR("JohannGONZALEZ"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - LayoutTab for wt web apps."); -BBTK_CATEGORY("__CategoryBlackBox__"); - BBTK_DESCRIPTION("LayoutTab widget The label of each 'note book' will be the name of the object it contains"); - - BBTK_INPUT(LayoutTab,Widget1,"widget 1",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget2,"widget 2",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget3,"widget 3",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget4,"widget 4",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget5,"widget 5",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget6,"widget 6",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget7,"widget 7",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget8,"widget 8",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Widget9,"widget 9",Wt:WContainerWidget*,""); - BBTK_INPUT(LayoutTab,Label1,"label 1",std::string,""); - BBTK_INPUT(LayoutTab,Label2,"label 2",std::string,""); - BBTK_INPUT(LayoutTab,Label3,"label 3",std::string,""); - BBTK_INPUT(LayoutTab,Label4,"label 4",std::string,""); - BBTK_INPUT(LayoutTab,Label5,"label 5",std::string,""); - BBTK_INPUT(LayoutTab,Label6,"label 6",std::string,""); - BBTK_INPUT(LayoutTab,Label7,"label 7",std::string,""); - BBTK_INPUT(LayoutTab,Label8,"label 8",std::string,""); - BBTK_INPUT(LayoutTab,Label9,"label 9",std::string,""); -// BBTK_INPUT(LayoutTab,Orientation, -// "Orientation (default T), 0=T=TOP , 1=R=RIGHT , 2=B=BOTTON , 3=L=LEFT " -// ,std::string,""); -BBTK_END_DESCRIBE_BLACK_BOX(LayoutTab); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtLayoutTab_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtOutpuText.cxx~ b/wt/bbtk_wt_PKG/src/bbwtOutpuText.cxx~ deleted file mode 100644 index 793c370..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtOutpuText.cxx~ +++ /dev/null @@ -1,62 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtOutpuText.h" -#include "bbwtPackage.h" -namespace bbwt -{ - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,OutpuText) -BBTK_BLACK_BOX_IMPLEMENTATION(OutpuText,bbtk::WxBlackBox); -//===== -// 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 OutpuText::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 OutpuText::CreateWidget(wxWindow* parent) -{ - - bbSetOutputWidget( new wxStaticText ( parent , -1 , _T("") ) ); - -} -//===== -// 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 OutpuText::bbUserSetDefaultValues() -{ - -} -//===== -// 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 OutpuText::bbUserInitializeProcessing() -{ - -} -//===== -// 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 OutpuText::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtOutpuText.h~ b/wt/bbtk_wt_PKG/src/bbwtOutpuText.h~ deleted file mode 100644 index 683ab6f..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtOutpuText.h~ +++ /dev/null @@ -1,48 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WXWIDGETS_ -#ifndef __bbwtOutpuText_h_INCLUDED__ -#define __bbwtOutpuText_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWxBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT OutpuText - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(OutpuText,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) -//===== - BBTK_DECLARE_INPUT(Title,std::string); - BBTK_DECLARE_INPUT(In,std::string); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(OutpuText,bbtk::WtBlackBox); -BBTK_NAME("OutpuText"); -BBTK_AUTHOR("JohannGONZALEZ"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - OutputText widget for webApps with wt library"); -BBTK_CATEGORY("__CategoryBlackBox__"); -BBTK_INPUT(OutpuText,Title,"Title prepended to the text",std::string,""); -BBTK_INPUT(OutpuText,In,"Text",std::string,""); -BBTK_END_DESCRIBE_BLACK_BOX(OutpuText); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtOutpuText_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtOutputText.cxx~ b/wt/bbtk_wt_PKG/src/bbwtOutputText.cxx~ deleted file mode 100644 index 900670c..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtOutputText.cxx~ +++ /dev/null @@ -1,110 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtOutputText.h" -#include "bbwtPackage.h" -namespace bbwt -{ - class OutputTextWidget : public Wt::WContainerWidget - { - public: - OutputTextWidget( - Wt::WContainerWidget *parent, - Wt::WString text); - ~OutputTextWidget(); - - - void setTextValue(Wt::WString newText); - Wt::WString getTextValue(); - - - private: - - Wt::WText* mText; - - }; - - OutputTextWidget::OutputTextWidget( - Wt::WContainerWidget *parent, - Wt::WString text) - : - Wt::WContainerWidget(parent) - { - - Wt::WContainerWidget *panel = this; - mText = new Wt::WText(text,panel); - - } - - OutputTextWidget::~OutputTextWidget() - { - } - - void OutputTextWidget::setTextValue(Wt::WString newText) - { - std::cout<<"CAMBIANDO TEXTO--"<setText(newText); - } - - Wt::WString OutputTextWidget::getTextValue() - { - return mText->text(); - } - - - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,OutputText) -BBTK_BLACK_BOX_IMPLEMENTATION(OutputText,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 OutputText::Process() -{ - - std::string msg; - if (bbGetInputTitle()!="") - { - msg = bbGetInputTitle()+": " + bbGetInputIn(); - } - else - { - msg = bbGetInputIn(); - } - ((OutputTextWidget*)bbGetOutputWidget())->setTextValue( bbtk::std2wt( 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 OutputText::CreateWidget(Wt::WContainerWidget* parent) -{ - - bbSetOutputWidget( new OutputTextWidget(parent,bbtk::std2wt(bbGetInputIn()))) ; -//EED Process(); - -} -//===== -// 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 OutputText::bbUserSetDefaultValues() -{ - -} -//===== -// 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 OutputText::bbUserInitializeProcessing() -{ - -} -//===== -// 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 OutputText::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtOutputText.h~ b/wt/bbtk_wt_PKG/src/bbwtOutputText.h~ deleted file mode 100644 index 4aa31ec..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtOutputText.h~ +++ /dev/null @@ -1,48 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtOutpuText_h_INCLUDED__ -#define __bbwtOutpuText_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT OutputText - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(OutputText,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) -//===== - BBTK_DECLARE_INPUT(Title,std::string); - BBTK_DECLARE_INPUT(In,std::string); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(Wt::WContainerWidget*); -//===== -// 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) -//===== -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(OutputText,bbtk::WtBlackBox); -BBTK_NAME("OutputText"); -BBTK_AUTHOR("JohannGONZALEZ"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - OutputText widget for webApps with wt library"); -BBTK_CATEGORY("__CategoryBlackBox__"); -BBTK_INPUT(OutpuText,Title,"Title prepended to the text",std::string,""); -BBTK_INPUT(OutpuText,In,"Text",std::string,""); -BBTK_END_DESCRIBE_BLACK_BOX(OutpuText); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtOutpuText_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtRadioButton.cxx~ b/wt/bbtk_wt_PKG/src/bbwtRadioButton.cxx~ deleted file mode 100644 index 1361752..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtRadioButton.cxx~ +++ /dev/null @@ -1,184 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtRadioButton.h" -#include "bbwtPackage.h" -#include - -namespace bbwt -{ - - class RadioButtonWidget : public Wt::WContainerWidget - { - public: - RadioButtonWidget( RadioButton* box, Wt::WContainerWidget *parent, - int In, - Wt::WString title, - std::vector lstIn ); - - ~RadioButtonWidget(); - - int GetValue(); - void OnRadioButton(); - - private: - RadioButton *mBox; - int MAX_RADIOBUTTON; - Wt::WRadioButton *mwtRadioButton[10]; - Wt::WButtonGroup *group; - }; - - - - //------------------------------------------------------------------------- - RadioButtonWidget::RadioButtonWidget( RadioButton* box, - Wt::WContainerWidget *parent, - int In, - Wt::WString title, - std::vector lstIn ) - : - Wt::WContainerWidget( parent) , - mBox(box) - { - Wt::WContainerWidget *panel = this; - MAX_RADIOBUTTON = lstIn.size(); - int i; - - - Wt::WGroupBox *cont = new Wt::WGroupBox(title); - group = new Wt::WButtonGroup(panel); - - - for (i=0;iaddButton(mwtRadioButton[i],i); - if (In==i) - { - mwtRadioButton[i]->setChecked(true); - } - else - { - mwtRadioButton[i]->setChecked(false); - } - mwtRadioButton[i]->checked().connect(this,&RadioButtonWidget::OnRadioButton); - } - else - { - mwtRadioButton[i]=NULL; - } - } - - panel->addWidget(cont); - - } - //------------------------------------------------------------------------- - - RadioButtonWidget::~RadioButtonWidget() - { - } - - //------------------------------------------------------------------------- - - int RadioButtonWidget::GetValue() - { - - return group->checkedId(); - } - - //-------------------------------------------------------------------------- - void RadioButtonWidget::OnRadioButton() - { - mBox->bbSetOutputOut( GetValue() ); - mBox->bbSetInputIn( GetValue() ); - mBox->bbSignalOutputModification("Out"); - } - - //-------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,RadioButton) -BBTK_BLACK_BOX_IMPLEMENTATION(RadioButton,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 RadioButton::Process() -{ - -} -//===== -// 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 RadioButton::CreateWidget(Wt::WContainerWidget* parent) -{ - - - std::vector lstIn; - lstIn.push_back( bbtk::std2wt(bbGetInputIn0()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn1()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn2()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn3()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn4()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn5()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn6()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn7()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn8()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn9()) ); - - RadioButtonWidget *w = new RadioButtonWidget( - this, -// bbGetWxParent(), - parent, - bbGetInputIn() , - bbtk::std2wt(bbGetInputTitle()), - lstIn ); - - bbSetOutputOut( bbGetInputIn() ); - 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) -//===== -void RadioButton::bbUserSetDefaultValues() -{ - bbSetInputIn(0); - bbSetOutputOut( bbGetInputIn() ); - bbSetInputIn0(""); - bbSetInputIn1(""); - bbSetInputIn2(""); - bbSetInputIn3(""); - bbSetInputIn4(""); - bbSetInputIn5(""); - bbSetInputIn6(""); - bbSetInputIn7(""); - bbSetInputIn8(""); - bbSetInputIn9(""); -} -//===== -// 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 RadioButton::bbUserInitializeProcessing() -{ - -} -//===== -// 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 RadioButton::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtRadioButton.h~ b/wt/bbtk_wt_PKG/src/bbwtRadioButton.h~ deleted file mode 100644 index 14e6668..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtRadioButton.h~ +++ /dev/null @@ -1,74 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WT_ -#ifndef __bbwtRadioButton_h_INCLUDED__ -#define __bbwtRadioButton_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWtBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT RadioButton - : - public bbtk::WtBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(RadioButton,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) -//===== - BBTK_DECLARE_INPUT(In,int); - BBTK_DECLARE_INPUT(In0,std::string); - BBTK_DECLARE_INPUT(In1,std::string); - BBTK_DECLARE_INPUT(In2,std::string); - BBTK_DECLARE_INPUT(In3,std::string); - BBTK_DECLARE_INPUT(In4,std::string); - BBTK_DECLARE_INPUT(In5,std::string); - BBTK_DECLARE_INPUT(In6,std::string); - BBTK_DECLARE_INPUT(In7,std::string); - BBTK_DECLARE_INPUT(In8,std::string); - BBTK_DECLARE_INPUT(In9,std::string); - BBTK_DECLARE_INPUT(Title,std::string); - BBTK_DECLARE_OUTPUT(Out,int); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(wxWindow*); -//===== -// 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) -//===== -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(RadioButton,bbtk::WtBlackBox); -BBTK_NAME("RadioButton"); -BBTK_AUTHOR("JohannGONZALEZ"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - RadioButton widget for WT web apps."); -BBTK_CATEGORY("__CategoryBlackBox__"); - BBTK_INPUT(RadioButton,In,"Set initial item",int,""); - - BBTK_INPUT(RadioButton,In0,"option 0",std::string,""); - BBTK_INPUT(RadioButton,In1,"option 1",std::string,""); - BBTK_INPUT(RadioButton,In2,"option 2",std::string,""); - BBTK_INPUT(RadioButton,In3,"option 3",std::string,""); - BBTK_INPUT(RadioButton,In4,"option 4",std::string,""); - BBTK_INPUT(RadioButton,In5,"option 5",std::string,""); - BBTK_INPUT(RadioButton,In6,"option 6",std::string,""); - BBTK_INPUT(RadioButton,In7,"option 7",std::string,""); - BBTK_INPUT(RadioButton,In8,"option 8",std::string,""); - BBTK_INPUT(RadioButton,In9,"option 9",std::string,""); - - BBTK_INPUT(RadioButton,Title,"Title of the widget (default '') ", - std::string,""); - - BBTK_OUTPUT(RadioButton,Out,"Item selected",int,""); -BBTK_END_DESCRIBE_BLACK_BOX(RadioButton); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtRadioButton_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ - diff --git a/wt/bbtk_wt_PKG/src/bbwtSlider.cxx~ b/wt/bbtk_wt_PKG/src/bbwtSlider.cxx~ deleted file mode 100644 index e6c6514..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtSlider.cxx~ +++ /dev/null @@ -1,339 +0,0 @@ -//===== -// 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) -//===== -#include "bbwtSlider.h" -#include "bbwtPackage.h" -#include "bbtkUtilities.h" -namespace bbwt -{ - - class SliderWidget : public Wt::WContainerWidget - { - public: - SliderWidget(Slider* box, Wt::WContainerWidget *parent, - int orientation, - bool changeresolution, - Wt::WString title, - int vmin, - int vmax, - int value, - bool reactiveontrack); - - ~SliderWidget(); - - /// Events callbacks - /// Called when the slider is moved - void OnSliderTrack(); - void OnSliderMove(); - /// Called when the little slider which controls the resolution - /// of the main slider is moved (if activated) - void OnResolutionOfSlider(); - - // Accessors - void SetValue(int v) { mwtSlider->setValue(v); } - int GetValue() { return mwtSlider->value(); } - int GetMin() {return min;} - int GetMax() {return max;} - void SetRange(int min, int max); - void SetReactiveOnTrack(bool ok); - - - private: - Slider* mBox; - Wt::WSlider *mwtSlider; - Wt::WSlider *mResolutionOfSlider; - Wt::WText *textTitle; - Wt::WString tTitle; - int min; - int max; - bool reactiveOnTrack; - - - }; - - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - //------------------------------------------------------------------------ - - - - //------------------------------------------------------------------------- - SliderWidget::SliderWidget(Slider* box, Wt::WContainerWidget *parent, - int orientation, - bool changeresolution, - Wt::WString title, - int vmin, - int vmax, - int value, - bool reactiveontrack) - : - Wt::WContainerWidget(parent), - mBox(box), - tTitle(title), - min(vmin), - max(vmax), - reactiveOnTrack(reactiveontrack) - - { - std::cout<<"Creando SLIDER -- 0 "<resize(sizeX,sizeY); - mwtSlider->setMinimum(min); - mwtSlider->setMaximum(max); - mwtSlider->setValue(value); - mwtSlider->setTickPosition(Wt::WSlider::TicksBothSides); - //mwtSlider->setValueText(title); - mwtSlider->valueChanged().connect(this,&SliderWidget::OnSliderTrack); - mwtSlider->sliderMoved().connect(this,&SliderWidget::OnSliderMove); - // mwtSlider->resize(Wt::WLength::Auto, 50); - - - // If asked : creation of the other little slider which allows to change - // the resolution of the main slider - std::cout<<"Creando SLIDER -- 3 "<setMinimum(1); - mResolutionOfSlider->setMaximum(8); - mResolutionOfSlider->setValue(5); - mResolutionOfSlider->valueChanged().connect(this,&SliderWidget::OnResolutionOfSlider); - mResolutionOfSlider->resize(5,10); - if (orientation==0) - { - // HORIZONTAL - layout->addWidget(mResolutionOfSlider,Wt::WBorderLayout::West); - - } - else - { - // VERTICAL - layout->addWidget(mResolutionOfSlider,Wt::WBorderLayout::South); - - } - - } - - //--------------------------------------------------------------------- - - //--------------------------------------------------------------------- - // 2) Insertion of the components in the window - std::cout<<"Creando SLIDER -- 4 "<valueText()); - layout->addWidget(textTitle,Wt::WBorderLayout::North); - layout->addWidget(mwtSlider,Wt::WBorderLayout::Center); - std::cout<<"Creando SLIDER -- 5 "<setLayout(layout); - std::cout<<"Creando SLIDER -- 6 "<value(); - int delta = (int) (pow((double) 4 ,(double) mResolutionOfSlider->value() )); - int minTmp = value - delta/2; - int maxTmp = value + delta/2; - if (minTmpmax) - { - maxTmp = max; - } - mwtSlider->setMinimum(minTmp); - mwtSlider->setMaximum(maxTmp); - - } - //------------------------------------------------------------------------- - - - - //------------------------------------------------------------------------- - void SliderWidget::OnSliderTrack() - { - -printf("EED SliderWidget::OnSliderTrack value=%d\n", mwtSlider->value() ); - - // When user releases the slider - // we update the output of the box - mBox->bbSetOutputOut( mwtSlider->value() ); - mBox->bbSetInputIn( mwtSlider->value() ); - mBox->bbSignalOutputModification(std::string("Out")); - textTitle->setText(tTitle + bbtk::std2wt(" : ") + mwtSlider->valueText()); - } - - - //------------------------------------------------------------------------- - void SliderWidget::OnSliderMove() - { -printf("EED SliderWidget::OnSliderMove value %d\n",mwtSlider->value() ); - - // When user releases the slider - // we update the output of the box - if(reactiveOnTrack==true) - { - mBox->bbSetOutputOut( mwtSlider->value() ); - mBox->bbSetInputIn( mwtSlider->value() ); - mBox->bbSignalOutputModification(std::string("Out")); - } - textTitle->setText(tTitle + bbtk::std2wt(" :: ") + mwtSlider->valueText()); - } - - //------------------------------------------------------------------------- - - - //------------------------------------------------------------------------- - void SliderWidget::SetRange(int min, int max) - { - this->min = min; - this->max = max; - mwtSlider->setMinimum(min); - mwtSlider->setMaximum(max); - } - - - //------------------------------------------------------------------------- - void SliderWidget::SetReactiveOnTrack(bool ok) - { - reactiveOnTrack = ok; - } - - - - - BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,Slider); - BBTK_BLACK_BOX_IMPLEMENTATION(Slider,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 Slider::Process() - { - - bbtkDebugMessage("process",3, - "Slider "<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 wtCheckBox::CreateWidget(wxWindow* parent) -{ - - bbSetOutputWidget( new wxStaticText ( parent , -1 , _T("") ) ); - -} -//===== -// 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 wtCheckBox::bbUserSetDefaultValues() -{ - -} -//===== -// 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 wtCheckBox::bbUserInitializeProcessing() -{ - -} -//===== -// 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 wtCheckBox::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - - diff --git a/wt/bbtk_wt_PKG/src/bbwtwtCheckBox.h~ b/wt/bbtk_wt_PKG/src/bbwtwtCheckBox.h~ deleted file mode 100644 index b2187c9..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtwtCheckBox.h~ +++ /dev/null @@ -1,48 +0,0 @@ -//===== -// 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) -//===== -#ifdef _USE_WXWIDGETS_ -#ifndef __bbwtwtCheckBox_h_INCLUDED__ -#define __bbwtwtCheckBox_h_INCLUDED__ -#include "bbwt_EXPORT.h" -#include "bbtkWxBlackBox.h" - -namespace bbwt -{ - -class bbwt_EXPORT wtCheckBox - : - public bbtk::WxBlackBox -{ - BBTK_BLACK_BOX_INTERFACE(wtCheckBox,bbtk::WxBlackBox); -//===== -// 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) -//===== - BBTK_DECLARE_INPUT(Title,std::string); - BBTK_DECLARE_INPUT(In,std::string); - BBTK_PROCESS(Process); - void Process(); - BBTK_CREATE_WIDGET(CreateWidget); - void CreateWidget(wxWindow*); -//===== -// 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) -//===== -}; - -BBTK_BEGIN_DESCRIBE_BLACK_BOX(wtCheckBox,bbtk::WxBlackBox); -BBTK_NAME("wtCheckBox"); -BBTK_AUTHOR("JohannGONZALEZ"); -BBTK_DESCRIPTION("gonzalez@creatis.insa-lyon.fr - Checkbox web widget implemented in wt"); -BBTK_CATEGORY("__CategoryBlackBox__"); -BBTK_INPUT(wtCheckBox,Title,"Title prepended to the text",std::string,""); -BBTK_INPUT(wtCheckBox,In,"Text",std::string,""); -BBTK_END_DESCRIBE_BLACK_BOX(wtCheckBox); -//===== -// 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) -//===== -} -// EO namespace bbwt - -#endif // __bbwtwtCheckBox_h_INCLUDED__ -#endif // _USE_WXWIDGETS_ -