X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=packages%2Fwx%2Fsrc%2FbbwxLayoutSplit.cxx;h=642708530e1a2ac8e9fe9f810447d11f1f294fda;hb=973e1f112acd58fc3390fd0a4298a274fc58ebda;hp=939355f8d4175bf9f3cbd42f28c5eee05e6eb7a2;hpb=236a8e2fee9937c050e2d16c7222e1caa993f01c;p=bbtk.git diff --git a/packages/wx/src/bbwxLayoutSplit.cxx b/packages/wx/src/bbwxLayoutSplit.cxx index 939355f..6427085 100644 --- a/packages/wx/src/bbwxLayoutSplit.cxx +++ b/packages/wx/src/bbwxLayoutSplit.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxLayoutSplit.cxx,v $ Language: C++ - Date: $Date: 2008/11/13 14:46:46 $ - Version: $Revision: 1.7 $ + Date: $Date: 2009/04/15 15:45:55 $ + Version: $Revision: 1.10 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -58,9 +58,9 @@ namespace bbwx { } - void LayoutSplit::CreateWidget() + void LayoutSplit::CreateWidget(wxWindow* parent) { - wxSplitterWindow* w = new wxSplitterWindow(bbGetWxParent(), + wxSplitterWindow* w = new wxSplitterWindow(parent, //bbGetWxParent(), -1, wxDefaultPosition, wxDefaultSize, @@ -68,20 +68,30 @@ namespace bbwx wxSP_3D | wxSP_LIVE_UPDATE ); w->SetName( bbtk::std2wx( bbGetInputWinTitle() ) ); - wxWindow* w1 = bbGetInputWidget1(); + w->SetMinimumPaneSize(2); +/* + wxWindow* w1 = bbGetInputWidget1(); wxWindow* w2 = bbGetInputWidget2(); if (w1==NULL) { w1=new wxPanel(bbGetWxParent()); } if (w2==NULL) { w2=new wxPanel(bbGetWxParent()); } w1->Reparent(w); w2->Reparent(w); - int orientation=0; + */ + + wxWindow* w1 = bbCreateWidgetOfInput("Widget1",w); + wxWindow* w2 = bbCreateWidgetOfInput("Widget2",w); + if (w1==NULL) { w1=new wxPanel(parent); } + if (w2==NULL) { w2=new wxPanel(parent); } + + 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 (orientation==1) { w->SplitHorizontally( w1, w2, 100); } + + if (orientation==1) { w->SplitHorizontally( w1, w2, 100); } else { w->SplitVertically( w1, w2, 100); } - + bbSetOutputWidget( w ); } @@ -90,6 +100,7 @@ namespace bbwx // when window is shown void LayoutSplit::OnShowWidget() { + // std::cout << "LayoutSplit::OnShowWidget()" << std::endl; if (bbGetOutputWidget()==0) { return;