From 6acada1443d66ee0de5825c90b92449a64320870 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Thu, 14 Feb 2008 20:55:52 +0000 Subject: [PATCH] cosmetics --- kernel/src/bbtkExecuter.cxx | 10 +++---- packages/wx/src/bbwxSizer.cxx | 56 ++++++++++++++--------------------- packages/wx/src/bbwxSplit.cxx | 43 +++++++++++---------------- 3 files changed, 45 insertions(+), 64 deletions(-) diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index 144dfcf..7d24b70 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -1,11 +1,11 @@ /*========================================================================= - + Program: bbtk Module: $RCSfile: bbtkExecuter.cxx,v $ $ Language: C++ - Date: $Date: 2008/02/14 20:26:54 $ - Version: $Revision: 1.11 $ - + Date: $Date: 2008/02/14 20:57:27 $ + Version: $Revision: 1.12 $ + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. @@ -13,7 +13,7 @@ This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. - + =========================================================================*/ /** * \file diff --git a/packages/wx/src/bbwxSizer.cxx b/packages/wx/src/bbwxSizer.cxx index 86736a9..c213d41 100644 --- a/packages/wx/src/bbwxSizer.cxx +++ b/packages/wx/src/bbwxSizer.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxSizer.cxx,v $ Language: C++ - Date: $Date: 2008/02/08 14:58:31 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/02/14 20:55:52 $ + Version: $Revision: 1.5 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -16,31 +16,25 @@ =========================================================================*/ /** - * \file - * \brief + * \file + * \brief */ #ifdef _USE_WXWIDGETS_ - #include "bbwxSizer.h" #include "bbwxPackage.h" #include "bbtkUtilities.h" - - - namespace bbwx { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx , Sizer); - - + BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx, Sizer); BBTK_USER_BLACK_BOX_IMPLEMENTATION(Sizer,bbtk::WxBlackBox); - - void Sizer::bbUserConstructor() - { + + void Sizer::bbUserConstructor() + { bbSetInputOrientation("VERTICAL"); bbSetInputWidget1(NULL); bbSetInputWidget2(NULL); @@ -53,31 +47,29 @@ namespace bbwx bbSetInputWidget9(NULL); } + void Sizer::Process() + { + } + void Sizer::TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer) { if (w!=NULL) { w->Reparent(parent); - sizer->Add(w, 1, wxEXPAND, 0); - } + sizer->Add(w, 1, wxEXPAND, 0); + } } - - void Sizer::Process() - { - } - - - void Sizer::CreateWidget() - { + void Sizer::CreateWidget() + { wxBoxSizer *sizer; wxPanel *w=new wxPanel(bbGetWxParent(), -1); w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) ); - + int style=0; if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { style=wxHORIZONTAL; } - if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { style=wxVERTICAL; } - + if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { style=wxVERTICAL; } + sizer = new wxBoxSizer(style); TryInsertWindow(w,bbGetInputWidget1(),sizer); @@ -89,16 +81,12 @@ namespace bbwx TryInsertWindow(w,bbGetInputWidget7(),sizer); TryInsertWindow(w,bbGetInputWidget8(),sizer); TryInsertWindow(w,bbGetInputWidget9(),sizer); - - w -> SetSizer(sizer); + + w -> SetSizer(sizer); bbSetOutputWidget( w ); } - - - - }//namespace bbwx -#endif +#endif // _USE_WXWIDGETS_ diff --git a/packages/wx/src/bbwxSplit.cxx b/packages/wx/src/bbwxSplit.cxx index 2e61dc7..0b5a71f 100644 --- a/packages/wx/src/bbwxSplit.cxx +++ b/packages/wx/src/bbwxSplit.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxSplit.cxx,v $ Language: C++ - Date: $Date: 2008/02/14 16:55:07 $ - Version: $Revision: 1.6 $ + Date: $Date: 2008/02/14 20:55:52 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -16,8 +16,8 @@ =========================================================================*/ /** - * \file - * \brief + * \file + * \brief */ @@ -28,18 +28,13 @@ #include "bbtkUtilities.h" -//#include "bbtk - namespace bbwx { BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,Split); - - BBTK_USER_BLACK_BOX_IMPLEMENTATION(Split,bbtk::WxBlackBox); - - void Split::bbUserConstructor() - { + void Split::bbUserConstructor() + { bbSetInputWinTitle("Split"); bbSetInputOrientation("HORIZONTAL"); bbSetInputProportion(50); @@ -47,18 +42,18 @@ namespace bbwx bbSetInputWidget2(NULL); } - void Split::Process() - { + void Split::Process() + { } - void Split::CreateWidget() - { + void Split::CreateWidget() + { wxSplitterWindow* w = new wxSplitterWindow(bbGetWxParent(), -1, wxDefaultPosition, - wxDefaultSize, + wxDefaultSize, //wxSize(400,200), - wxSP_3D | + wxSP_3D | wxSP_LIVE_UPDATE ); w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) ); wxWindow* w1 = bbGetInputWidget1(); @@ -70,17 +65,15 @@ namespace bbwx w2->Reparent(w); int orientation=0; if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|H|HORIZONTAL")==true) { orientation=0; } - if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { orientation=1; } + if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"1|V|VERTICAL")==true) { orientation=1; } + if (orientation==0) { w->SplitHorizontally( w1, w2, 100); } - if (orientation==1) { w->SplitVertically( w1, w2, 100); } - - + else { w->SplitVertically( w1, w2, 100); } + bbSetOutputWidget( w ); } - - -}//namespace bbtk +}//namespace bbwx -#endif // _USE_WXWIDGETS_ +#endif // _USE_WXWIDGETS_ -- 2.45.1