]> Creatis software - bbtk.git/blob - packages/wx/bbs/appli/wxTour.bbs
03f12152f44add2d7e6d31f7c4c87d0ecfa32434
[bbtk.git] / packages / wx / bbs / appli / wxTour.bbs
1 description "A tour of wx boxes"
2 author "laurent.guigues@creatis.insa-lyon.fr"
3 category "demo"
4
5 include wx
6 #==================================================================
7 print " "
8 print "============================"
9 print "A Slider whose output is plugged into an OutputText"
10 print "============================"
11 print " "
12 #==================================================================
13 message echo 2
14
15 # Create the Slider
16 new Slider     slider
17 # Make it signal it has changed when it is moved (not only released)
18 set slider.ReactiveOnTrack 1
19 # Create the OutputText
20 new OutputText text
21 # Add the Layout
22 new LayoutLine main
23 # Make it a Dialog
24 set main.WinDialog true
25
26 # Setting up the Layout
27 connect slider.Widget    main.Widget1
28 connect text.Widget      main.Widget2
29
30 #The output of the slider is plugged into the input of the text
31 #To do this, we must have an int to string adaptor, hence load std
32 load std
33 connect slider.Out       text.In
34
35 # Any change of the slider must update the text
36 connect slider.BoxChange text.BoxExecute
37
38 # Go!
39 exec main
40
41 #==================================================================
42 message echo 0
43 clear
44 print " "
45 print "============================"
46 print "Splitting a window into two adjustable parts"
47 print "============================"
48 print " "
49 #==================================================================
50 message echo 2
51
52 new LayoutSplit main
53 new Slider slider1
54 new Slider slider2
55 connect slider1.Widget main.Widget1
56 connect slider2.Widget main.Widget2
57 set main.Proportion 75
58 set main.Orientation Horizontal
59 set main.WinDialog true
60 exec main
61
62 #==================================================================
63 message echo 0
64 clear
65 #==================================================================