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