X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=creaWT.git;a=blobdiff_plain;f=wt%2Fbbtk_wt_PKG%2Fsrc%2FbbwtCheckBox.cxx~;fp=wt%2Fbbtk_wt_PKG%2Fsrc%2FbbwtCheckBox.cxx~;h=0000000000000000000000000000000000000000;hp=217132d4a981475c235931898d8bb490b024b1d8;hb=5bdd6bc07e285c2dc485dd053aaee47356d8689b;hpb=430578713a572cd83e04ca0f65c6e34e87879cd6 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 - -