From b1e652b50fd57dc8d52560a84211d3f9a02fbaf5 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Tue, 19 Feb 2008 18:31:36 +0000 Subject: [PATCH] test to example --- packages/wx/bbs/appli/exampleLayoutLine.bbs | 14 +++ .../appli/exampleLayoutLine_In_LayoutLine.bbs | 91 +++++++++++++++++++ .../appli/exampleLayoutLine_Orientation.bbs | 30 ++++++ packages/wx/bbs/appli/exampleLayoutSplit.bbs | 14 +++ .../exampleLayoutSplit_In_LayoutSplit.bbs | 91 +++++++++++++++++++ .../appli/exampleLayoutSplit_Orientation.bbs | 30 ++++++ ...{testNotebook.bbs => exampleLayoutTab.bbs} | 4 +- ...stNotebook2.bbs => exampleLayoutTab_2.bbs} | 12 +-- packages/wx/bbs/appli/exampleRadioButton.bbs | 24 +++++ packages/wx/bbs/appli/exampleSlider.bbs | 7 ++ .../wx/bbs/appli/exampleTextInputOutput.bbs | 2 +- .../{bbwxNotebook.cxx => bbwxLayoutTab.cxx} | 20 ++-- .../src/{bbwxNotebook.h => bbwxLayoutTab.h} | 42 ++++----- 13 files changed, 341 insertions(+), 40 deletions(-) create mode 100644 packages/wx/bbs/appli/exampleLayoutLine.bbs create mode 100644 packages/wx/bbs/appli/exampleLayoutLine_In_LayoutLine.bbs create mode 100644 packages/wx/bbs/appli/exampleLayoutLine_Orientation.bbs create mode 100644 packages/wx/bbs/appli/exampleLayoutSplit.bbs create mode 100644 packages/wx/bbs/appli/exampleLayoutSplit_In_LayoutSplit.bbs create mode 100644 packages/wx/bbs/appli/exampleLayoutSplit_Orientation.bbs rename packages/wx/bbs/appli/{testNotebook.bbs => exampleLayoutTab.bbs} (82%) rename packages/wx/bbs/appli/{testNotebook2.bbs => exampleLayoutTab_2.bbs} (68%) create mode 100644 packages/wx/bbs/appli/exampleRadioButton.bbs create mode 100644 packages/wx/bbs/appli/exampleSlider.bbs rename packages/wx/src/{bbwxNotebook.cxx => bbwxLayoutTab.cxx} (85%) rename packages/wx/src/{bbwxNotebook.h => bbwxLayoutTab.h} (68%) diff --git a/packages/wx/bbs/appli/exampleLayoutLine.bbs b/packages/wx/bbs/appli/exampleLayoutLine.bbs new file mode 100644 index 0000000..48f6ac0 --- /dev/null +++ b/packages/wx/bbs/appli/exampleLayoutLine.bbs @@ -0,0 +1,14 @@ +description "Simple test of wx::LayoutLine widget" +author "eduardo.davila@creatis.insa-lyon.fr" +category "example;widget" + +load wx + +new Slider slider1 +new Slider slider2 +new LayoutLine main + +connect slider1.Widget main.Widget1 +connect slider2.Widget main.Widget2 + +exec main diff --git a/packages/wx/bbs/appli/exampleLayoutLine_In_LayoutLine.bbs b/packages/wx/bbs/appli/exampleLayoutLine_In_LayoutLine.bbs new file mode 100644 index 0000000..55378d3 --- /dev/null +++ b/packages/wx/bbs/appli/exampleLayoutLine_In_LayoutLine.bbs @@ -0,0 +1,91 @@ +description "Simple test of wx::LayoutLine widgets" +author "jean-pierre.roux@creatis.univ-lyon1.fr" +category "example;widget" + +load std +load wx + + +#----- I N T E R F A C E ------------------------------------- + + +new LayoutLine main + set main.Orientation H + +new LayoutLine up +set up.Orientation 0 + +new LayoutLine down + set down.Orientation 1 + new Slider sDown + set sDown.Title "sDown" + connect sDown.Widget down.Widget1 + new RadioButton rb + set rb.Title "Rad But" + set rb.In0 "Choix 1" + set rb.In1 "Choix 2" + set rb.In2 "Choix 3" + set rb.In3 "Choix 4" + set rb.In 1 + connect rb.Widget down.Widget2 + + +connect up.Widget main.Widget1 +connect down.Widget main.Widget2 + + + new LayoutLine upLeft + #set upLeft.Proportion 80 + new Slider sUpLeft1 + set sUpLeft1.Title "sUpLeft1" + connect sUpLeft1.Widget upLeft.Widget1 + new Slider sUpLeft2 + set sUpLeft2.Title "sUpLeft2" + connect sUpLeft2.Widget upLeft.Widget2 + connect upLeft.Widget up.Widget1 + + + new LayoutLine upRight + set upRight.Orientation 0 + new Slider s1 + set s1.Orientation 1 + set s1.Title "s1" + new Slider s2 + set s2.Orientation 1 + set s2.Title "s2" + new Slider s3 + set s3.Orientation 1 + set s3.Title "s3" + new Slider s4 + set s4.Orientation 1 + set s4.Title "s4" + connect s1.Widget upRight.Widget1 + connect s2.Widget upRight.Widget2 + connect s3.Widget upRight.Widget3 + connect s4.Widget upRight.Widget4 + connect upRight.Widget up.Widget2 + +#------p i p e l i n e--------------------------------------- +#... +#------------------------------------------------------------ + + +//graph +#set main.WinDialog 1 +exec main + + +set s1.BoxProcessMode 1 + + +//print rb=$rb.Out$\n + +/* +print s1=$s1.Out$\n +print s2=$s2.Out$\n +print s3=$s3.Out$\n +print s4=$s4.Out$\n +print sUpLeft=$sUpLeft.Out$\n +print sDown=$sDown.Out$\n +*/ + diff --git a/packages/wx/bbs/appli/exampleLayoutLine_Orientation.bbs b/packages/wx/bbs/appli/exampleLayoutLine_Orientation.bbs new file mode 100644 index 0000000..936764b --- /dev/null +++ b/packages/wx/bbs/appli/exampleLayoutLine_Orientation.bbs @@ -0,0 +1,30 @@ +description "Simple test of wx::LayoutLine widgets" +author "jean-pierre.roux@creatis.univ-lyon1.fr" +category "example;widget" + +load std +load wx + +new LayoutLine main + set main.Orientation V +new LayoutLine Sizer2 + +new Slider s1 + set s1.Title "SliderUp" +new Slider s2 + set s2.Title "SliderDownLeft" +new Slider s3 + set s3.Title "SliderDownRight" + +connect s1.Widget main.Widget1 +connect Sizer2.Widget main.Widget2 + +set Sizer2.Orientation H +connect s2.Widget Sizer2.Widget1 +connect s3.Widget Sizer2.Widget2 + +print s1=$s1.Out$\n +print s2=$s2.Out$\n +print s3=$s3.Out$\n + +exec main diff --git a/packages/wx/bbs/appli/exampleLayoutSplit.bbs b/packages/wx/bbs/appli/exampleLayoutSplit.bbs new file mode 100644 index 0000000..943994c --- /dev/null +++ b/packages/wx/bbs/appli/exampleLayoutSplit.bbs @@ -0,0 +1,14 @@ +description "Simple test of wx::LayoutSplit widget" +author "laurent.guigues@creatis.insa-lyon.fr" +category "example;widget" + +load wx + +new Slider slider1 +new Slider slider2 +new LayoutSplit main + +connect slider1.Widget main.Widget1 +connect slider2.Widget main.Widget2 + +exec main diff --git a/packages/wx/bbs/appli/exampleLayoutSplit_In_LayoutSplit.bbs b/packages/wx/bbs/appli/exampleLayoutSplit_In_LayoutSplit.bbs new file mode 100644 index 0000000..66492f7 --- /dev/null +++ b/packages/wx/bbs/appli/exampleLayoutSplit_In_LayoutSplit.bbs @@ -0,0 +1,91 @@ +description "Simple test of wx::LayoutSplit widgets" +author "jean-pierre.roux@creatis.univ-lyon1.fr" +category "example;widget" + +load std +load wx + + +#----- I N T E R F A C E ------------------------------------- + + +new LayoutSplit main + set main.Orientation V + +new LayoutSplit up +set up.Orientation H + +new LayoutSplit down + set down.Orientation V + new Slider sDown + set sDown.Title "sDown" + connect sDown.Widget down.Widget1 + new RadioButton rb + set rb.Title "Rad But Down" + set rb.In0 "Choix 1" + set rb.In1 "Choix 2" + set rb.In2 "Choix 3" + set rb.In3 "Choix 4" + set rb.In 1 + connect rb.Widget down.Widget2 + + +connect up.Widget main.Widget1 +connect down.Widget main.Widget2 + + + new LayoutSplit upLeft + set upLeft.Proportion 80 + new Slider sUpLeft1 + set sUpLeft1.Title "sUpLeft1" + connect sUpLeft1.Widget upLeft.Widget1 + new Slider sUpLeft2 + set sUpLeft2.Title "sUpLeft2" + connect sUpLeft2.Widget upLeft.Widget2 + connect upLeft.Widget up.Widget1 + + + new LayoutLine upRight + set upRight.Orientation H + new Slider s1 + set s1.Orientation V + set s1.Title "s1" + new Slider s2 + set s2.Orientation V + set s2.Title "s2" + new Slider s3 + set s3.Orientation V + set s3.Title "s3" + new Slider s4 + set s4.Orientation V + set s4.Title "s4" + connect s1.Widget upRight.Widget1 + connect s2.Widget upRight.Widget2 + connect s3.Widget upRight.Widget3 + connect s4.Widget upRight.Widget4 + connect upRight.Widget up.Widget2 + +#------p i p e l i n e--------------------------------------- +#... +#------------------------------------------------------------ + + +//graph +#set main.WinDialog 1 +exec main + + +set s1.BoxProcessMode 1 + + +//print rb=$rb.Out$\n + +/* +print s1=$s1.Out$\n +print s2=$s2.Out$\n +print s3=$s3.Out$\n +print s4=$s4.Out$\n +print sUpLeft=$sUpLeft.Out$\n +print sDown=$sDown.Out$\n +*/ + diff --git a/packages/wx/bbs/appli/exampleLayoutSplit_Orientation.bbs b/packages/wx/bbs/appli/exampleLayoutSplit_Orientation.bbs new file mode 100644 index 0000000..673b063 --- /dev/null +++ b/packages/wx/bbs/appli/exampleLayoutSplit_Orientation.bbs @@ -0,0 +1,30 @@ +description "Simple test of wx::LayoutSplit widgets" +author "jean-pierre.roux@creatis.univ-lyon1.fr" +category "example;widget" + +load std +load wx + +new LayoutSplit main + set main.Orientation V +new LayoutSplit split2 + +new Slider s1 + set s1.Title "SliderUp" +new Slider s2 + set s2.Title "SliderDownLeft" +new Slider s3 + set s3.Title "SliderDownRight" + +connect s1.Widget main.Widget1 +connect split2.Widget main.Widget2 + +set split2.Orientation H +connect s2.Widget split2.Widget1 +connect s3.Widget split2.Widget2 + +print s1=$s1.Out$\n +print s2=$s2.Out$\n +print s3=$s3.Out$\n + +exec main diff --git a/packages/wx/bbs/appli/testNotebook.bbs b/packages/wx/bbs/appli/exampleLayoutTab.bbs similarity index 82% rename from packages/wx/bbs/appli/testNotebook.bbs rename to packages/wx/bbs/appli/exampleLayoutTab.bbs index 1f08f1e..02f3637 100644 --- a/packages/wx/bbs/appli/testNotebook.bbs +++ b/packages/wx/bbs/appli/exampleLayoutTab.bbs @@ -1,4 +1,4 @@ -description "Simple test of wx::Layout widget" +description "Simple test of wx::LayoutTab widget" author "eduardo.davila@creatis.insa-lyon.fr" category "example;widget" @@ -8,7 +8,7 @@ new Slider slider1 new Slider slider2 new Slider slider3 new LayoutLine sizer -new Notebook main +new LayoutTab main connect slider2.Widget sizer.Widget1 connect slider3.Widget sizer.Widget2 diff --git a/packages/wx/bbs/appli/testNotebook2.bbs b/packages/wx/bbs/appli/exampleLayoutTab_2.bbs similarity index 68% rename from packages/wx/bbs/appli/testNotebook2.bbs rename to packages/wx/bbs/appli/exampleLayoutTab_2.bbs index c49f527..e7aa566 100644 --- a/packages/wx/bbs/appli/testNotebook2.bbs +++ b/packages/wx/bbs/appli/exampleLayoutTab_2.bbs @@ -8,22 +8,22 @@ new Slider slider1 new Slider slider2 new Slider slider3 new LayoutLine sizer -new Notebook main +new LayoutTab main new Slider sA new Slider sB -new Notebook notebook - set notebook.Orientation "L" +new LayoutTab layouttab + set layouttab.Orientation "L" connect slider2.Widget sizer.Widget1 connect slider3.Widget sizer.Widget2 -connect sA.Widget notebook.Widget1 -connect sB.Widget notebook.Widget2 +connect sA.Widget layouttab.Widget1 +connect sB.Widget layouttab.Widget2 connect slider1.Widget main.Widget1 connect sizer.Widget main.Widget2 -connect notebook.Widget main.Widget3 +connect layouttab.Widget main.Widget3 exec main diff --git a/packages/wx/bbs/appli/exampleRadioButton.bbs b/packages/wx/bbs/appli/exampleRadioButton.bbs new file mode 100644 index 0000000..cccb248 --- /dev/null +++ b/packages/wx/bbs/appli/exampleRadioButton.bbs @@ -0,0 +1,24 @@ +description "Simple test of wx::RadioButton widget" +author "jean-pierre.roux@creatis.insa-lyon.fr" +category "example;widget" + +load wx +load std + +print "Ceci est un essai de RadioButton" +new RadioButton rb +set rb.Title "My Radio Button" +set rb.In0 "This" +set rb.In1 "Is" +set rb.In2 "Not" +set rb.In4 "A" +set rb.In5 "Love" +# Here we put "Song" in In9 : if it is selected, the output is '9' +set rb.In9 "Song" +set rb.In 2 + +print $rb.Out$\n + +//new StaticText t +//connect rb.Out t.In +//connect rb.BoxChange t.BoxExecute diff --git a/packages/wx/bbs/appli/exampleSlider.bbs b/packages/wx/bbs/appli/exampleSlider.bbs new file mode 100644 index 0000000..962a353 --- /dev/null +++ b/packages/wx/bbs/appli/exampleSlider.bbs @@ -0,0 +1,7 @@ +description "Simple test of wx::Slider widget" +author "laurent.guigues@creatis.insa-lyon.fr" +category "example;widget" + +load wx +new Slider slider +exec slider diff --git a/packages/wx/bbs/appli/exampleTextInputOutput.bbs b/packages/wx/bbs/appli/exampleTextInputOutput.bbs index 84d66e5..2c885b5 100644 --- a/packages/wx/bbs/appli/exampleTextInputOutput.bbs +++ b/packages/wx/bbs/appli/exampleTextInputOutput.bbs @@ -1,6 +1,6 @@ description "Input/OutputText widgets example" author "laurent.guigues at creatis.insa-lyon.fr" -category "example" +category "example;widget" include wx new InputText in diff --git a/packages/wx/src/bbwxNotebook.cxx b/packages/wx/src/bbwxLayoutTab.cxx similarity index 85% rename from packages/wx/src/bbwxNotebook.cxx rename to packages/wx/src/bbwxLayoutTab.cxx index d4aa4ff..b61b23c 100644 --- a/packages/wx/src/bbwxNotebook.cxx +++ b/packages/wx/src/bbwxLayoutTab.cxx @@ -1,10 +1,10 @@ /*========================================================================= Program: bbtk - Module: $RCSfile: bbwxNotebook.cxx,v $ + Module: $RCSfile: bbwxLayoutTab.cxx,v $ Language: C++ - Date: $Date: 2008/02/08 14:58:31 $ - Version: $Revision: 1.2 $ + Date: $Date: 2008/02/19 18:31:36 $ + Version: $Revision: 1.1 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -24,7 +24,7 @@ #ifdef _USE_WXWIDGETS_ -#include "bbwxNotebook.h" +#include "bbwxLayoutTab.h" #include "bbwxPackage.h" #include "bbtkUtilities.h" @@ -33,12 +33,12 @@ namespace bbwx { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx , Notebook); + BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx , LayoutTab); - BBTK_USER_BLACK_BOX_IMPLEMENTATION(Notebook,bbtk::WxBlackBox); + BBTK_USER_BLACK_BOX_IMPLEMENTATION(LayoutTab,bbtk::WxBlackBox); - void Notebook::bbUserConstructor() + void LayoutTab::bbUserConstructor() { bbSetInputOrientation("TOP"); bbSetInputWidget1(NULL); @@ -52,7 +52,7 @@ namespace bbwx bbSetInputWidget9(NULL); } - void Notebook::TryInsertWindow(wxNotebook *book, wxWindow *widgetchild ) + void LayoutTab::TryInsertWindow(wxNotebook *book, wxWindow *widgetchild ) { if (widgetchild!=NULL) { @@ -62,12 +62,12 @@ namespace bbwx } - void Notebook::Process() + void LayoutTab::Process() { } - void Notebook::CreateWidget() + void LayoutTab::CreateWidget() { long style = wxNB_TOP; if (bbtk::Utilities::loosematch(bbGetInputOrientation(),"0|T|TOP")==true) { style=wxNB_TOP; } diff --git a/packages/wx/src/bbwxNotebook.h b/packages/wx/src/bbwxLayoutTab.h similarity index 68% rename from packages/wx/src/bbwxNotebook.h rename to packages/wx/src/bbwxLayoutTab.h index 1a77078..ed3cd47 100644 --- a/packages/wx/src/bbwxNotebook.h +++ b/packages/wx/src/bbwxLayoutTab.h @@ -1,10 +1,10 @@ /*========================================================================= Program: bbtk - Module: $RCSfile: bbwxNotebook.h,v $ + Module: $RCSfile: bbwxLayoutTab.h,v $ Language: C++ - Date: $Date: 2008/02/08 14:58:31 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/02/19 18:31:36 $ + Version: $Revision: 1.1 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,8 +33,8 @@ #ifdef _USE_WXWIDGETS_ -#ifndef __bbWxNotebook_h__ -#define __bbWxNotebook_h__ +#ifndef __bbWxLayoutTab_h__ +#define __bbWxLayoutTab_h__ #include "bbtkWxBlackBox.h" #include @@ -46,10 +46,10 @@ namespace bbwx - class /*BBTK_EXPORT*/ Notebook : public bbtk::WxBlackBox + class /*BBTK_EXPORT*/ LayoutTab : public bbtk::WxBlackBox { - BBTK_USER_BLACK_BOX_INTERFACE(Notebook,bbtk::WxBlackBox); + BBTK_USER_BLACK_BOX_INTERFACE(LayoutTab,bbtk::WxBlackBox); BBTK_DECLARE_INPUT(Widget1,wxWindow*); BBTK_DECLARE_INPUT(Widget2,wxWindow*); BBTK_DECLARE_INPUT(Widget3,wxWindow*); @@ -75,22 +75,22 @@ namespace bbwx //================================================================= // BlackBox description - BBTK_BEGIN_DESCRIBE_BLACK_BOX(Notebook,bbtk::WxBlackBox); - BBTK_NAME("Notebook"); + BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutTab,bbtk::WxBlackBox); + BBTK_NAME("LayoutTab"); BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr"); - BBTK_DESCRIPTION("Notebook widget (wxNotebook)"); + BBTK_DESCRIPTION("LayoutTab widget (wxNotebook)"); // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); - BBTK_INPUT(Notebook,Widget1,"widget 1",wxWindow*); - BBTK_INPUT(Notebook,Widget2,"widget 2",wxWindow*); - BBTK_INPUT(Notebook,Widget3,"widget 3",wxWindow*); - BBTK_INPUT(Notebook,Widget4,"widget 4",wxWindow*); - BBTK_INPUT(Notebook,Widget5,"widget 5",wxWindow*); - BBTK_INPUT(Notebook,Widget6,"widget 6",wxWindow*); - BBTK_INPUT(Notebook,Widget7,"widget 7",wxWindow*); - BBTK_INPUT(Notebook,Widget8,"widget 8",wxWindow*); - BBTK_INPUT(Notebook,Widget9,"widget 9",wxWindow*); - BBTK_INPUT(Notebook,Orientation,"Orientation (default T), 0=T=TOP , 1=R=RIGHT , 2=B=BOTTON , 3=L=LEFT " ,std::string); - BBTK_END_DESCRIBE_BLACK_BOX(Notebook); + BBTK_INPUT(LayoutTab,Widget1,"widget 1",wxWindow*); + BBTK_INPUT(LayoutTab,Widget2,"widget 2",wxWindow*); + BBTK_INPUT(LayoutTab,Widget3,"widget 3",wxWindow*); + BBTK_INPUT(LayoutTab,Widget4,"widget 4",wxWindow*); + BBTK_INPUT(LayoutTab,Widget5,"widget 5",wxWindow*); + BBTK_INPUT(LayoutTab,Widget6,"widget 6",wxWindow*); + BBTK_INPUT(LayoutTab,Widget7,"widget 7",wxWindow*); + BBTK_INPUT(LayoutTab,Widget8,"widget 8",wxWindow*); + BBTK_INPUT(LayoutTab,Widget9,"widget 9",wxWindow*); + BBTK_INPUT(LayoutTab,Orientation,"Orientation (default T), 0=T=TOP , 1=R=RIGHT , 2=B=BOTTON , 3=L=LEFT " ,std::string); + BBTK_END_DESCRIBE_BLACK_BOX(LayoutTab); //================================================================= -- 2.45.1