author "laurent.guigues at creatis.insa-lyon.fr"
category "demo"
+include kw
+load std
+include vtk
+load wx
+
print "=================================="
print "A Slider whose output is plugged into an OutputText"
message echo 2
-include kw
-load std
new kwSlider in
new kwOutputText out
connect in.Out out.In
print "The kwSlicer widget"
message echo 2
-load kw
-include vtk
-load wx
-
new LoadHola r
new kwSlicer s
connect r.Out s.In
exec s
-reset
message echo 0
clear
print "Using both kw and wx"
message echo 2
-load wx
-load kw
-load std
-
new OutputText t
exec t
connect s.BoxChange t.BoxExecute
exec s
+
+message echo 0
+clear
--- /dev/null
+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
+#==================================================================