From 07409142d99aa56208a3955ee9d5d4d58fa99ed9 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Fri, 22 Dec 2023 10:32:31 +0100 Subject: [PATCH] Clean code --- packages/wx/src/bbwxInputText.h | 2 +- packages/wx/src/bbwxSlider.cxx | 28 +++++++++------------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/packages/wx/src/bbwxInputText.h b/packages/wx/src/bbwxInputText.h index dbaa017..4c3daa1 100644 --- a/packages/wx/src/bbwxInputText.h +++ b/packages/wx/src/bbwxInputText.h @@ -87,7 +87,7 @@ namespace bbwx BBTK_BEGIN_DESCRIBE_BLACK_BOX(InputText,bbtk::WxBlackBox); BBTK_NAME("InputText"); BBTK_AUTHOR("laurent guigues at creatis.insa-lyon.fr"); - BBTK_DESCRIPTION("A zone in which the user can enter a text (wxTextCtrl)"); + BBTK_DESCRIPTION("(C++,Python) A zone in which the user can enter a text (wxTextCtrl)"); BBTK_INPUT(InputText,In,"Initial text (default '')",std::string,""); BBTK_INPUT(InputText,Title,"Title of the input zone (default '') ", std::string,""); BBTK_INPUT(InputText,ReactiveOnKeystroke,"0 not event generated, 1 Enter event genereated, 2 All keys, (default '2') ", int,""); diff --git a/packages/wx/src/bbwxSlider.cxx b/packages/wx/src/bbwxSlider.cxx index b0022b2..facdc06 100644 --- a/packages/wx/src/bbwxSlider.cxx +++ b/packages/wx/src/bbwxSlider.cxx @@ -301,16 +301,11 @@ namespace bbwx // Insert the sizer in the main panel and refresh the layout panel->SetSizer(sizer); } - //------------------------------------------------------------------------- - - //------------------------------------------------------------------------- SliderWidget::~SliderWidget() { } - //------------------------------------------------------------------------- - //------------------------------------------------------------------------- void SliderWidget::OnResolutionOfSlider(wxScrollEvent& event) @@ -320,22 +315,19 @@ namespace bbwx int minTmp = value - delta/2; int maxTmp = value + delta/2; if (minTmpmax) - { - maxTmp = max; - } + { + maxTmp = max; + } mwxSlider->SetRange(minTmp,maxTmp); RefreshLabels(); } - //------------------------------------------------------------------------- - - - //------------------------------------------------------------------------- +//------------------------------------------------------------------------- void SliderWidget::OnSliderTrack(wxScrollEvent& event) { if(reactiveOnTrack) @@ -350,10 +342,8 @@ namespace bbwx } RefreshLabels(); } - //------------------------------------------------------------------------- - - //------------------------------------------------------------------------- +//------------------------------------------------------------------------- void SliderWidget::OnSliderRelease(wxScrollEvent& event) { // When user releases the slider -- 2.47.1