]> Creatis software - bbtk.git/blob - packages/wx/bbs/appli/exampleComplexLayoutSplit_In_LayoutSplit.bbs
Feature #1774
[bbtk.git] / packages / wx / bbs / appli / exampleComplexLayoutSplit_In_LayoutSplit.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 "Simple test of wx::LayoutSplit widgets"
28 author "jean-pierre.roux@creatis.univ-lyon1.fr"
29 category "example"
30
31 load std
32 load wx
33
34
35 #----- I N T E R F A C E  -------------------------------------
36
37 // Just to see the mess when you want something not so simple...
38
39 //                          upLeft    upRight
40 //                        ----------|-----------|
41 //                        |         |           |
42 //                        |         |           |
43 //                        |         |           |
44 //      UP                |---------|           |
45 //                        |         |           |
46 //                        |         |           |
47 //                        |         |           |
48 //     ----------         -----------------------
49 //                        |                     |
50 //                        |                     |
51 //                        |                     |
52 //                        |                     |
53 //        DOWN            ----------|-----------|
54 //                        |         |           |
55 //                        |         |           |
56 //                        |         |           |  downDown
57 //                        |         |           |
58 //                        ----------------------
59 //
60 // Better use a mix of LayoutTxxx (xxx = Up, Down, Right, Left)!
61 //
62 //
63 // TODO : add same structure using only  LayoutTxxx
64  
65 new LayoutSplit main
66  set main.Orientation V
67
68 new LayoutSplit up
69 set up.Orientation H
70
71 new LayoutSplit down
72   set down.Orientation V
73   new Slider s1Down
74       set s1Down.Title "s1Down"
75   connect s1Down.Widget   down.Widget1
76      
77  new LayoutSplit downDown
78   set downDown.Orientation H
79   
80   connect downDown.Widget down.Widget2 
81      
82   new RadioButton rb1
83     set rb1.Title "Rad But DownLeft"
84     set rb1.In0 "Choix 1"
85     set rb1.In1 "Choix 2"
86     set rb1.In2 "Choix 3"
87     set rb1.In3 "Choix 4"
88     set rb1.In 1
89    connect rb1.Widget downDown.Widget1
90
91
92   new RadioButton rb2
93     set rb2.Title "Rad But DownLeft"
94     set rb2.In0 "Choix 1"
95     set rb2.In1 "Choix 2"
96     set rb2.In2 "Choix 3"
97     set rb2.In3 "Choix 4"
98     set rb2.In 4
99    connect rb2.Widget downDown.Widget2
100
101
102   connect up.Widget   main.Widget1
103   connect down.Widget main.Widget2
104
105
106   new LayoutSplit upLeft
107     set upLeft.Proportion 80
108     // only 2 objets are allowed here
109     new Slider sUpLeft1
110       set sUpLeft1.Title "sUpLeft1"
111     connect sUpLeft1.Widget upLeft.Widget1
112     new Slider sUpLeft2
113       set sUpLeft2.Title "sUpLeft2"
114     connect sUpLeft2.Widget upLeft.Widget2
115
116   connect upLeft.Widget up.Widget1
117
118
119   new LayoutLine upRight
120     set upRight.Orientation H
121     new Slider s1
122     set s1.Orientation V
123     set s1.Title "s1"
124     new Slider s2
125     set s2.Orientation V
126     set s2.Title "s2"
127     new Slider s3
128     set s3.Orientation V
129     set s3.Title "s3"
130     new Slider s4
131     set s4.Orientation V
132     set s4.Title "s4"
133     connect s1.Widget upRight.Widget1 
134     connect s2.Widget upRight.Widget2 
135     connect s3.Widget upRight.Widget3 
136     connect s4.Widget upRight.Widget4 
137   connect upRight.Widget up.Widget2
138
139 #------p i p e l i n e---------------------------------------
140 #...
141 #------------------------------------------------------------
142
143
144 //graph
145 #set main.WinDialog 1
146 exec main
147
148
149 set s1.BoxProcessMode 1
150
151
152 //print rb=$rb.Out$\n
153
154 /*
155 print s1=$s1.Out$\n
156 print s2=$s2.Out$\n
157 print s3=$s3.Out$\n
158 print s4=$s4.Out$\n
159 print sUpLeft=$sUpLeft.Out$\n
160 print sDown=$sDown.Out$\n
161 */
162