/*=========================================================================
-
+
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.
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
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
=========================================================================*/
/**
- * \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);
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);
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_
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
=========================================================================*/
/**
- * \file
- * \brief
+ * \file
+ * \brief
*/
#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);
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();
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_