]> Creatis software - bbtk.git/blobdiff - packages/wx/bbs/appli/wxTour.bbs
*** empty log message ***
[bbtk.git] / packages / wx / bbs / appli / wxTour.bbs
diff --git a/packages/wx/bbs/appli/wxTour.bbs b/packages/wx/bbs/appli/wxTour.bbs
new file mode 100644 (file)
index 0000000..d22aaca
--- /dev/null
@@ -0,0 +1,55 @@
+description "A tour of wx boxes"
+author "laurent.guigues@creatis.insa-lyon.fr"
+category "demo"
+
+include wx
+#==================================================================
+print " "
+print "===================================================="
+print "A Slider whose output is plugged into an OutputText"
+message echo 2
+
+# Create the Slider
+new Slider     slider
+# Make it signal it has changed when it is moved (not only released)
+set slider.ReactiveOnTrack 1
+# Create the OutputText
+new OutputText text
+# Add the Layout
+new LayoutLine main
+# Make it a Dialog 
+set main.WinDialog true
+
+# Setting up the Layout :
+connect slider.Widget    main.Widget1
+connect text.Widget      main.Widget2
+
+# The output of the slider is plugged into the input of the text
+# To do this, we must have an int to string adaptor, hence load std
+load std
+connect slider.Out       text.In
+
+# Any change of the slider must update the text
+connect slider.BoxChange text.BoxExecute
+
+# Go!
+exec main
+
+#==================================================================
+message echo 0
+clear
+print " "
+print "===================================================="
+print "Splitting a window into two adjustable parts"
+#==================================================================
+message echo 2
+
+new LayoutSplit main
+set main.WinDialog true
+
+exec main
+
+#==================================================================
+message echo 0
+clear
+#==================================================================