]> Creatis software - bbtk.git/blob - packages/wx/bbs/appli/wxTour.bbs
Feature #1774
[bbtk.git] / packages / wx / bbs / appli / wxTour.bbs
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la SantÈ)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26
27 description "A tour of wx boxes"
28 author "laurent.guigues@creatis.insa-lyon.fr"
29 category "demo"
30
31 include wx
32 #==================================================================
33 print " "
34 print "============================"
35 print "A Slider whose output is plugged into an OutputText"
36 print "============================"
37 print " "
38 #==================================================================
39 message echo 2
40
41 # Create the Slider
42 new Slider     slider
43 # Make it signal it has changed when it is moved (not only released)
44 set slider.ReactiveOnTrack 1
45 # Create the OutputText
46 new OutputText text
47 # Add the Layout
48 new LayoutLine main
49 # Make it a Dialog
50 set main.WinDialog true
51
52 # Setting up the Layout
53 connect slider.Widget    main.Widget1
54 connect text.Widget      main.Widget2
55
56 #The output of the slider is plugged into the input of the text
57 #To do this, we must have an int to string adaptor, hence load std
58 load std
59 connect slider.Out       text.In
60
61 # Any change of the slider must update the text
62 connect slider.BoxChange text.BoxExecute
63
64 # Go!
65 exec main
66
67 #==================================================================
68 message echo 0
69 clear
70 print " "
71 print "============================"
72 print "Splitting a window into two adjustable parts"
73 print "============================"
74 print " "
75 #==================================================================
76 message echo 2
77
78 new LayoutSplit main
79 new Slider slider1
80 new Slider slider2
81 connect slider1.Widget main.Widget1
82 connect slider2.Widget main.Widget2
83 set main.Proportion 75
84 set main.Orientation Horizontal
85 set main.WinDialog true
86 exec main
87
88 #==================================================================
89 message echo 0
90 clear
91 #==================================================================