Program: bbtk
Module: $RCSfile: bbtkWxBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/03/06 09:23:43 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/03/10 10:01:14 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
" Input WinDialog set to true : creating a Dialog"
<<std::endl);
show = (Window*) new WxBlackBoxDialog( this,
- Wx::GetTopWindow(),
+ bbGetWxParent(),
std2wx( bbGetInputWinTitle() + " - bbtk (c) CREATIS LRMN"),
wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
}
" Input WinDialog set to false : creating a Frame"
<<std::endl);
show = (Window*) new WxBlackBoxFrame( this,
- Wx::GetTopWindow(),
+ bbGetWxParent(),
std2wx( bbGetInputWinTitle() + " - bbtk (c) CREATIS LRMN"),
wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) );
}
Program: bbtk
Module: $RCSfile: bbwxLayoutLine.cxx,v $
Language: C++
- Date: $Date: 2008/02/15 12:19:58 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/03/10 10:01:15 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx, LayoutLine);
BBTK_USER_BLACK_BOX_IMPLEMENTATION(LayoutLine,bbtk::WxBlackBox);
-
- void LayoutLine::bbUserConstructor()
- {
- bbSetInputOrientation("VERTICAL");
- bbSetInputWidget1(NULL);
- bbSetInputWidget2(NULL);
- bbSetInputWidget3(NULL);
- bbSetInputWidget4(NULL);
- bbSetInputWidget5(NULL);
- bbSetInputWidget6(NULL);
- bbSetInputWidget7(NULL);
- bbSetInputWidget8(NULL);
- bbSetInputWidget9(NULL);
- }
-
- void LayoutLine::Process()
- {
- }
-
- void LayoutLine::TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer)
- {
- if (w!=NULL)
- {
- w->Reparent(parent);
- sizer->Add(w, 1, wxEXPAND, 0);
- }
- }
-
- void LayoutLine::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; }
-
- sizer = new wxBoxSizer(style);
-
- TryInsertWindow(w,bbGetInputWidget1(),sizer);
- TryInsertWindow(w,bbGetInputWidget2(),sizer);
- TryInsertWindow(w,bbGetInputWidget3(),sizer);
- TryInsertWindow(w,bbGetInputWidget4(),sizer);
- TryInsertWindow(w,bbGetInputWidget5(),sizer);
- TryInsertWindow(w,bbGetInputWidget6(),sizer);
- TryInsertWindow(w,bbGetInputWidget7(),sizer);
- TryInsertWindow(w,bbGetInputWidget8(),sizer);
- TryInsertWindow(w,bbGetInputWidget9(),sizer);
-
- w -> SetSizer(sizer);
- bbSetOutputWidget( w );
+
+ void LayoutLine::bbUserConstructor()
+ {
+ bbSetInputOrientation("VERTICAL");
+ bbSetInputWidget1(NULL);
+ bbSetInputWidget2(NULL);
+ bbSetInputWidget3(NULL);
+ bbSetInputWidget4(NULL);
+ bbSetInputWidget5(NULL);
+ bbSetInputWidget6(NULL);
+ bbSetInputWidget7(NULL);
+ bbSetInputWidget8(NULL);
+ bbSetInputWidget9(NULL);
}
-
+
+ void LayoutLine::Process()
+ {
+ }
+
+ void LayoutLine::TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer)
+ {
+ if (w!=NULL)
+ {
+ w->Reparent(parent);
+ sizer->Add(w, 1, wxEXPAND, 0);
+ }
+ }
+
+ void LayoutLine::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; }
+
+ sizer = new wxBoxSizer(style);
+
+ TryInsertWindow(w,bbGetInputWidget1(),sizer);
+ TryInsertWindow(w,bbGetInputWidget2(),sizer);
+ TryInsertWindow(w,bbGetInputWidget3(),sizer);
+ TryInsertWindow(w,bbGetInputWidget4(),sizer);
+ TryInsertWindow(w,bbGetInputWidget5(),sizer);
+ TryInsertWindow(w,bbGetInputWidget6(),sizer);
+ TryInsertWindow(w,bbGetInputWidget7(),sizer);
+ TryInsertWindow(w,bbGetInputWidget8(),sizer);
+ TryInsertWindow(w,bbGetInputWidget9(),sizer);
+
+ w -> SetSizer(sizer);
+ bbSetOutputWidget( w );
+ }
+
}//namespace bbwx
#endif // _USE_WXWIDGETS_
Program: bbtk
Module: $RCSfile: bbwxSlider.cxx,v $
Language: C++
- Date: $Date: 2008/02/13 15:09:37 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/03/10 10:01:15 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void Slider::CreateWidget()
{
- 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; }
-
- SliderWidget *w = new SliderWidget(this,
- bbGetWxParent(),
- orientation ,
- bbGetInputChangeResolution(),
- bbGetInputLabel(),
- bbtk::std2wx( bbGetInputTitle() ),
- bbGetInputMin(),
- bbGetInputMax(),
- bbGetInputIn(),
- bbGetInputReactiveOnTrack()
- );
+ 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; }
+
+
+ std::cout << "bbGetWxParent = "<<bbGetWxParent()<<std::endl;
+ SliderWidget *w = new SliderWidget(this,
+ bbGetWxParent(),
+ orientation ,
+ bbGetInputChangeResolution(),
+ bbGetInputLabel(),
+ bbtk::std2wx( bbGetInputTitle() ),
+ bbGetInputMin(),
+ bbGetInputMax(),
+ bbGetInputIn(),
+ bbGetInputReactiveOnTrack()
+ );
+ std::cout << "w = "<<w<<std::endl;
// w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) );
bbSetOutputWidget( w );