]> Creatis software - bbtk.git/commitdiff
test to example
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Tue, 19 Feb 2008 18:31:36 +0000 (18:31 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Tue, 19 Feb 2008 18:31:36 +0000 (18:31 +0000)
13 files changed:
packages/wx/bbs/appli/exampleLayoutLine.bbs [new file with mode: 0644]
packages/wx/bbs/appli/exampleLayoutLine_In_LayoutLine.bbs [new file with mode: 0644]
packages/wx/bbs/appli/exampleLayoutLine_Orientation.bbs [new file with mode: 0644]
packages/wx/bbs/appli/exampleLayoutSplit.bbs [new file with mode: 0644]
packages/wx/bbs/appli/exampleLayoutSplit_In_LayoutSplit.bbs [new file with mode: 0644]
packages/wx/bbs/appli/exampleLayoutSplit_Orientation.bbs [new file with mode: 0644]
packages/wx/bbs/appli/exampleLayoutTab.bbs [moved from packages/wx/bbs/appli/testNotebook.bbs with 82% similarity]
packages/wx/bbs/appli/exampleLayoutTab_2.bbs [moved from packages/wx/bbs/appli/testNotebook2.bbs with 68% similarity]
packages/wx/bbs/appli/exampleRadioButton.bbs [new file with mode: 0644]
packages/wx/bbs/appli/exampleSlider.bbs [new file with mode: 0644]
packages/wx/bbs/appli/exampleTextInputOutput.bbs
packages/wx/src/bbwxLayoutTab.cxx [moved from packages/wx/src/bbwxNotebook.cxx with 85% similarity]
packages/wx/src/bbwxLayoutTab.h [moved from packages/wx/src/bbwxNotebook.h with 68% similarity]

diff --git a/packages/wx/bbs/appli/exampleLayoutLine.bbs b/packages/wx/bbs/appli/exampleLayoutLine.bbs
new file mode 100644 (file)
index 0000000..48f6ac0
--- /dev/null
@@ -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 (file)
index 0000000..55378d3
--- /dev/null
@@ -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 (file)
index 0000000..936764b
--- /dev/null
@@ -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 (file)
index 0000000..943994c
--- /dev/null
@@ -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 (file)
index 0000000..66492f7
--- /dev/null
@@ -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 (file)
index 0000000..673b063
--- /dev/null
@@ -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
similarity index 82%
rename from packages/wx/bbs/appli/testNotebook.bbs
rename to packages/wx/bbs/appli/exampleLayoutTab.bbs
index 1f08f1e5323840b342bcf167cde72c7eefc09cb9..02f3637b52a33cb54123ff72f6665f5ce5027057 100644 (file)
@@ -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
similarity index 68%
rename from packages/wx/bbs/appli/testNotebook2.bbs
rename to packages/wx/bbs/appli/exampleLayoutTab_2.bbs
index c49f527b070c200e90c641a247acd4e8c8da478d..e7aa56612286ef1686417f77c4ab9869cc13aa04 100644 (file)
@@ -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 (file)
index 0000000..cccb248
--- /dev/null
@@ -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 (file)
index 0000000..962a353
--- /dev/null
@@ -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
index 84d66e5115d681e46ae9a27a3e8b4aeebecf127f..2c885b5a136c94a4f8f0b2d19fac1e758a82eec5 100644 (file)
@@ -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
similarity index 85%
rename from packages/wx/src/bbwxNotebook.cxx
rename to packages/wx/src/bbwxLayoutTab.cxx
index d4aa4ff80c6633fe99d54722ca67c23dc169e7aa..b61b23c1b8998a01a5b942a32cd7171e6fd2a694 100644 (file)
@@ -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"
 
 
 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; }
similarity index 68%
rename from packages/wx/src/bbwxNotebook.h
rename to packages/wx/src/bbwxLayoutTab.h
index 1a77078a534a94de9b324173b91fd3968a5b7e0d..ed3cd476dc8b41ce5ddd2644bd636280dcca862f 100644 (file)
@@ -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 <wx/notebook.h>
@@ -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);
   //=================================================================