author | Claus Gittinger <cg@exept.de> |
Wed, 04 Sep 2002 21:38:09 +0200 | |
changeset 1596 | be79a5a5e8e4 |
parent 1581 | d7afe06ebbae |
child 1625 | 4dc8b595e92f |
permissions | -rw-r--r-- |
163 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
15 |
||
1409 | 16 |
"{ Package: 'stx:libtool2' }" |
17 |
||
163 | 18 |
ApplicationModel subclass:#UILayoutTool |
1305 | 19 |
instanceVariableNames:'modifiedHolder aspects selection currentTool layoutView tabList |
20 |
layoutSpec toolsDictionary' |
|
163 | 21 |
classVariableNames:'' |
22 |
poolDictionaries:'' |
|
23 |
category:'Interface-UIPainter' |
|
24 |
! |
|
25 |
||
1343 | 26 |
ApplicationModel subclass:#AnyLayout |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
27 |
instanceVariableNames:'' |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
28 |
classVariableNames:'' |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
29 |
poolDictionaries:'' |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
30 |
privateIn:UILayoutTool |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
31 |
! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
32 |
|
1447 | 33 |
UILayoutTool::AnyLayout subclass:#AlignmentOrigin |
34 |
instanceVariableNames:'' |
|
35 |
classVariableNames:'' |
|
36 |
poolDictionaries:'' |
|
37 |
privateIn:UILayoutTool |
|
38 |
! |
|
39 |
||
40 |
UILayoutTool::AnyLayout subclass:#Extent |
|
41 |
instanceVariableNames:'' |
|
42 |
classVariableNames:'' |
|
43 |
poolDictionaries:'' |
|
44 |
privateIn:UILayoutTool |
|
45 |
! |
|
46 |
||
1409 | 47 |
UILayoutTool::AnyLayout subclass:#LayoutFrame |
1343 | 48 |
instanceVariableNames:'' |
49 |
classVariableNames:'' |
|
50 |
poolDictionaries:'' |
|
51 |
privateIn:UILayoutTool |
|
52 |
! |
|
53 |
||
1447 | 54 |
UILayoutTool::AnyLayout subclass:#LayoutOrigin |
1310 | 55 |
instanceVariableNames:'' |
56 |
classVariableNames:'' |
|
57 |
poolDictionaries:'' |
|
58 |
privateIn:UILayoutTool |
|
59 |
! |
|
60 |
||
1343 | 61 |
UILayoutTool::AnyLayout subclass:#Point |
1310 | 62 |
instanceVariableNames:'' |
63 |
classVariableNames:'' |
|
64 |
poolDictionaries:'' |
|
65 |
privateIn:UILayoutTool |
|
66 |
! |
|
67 |
||
1343 | 68 |
UILayoutTool::AnyLayout subclass:#Rectangle |
1304 | 69 |
instanceVariableNames:'' |
70 |
classVariableNames:'' |
|
71 |
poolDictionaries:'' |
|
72 |
privateIn:UILayoutTool |
|
73 |
! |
|
74 |
||
163 | 75 |
!UILayoutTool class methodsFor:'documentation'! |
76 |
||
77 |
copyright |
|
78 |
" |
|
79 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
80 |
All Rights Reserved |
|
81 |
||
82 |
This software is furnished under a license and may be used |
|
83 |
only in accordance with the terms of that license and with the |
|
84 |
inclusion of the above copyright notice. This software may not |
|
85 |
be provided or otherwise made available to, or used by, any |
|
86 |
other person. No title to or ownership of the software is |
|
87 |
hereby transferred. |
|
88 |
" |
|
89 |
||
90 |
||
91 |
||
92 |
! |
|
93 |
||
94 |
documentation |
|
95 |
" |
|
96 |
used by the UIPainter to manipulate the layout of the selected component |
|
97 |
||
98 |
[author:] |
|
99 |
Claus Atzkern |
|
100 |
||
101 |
[see also:] |
|
102 |
UIPainter |
|
103 |
UIHelpTool |
|
104 |
UISpecificationTool |
|
105 |
" |
|
106 |
||
107 |
||
108 |
! ! |
|
109 |
||
110 |
!UILayoutTool class methodsFor:'constants'! |
|
111 |
||
112 |
label |
|
113 |
^ 'Layout' |
|
114 |
! ! |
|
115 |
||
184 | 116 |
!UILayoutTool class methodsFor:'help specs'! |
117 |
||
118 |
helpSpec |
|
741 | 119 |
"This resource specification was automatically generated |
120 |
by the UIHelpTool of ST/X." |
|
121 |
||
122 |
"Do not manually edit this!! If it is corrupted, |
|
123 |
the UIHelpTool may not be able to read the specification." |
|
293 | 124 |
|
184 | 125 |
" |
741 | 126 |
UIHelpTool openOnClass:UILayoutTool |
293 | 127 |
" |
128 |
||
741 | 129 |
<resource: #help> |
130 |
||
131 |
^super helpSpec addPairsFrom:#( |
|
132 |
||
133 |
#cornerX |
|
134 |
'Absolute corner x of the selected widget.' |
|
135 |
||
136 |
#cornerY |
|
137 |
'Absolute corner y of the selected widget.' |
|
138 |
||
139 |
#layoutTool |
|
140 |
'Tool to set the layout of the selected widget.' |
|
184 | 141 |
|
142 |
#leftAbsolute |
|
714 | 143 |
'Offset of the left edge; positive is to the right, negative to the left.' |
184 | 144 |
|
741 | 145 |
#leftRelative |
146 |
'Relative origin x of the selected widget.' |
|
201 | 147 |
|
148 |
#makeLeftAbsolute |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
149 |
'Compute pure-absolute x' |
201 | 150 |
|
741 | 151 |
#makeLeftRelative |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
152 |
'Compute pure-fraction x.' |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
153 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
154 |
#makeLeftRelativeFromRight |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
155 |
'Compute fraction+offset for x relative to containers right.' |
741 | 156 |
|
157 |
#makeTopAbsolute |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
158 |
'Compute pure-absolute y.' |
741 | 159 |
|
160 |
#makeTopRelative |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
161 |
'Computes pure-fractional y.' |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
162 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
163 |
#makeTopRelativeFromBottom |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
164 |
'Compute fraction+offset for y relative to containers bottom.' |
741 | 165 |
|
166 |
#originX |
|
167 |
'Absolute origin x of the selected widget.' |
|
168 |
||
169 |
#originY |
|
170 |
'Absolute origin y of the selected widget.' |
|
171 |
||
184 | 172 |
#topAbsolute |
714 | 173 |
'Offset of the top edge; positive is to the bottom, negative to the top.' |
184 | 174 |
|
201 | 175 |
#topRelative |
714 | 176 |
'Relative origin y of the selected widget.' |
201 | 177 |
|
184 | 178 |
) |
179 |
! ! |
|
180 |
||
163 | 181 |
!UILayoutTool class methodsFor:'interface specs'! |
182 |
||
184 | 183 |
layoutOriginSpec |
741 | 184 |
"This resource specification was automatically generated |
185 |
by the UIPainter of ST/X." |
|
184 | 186 |
|
741 | 187 |
"Do not manually edit this!! If it is corrupted, |
188 |
the UIPainter may not be able to read the specification." |
|
184 | 189 |
|
190 |
" |
|
259 | 191 |
UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec |
192 |
UILayoutTool new openInterface:#layoutOriginSpec |
|
184 | 193 |
" |
194 |
||
195 |
<resource: #canvas> |
|
196 |
||
1304 | 197 |
^ |
198 |
#(#FullSpec |
|
199 |
#name: #layoutOriginSpec |
|
200 |
#window: |
|
201 |
#(#WindowSpec |
|
202 |
#label: 'UILayoutTool' |
|
203 |
#name: 'UILayoutTool' |
|
204 |
#min: #(#Point 10 10) |
|
205 |
#max: #(#Point 1152 900) |
|
1343 | 206 |
#bounds: #(#Rectangle 12 22 357 204) |
1304 | 207 |
) |
208 |
#component: |
|
209 |
#(#SpecCollection |
|
210 |
#collection: #( |
|
211 |
#(#FramedBoxSpec |
|
212 |
#label: 'Origin' |
|
213 |
#name: 'FramedBox' |
|
214 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 108 0) |
|
215 |
#labelPosition: #topLeft |
|
216 |
#component: |
|
217 |
#(#SpecCollection |
|
218 |
#collection: #( |
|
219 |
#(#LabelSpec |
|
220 |
#label: 'Relative:' |
|
221 |
#name: 'labelRelative' |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
222 |
#layout: #(#Point 103 6) |
1304 | 223 |
) |
224 |
#(#LabelSpec |
|
225 |
#label: 'Offset:' |
|
226 |
#name: 'labelAbsolute' |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
227 |
#layout: #(#Point 203 6) |
1304 | 228 |
) |
229 |
#(#LabelSpec |
|
230 |
#label: 'Left:' |
|
231 |
#name: 'labelLeft' |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
232 |
#layout: #(#AlignmentOrigin 68 0 27 0 1 0) |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
233 |
) |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
234 |
#(#ActionButtonSpec |
1343 | 235 |
#label: 'imageFractX' |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
236 |
#name: 'actionRelativeLeft' |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
237 |
#layout: #(#LayoutFrame 77 0 24 0 99 0 46 0) |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
238 |
#activeHelpKey: #makeLeftRelative |
1343 | 239 |
#hasCharacterOrientedLabel: false |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
240 |
#tabable: true |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
241 |
#model: #relativeLeft |
1304 | 242 |
) |
243 |
#(#InputFieldSpec |
|
244 |
#name: 'fieldLeftFraction' |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
245 |
#layout: #(#LayoutFrame 103 0 24 0 153 0 46 0) |
1304 | 246 |
#activeHelpKey: #leftRelative |
247 |
#tabable: true |
|
248 |
#model: #leftFraction |
|
249 |
#group: #inputGroup |
|
250 |
#type: #numberOrNil |
|
251 |
#acceptChannel: #acceptChannel |
|
252 |
#modifiedChannel: #modifiedChannel |
|
253 |
#acceptOnPointerLeave: false |
|
254 |
) |
|
255 |
#(#ActionButtonSpec |
|
1343 | 256 |
#label: 'imageAbsXFromRight' |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
257 |
#name: 'actionRightRelativeLeft' |
1343 | 258 |
#layout: #(#LayoutFrame 257 0 24 0 279 0 46 0) |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
259 |
#activeHelpKey: #makeLeftRelativeFromRight |
1343 | 260 |
#hasCharacterOrientedLabel: false |
1304 | 261 |
#tabable: true |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
262 |
#model: #rightRelativeLeft |
1304 | 263 |
) |
264 |
#(#InputFieldSpec |
|
265 |
#name: 'fieldLeftOffset' |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
266 |
#layout: #(#LayoutFrame 203 0 24 0 253 0 46 0) |
1304 | 267 |
#activeHelpKey: #leftAbsolute |
268 |
#tabable: true |
|
269 |
#model: #leftOffset |
|
270 |
#group: #inputGroup |
|
271 |
#type: #numberOrNil |
|
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
272 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
273 |
#modifiedChannel: #modifiedChannel |
1304 | 274 |
#acceptOnPointerLeave: false |
275 |
) |
|
276 |
#(#ActionButtonSpec |
|
1343 | 277 |
#label: 'imageAbsX' |
1304 | 278 |
#name: 'actionAbsoluteLeft' |
1343 | 279 |
#layout: #(#LayoutFrame 178 0 24 0 200 0 46 0) |
1304 | 280 |
#activeHelpKey: #makeLeftAbsolute |
1343 | 281 |
#hasCharacterOrientedLabel: false |
1304 | 282 |
#tabable: true |
283 |
#model: #absoluteLeft |
|
284 |
) |
|
285 |
#(#LabelSpec |
|
286 |
#label: 'Top:' |
|
287 |
#name: 'labelTop' |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
288 |
#layout: #(#AlignmentOrigin 68 0 54 0 1 0) |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
289 |
) |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
290 |
#(#ActionButtonSpec |
1343 | 291 |
#label: 'imageFractY' |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
292 |
#name: 'actionRelativeTop' |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
293 |
#layout: #(#LayoutFrame 77 0 51 0 99 0 73 0) |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
294 |
#activeHelpKey: #makeTopRelative |
1343 | 295 |
#hasCharacterOrientedLabel: false |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
296 |
#tabable: true |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
297 |
#model: #relativeTop |
1304 | 298 |
) |
299 |
#(#InputFieldSpec |
|
300 |
#name: 'fieldTopFraction' |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
301 |
#layout: #(#LayoutFrame 103 0 51 0 153 0 73 0) |
1304 | 302 |
#activeHelpKey: #topRelative |
303 |
#tabable: true |
|
304 |
#model: #topFraction |
|
305 |
#group: #inputGroup |
|
306 |
#type: #numberOrNil |
|
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
307 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
308 |
#modifiedChannel: #modifiedChannel |
1304 | 309 |
#acceptOnPointerLeave: false |
310 |
) |
|
311 |
#(#ActionButtonSpec |
|
1343 | 312 |
#label: 'imageAbsYFromBottom' |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
313 |
#name: 'actionBottomRelativeTop' |
1343 | 314 |
#layout: #(#LayoutFrame 257 0 51 0 279 0 73 0) |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
315 |
#activeHelpKey: #makeTopRelativeFromBottom |
1343 | 316 |
#hasCharacterOrientedLabel: false |
1304 | 317 |
#tabable: true |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
318 |
#model: #bottomRelativeTop |
1304 | 319 |
) |
320 |
#(#InputFieldSpec |
|
321 |
#name: 'fieldTopOffset' |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
322 |
#layout: #(#LayoutFrame 203 0 51 0 253 0 73 0) |
1304 | 323 |
#activeHelpKey: #topAbsolute |
324 |
#tabable: true |
|
325 |
#model: #topOffset |
|
326 |
#group: #inputGroup |
|
327 |
#type: #numberOrNil |
|
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
328 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
329 |
#modifiedChannel: #modifiedChannel |
1304 | 330 |
#acceptOnPointerLeave: false |
331 |
) |
|
332 |
#(#ActionButtonSpec |
|
1343 | 333 |
#label: 'imageAbsY' |
1304 | 334 |
#name: 'actionAbsoluteTop' |
1343 | 335 |
#layout: #(#LayoutFrame 178 0 51 0 200 0 73 0) |
1304 | 336 |
#activeHelpKey: #makeTopAbsolute |
1343 | 337 |
#hasCharacterOrientedLabel: false |
1304 | 338 |
#tabable: true |
339 |
#model: #absoluteTop |
|
340 |
) |
|
341 |
) |
|
342 |
||
184 | 343 |
) |
1304 | 344 |
) |
345 |
) |
|
346 |
||
347 |
) |
|
184 | 348 |
) |
349 |
! |
|
350 |
||
351 |
layoutPointSpec |
|
741 | 352 |
"This resource specification was automatically generated |
353 |
by the UIPainter of ST/X." |
|
184 | 354 |
|
741 | 355 |
"Do not manually edit this!! If it is corrupted, |
356 |
the UIPainter may not be able to read the specification." |
|
184 | 357 |
|
358 |
" |
|
259 | 359 |
UIPainter new openOnClass:UILayoutTool andSelector:#layoutPointSpec |
360 |
UILayoutTool new openInterface:#layoutPointSpec |
|
184 | 361 |
" |
259 | 362 |
|
184 | 363 |
<resource: #canvas> |
364 |
||
365 |
^ |
|
259 | 366 |
|
184 | 367 |
#(#FullSpec |
690 | 368 |
#window: |
184 | 369 |
#(#WindowSpec |
741 | 370 |
#name: 'UILayoutTool' |
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
371 |
#layout: #(#LayoutFrame 216 0 173 0 493 0 296 0) |
741 | 372 |
#label: 'UILayoutTool' |
690 | 373 |
#min: #(#Point 10 10) |
374 |
#max: #(#Point 1152 900) |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
375 |
#bounds: #(#Rectangle 216 173 494 297) |
690 | 376 |
#usePreferredExtent: false |
184 | 377 |
) |
690 | 378 |
#component: |
184 | 379 |
#(#SpecCollection |
690 | 380 |
#collection: |
184 | 381 |
#( |
751 | 382 |
#(#FramedBoxSpec |
383 |
#name: 'FramedBox' |
|
384 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 94 0) |
|
385 |
#component: |
|
386 |
#(#SpecCollection |
|
387 |
#collection: |
|
388 |
#( |
|
389 |
#(#LabelSpec |
|
390 |
#name: 'labelOriginY' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
391 |
#layout: #(#AlignmentOrigin 83 0 14 0 1 0) |
751 | 392 |
#label: 'Left:' |
393 |
) |
|
394 |
#(#InputFieldSpec |
|
395 |
#name: 'fieldOriginX' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
396 |
#layout: #(#LayoutFrame 85 0 11 0 135 0 33 0) |
751 | 397 |
#activeHelpKey: #originX |
398 |
#tabable: true |
|
399 |
#model: #leftOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
400 |
#group: #inputGroup |
751 | 401 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
402 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
403 |
#modifiedChannel: #modifiedChannel |
751 | 404 |
) |
405 |
#(#LabelSpec |
|
406 |
#name: 'labelOriginX' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
407 |
#layout: #(#AlignmentOrigin 83 0 39 0 1 0) |
751 | 408 |
#label: 'Top:' |
409 |
) |
|
410 |
#(#InputFieldSpec |
|
411 |
#name: 'fieldOriginY' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
412 |
#layout: #(#LayoutFrame 85 0 36 0 135 0 58 0) |
751 | 413 |
#activeHelpKey: #originY |
414 |
#tabable: true |
|
415 |
#model: #topOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
416 |
#group: #inputGroup |
751 | 417 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
418 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
419 |
#modifiedChannel: #modifiedChannel |
751 | 420 |
) |
421 |
) |
|
422 |
) |
|
423 |
#label: 'Origin' |
|
424 |
#labelPosition: #topLeft |
|
184 | 425 |
) |
426 |
) |
|
427 |
) |
|
428 |
) |
|
922
0a5799408f54
assign all inputFields to a common group.
Claus Gittinger <cg@exept.de>
parents:
751
diff
changeset
|
429 |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
430 |
"Modified: / 13.8.1998 / 19:52:15 / cg" |
184 | 431 |
! |
432 |
||
163 | 433 |
slices |
434 |
^ #( |
|
435 |
( 'Frame' LayoutFrame) |
|
436 |
( 'Origin' LayoutOrigin) |
|
437 |
( 'Alig.Origin' AlignmentOrigin) |
|
438 |
( 'Point' Point) |
|
439 |
( 'Rectangle' Rectangle) |
|
440 |
( 'Extent' Extent) |
|
441 |
) |
|
442 |
||
443 |
! |
|
444 |
||
445 |
windowSpec |
|
741 | 446 |
"This resource specification was automatically generated |
447 |
by the UIPainter of ST/X." |
|
163 | 448 |
|
741 | 449 |
"Do not manually edit this!! If it is corrupted, |
450 |
the UIPainter may not be able to read the specification." |
|
163 | 451 |
|
452 |
" |
|
453 |
UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec |
|
454 |
UILayoutTool new openInterface:#windowSpec |
|
741 | 455 |
UILayoutTool open |
163 | 456 |
" |
457 |
||
458 |
<resource: #canvas> |
|
459 |
||
1305 | 460 |
^ |
461 |
#(#FullSpec |
|
462 |
#name: #windowSpec |
|
463 |
#window: |
|
464 |
#(#WindowSpec |
|
465 |
#label: 'UILayoutTool' |
|
466 |
#name: 'UILayoutTool' |
|
467 |
#min: #(#Point 10 10) |
|
468 |
#max: #(#Point 1152 900) |
|
469 |
#bounds: #(#Rectangle 12 22 312 322) |
|
470 |
) |
|
471 |
#component: |
|
472 |
#(#SpecCollection |
|
473 |
#collection: #( |
|
474 |
#(#NoteBookViewSpec |
|
475 |
#attributes: |
|
476 |
#(#tabable |
|
477 |
true |
|
163 | 478 |
) |
1305 | 479 |
#name: 'NoteBook' |
480 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
481 |
#activeHelpKey: #layoutTool |
|
482 |
#enableChannel: #enableChannel |
|
483 |
#tabable: true |
|
484 |
#model: #noteBookModel |
|
485 |
#menu: #noteBookList |
|
486 |
#direction: #bottom |
|
487 |
#canvas: #layoutCanvasHolder |
|
488 |
#keepCanvasAlive: true |
|
489 |
) |
|
490 |
) |
|
491 |
||
492 |
) |
|
163 | 493 |
) |
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
494 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
495 |
"Modified: / 5.2.2000 / 15:37:02 / cg" |
163 | 496 |
! ! |
497 |
||
498 |
!UILayoutTool methodsFor:'accessing'! |
|
499 |
||
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
500 |
acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
501 |
"return the value of the instance variable 'acceptChannel' (automatically generated)" |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
502 |
|
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
503 |
^ masterApplication acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
504 |
! |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
505 |
|
163 | 506 |
layout |
507 |
"returns configued layout or nil |
|
508 |
" |
|
1305 | 509 |
^ currentTool notNil ifTrue:[currentTool layout] |
510 |
ifFalse:[nil] |
|
163 | 511 |
! |
512 |
||
513 |
layoutType |
|
514 |
"returns current layout type or nil |
|
515 |
" |
|
516 |
|slice| |
|
517 |
||
518 |
(slice := self selectedSlice) notNil ifTrue:[ |
|
519 |
^ slice last |
|
520 |
]. |
|
521 |
^ nil |
|
522 |
! |
|
523 |
||
524 |
layoutView |
|
525 |
"returns current edited view |
|
526 |
" |
|
527 |
^ layoutView |
|
528 |
! |
|
529 |
||
1072 | 530 |
layoutView:aView type:aTypeOrNil spec:aSpec |
283 | 531 |
"change current edited view |
532 |
" |
|
163 | 533 |
|type name list| |
534 |
||
535 |
layoutView := aView. |
|
1072 | 536 |
layoutSpec := aSpec. |
163 | 537 |
|
1074
49ef9991d1d5
disable defaultExtent button when editing the top-windows spec.
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
538 |
(self aspectFor:#defaultExtentEnabled) value:(aSpec class == WindowSpec) not. |
49ef9991d1d5
disable defaultExtent button when editing the top-windows spec.
Claus Gittinger <cg@exept.de>
parents:
1072
diff
changeset
|
539 |
|
283 | 540 |
aTypeOrNil notNil ifTrue:[ |
163 | 541 |
self class slices findFirst:[:e| |
283 | 542 |
e last == aTypeOrNil ifTrue:[name := e first. true] |
163 | 543 |
]. |
283 | 544 |
list := Array with:name |
545 |
] ifFalse:[ |
|
546 |
(type := UIPainterView layoutType:layoutView) notNil ifTrue:[ |
|
547 |
self class slices findFirst:[:e| |
|
548 |
e last == type ifTrue:[name := e first. true] |
|
549 |
]. |
|
550 |
list := tabList. |
|
235 | 551 |
|
283 | 552 |
type == #Extent ifTrue:[ |
553 |
aView superView specClass isLayoutContainer ifTrue:[ |
|
554 |
list := Array with:name |
|
555 |
] ifFalse:[ |
|
556 |
list := list copyWith:name |
|
557 |
] |
|
235 | 558 |
] |
559 |
] |
|
163 | 560 |
]. |
561 |
self noteBookList value:list. |
|
562 |
self noteBookModel value:name. |
|
563 |
self update. |
|
564 |
! |
|
565 |
||
566 |
modifiedHolder:aValueHolder |
|
567 |
"set the value holder set to true in case of modifying attributes |
|
568 |
" |
|
569 |
modifiedHolder notNil ifTrue:[ |
|
570 |
modifiedHolder removeDependent:self. |
|
571 |
]. |
|
572 |
||
573 |
(modifiedHolder := aValueHolder) notNil ifTrue:[ |
|
574 |
modifiedHolder addDependent:self. |
|
575 |
]. |
|
576 |
||
577 |
! |
|
578 |
||
579 |
update |
|
580 |
"update from view |
|
581 |
" |
|
1305 | 582 |
|view| |
163 | 583 |
|
1305 | 584 |
(selection notNil and:[currentTool notNil]) ifTrue:[ |
1072 | 585 |
(view := layoutView) notNil ifTrue:[ |
1305 | 586 |
currentTool fetch:view spec:layoutSpec |
163 | 587 |
] |
588 |
]. |
|
589 |
||
590 |
! ! |
|
591 |
||
592 |
!UILayoutTool methodsFor:'aspects'! |
|
593 |
||
594 |
aspectFor:aKey |
|
595 |
"returns aspect for a key or nil |
|
596 |
" |
|
597 |
^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ] |
|
598 |
||
599 |
||
600 |
! |
|
601 |
||
1305 | 602 |
layoutCanvasHolder |
603 |
|holder| |
|
604 |
||
605 |
(holder := builder bindingAt:#layoutCanvasHolder) isNil ifTrue:[ |
|
606 |
holder := ValueHolder new. |
|
607 |
builder aspectAt:#layoutCanvasHolder put:holder |
|
608 |
]. |
|
609 |
^ holder |
|
610 |
! |
|
611 |
||
1072 | 612 |
notUsingDefaultExtent |
613 |
|holder| |
|
614 |
||
615 |
(holder := builder bindingAt:#notUsingDefaultExtent) isNil ifTrue:[ |
|
616 |
holder := BlockValue forLogicalNot:(self aspectFor:#useDefaultExtent). |
|
617 |
builder aspectAt:#notUsingDefaultExtent put:holder. |
|
618 |
]. |
|
619 |
^ holder |
|
620 |
||
621 |
! |
|
622 |
||
163 | 623 |
noteBookList |
624 |
"returns list of tab labels |
|
625 |
" |
|
626 |
|holder| |
|
627 |
||
628 |
(holder := builder bindingAt:#noteBookList) isNil ifTrue:[ |
|
629 |
holder := nil asValue. |
|
630 |
builder aspectAt:#noteBookList put:holder |
|
631 |
]. |
|
632 |
^ holder |
|
633 |
! |
|
634 |
||
635 |
noteBookModel |
|
636 |
"automatically generated by UIPainter ..." |
|
637 |
||
638 |
|holder| |
|
639 |
||
640 |
(holder := builder bindingAt:#noteBookModel) isNil ifTrue:[ |
|
641 |
holder := AspectAdaptor new subject:self; forAspect:#selection. |
|
642 |
builder aspectAt:#noteBookModel put:holder. |
|
643 |
]. |
|
644 |
^ holder |
|
645 |
! ! |
|
646 |
||
647 |
!UILayoutTool methodsFor:'change & update'! |
|
648 |
||
649 |
update:something with:aParameter from:changedObject |
|
650 |
"one of my models changed its value |
|
651 |
" |
|
652 |
changedObject ~~ modifiedHolder ifTrue:[ |
|
653 |
modifiedHolder value ~~ true ifTrue:[ |
|
654 |
modifiedHolder isNil ifFalse:[ |
|
655 |
modifiedHolder value:true |
|
656 |
] |
|
657 |
] |
|
658 |
] |
|
659 |
||
660 |
! ! |
|
661 |
||
662 |
!UILayoutTool methodsFor:'converting absolute'! |
|
663 |
||
664 |
absolute:what xOrY:xOrY |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
665 |
"compute what as absolute (i.e. fraction=0, offset >= 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
666 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
667 |
|extent fraction offset fractSymb offsetSymb |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
668 |
newOffset newFraction fractHolder offsetHolder| |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
669 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
670 |
extent := (self layoutView superView computeExtent) perform:xOrY. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
671 |
fractSymb := (what, 'Fraction') asSymbol. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
672 |
offsetSymb := (what, 'Offset') asSymbol. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
673 |
fractHolder := (self aspectFor:fractSymb). |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
674 |
offsetHolder := (self aspectFor:offsetSymb). |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
675 |
fraction := fractHolder value. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
676 |
offset := offsetHolder value. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
677 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
678 |
newOffset := offset + ((fraction * extent) asInteger). |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
679 |
newFraction := 0. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
680 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
681 |
fractHolder value:newFraction. |
1343 | 682 |
offsetHolder value:newOffset. |
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
683 |
! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
684 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
685 |
absoluteBottom |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
686 |
"compute bottom as absolute (i.e. fraction=0, offset >= 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
687 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
688 |
self absolute:'bottom' xOrY:#y |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
689 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
690 |
! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
691 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
692 |
absoluteLeft |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
693 |
"compute left as absolute (i.e. fraction=0, offset >= 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
694 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
695 |
self absolute:'left' xOrY:#x |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
696 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
697 |
! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
698 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
699 |
absoluteRight |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
700 |
"compute right as absolute (i.e. fraction=0, offset >= 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
701 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
702 |
self absolute:'right' xOrY:#x |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
703 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
704 |
! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
705 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
706 |
absoluteTop |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
707 |
"compute top as absolute (i.e. fraction=0, offset >= 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
708 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
709 |
self absolute:'top' xOrY:#y |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
710 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
711 |
! ! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
712 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
713 |
!UILayoutTool methodsFor:'converting absolute from corner'! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
714 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
715 |
bottomRelativeBottom |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
716 |
"compute bottom relative to containers bottom (fraction=1, offset negative)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
717 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
718 |
self cornerRelative:'bottom' xOrY:#y |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
719 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
720 |
! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
721 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
722 |
bottomRelativeTop |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
723 |
"compute top relative to containers bottom (fraction=1, offset negative)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
724 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
725 |
self cornerRelative:'top' xOrY:#y |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
726 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
727 |
! |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
728 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
729 |
cornerRelative:what xOrY:xOrY |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
730 |
"compute what relative to the corner (i.e. fraction=1, offset negative)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
731 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
732 |
|extent fraction offset fractSymb offsetSymb |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
733 |
newFraction newOffset fractHolder offsetHolder| |
163 | 734 |
|
735 |
extent := (self layoutView superView computeExtent) perform:xOrY. |
|
736 |
fractSymb := (what, 'Fraction') asSymbol. |
|
737 |
offsetSymb := (what, 'Offset') asSymbol. |
|
1198 | 738 |
fractHolder := (self aspectFor:fractSymb). |
739 |
offsetHolder := (self aspectFor:offsetSymb). |
|
740 |
fraction := fractHolder value. |
|
741 |
offset := offsetHolder value. |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
742 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
743 |
newOffset := offset + ((fraction * extent) asInteger). |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
744 |
newOffset := newOffset - extent. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
745 |
newFraction := 1. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
746 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
747 |
fractHolder value:newFraction. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
748 |
offsetHolder value:newOffset. |
163 | 749 |
|
750 |
||
751 |
||
752 |
! |
|
753 |
||
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
754 |
rightRelativeLeft |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
755 |
"compute left relative to containers right (fraction=1, offset negative)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
756 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
757 |
self cornerRelative:'left' xOrY:#x |
163 | 758 |
|
759 |
! |
|
760 |
||
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
761 |
rightRelativeRight |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
762 |
"compute right relative to containers right (fraction=1, offset negative)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
763 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
764 |
self cornerRelative:'right' xOrY:#x |
163 | 765 |
|
766 |
! ! |
|
767 |
||
768 |
!UILayoutTool methodsFor:'converting relative'! |
|
769 |
||
770 |
relative:what xOrY:xOrY |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
771 |
"compute what relative to the origin (i.e. fraction=0..1, offset 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
772 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
773 |
|extent fraction offset fractSymb offsetSymb |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
774 |
newFraction newOffset |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
775 |
fractHolder offsetHolder| |
163 | 776 |
|
777 |
extent := (self layoutView superView computeExtent) perform:xOrY. |
|
778 |
fractSymb := (what, 'Fraction') asSymbol. |
|
779 |
offsetSymb := (what, 'Offset') asSymbol. |
|
1198 | 780 |
fractHolder := (self aspectFor:fractSymb). |
781 |
offsetHolder := (self aspectFor:offsetSymb). |
|
782 |
fraction := fractHolder value. |
|
783 |
offset := offsetHolder value. |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
784 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
785 |
newFraction := (fraction + (offset / extent)) asFloat. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
786 |
newOffset := 0. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
787 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
788 |
(newFraction > 1.0) ifTrue:[newFraction := 1.0]. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
789 |
(newFraction < 0.0) ifTrue:[newFraction := 0]. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
790 |
|
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
791 |
offsetHolder value:newOffset. |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
792 |
fractHolder value:newFraction. |
163 | 793 |
|
794 |
||
795 |
||
796 |
! |
|
797 |
||
798 |
relativeBottom |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
799 |
"compute bottom relative to the origin (i.e. fraction=0..1, offset 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
800 |
|
163 | 801 |
self relative:'bottom' xOrY:#y |
802 |
||
803 |
||
804 |
! |
|
805 |
||
806 |
relativeLeft |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
807 |
"compute left relative to the origin (i.e. fraction=0..1, offset 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
808 |
|
163 | 809 |
self relative:'left' xOrY:#x |
810 |
||
811 |
! |
|
812 |
||
813 |
relativeRight |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
814 |
"compute right relative to the origin (i.e. fraction=0..1, offset 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
815 |
|
163 | 816 |
self relative:'right' xOrY:#x |
817 |
||
818 |
! |
|
819 |
||
820 |
relativeTop |
|
1339
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
821 |
"compute top relative to the origin (i.e. fraction=0..1, offset 0)" |
b989732e3610
added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents:
1334
diff
changeset
|
822 |
|
163 | 823 |
self relative:'top' xOrY:#y |
824 |
||
825 |
! ! |
|
826 |
||
827 |
!UILayoutTool methodsFor:'initialization'! |
|
828 |
||
829 |
initialize |
|
830 |
"initialize channels |
|
831 |
" |
|
221 | 832 |
|slices size| |
833 |
||
163 | 834 |
super initialize. |
835 |
||
836 |
aspects := IdentityDictionary new. |
|
1305 | 837 |
toolsDictionary := IdentityDictionary new. |
163 | 838 |
|
839 |
#( bottomFraction bottomOffset |
|
840 |
leftFraction leftOffset |
|
841 |
topFraction topOffset |
|
842 |
rightFraction rightOffset |
|
843 |
leftAlignmentFraction topAlignmentFraction |
|
1268
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
844 |
(useDefaultExtent false) |
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
845 |
(defaultExtentEnabled false) |
163 | 846 |
) |
847 |
||
1268
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
848 |
do:[:aKeyOrPair| |holder key val| |
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
849 |
(key := aKeyOrPair) isSymbol ifFalse:[ |
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
850 |
key := aKeyOrPair first. |
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
851 |
val := aKeyOrPair second |
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
852 |
]. |
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
853 |
holder := val asValue. |
163 | 854 |
holder addDependent:self. |
1268
1bc516d840bf
must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents:
1198
diff
changeset
|
855 |
aspects at:key put:holder. |
163 | 856 |
]. |
857 |
||
221 | 858 |
slices := self class slices. |
859 |
size := slices size - 1. |
|
860 |
tabList := Array new:size. |
|
163 | 861 |
|
221 | 862 |
1 to:size do:[:i| tabList at:i put:((slices at:i) first) ]. |
163 | 863 |
|
864 |
||
865 |
! ! |
|
866 |
||
867 |
!UILayoutTool methodsFor:'selection'! |
|
868 |
||
869 |
selectedSlice |
|
870 |
"returns slice assigned to selection or nil |
|
871 |
" |
|
872 |
selection notNil ifTrue:[ |
|
873 |
self class slices do:[:aSlice| |
|
874 |
aSlice first = selection ifTrue:[ |
|
875 |
^ aSlice |
|
876 |
] |
|
877 |
] |
|
878 |
]. |
|
879 |
^ nil |
|
880 |
||
881 |
! |
|
882 |
||
883 |
selection |
|
884 |
^ selection |
|
885 |
! |
|
886 |
||
887 |
selection:aSelection |
|
1305 | 888 |
|appl slice sel noteBook key view| |
163 | 889 |
|
293 | 890 |
aSelection isNumber ifTrue:[ |
891 |
aSelection ~~ 0 ifTrue:[sel := tabList at:aSelection] |
|
892 |
] ifFalse:[ |
|
893 |
sel := aSelection |
|
894 |
]. |
|
1305 | 895 |
|
293 | 896 |
selection = sel ifFalse:[ |
897 |
(selection := sel) notNil ifTrue:[ |
|
1305 | 898 |
key := selection asSymbol. |
899 |
appl := toolsDictionary at:key ifAbsent:nil. |
|
900 |
||
901 |
appl isNil ifTrue:[ |
|
1334 | 902 |
view := ApplicationSubView new. |
1305 | 903 |
slice := self selectedSlice. |
904 |
appl := slice last asString. |
|
905 |
appl := Smalltalk classNamed:(self class name asString, '::', appl). |
|
906 |
appl := appl new. |
|
907 |
appl masterApplication:self. |
|
908 |
appl createBuilder. |
|
909 |
view client:appl. |
|
910 |
appl window:view. |
|
911 |
toolsDictionary at:key put:appl. |
|
912 |
] ifFalse:[ |
|
913 |
view := appl window |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
914 |
]. |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
915 |
modifiedHolder value:true. |
163 | 916 |
]. |
1305 | 917 |
currentTool := appl. |
918 |
self layoutCanvasHolder value:view. |
|
163 | 919 |
]. |
920 |
self update |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
921 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
922 |
"Modified: / 4.2.2000 / 22:31:41 / cg" |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
923 |
! ! |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
924 |
|
1343 | 925 |
!UILayoutTool::AnyLayout class methodsFor:'image specs'! |
926 |
||
927 |
imageAbsX |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
928 |
"This resource specification was automatically generated |
1343 | 929 |
by the ImageEditor of ST/X." |
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
930 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
931 |
"Do not manually edit this!! If it is corrupted, |
1343 | 932 |
the ImageEditor may not be able to read the specification." |
933 |
||
934 |
" |
|
935 |
self imageAbsX inspect |
|
936 |
ImageEditor openOnClass:self andSelector:#imageAbsX |
|
937 |
" |
|
938 |
||
939 |
<resource: #image> |
|
940 |
||
941 |
^Icon |
|
942 |
constantNamed:#'UILayoutTool imageAbsX' |
|
943 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
944 |
<@BP@I@N$L*P*)BZ''8*@@(@B''8*P&)B*$L*PC)@@<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
945 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
1447 | 946 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'<@C0@O@N<L;0;/C>??;??/?>??;0?/C.<L;0C/@@<@@b') ; yourself); yourself] |
947 |
! |
|
1343 | 948 |
|
949 |
imageAbsXFromRight |
|
950 |
"This resource specification was automatically generated |
|
951 |
by the ImageEditor of ST/X." |
|
952 |
||
953 |
"Do not manually edit this!! If it is corrupted, |
|
954 |
the ImageEditor may not be able to read the specification." |
|
955 |
||
956 |
" |
|
957 |
self imageAbsXFromRight inspect |
|
958 |
ImageEditor openOnClass:self andSelector:#imageAbsXFromRight |
|
959 |
" |
|
960 |
||
961 |
<resource: #image> |
|
962 |
||
963 |
^Icon |
|
964 |
constantNamed:#'UILayoutTool imageAbsXFromRight' |
|
1447 | 965 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@<@BW@IT0%UBU$IT_%@@T@AT_%YBUTIT0%0BP@I@@<b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@<@C7@O\0=7C7<O_?=??7??_?=?C7\O\0=0C0@O@@<b') ; yourself); yourself] |
966 |
! |
|
1343 | 967 |
|
968 |
imageAbsY |
|
969 |
"This resource specification was automatically generated |
|
970 |
by the ImageEditor of ST/X." |
|
971 |
||
972 |
"Do not manually edit this!! If it is corrupted, |
|
973 |
the ImageEditor may not be able to read the specification." |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
974 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
975 |
" |
1343 | 976 |
self imageAbsY inspect |
977 |
ImageEditor openOnClass:self andSelector:#imageAbsY |
|
978 |
" |
|
979 |
||
980 |
<resource: #image> |
|
981 |
||
982 |
^Icon |
|
983 |
constantNamed:#'UILayoutTool imageAbsY' |
|
1447 | 984 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A?''<BP@I@@$@BPA98D@ HD@P O''0 AC?<@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??????????<C0@O@@<@C0A?8G? O<@_ O?0??C?<@@@b') ; yourself); yourself] |
985 |
! |
|
1343 | 986 |
|
987 |
imageAbsYFromBottom |
|
988 |
"This resource specification was automatically generated |
|
989 |
by the ImageEditor of ST/X." |
|
990 |
||
991 |
"Do not manually edit this!! If it is corrupted, |
|
992 |
the ImageEditor may not be able to read the specification." |
|
993 |
||
994 |
" |
|
995 |
self imageAbsYFromBottom inspect |
|
996 |
ImageEditor openOnClass:self andSelector:#imageAbsYFromBottom |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
997 |
" |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
998 |
|
1343 | 999 |
<resource: #image> |
1000 |
||
1001 |
^Icon |
|
1002 |
constantNamed:#'UILayoutTool imageAbsYFromBottom' |
|
1447 | 1003 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@??B@DO''0DH@ PD@ ^^@I@@$@BP@I@?''>@@X@A??<b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@??C?<O?0G8@?0G? _>@O@@<@C0@O@??????????<b') ; yourself); yourself] |
1004 |
! |
|
1343 | 1005 |
|
1006 |
imageFractX |
|
1007 |
"This resource specification was automatically generated |
|
1008 |
by the ImageEditor of ST/X." |
|
1009 |
||
1010 |
"Do not manually edit this!! If it is corrupted, |
|
1011 |
the ImageEditor may not be able to read the specification." |
|
1012 |
||
1013 |
" |
|
1014 |
self imageFractX inspect |
|
1015 |
ImageEditor openOnClass:self andSelector:#imageFractX |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
1016 |
" |
1343 | 1017 |
|
1018 |
<resource: #image> |
|
1019 |
||
1020 |
^Icon |
|
1021 |
constantNamed:#'UILayoutTool::AnyLayout imageFractX' |
|
1022 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
1023 |
<@>PBY@I&A&TJYII$X&@@X@A$X&RRYP)&A&PBY@I<@<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
1024 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
1447 | 1025 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'<@?0C?@O>A?<O?9????????????>_?0?>A?0C?@O<@<b') ; yourself); yourself] |
1026 |
! |
|
1343 | 1027 |
|
1028 |
imageFractY |
|
1029 |
"This resource specification was automatically generated |
|
1030 |
by the ImageEditor of ST/X." |
|
1031 |
||
1032 |
"Do not manually edit this!! If it is corrupted, |
|
1033 |
the ImageEditor may not be able to read the specification." |
|
1034 |
||
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
1035 |
" |
1343 | 1036 |
self imageFractY inspect |
1037 |
ImageEditor openOnClass:self andSelector:#imageFractY |
|
1038 |
" |
|
1039 |
||
1040 |
<resource: #image> |
|
1041 |
||
1042 |
^Icon |
|
1043 |
constantNamed:#'UILayoutTool::AnyLayout imageFractY' |
|
1447 | 1044 |
ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A?''<PB@ PAB@BP@I@AB@HDA@H?''>@@X@A??<b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??????????<_>@?0A>@C0@O@A>@O<A?8??????????<b') ; yourself); yourself] |
1045 |
! ! |
|
1046 |
||
1047 |
!UILayoutTool::AlignmentOrigin class methodsFor:'help specs'! |
|
1048 |
||
1049 |
helpSpec |
|
1050 |
"This resource specification was automatically generated |
|
1051 |
by the UIHelpTool of ST/X." |
|
1052 |
||
1053 |
"Do not manually edit this!! If it is corrupted, |
|
1054 |
the UIHelpTool may not be able to read the specification." |
|
1055 |
||
1056 |
" |
|
1057 |
UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin |
|
1058 |
" |
|
1059 |
||
1060 |
<resource: #help> |
|
1061 |
||
1062 |
^super helpSpec addPairsFrom:#( |
|
1063 |
||
1064 |
#alignBottomCenter |
|
1065 |
'Aligns the selected widget bottomCenter to location.' |
|
1066 |
||
1067 |
#alignBottomLeft |
|
1068 |
'Aligns the selected widget bottomLeft to location.' |
|
1069 |
||
1070 |
#alignBottomRight |
|
1071 |
'Aligns the selected widget bottomRight to location.' |
|
1072 |
||
1073 |
#alignCenter |
|
1074 |
'Aligns the selected widget center to location.' |
|
1075 |
||
1076 |
#alignHorizontal |
|
1077 |
'Horizontal inset to the location point of the selected widget.' |
|
1078 |
||
1079 |
#alignLeftCenter |
|
1080 |
'Aligns the selected widget leftCenter to location.' |
|
1081 |
||
1082 |
#alignRightCenter |
|
1083 |
'Aligns the selected widget rightCenter to location.' |
|
1084 |
||
1085 |
#alignTopCenter |
|
1086 |
'Aligns the selected widget topCenter to location.' |
|
1087 |
||
1088 |
#alignTopLeft |
|
1089 |
'Aligns the selected widget topLeft to location.' |
|
1090 |
||
1091 |
#alignTopRight |
|
1092 |
'Aligns the selected widget topRight to location.' |
|
1093 |
||
1094 |
#alignVertical |
|
1095 |
'Vertical inset to the location point of the widget.' |
|
1096 |
||
1097 |
) |
|
1098 |
! ! |
|
1099 |
||
1100 |
!UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'! |
|
1101 |
||
1102 |
windowSpec |
|
1103 |
"This resource specification was automatically generated |
|
1104 |
by the UIPainter of ST/X." |
|
1105 |
||
1106 |
"Do not manually edit this!! If it is corrupted, |
|
1107 |
the UIPainter may not be able to read the specification." |
|
1108 |
||
1109 |
" |
|
1110 |
UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec |
|
1111 |
UILayoutTool::AlignmentOrigin new openInterface:#windowSpec |
|
1112 |
UILayoutTool::AlignmentOrigin open |
|
1113 |
" |
|
1114 |
||
1115 |
<resource: #canvas> |
|
1116 |
||
1117 |
^ |
|
1118 |
#(#FullSpec |
|
1119 |
#name: #windowSpec |
|
1120 |
#window: |
|
1121 |
#(#WindowSpec |
|
1122 |
#label: 'UILayoutTool-AlignmentOrigin' |
|
1123 |
#name: 'UILayoutTool-AlignmentOrigin' |
|
1124 |
#min: #(#Point 10 10) |
|
1125 |
#max: #(#Point 1152 900) |
|
1126 |
#bounds: #(#Rectangle 42 231 447 438) |
|
1127 |
) |
|
1128 |
#component: |
|
1129 |
#(#SpecCollection |
|
1130 |
#collection: #( |
|
1131 |
#(#UISubSpecification |
|
1132 |
#name: 'layoutOriginSpec' |
|
1133 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 111 0) |
|
1134 |
#majorKey: #UILayoutTool |
|
1135 |
#minorKey: #layoutOriginSpec |
|
1136 |
) |
|
1137 |
#(#FramedBoxSpec |
|
1138 |
#label: 'Alignment' |
|
1139 |
#name: 'FramedBox' |
|
1140 |
#layout: #(#LayoutFrame 1 0.0 113 0 0 1.0 208 0) |
|
1141 |
#labelPosition: #topLeft |
|
1142 |
#component: |
|
1143 |
#(#SpecCollection |
|
1144 |
#collection: #( |
|
1145 |
#(#LabelSpec |
|
1146 |
#label: 'Horizontal:' |
|
1147 |
#name: 'alignHLabel' |
|
1148 |
#layout: #(#AlignmentOrigin 88 0 17 0 1 0) |
|
1149 |
#adjust: #right |
|
1150 |
) |
|
1151 |
#(#InputFieldSpec |
|
1152 |
#attributes: |
|
1153 |
#(#tabable |
|
1154 |
true |
|
1155 |
) |
|
1156 |
#name: 'leftAlignmentFractionField' |
|
1157 |
#layout: #(#LayoutFrame 90 0 14 0 147 0 36 0) |
|
1158 |
#activeHelpKey: #alignHorizontal |
|
1159 |
#tabable: true |
|
1160 |
#model: #leftAlignmentFraction |
|
1161 |
#group: #inputGroup |
|
1162 |
#type: #numberOrNil |
|
1163 |
#acceptOnLostFocus: true |
|
1164 |
#acceptChannel: #acceptChannel |
|
1165 |
#modifiedChannel: #modifiedChannel |
|
1166 |
#acceptOnPointerLeave: false |
|
1167 |
) |
|
1168 |
#(#LabelSpec |
|
1169 |
#label: 'Vertical:' |
|
1170 |
#name: 'alignVLabel' |
|
1171 |
#layout: #(#AlignmentOrigin 88 0 43 0 1 0) |
|
1172 |
#adjust: #right |
|
1173 |
) |
|
1174 |
#(#InputFieldSpec |
|
1175 |
#attributes: |
|
1176 |
#(#tabable |
|
1177 |
true |
|
1178 |
) |
|
1179 |
#name: 'topAlignmentFractionField' |
|
1180 |
#layout: #(#LayoutFrame 90 0 40 0 147 0 62 0) |
|
1181 |
#activeHelpKey: #alignVertical |
|
1182 |
#tabable: true |
|
1183 |
#model: #topAlignmentFraction |
|
1184 |
#group: #inputGroup |
|
1185 |
#type: #numberOrNil |
|
1186 |
#acceptOnLostFocus: true |
|
1187 |
#acceptChannel: #acceptChannel |
|
1188 |
#modifiedChannel: #modifiedChannel |
|
1189 |
#acceptOnPointerLeave: false |
|
1190 |
) |
|
1191 |
#(#DividerSpec |
|
1192 |
#name: 'separator1' |
|
1193 |
#layout: #(#LayoutFrame 204 0 19 0 245 0 22 0) |
|
1194 |
) |
|
1195 |
#(#DividerSpec |
|
1196 |
#name: 'separator2' |
|
1197 |
#layout: #(#LayoutFrame 204 0 55 0 245 0 58 0) |
|
1198 |
) |
|
1199 |
#(#DividerSpec |
|
1200 |
#name: 'separator3' |
|
1201 |
#layout: #(#LayoutFrame 196 0 28 0 199 0 50 0) |
|
1202 |
#orientation: #vertical |
|
1203 |
) |
|
1204 |
#(#DividerSpec |
|
1205 |
#name: 'separator4' |
|
1206 |
#layout: #(#LayoutFrame 250 0 28 0 253 0 50 0) |
|
1207 |
#orientation: #vertical |
|
1208 |
) |
|
1209 |
#(#ActionButtonSpec |
|
1210 |
#attributes: |
|
1211 |
#(#tabable |
|
1212 |
true |
|
1213 |
) |
|
1214 |
#name: 'alignTopLeft' |
|
1215 |
#layout: #(#LayoutFrame 190 0 14 0 204 0 28 0) |
|
1216 |
#activeHelpKey: #alignTopLeft |
|
1217 |
#tabable: true |
|
1218 |
#model: #alignTopLeft |
|
1219 |
) |
|
1220 |
#(#ActionButtonSpec |
|
1221 |
#attributes: |
|
1222 |
#(#tabable |
|
1223 |
true |
|
1224 |
) |
|
1225 |
#name: 'alignTopCenter' |
|
1226 |
#layout: #(#LayoutFrame 217 0 14 0 231 0 28 0) |
|
1227 |
#activeHelpKey: #alignTopCenter |
|
1228 |
#tabable: true |
|
1229 |
#model: #alignTopCenter |
|
1230 |
) |
|
1231 |
#(#ActionButtonSpec |
|
1232 |
#attributes: |
|
1233 |
#(#tabable |
|
1234 |
true |
|
1235 |
) |
|
1236 |
#name: 'alignTopRight' |
|
1237 |
#layout: #(#LayoutFrame 245 0 14 0 259 0 28 0) |
|
1238 |
#activeHelpKey: #alignTopRight |
|
1239 |
#tabable: true |
|
1240 |
#model: #alignTopRight |
|
1241 |
) |
|
1242 |
#(#ActionButtonSpec |
|
1243 |
#attributes: |
|
1244 |
#(#tabable |
|
1245 |
true |
|
1246 |
) |
|
1247 |
#name: 'alignLeftCenter' |
|
1248 |
#layout: #(#LayoutFrame 190 0 32 0 204 0 46 0) |
|
1249 |
#activeHelpKey: #alignLeftCenter |
|
1250 |
#tabable: true |
|
1251 |
#model: #alignLeftCenter |
|
1252 |
) |
|
1253 |
#(#ActionButtonSpec |
|
1254 |
#attributes: |
|
1255 |
#(#tabable |
|
1256 |
true |
|
1257 |
) |
|
1258 |
#name: 'alignCenter' |
|
1259 |
#layout: #(#LayoutFrame 217 0 32 0 231 0 46 0) |
|
1260 |
#activeHelpKey: #alignCenter |
|
1261 |
#tabable: true |
|
1262 |
#model: #alignCenter |
|
1263 |
) |
|
1264 |
#(#ActionButtonSpec |
|
1265 |
#attributes: |
|
1266 |
#(#tabable |
|
1267 |
true |
|
1268 |
) |
|
1269 |
#name: 'alignRightCenter' |
|
1270 |
#layout: #(#LayoutFrame 245 0 32 0 259 0 46 0) |
|
1271 |
#activeHelpKey: #alignRightCenter |
|
1272 |
#tabable: true |
|
1273 |
#model: #alignRightCenter |
|
1274 |
) |
|
1275 |
#(#ActionButtonSpec |
|
1276 |
#attributes: |
|
1277 |
#(#tabable |
|
1278 |
true |
|
1279 |
) |
|
1280 |
#name: 'alignBottomLeft' |
|
1281 |
#layout: #(#LayoutFrame 190 0 50 0 204 0 64 0) |
|
1282 |
#activeHelpKey: #alignBottomLeft |
|
1283 |
#tabable: true |
|
1284 |
#model: #alignBottomLeft |
|
1285 |
) |
|
1286 |
#(#ActionButtonSpec |
|
1287 |
#attributes: |
|
1288 |
#(#tabable |
|
1289 |
true |
|
1290 |
) |
|
1291 |
#name: 'alignBottomCenter' |
|
1292 |
#layout: #(#LayoutFrame 217 0 50 0 231 0 64 0) |
|
1293 |
#activeHelpKey: #alignBottomCenter |
|
1294 |
#tabable: true |
|
1295 |
#model: #alignBottomCenter |
|
1296 |
) |
|
1297 |
#(#ActionButtonSpec |
|
1298 |
#attributes: |
|
1299 |
#(#tabable |
|
1300 |
true |
|
1301 |
) |
|
1302 |
#name: 'alignBottomRight' |
|
1303 |
#layout: #(#LayoutFrame 245 0 50 0 259 0 64 0) |
|
1304 |
#activeHelpKey: #alignBottomRight |
|
1305 |
#tabable: true |
|
1306 |
#model: #alignBottomRight |
|
1307 |
) |
|
1308 |
) |
|
1309 |
||
1310 |
) |
|
1311 |
) |
|
1312 |
) |
|
1313 |
||
1314 |
) |
|
1315 |
) |
|
1316 |
! ! |
|
1317 |
||
1318 |
!UILayoutTool::AlignmentOrigin methodsFor:'accessing'! |
|
1319 |
||
1320 |
fetch:aView spec:aSpec |
|
1321 |
"fetch alignmentOrigin |
|
1322 |
" |
|
1323 |
|layout type |
|
1324 |
leftAlignmentFractionHolder topAlignmentFractionHolder |
|
1325 |
leftOffsetHolder leftFractionHolder topOffsetHolder topFractionHolder| |
|
1326 |
||
1327 |
type := UIPainterView layoutType:aView. |
|
1328 |
layout := aView geometryLayout. |
|
1329 |
||
1330 |
leftOffsetHolder := (self aspectFor:#leftOffset). |
|
1331 |
leftFractionHolder := (self aspectFor:#leftFraction). |
|
1332 |
topOffsetHolder := (self aspectFor:#topOffset). |
|
1333 |
topFractionHolder := (self aspectFor:#topFraction). |
|
1334 |
leftAlignmentFractionHolder := (self aspectFor:#leftAlignmentFraction). |
|
1335 |
topAlignmentFractionHolder := (self aspectFor:#topAlignmentFraction). |
|
1336 |
||
1337 |
layout isLayout ifTrue:[ |
|
1338 |
leftOffsetHolder value:(layout leftOffset). |
|
1339 |
leftFractionHolder value:(layout leftFraction). |
|
1340 |
topOffsetHolder value:(layout topOffset). |
|
1341 |
topFractionHolder value:(layout topFraction). |
|
1342 |
||
1343 |
type == #AlignmentOrigin ifTrue:[ |
|
1344 |
leftAlignmentFractionHolder value:(layout leftAlignmentFraction). |
|
1345 |
topAlignmentFractionHolder value:(layout topAlignmentFraction). |
|
1346 |
^ self |
|
1347 |
] |
|
1348 |
] ifFalse:[ |
|
1349 |
layout := aView computeOrigin. |
|
1350 |
||
1351 |
leftOffsetHolder value:(layout x). |
|
1352 |
leftFractionHolder value:0. |
|
1353 |
topOffsetHolder value:(layout y). |
|
1354 |
topFractionHolder value:0. |
|
1355 |
]. |
|
1356 |
leftAlignmentFractionHolder value:0. |
|
1357 |
topAlignmentFractionHolder value:0. |
|
1358 |
||
1359 |
||
1360 |
! |
|
1361 |
||
1362 |
layout |
|
1363 |
"returns current layout as alignmentOrigin |
|
1364 |
" |
|
1365 |
|layout| |
|
1366 |
||
1367 |
layout := Smalltalk::AlignmentOrigin new. |
|
1368 |
||
1581 | 1369 |
layout |
1370 |
leftFraction:(((self aspectFor:#leftFraction) value) ? 0) |
|
1371 |
offset:(((self aspectFor:#leftOffset) value) ? 0) |
|
1372 |
topFraction:(((self aspectFor:#topFraction) value) ? 0) |
|
1373 |
offset:(((self aspectFor:#topOffset) value) ? 0). |
|
1374 |
||
1375 |
layout |
|
1376 |
leftAlignmentFraction:(((self aspectFor:#leftAlignmentFraction) value) ? 0) |
|
1377 |
topAlignmentFraction:(((self aspectFor:#topAlignmentFraction) value) ? 0). |
|
1447 | 1378 |
|
1379 |
^ layout |
|
1380 |
! ! |
|
1381 |
||
1382 |
!UILayoutTool::AlignmentOrigin methodsFor:'alignment'! |
|
1383 |
||
1384 |
alignBottomCenter |
|
1385 |
self makeAlignLeft:0.5 top:1 |
|
1386 |
||
1387 |
||
1388 |
! |
|
1389 |
||
1390 |
alignBottomLeft |
|
1391 |
self makeAlignLeft:0 top:1 |
|
1392 |
||
1393 |
||
1394 |
! |
|
1395 |
||
1396 |
alignBottomRight |
|
1397 |
self makeAlignLeft:1 top:1 |
|
1398 |
||
1399 |
||
1400 |
! |
|
1401 |
||
1402 |
alignCenter |
|
1403 |
self makeAlignLeft:0.5 top:0.5 |
|
1404 |
||
1405 |
||
1406 |
! |
|
1407 |
||
1408 |
alignLeftCenter |
|
1409 |
self makeAlignLeft:0 top:0.5 |
|
1410 |
||
1411 |
||
1412 |
! |
|
1413 |
||
1414 |
alignRightCenter |
|
1415 |
self makeAlignLeft:1 top:0.5 |
|
1416 |
||
1417 |
||
1418 |
! |
|
1419 |
||
1420 |
alignTopCenter |
|
1421 |
self makeAlignLeft:0.5 top:0 |
|
1422 |
||
1423 |
||
1424 |
! |
|
1425 |
||
1426 |
alignTopLeft |
|
1427 |
self makeAlignLeft:0 top:0 |
|
1428 |
||
1429 |
||
1430 |
! |
|
1431 |
||
1432 |
alignTopRight |
|
1433 |
self makeAlignLeft:1 top:0 |
|
1434 |
||
1435 |
||
1436 |
! |
|
1437 |
||
1438 |
makeAlignLeft:leftAlignmentFraction top:topAlignmentFraction |
|
1439 |
|lAF tAF lO tO ext lAHolder tAHolder lOHolder tOHolder| |
|
1440 |
||
1441 |
lAF := (lAHolder := self aspectFor:#leftAlignmentFraction) value ? 0. |
|
1442 |
tAF := (tAHolder := self aspectFor:#topAlignmentFraction) value ? 0. |
|
1443 |
ext := (self aspectFor:#layoutView) computeExtent. |
|
1444 |
||
1445 |
lAHolder value:leftAlignmentFraction. |
|
1446 |
tAHolder value:topAlignmentFraction. |
|
1447 |
||
1448 |
lO := (lOHolder := self aspectFor:#leftOffset) value ? 0. |
|
1449 |
tO := (tOHolder := self aspectFor:#topOffset) value ? 0. |
|
1450 |
||
1451 |
lO := lO + (ext x * (leftAlignmentFraction - lAF)). |
|
1452 |
tO := tO + (ext y * (topAlignmentFraction - tAF)). |
|
1453 |
||
1454 |
lOHolder value:(lO rounded). |
|
1455 |
tOHolder value:(tO rounded). |
|
1456 |
||
1457 |
! |
|
1458 |
||
1459 |
makeAlignTopRight |
|
1460 |
self makeAlignLeft:1 top:0 |
|
1461 |
||
1462 |
||
1463 |
! ! |
|
1464 |
||
1465 |
!UILayoutTool::Extent class methodsFor:'help specs'! |
|
1466 |
||
1467 |
helpSpec |
|
1468 |
"This resource specification was automatically generated |
|
1469 |
by the UIHelpTool of ST/X." |
|
1470 |
||
1471 |
"Do not manually edit this!! If it is corrupted, |
|
1472 |
the UIHelpTool may not be able to read the specification." |
|
1473 |
||
1474 |
" |
|
1475 |
UIHelpTool openOnClass:UILayoutTool::Extent |
|
1476 |
" |
|
1477 |
||
1478 |
<resource: #help> |
|
1479 |
||
1480 |
^super helpSpec addPairsFrom:#( |
|
1481 |
||
1482 |
#hrzExtent |
|
1483 |
'Horizontal extent of the selected widget.' |
|
1484 |
||
1485 |
#vrtExtent |
|
1486 |
'Vertical extent of the selected widget.' |
|
1487 |
||
1488 |
) |
|
1489 |
! ! |
|
1490 |
||
1491 |
!UILayoutTool::Extent class methodsFor:'interface specs'! |
|
1492 |
||
1493 |
windowSpec |
|
1494 |
"This resource specification was automatically generated |
|
1495 |
by the UIPainter of ST/X." |
|
1496 |
||
1497 |
"Do not manually edit this!! If it is corrupted, |
|
1498 |
the UIPainter may not be able to read the specification." |
|
1499 |
||
1500 |
" |
|
1501 |
UIPainter new openOnClass:UILayoutTool::Extent andSelector:#windowSpec |
|
1502 |
UILayoutTool::Extent new openInterface:#windowSpec |
|
1503 |
UILayoutTool::Extent open |
|
1504 |
" |
|
1505 |
||
1506 |
<resource: #canvas> |
|
1507 |
||
1508 |
^ |
|
1509 |
#(#FullSpec |
|
1510 |
#name: #windowSpec |
|
1511 |
#window: |
|
1512 |
#(#WindowSpec |
|
1513 |
#label: 'UILayoutTool-Extent' |
|
1514 |
#name: 'UILayoutTool-Extent' |
|
1515 |
#min: #(#Point 10 10) |
|
1516 |
#max: #(#Point 1152 900) |
|
1517 |
#bounds: #(#Rectangle 506 24 832 173) |
|
1518 |
) |
|
1519 |
#component: |
|
1520 |
#(#SpecCollection |
|
1521 |
#collection: #( |
|
1522 |
#(#FramedBoxSpec |
|
1523 |
#label: 'Extent' |
|
1524 |
#name: 'FramedBox' |
|
1525 |
#layout: #(#LayoutFrame 0 0.0 6 0.0 0 1.0 137 0) |
|
1526 |
#labelPosition: #topLeft |
|
1527 |
#component: |
|
1528 |
#(#SpecCollection |
|
1529 |
#collection: #( |
|
1530 |
#(#LabelSpec |
|
1531 |
#label: 'Width:' |
|
1532 |
#name: 'labelWidth' |
|
1533 |
#layout: #(#AlignmentOrigin 89 0 24 0 1 0.5) |
|
1534 |
#adjust: #right |
|
1535 |
) |
|
1536 |
#(#InputFieldSpec |
|
1537 |
#attributes: |
|
1538 |
#(#tabable |
|
1539 |
true |
|
1540 |
) |
|
1541 |
#name: 'fieldLeftOffset' |
|
1542 |
#layout: #(#LayoutFrame 90 0 13 0 140 0 35 0) |
|
1543 |
#activeHelpKey: #hrzExtent |
|
1544 |
#enableChannel: #notUsingDefaultExtent |
|
1545 |
#tabable: true |
|
1546 |
#model: #leftOffset |
|
1547 |
#group: #inputGroup |
|
1548 |
#type: #numberOrNil |
|
1549 |
#acceptOnLostFocus: true |
|
1550 |
#acceptChannel: #acceptChannel |
|
1551 |
#modifiedChannel: #modifiedChannel |
|
1552 |
#acceptOnPointerLeave: false |
|
1553 |
) |
|
1554 |
#(#LabelSpec |
|
1555 |
#label: 'Height:' |
|
1556 |
#name: 'labelHeight' |
|
1557 |
#layout: #(#AlignmentOrigin 89 0 49 0 1 0.5) |
|
1558 |
#adjust: #right |
|
1559 |
) |
|
1560 |
#(#InputFieldSpec |
|
1561 |
#attributes: |
|
1562 |
#(#tabable |
|
1563 |
true |
|
1564 |
) |
|
1565 |
#name: 'fieldRightOffset' |
|
1566 |
#layout: #(#LayoutFrame 90 0 38 0 140 0 60 0) |
|
1567 |
#activeHelpKey: #vrtExtent |
|
1568 |
#enableChannel: #notUsingDefaultExtent |
|
1569 |
#tabable: true |
|
1570 |
#model: #rightOffset |
|
1571 |
#group: #inputGroup |
|
1572 |
#type: #numberOrNil |
|
1573 |
#acceptOnLostFocus: true |
|
1574 |
#acceptChannel: #acceptChannel |
|
1575 |
#modifiedChannel: #modifiedChannel |
|
1576 |
#acceptOnPointerLeave: false |
|
1577 |
) |
|
1578 |
#(#CheckBoxSpec |
|
1579 |
#attributes: |
|
1580 |
#(#tabable |
|
1581 |
true |
|
1582 |
) |
|
1583 |
#label: 'Use Widgets Default Extent' |
|
1584 |
#name: 'useDefaultExtentCheckBox' |
|
1585 |
#layout: #(#Point 5 74) |
|
1586 |
#enableChannel: #defaultExtentEnabled |
|
1587 |
#tabable: true |
|
1588 |
#model: #useDefaultExtent |
|
1589 |
#translateLabel: true |
|
1590 |
) |
|
1591 |
) |
|
1592 |
||
1593 |
) |
|
1594 |
) |
|
1595 |
) |
|
1596 |
||
1597 |
) |
|
1598 |
) |
|
1599 |
! ! |
|
1600 |
||
1601 |
!UILayoutTool::Extent methodsFor:'accessing'! |
|
1602 |
||
1603 |
fetch:aView spec:aSpec |
|
1604 |
"fetch extent |
|
1605 |
" |
|
1606 |
|extent| |
|
1607 |
||
1608 |
extent := aView computeExtent. |
|
1609 |
||
1610 |
(self aspectFor:#leftOffset) value:(extent x). |
|
1611 |
(self aspectFor:#rightOffset) value:(extent y). |
|
1612 |
||
1613 |
(self aspectFor:#useDefaultExtent) value:aSpec useDefaultExtent |
|
1614 |
! |
|
1615 |
||
1616 |
layout |
|
1617 |
"returns current extent |
|
1618 |
" |
|
1619 |
^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
|
1620 |
y:(((self aspectFor:#rightOffset) value) ? 0) |
|
1621 |
||
1622 |
! ! |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
1623 |
|
1409 | 1624 |
!UILayoutTool::LayoutFrame class methodsFor:'help specs'! |
1625 |
||
1626 |
helpSpec |
|
1627 |
"This resource specification was automatically generated |
|
1628 |
by the UIHelpTool of ST/X." |
|
1629 |
||
1630 |
"Do not manually edit this!! If it is corrupted, |
|
1631 |
the UIHelpTool may not be able to read the specification." |
|
1632 |
||
1633 |
" |
|
1634 |
UIHelpTool openOnClass:UILayoutTool::LayoutFrame |
|
1635 |
" |
|
1636 |
||
1637 |
<resource: #help> |
|
1638 |
||
1639 |
^super helpSpec addPairsFrom:#( |
|
1640 |
||
1641 |
#bottomAbsolute |
|
1642 |
'Offset of the bottom edge; positive is to the bottom, negative to the top.' |
|
1643 |
||
1644 |
#bottomFixPartLayout |
|
1645 |
'Set the layout for a fixed area at the bottom of the widgets containers space' |
|
1646 |
||
1647 |
#bottomHalfLayout |
|
1648 |
'Set the layout for the bottom half of the widgets containers space' |
|
1649 |
||
1650 |
#bottomLeftQuarterLayout |
|
1651 |
'Set the layout for the bottom-left quarter of the widgets containers space' |
|
1652 |
||
1653 |
#bottomRelative |
|
1654 |
'Relative corner y of the selected widget.' |
|
1655 |
||
1656 |
#bottomRightQuarterLayout |
|
1657 |
'Set the layout for the bottom-right quarter of the widgets containers space' |
|
1658 |
||
1659 |
#horizontalFixPartLayout |
|
1660 |
'Set the layout for a fixed-height horizontal area' |
|
1661 |
||
1662 |
#leftFixPartLayout |
|
1663 |
'Set the layout for a fixed area at the left of the widgets containers space' |
|
1664 |
||
1665 |
#leftHalfLayout |
|
1666 |
'Set the layout for the left half of the widgets containers space' |
|
1667 |
||
1668 |
#makeBottomAbsolute |
|
1669 |
'Compute pure-absolute y.' |
|
1670 |
||
1671 |
#makeBottomRelative |
|
1672 |
'Computes pure-fractional y.' |
|
1673 |
||
1674 |
#makeBottomRelativeFromBottom |
|
1675 |
'Compute fraction+offset for y relative to containers bottom.' |
|
1676 |
||
1677 |
#makeRightAbsolute |
|
1678 |
'Compute pure-absolute x.' |
|
1679 |
||
1680 |
#makeRightRelative |
|
1681 |
'Compute pure-fraction x.' |
|
1682 |
||
1683 |
#makeRightRelativeFromRight |
|
1684 |
'Compute fraction+offset for x relative to containers right.' |
|
1685 |
||
1686 |
#rightAbsolute |
|
1687 |
'Offset of the right edge; positive is to the right, negative to the left.' |
|
1688 |
||
1689 |
#rightFixPartLayout |
|
1690 |
'Set the layout for a fixed area at the right of the widgets containers space' |
|
1691 |
||
1692 |
#rightHalfLayout |
|
1693 |
'Set the layout for the right half of the widgets containers space' |
|
1694 |
||
1695 |
#rightRelative |
|
1696 |
'Relative corner x of the selected widget.' |
|
1697 |
||
1698 |
#topFixPartLayout |
|
1699 |
'Set the layout for a fixed area at the top of the widgets containers space' |
|
1700 |
||
1701 |
#topHalfLayout |
|
1702 |
'Set the layout for the top half of the widgets containers space' |
|
1703 |
||
1704 |
#topLeftQuarterLayout |
|
1705 |
'Set the layout for the top-left quarter of the widgets containers space' |
|
1706 |
||
1707 |
#topRightQuarterLayout |
|
1708 |
'Set the layout for the top-right quarter of the widgets containers space' |
|
1709 |
||
1710 |
#verticalFixPartLayout |
|
1711 |
'Set the layout for a fixed-height vertical area' |
|
1712 |
||
1713 |
) |
|
1714 |
! ! |
|
1715 |
||
1716 |
!UILayoutTool::LayoutFrame class methodsFor:'image specs'! |
|
1717 |
||
1718 |
setBottomFixPartIcon |
|
1719 |
"This resource specification was automatically generated |
|
1720 |
by the ImageEditor of ST/X." |
|
1721 |
||
1722 |
"Do not manually edit this!! If it is corrupted, |
|
1723 |
the ImageEditor may not be able to read the specification." |
|
1724 |
||
1725 |
" |
|
1726 |
self setBottomFixPartIcon inspect |
|
1727 |
ImageEditor openOnClass:self andSelector:#setBottomFixPartIcon |
|
1728 |
" |
|
1729 |
||
1730 |
<resource: #image> |
|
1731 |
||
1732 |
^Icon |
|
1733 |
constantNamed:#'UILayoutTool::LayoutFrame setBottomFixPartIcon' |
|
1447 | 1734 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H"H"@BH"H @!!DQD@DQDR@BDQDP@QDQH@H"H"@BH"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@X@A @F@@X@A @G???????????????<b') ; yourself); yourself] |
1735 |
! |
|
1409 | 1736 |
|
1737 |
setBottomHalfIcon |
|
1738 |
"This resource specification was automatically generated |
|
1739 |
by the ImageEditor of ST/X." |
|
1740 |
||
1741 |
"Do not manually edit this!! If it is corrupted, |
|
1742 |
the ImageEditor may not be able to read the specification." |
|
1743 |
||
1744 |
" |
|
1745 |
self setBottomHalfIcon inspect |
|
1746 |
ImageEditor openOnClass:self andSelector:#setBottomHalfIcon |
|
1747 |
" |
|
1748 |
||
1749 |
<resource: #image> |
|
1750 |
||
1751 |
^Icon |
|
1752 |
constantNamed:#'UILayoutTool::LayoutFrame setBottomHalfIcon' |
|
1447 | 1753 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"H"H"H"H"@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@H"H"H"H"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@X@A @F@@_????????????????????<b') ; yourself); yourself] |
1754 |
! |
|
1409 | 1755 |
|
1756 |
setBottomLeftQuarterIcon |
|
1757 |
"This resource specification was automatically generated |
|
1758 |
by the ImageEditor of ST/X." |
|
1759 |
||
1760 |
"Do not manually edit this!! If it is corrupted, |
|
1761 |
the ImageEditor may not be able to read the specification." |
|
1762 |
||
1763 |
" |
|
1764 |
self setBottomLeftQuarterIcon inspect |
|
1765 |
ImageEditor openOnClass:self andSelector:#setBottomLeftQuarterIcon |
|
1766 |
" |
|
1767 |
||
1768 |
<resource: #image> |
|
1769 |
||
1770 |
^Icon |
|
1771 |
constantNamed:#'UILayoutTool::LayoutFrame setBottomLeftQuarterIcon' |
|
1447 | 1772 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H"H"@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@H"H"@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@X@A @G?@_<A?0G?@_<A?0G?@_<A??<b') ; yourself); yourself] |
1773 |
! |
|
1409 | 1774 |
|
1775 |
setBottomRightQuarterIcon |
|
1776 |
"This resource specification was automatically generated |
|
1777 |
by the ImageEditor of ST/X." |
|
1778 |
||
1779 |
"Do not manually edit this!! If it is corrupted, |
|
1780 |
the ImageEditor may not be able to read the specification." |
|
1781 |
||
1782 |
" |
|
1783 |
self setBottomRightQuarterIcon inspect |
|
1784 |
ImageEditor openOnClass:self andSelector:#setBottomRightQuarterIcon |
|
1785 |
" |
|
1786 |
||
1787 |
<resource: #image> |
|
1788 |
||
1789 |
^Icon |
|
1790 |
constantNamed:#'UILayoutTool::LayoutFrame setBottomRightQuarterIcon' |
|
1447 | 1791 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BH"H"@@@@@@HQDQH@@@@@@!!DQD @@@@@BDQDR@@@@@@HQDQH@@@@@@"H"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@X@A @F@@XG? _>A?8G? _>A?8G???<b') ; yourself); yourself] |
1792 |
! |
|
1409 | 1793 |
|
1794 |
setHorizontalFixPartIcon |
|
1795 |
"This resource specification was automatically generated |
|
1796 |
by the ImageEditor of ST/X." |
|
1797 |
||
1798 |
"Do not manually edit this!! If it is corrupted, |
|
1799 |
the ImageEditor may not be able to read the specification." |
|
1800 |
||
1801 |
" |
|
1802 |
self setHorizontalFixPartIcon inspect |
|
1803 |
ImageEditor openOnClass:self andSelector:#setHorizontalFixPartIcon |
|
1804 |
" |
|
1805 |
||
1806 |
<resource: #image> |
|
1807 |
||
1808 |
^Icon |
|
1809 |
constantNamed:#'UILayoutTool::LayoutFrame setHorizontalFixPartIcon' |
|
1810 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
1811 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"H"H@H"H"@BDQDP@QDQH@HQDQ@ADQD @"H"H@H"H"@@@@@@@@@@@@@@ |
|
1447 | 1812 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@_???????????????8@A @F@@X@A??<b') ; yourself); yourself] |
1813 |
! |
|
1409 | 1814 |
|
1815 |
setLeftFixPartIcon |
|
1816 |
"This resource specification was automatically generated |
|
1817 |
by the ImageEditor of ST/X." |
|
1818 |
||
1819 |
"Do not manually edit this!! If it is corrupted, |
|
1820 |
the ImageEditor may not be able to read the specification." |
|
1821 |
||
1822 |
" |
|
1823 |
self setLeftFixPartIcon inspect |
|
1824 |
ImageEditor openOnClass:self andSelector:#setLeftFixPartIcon |
|
1825 |
" |
|
1826 |
||
1827 |
<resource: #image> |
|
1828 |
||
1829 |
^Icon |
|
1830 |
constantNamed:#'UILayoutTool::LayoutFrame setLeftFixPartIcon' |
|
1831 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
1832 |
@@@@@@@@@@@BH"@@@@@@@@HQH@@@@@@@@!!D @@@@@@@BDR@@@@@@@@HQH@@@@@@@@!!D @@@@@@@@@@@@@@@@@@@@@@@@@@@@@!!D @@@@@@@BDR@@@@@@@@HQ |
|
1447 | 1833 |
H@@@@@@@@!!D @@@@@@@BDR@@@@@@@@H"H@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<@_0A?@G<@_0A?@G<@_0A?@G<@_0A?@G<@_0A??<b') ; yourself); yourself] |
1834 |
! |
|
1409 | 1835 |
|
1836 |
setLeftHalfIcon |
|
1837 |
"This resource specification was automatically generated |
|
1838 |
by the ImageEditor of ST/X." |
|
1839 |
||
1840 |
"Do not manually edit this!! If it is corrupted, |
|
1841 |
the ImageEditor may not be able to read the specification." |
|
1842 |
||
1843 |
" |
|
1844 |
self setLeftHalfIcon inspect |
|
1845 |
ImageEditor openOnClass:self andSelector:#setLeftHalfIcon |
|
1846 |
" |
|
1847 |
||
1848 |
<resource: #image> |
|
1849 |
||
1850 |
^Icon |
|
1851 |
constantNamed:#'UILayoutTool::LayoutFrame setLeftHalfIcon' |
|
1447 | 1852 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BH"H @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@H"H"@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'????@_<A?0G?@_<A?0G?@_<A?0G?@_<A?0G?@_<A??<b') ; yourself); yourself] |
1853 |
! |
|
1409 | 1854 |
|
1855 |
setRightFixPartIcon |
|
1856 |
"This resource specification was automatically generated |
|
1857 |
by the ImageEditor of ST/X." |
|
1858 |
||
1859 |
"Do not manually edit this!! If it is corrupted, |
|
1860 |
the ImageEditor may not be able to read the specification." |
|
1861 |
||
1862 |
" |
|
1863 |
self setRightFixPartIcon inspect |
|
1864 |
ImageEditor openOnClass:self andSelector:#setRightFixPartIcon |
|
1865 |
" |
|
1866 |
||
1867 |
<resource: #image> |
|
1868 |
||
1869 |
^Icon |
|
1870 |
constantNamed:#'UILayoutTool::LayoutFrame setRightFixPartIcon' |
|
1871 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
1872 |
@@@@@@@@@@@@@@@@@@H"H@@@@@@@@!!D @@@@@@@BDR@@@@@@@@HQH@@@@@@@@!!D @@@@@@@BDR@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BDR@@@@@@@@HQH@@@ |
|
1447 | 1873 |
@@@@@!!D @@@@@@@BDR@@@@@@@@HQH@@@@@@@@"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@O8@? C>@O8@? C>@O8@? C>@O8@? C>@O8@???<b') ; yourself); yourself] |
1874 |
! |
|
1409 | 1875 |
|
1876 |
setRightHalfIcon |
|
1877 |
"This resource specification was automatically generated |
|
1878 |
by the ImageEditor of ST/X." |
|
1879 |
||
1880 |
"Do not manually edit this!! If it is corrupted, |
|
1881 |
the ImageEditor may not be able to read the specification." |
|
1882 |
||
1883 |
" |
|
1884 |
self setRightHalfIcon inspect |
|
1885 |
ImageEditor openOnClass:self andSelector:#setRightHalfIcon |
|
1886 |
" |
|
1887 |
||
1888 |
<resource: #image> |
|
1889 |
||
1890 |
^Icon |
|
1891 |
constantNamed:#'UILayoutTool::LayoutFrame setRightHalfIcon' |
|
1447 | 1892 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@"H"H@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BH"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@?8C? O>@?8C? O>@?8C? O>@?8C? O>@?8C???<b') ; yourself); yourself] |
1893 |
! |
|
1409 | 1894 |
|
1895 |
setToRightQuarterIcon |
|
1896 |
"This resource specification was automatically generated |
|
1897 |
by the ImageEditor of ST/X." |
|
1898 |
||
1899 |
"Do not manually edit this!! If it is corrupted, |
|
1900 |
the ImageEditor may not be able to read the specification." |
|
1901 |
||
1902 |
" |
|
1903 |
self setToRightQuarterIcon inspect |
|
1904 |
ImageEditor openOnClass:self andSelector:#setToRightQuarterIcon |
|
1905 |
" |
|
1906 |
||
1907 |
<resource: #image> |
|
1908 |
||
1909 |
^Icon |
|
1910 |
constantNamed:#'UILayoutTool::LayoutFrame setToRightQuarterIcon' |
|
1447 | 1911 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@"H"H@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@?8C? O>@?8C? O>@?8C? @F@@X@A @F@@X@A??<b') ; yourself); yourself] |
1912 |
! |
|
1409 | 1913 |
|
1914 |
setTopFixPartIcon |
|
1915 |
"This resource specification was automatically generated |
|
1916 |
by the ImageEditor of ST/X." |
|
1917 |
||
1918 |
"Do not manually edit this!! If it is corrupted, |
|
1919 |
the ImageEditor may not be able to read the specification." |
|
1920 |
||
1921 |
" |
|
1922 |
self setTopFixPartIcon inspect |
|
1923 |
ImageEditor openOnClass:self andSelector:#setTopFixPartIcon |
|
1924 |
" |
|
1925 |
||
1926 |
<resource: #image> |
|
1927 |
||
1928 |
^Icon |
|
1929 |
constantNamed:#'UILayoutTool::LayoutFrame setTopFixPartIcon' |
|
1447 | 1930 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BH"H @"H"H@HQDQ@ADQD @!!DQD@DQDR@BH"H @"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???????????????? @F@@X@A @F@@X@A @F@@X@A??<b') ; yourself); yourself] |
1931 |
! |
|
1409 | 1932 |
|
1933 |
setTopHalfIcon |
|
1934 |
"This resource specification was automatically generated |
|
1935 |
by the ImageEditor of ST/X." |
|
1936 |
||
1937 |
"Do not manually edit this!! If it is corrupted, |
|
1938 |
the ImageEditor may not be able to read the specification." |
|
1939 |
||
1940 |
" |
|
1941 |
self setTopHalfIcon inspect |
|
1942 |
ImageEditor openOnClass:self andSelector:#setTopHalfIcon |
|
1943 |
" |
|
1944 |
||
1945 |
<resource: #image> |
|
1946 |
||
1947 |
^Icon |
|
1948 |
constantNamed:#'UILayoutTool::LayoutFrame setTopHalfIcon' |
|
1447 | 1949 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BH"H"H"H"H@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @"H"H"H"H"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?????????????????????8@A @F@@X@A @F@@X@A??<b') ; yourself); yourself] |
1950 |
! |
|
1409 | 1951 |
|
1952 |
setTopLeftQuarterIcon |
|
1953 |
"This resource specification was automatically generated |
|
1954 |
by the ImageEditor of ST/X." |
|
1955 |
||
1956 |
"Do not manually edit this!! If it is corrupted, |
|
1957 |
the ImageEditor may not be able to read the specification." |
|
1958 |
||
1959 |
" |
|
1960 |
self setTopLeftQuarterIcon inspect |
|
1961 |
ImageEditor openOnClass:self andSelector:#setTopLeftQuarterIcon |
|
1962 |
" |
|
1963 |
||
1964 |
<resource: #image> |
|
1965 |
||
1966 |
^Icon |
|
1967 |
constantNamed:#'UILayoutTool::LayoutFrame setTopLeftQuarterIcon' |
|
1447 | 1968 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BH"H"@@@@@@HQDQH@@@@@@!!DQD @@@@@BDQDR@@@@@@HQDQH@@@@@@"H"H @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???? _>A?8G? _>A?8G? X@A @F@@X@A @F@@X@A??<b') ; yourself); yourself] |
1969 |
! |
|
1409 | 1970 |
|
1971 |
setVerticalFixPartIcon |
|
1972 |
"This resource specification was automatically generated |
|
1973 |
by the ImageEditor of ST/X." |
|
1974 |
||
1975 |
"Do not manually edit this!! If it is corrupted, |
|
1976 |
the ImageEditor may not be able to read the specification." |
|
1977 |
||
1978 |
" |
|
1979 |
self setVerticalFixPartIcon inspect |
|
1980 |
ImageEditor openOnClass:self andSelector:#setVerticalFixPartIcon |
|
1981 |
" |
|
1982 |
||
1983 |
<resource: #image> |
|
1984 |
||
1985 |
^Icon |
|
1986 |
constantNamed:#'UILayoutTool::LayoutFrame setVerticalFixPartIcon' |
|
1987 |
ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
1988 |
@@@@@@@@@@@@@@@"H @@@@@@@BDR@@@@@@@@HQH@@@@@@@@!!D @@@@@@@BDR@@@@@@@@HQH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@HQH@@@@@@@@!!D @@@@@@ |
|
1447 | 1989 |
@BDR@@@@@@@@HQH@@@@@@@@!!D @@@@@@@BH"@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>G8X_!!!!>FG8X_!!!!>FG8X_!!!!>FG8X_!!!!>FG8X_!!??<b') ; yourself); yourself] |
1990 |
! ! |
|
1409 | 1991 |
|
1992 |
!UILayoutTool::LayoutFrame class methodsFor:'interface specs'! |
|
1993 |
||
1994 |
windowSpec |
|
1995 |
"This resource specification was automatically generated |
|
1996 |
by the UIPainter of ST/X." |
|
1997 |
||
1998 |
"Do not manually edit this!! If it is corrupted, |
|
1999 |
the UIPainter may not be able to read the specification." |
|
2000 |
||
2001 |
" |
|
2002 |
UIPainter new openOnClass:UILayoutTool::LayoutFrame andSelector:#windowSpec |
|
2003 |
UILayoutTool::LayoutFrame new openInterface:#windowSpec |
|
2004 |
UILayoutTool::LayoutFrame open |
|
2005 |
" |
|
2006 |
||
2007 |
<resource: #canvas> |
|
2008 |
||
2009 |
^ |
|
2010 |
#(#FullSpec |
|
2011 |
#name: #windowSpec |
|
2012 |
#window: |
|
2013 |
#(#WindowSpec |
|
2014 |
#label: 'UILayoutTool-LayoutFrame' |
|
2015 |
#name: 'UILayoutTool-LayoutFrame' |
|
2016 |
#min: #(#Point 10 10) |
|
2017 |
#max: #(#Point 1152 900) |
|
2018 |
#bounds: #(#Rectangle 12 22 411 325) |
|
2019 |
#forceRecursiveBackground: false |
|
2020 |
) |
|
2021 |
#component: |
|
2022 |
#(#SpecCollection |
|
2023 |
#collection: #( |
|
2024 |
#(#UISubSpecification |
|
2025 |
#name: 'layoutOriginSpec' |
|
2026 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 110 0) |
|
2027 |
#majorKey: #UILayoutTool |
|
2028 |
#minorKey: #layoutOriginSpec |
|
2029 |
) |
|
2030 |
#(#FramedBoxSpec |
|
2031 |
#label: 'Corner' |
|
2032 |
#name: 'FramedBox' |
|
2033 |
#layout: #(#LayoutFrame 1 0.0 113 0 0 1.0 214 0) |
|
2034 |
#labelPosition: #topLeft |
|
2035 |
#component: |
|
2036 |
#(#SpecCollection |
|
2037 |
#collection: #( |
|
2038 |
#(#LabelSpec |
|
2039 |
#label: 'Right:' |
|
2040 |
#name: 'labelRight' |
|
2041 |
#layout: #(#AlignmentOrigin 68 0 25 0 1 0.5) |
|
2042 |
) |
|
2043 |
#(#ActionButtonSpec |
|
2044 |
#label: 'imageFractX' |
|
2045 |
#name: 'actionRelativeRight' |
|
2046 |
#layout: #(#LayoutFrame 78 0 14 0 100 0 36 0) |
|
2047 |
#activeHelpKey: #makeRightRelative |
|
2048 |
#hasCharacterOrientedLabel: false |
|
2049 |
#tabable: true |
|
2050 |
#model: #relativeRight |
|
2051 |
) |
|
2052 |
#(#InputFieldSpec |
|
2053 |
#name: 'fieldRightFraction' |
|
2054 |
#layout: #(#LayoutFrame 103 0 14 0 153 0 36 0) |
|
2055 |
#activeHelpKey: #rightRelative |
|
2056 |
#tabable: true |
|
2057 |
#model: #rightFraction |
|
2058 |
#group: #inputGroup |
|
2059 |
#type: #numberOrNil |
|
2060 |
#acceptOnLostFocus: true |
|
2061 |
#acceptChannel: #acceptChannel |
|
2062 |
#modifiedChannel: #modifiedChannel |
|
2063 |
#acceptOnPointerLeave: false |
|
2064 |
) |
|
2065 |
#(#ActionButtonSpec |
|
2066 |
#label: 'imageAbsXFromRight' |
|
2067 |
#name: 'actionRightRelativeRight' |
|
2068 |
#layout: #(#LayoutFrame 257 0 14 0 279 0 36 0) |
|
2069 |
#activeHelpKey: #makeRightRelativeFromRight |
|
2070 |
#hasCharacterOrientedLabel: false |
|
2071 |
#tabable: true |
|
2072 |
#model: #rightRelativeRight |
|
2073 |
) |
|
2074 |
#(#InputFieldSpec |
|
2075 |
#name: 'fieldRightOffset' |
|
2076 |
#layout: #(#LayoutFrame 203 0 14 0 253 0 36 0) |
|
2077 |
#activeHelpKey: #rightAbsolute |
|
2078 |
#tabable: true |
|
2079 |
#model: #rightOffset |
|
2080 |
#group: #inputGroup |
|
2081 |
#type: #numberOrNil |
|
2082 |
#acceptOnLostFocus: true |
|
2083 |
#acceptChannel: #acceptChannel |
|
2084 |
#modifiedChannel: #modifiedChannel |
|
2085 |
#acceptOnPointerLeave: false |
|
2086 |
) |
|
2087 |
#(#ActionButtonSpec |
|
2088 |
#label: 'imageAbsX' |
|
2089 |
#name: 'actionAbsoluteRight' |
|
2090 |
#layout: #(#LayoutFrame 178 0 14 0 200 0 36 0) |
|
2091 |
#activeHelpKey: #makeRightAbsolute |
|
2092 |
#hasCharacterOrientedLabel: false |
|
2093 |
#tabable: true |
|
2094 |
#model: #absoluteRight |
|
2095 |
) |
|
2096 |
#(#LabelSpec |
|
2097 |
#label: 'Bottom:' |
|
2098 |
#name: 'labelBottom' |
|
2099 |
#layout: #(#AlignmentOrigin 68 0 53 0 1 0.5) |
|
2100 |
) |
|
2101 |
#(#ActionButtonSpec |
|
2102 |
#label: 'imageFractY' |
|
2103 |
#name: 'actionRelativeBottom' |
|
2104 |
#layout: #(#LayoutFrame 78 0 42 0 100 0 64 0) |
|
2105 |
#activeHelpKey: #makeBottomRelative |
|
2106 |
#hasCharacterOrientedLabel: false |
|
2107 |
#tabable: true |
|
2108 |
#model: #relativeBottom |
|
2109 |
) |
|
2110 |
#(#InputFieldSpec |
|
2111 |
#name: 'fieldBottomFraction' |
|
2112 |
#layout: #(#LayoutFrame 103 0 42 0 153 0 64 0) |
|
2113 |
#activeHelpKey: #bottomRelative |
|
2114 |
#tabable: true |
|
2115 |
#model: #bottomFraction |
|
2116 |
#group: #inputGroup |
|
2117 |
#type: #numberOrNil |
|
2118 |
#acceptOnLostFocus: true |
|
2119 |
#acceptChannel: #acceptChannel |
|
2120 |
#modifiedChannel: #modifiedChannel |
|
2121 |
#acceptOnPointerLeave: false |
|
2122 |
) |
|
2123 |
#(#ActionButtonSpec |
|
2124 |
#label: 'imageAbsYFromBottom' |
|
2125 |
#name: 'actionBottomRelativeBottom' |
|
2126 |
#layout: #(#LayoutFrame 257 0 42 0 279 0 64 0) |
|
2127 |
#activeHelpKey: #makeBottomRelativeFromBottom |
|
2128 |
#hasCharacterOrientedLabel: false |
|
2129 |
#tabable: true |
|
2130 |
#model: #bottomRelativeBottom |
|
2131 |
) |
|
2132 |
#(#InputFieldSpec |
|
2133 |
#name: 'fieldBottomOffset' |
|
2134 |
#layout: #(#LayoutFrame 203 0 42 0 253 0 64 0) |
|
2135 |
#activeHelpKey: #bottomAbsolute |
|
2136 |
#tabable: true |
|
2137 |
#model: #bottomOffset |
|
2138 |
#group: #inputGroup |
|
2139 |
#type: #numberOrNil |
|
2140 |
#acceptOnLostFocus: true |
|
2141 |
#acceptChannel: #acceptChannel |
|
2142 |
#modifiedChannel: #modifiedChannel |
|
2143 |
#acceptOnPointerLeave: false |
|
2144 |
) |
|
2145 |
#(#ActionButtonSpec |
|
2146 |
#label: 'imageAbsY' |
|
2147 |
#name: 'actionAbsoluteBottom' |
|
2148 |
#layout: #(#LayoutFrame 178 0 42 0 200 0 64 0) |
|
2149 |
#activeHelpKey: #makeBottomAbsolute |
|
2150 |
#hasCharacterOrientedLabel: false |
|
2151 |
#tabable: true |
|
2152 |
#model: #absoluteBottom |
|
2153 |
) |
|
2154 |
) |
|
2155 |
||
2156 |
) |
|
2157 |
) |
|
2158 |
#(#MenuPanelSpec |
|
2159 |
#name: 'commonLayoutToolBar' |
|
2160 |
#layout: #(#LayoutFrame 6 0.0 231 0 -4 1.0 263 0) |
|
2161 |
#level: 0 |
|
2162 |
#tabable: true |
|
2163 |
#menu: #commonFrameLayoutsMenu |
|
2164 |
#textDefault: true |
|
2165 |
) |
|
2166 |
) |
|
2167 |
||
2168 |
) |
|
2169 |
) |
|
2170 |
! ! |
|
2171 |
||
2172 |
!UILayoutTool::LayoutFrame class methodsFor:'menu specs'! |
|
2173 |
||
2174 |
commonFrameLayoutsMenu |
|
2175 |
"This resource specification was automatically generated |
|
2176 |
by the MenuEditor of ST/X." |
|
2177 |
||
2178 |
"Do not manually edit this!! If it is corrupted, |
|
2179 |
the MenuEditor may not be able to read the specification." |
|
2180 |
||
2181 |
" |
|
2182 |
MenuEditor new openOnClass:UILayoutTool::LayoutFrame andSelector:#commonFrameLayoutsMenu |
|
2183 |
(Menu new fromLiteralArrayEncoding:(UILayoutTool::LayoutFrame commonFrameLayoutsMenu)) startUp |
|
2184 |
" |
|
2185 |
||
2186 |
<resource: #menu> |
|
2187 |
||
2188 |
^ |
|
2189 |
||
2190 |
#(#Menu |
|
2191 |
||
2192 |
#( |
|
2193 |
#(#MenuItem |
|
2194 |
#label: 'setTopHalfFrame' |
|
2195 |
#translateLabel: true |
|
2196 |
#isButton: true |
|
2197 |
#nameKey: #setTopHalfFrame |
|
2198 |
#value: #setTopHalfFrame |
|
2199 |
#activeHelpKey: #topHalfLayout |
|
2200 |
#labelImage: #(#ResourceRetriever #'UILayoutTool::LayoutFrame' #setTopHalfIcon) |
|
2201 |
) |
|
2202 |
#(#MenuItem |
|
2203 |
#label: 'setBottomHalfFrame' |
|
2204 |
#translateLabel: true |
|
2205 |
#isButton: true |
|
2206 |
#nameKey: #setBottomHalfFrame |
|
2207 |
#value: #setBottomHalfFrame |
|
2208 |
#activeHelpKey: #bottomHalfLayout |
|
2209 |
#labelImage: #(#ResourceRetriever nil #setBottomHalfIcon) |
|
2210 |
) |
|
2211 |
#(#MenuItem |
|
2212 |
#label: 'setLeftHalfFrame' |
|
2213 |
#translateLabel: true |
|
2214 |
#isButton: true |
|
2215 |
#nameKey: #setLeftHalfFrame |
|
2216 |
#value: #setLeftHalfFrame |
|
2217 |
#activeHelpKey: #leftHalfLayout |
|
2218 |
#labelImage: #(#ResourceRetriever nil #setLeftHalfIcon) |
|
2219 |
) |
|
2220 |
#(#MenuItem |
|
2221 |
#label: 'setRightHalfFrame' |
|
2222 |
#translateLabel: true |
|
2223 |
#isButton: true |
|
2224 |
#nameKey: #setRightHalfFrame |
|
2225 |
#value: #setRightHalfFrame |
|
2226 |
#activeHelpKey: #rightHalfLayout |
|
2227 |
#labelImage: #(#ResourceRetriever nil #setRightHalfIcon) |
|
2228 |
) |
|
2229 |
#(#MenuItem |
|
2230 |
#label: '' |
|
2231 |
) |
|
2232 |
#(#MenuItem |
|
2233 |
#label: 'setTopLeftQuarterFrame' |
|
2234 |
#translateLabel: true |
|
2235 |
#isButton: true |
|
2236 |
#activeHelpKey: #topLeftQuarterLayout |
|
2237 |
#nameKey: #setTopLeftQuarterFrame |
|
2238 |
#value: #setTopLeftQuarterFrame |
|
2239 |
#labelImage: #(#ResourceRetriever nil #setTopLeftQuarterIcon) |
|
2240 |
) |
|
2241 |
#(#MenuItem |
|
2242 |
#label: 'setTopRightQuarterFrame' |
|
2243 |
#translateLabel: true |
|
2244 |
#isButton: true |
|
2245 |
#activeHelpKey: #topRightQuarterLayout |
|
2246 |
#nameKey: #setTopRightQuarterFrame |
|
2247 |
#value: #setTopRightQuarterFrame |
|
2248 |
#labelImage: #(#ResourceRetriever nil #setToRightQuarterIcon) |
|
2249 |
) |
|
2250 |
#(#MenuItem |
|
2251 |
#label: 'setBottomRightQuarterFrame' |
|
2252 |
#translateLabel: true |
|
2253 |
#isButton: true |
|
2254 |
#activeHelpKey: #bottomRightQuarterLayout |
|
2255 |
#nameKey: #setBottomRightQuarterFrame |
|
2256 |
#value: #setBottomRightQuarterFrame |
|
2257 |
#labelImage: #(#ResourceRetriever nil #setBottomRightQuarterIcon) |
|
2258 |
) |
|
2259 |
#(#MenuItem |
|
2260 |
#label: 'setBottomLeftQuarterFrame' |
|
2261 |
#translateLabel: true |
|
2262 |
#activeHelpKey: #bottomLeftQuarterLayout |
|
2263 |
#isButton: true |
|
2264 |
#nameKey: #setBottomLeftQuarterFrame |
|
2265 |
#value: #setBottomLeftQuarterFrame |
|
2266 |
#labelImage: #(#ResourceRetriever nil #setBottomLeftQuarterIcon) |
|
2267 |
) |
|
2268 |
#(#MenuItem |
|
2269 |
#label: '' |
|
2270 |
) |
|
2271 |
#(#MenuItem |
|
2272 |
#label: 'setTopFixPartFrame' |
|
2273 |
#translateLabel: true |
|
2274 |
#isButton: true |
|
2275 |
#nameKey: #setTopFixPartFrame |
|
2276 |
#value: #setTopFixPartFrame |
|
2277 |
#activeHelpKey: #topFixPartLayout |
|
2278 |
#labelImage: #(#ResourceRetriever nil #setTopFixPartIcon) |
|
2279 |
) |
|
2280 |
#(#MenuItem |
|
2281 |
#label: 'setHorizontalFixPartFrame' |
|
2282 |
#translateLabel: true |
|
2283 |
#isButton: true |
|
2284 |
#nameKey: #setHorizontalFixPartFrame |
|
2285 |
#value: #setHorizontalFixPartFrame |
|
2286 |
#activeHelpKey: #horizontalFixPartLayout |
|
2287 |
#labelImage: #(#ResourceRetriever nil #setHorizontalFixPartIcon) |
|
2288 |
) |
|
2289 |
#(#MenuItem |
|
2290 |
#label: 'setBottomFixPartFrame' |
|
2291 |
#translateLabel: true |
|
2292 |
#isButton: true |
|
2293 |
#nameKey: #setBottomFixPartFrame |
|
2294 |
#value: #setBottomFixPartFrame |
|
2295 |
#activeHelpKey: #bottomFixPartLayout |
|
2296 |
#labelImage: #(#ResourceRetriever nil #setBottomFixPartIcon) |
|
2297 |
) |
|
2298 |
#(#MenuItem |
|
2299 |
#label: '' |
|
2300 |
) |
|
2301 |
#(#MenuItem |
|
2302 |
#label: 'setLeftFixPartFrame' |
|
2303 |
#translateLabel: true |
|
2304 |
#isButton: true |
|
2305 |
#nameKey: #setLeftFixPartFrame |
|
2306 |
#value: #setLeftFixPartFrame |
|
2307 |
#activeHelpKey: #leftFixPartLayout |
|
2308 |
#labelImage: #(#ResourceRetriever nil #setLeftFixPartIcon) |
|
2309 |
) |
|
2310 |
#(#MenuItem |
|
2311 |
#label: 'setVerticalFixPartFrame' |
|
2312 |
#translateLabel: true |
|
2313 |
#isButton: true |
|
2314 |
#nameKey: #setVerticalFixPartFrame |
|
2315 |
#value: #setVerticalFixPartFrame |
|
2316 |
#activeHelpKey: #verticalFixPartLayout |
|
2317 |
#labelImage: #(#ResourceRetriever nil #setVerticalFixPartIcon) |
|
2318 |
) |
|
2319 |
#(#MenuItem |
|
2320 |
#label: 'setRightFixPartFrame' |
|
2321 |
#translateLabel: true |
|
2322 |
#isButton: true |
|
2323 |
#nameKey: #setRightFixPartFrame |
|
2324 |
#value: #setRightFixPartFrame |
|
2325 |
#activeHelpKey: #rightFixPartLayout |
|
2326 |
#labelImage: #(#ResourceRetriever nil #setRightFixPartIcon) |
|
2327 |
) |
|
2328 |
) nil |
|
2329 |
nil |
|
2330 |
) |
|
2331 |
! ! |
|
2332 |
||
2333 |
!UILayoutTool::LayoutFrame methodsFor:'accessing'! |
|
2334 |
||
2335 |
fetch:aView spec:aSpec |
|
2336 |
|layout| |
|
2337 |
||
2338 |
layout := UIPainterView asLayoutFrameFromView:aView. |
|
2339 |
||
2340 |
(self aspectFor:#leftOffset) value:(layout leftOffset). |
|
2341 |
(self aspectFor:#leftFraction) value:(layout leftFraction). |
|
2342 |
(self aspectFor:#topOffset) value:(layout topOffset). |
|
2343 |
(self aspectFor:#topFraction) value:(layout topFraction). |
|
2344 |
(self aspectFor:#rightOffset) value:(layout rightOffset). |
|
2345 |
(self aspectFor:#bottomOffset) value:(layout bottomOffset). |
|
2346 |
(self aspectFor:#rightFraction) value:(layout rightFraction). |
|
2347 |
(self aspectFor:#bottomFraction) value:(layout bottomFraction). |
|
2348 |
||
2349 |
! |
|
2350 |
||
2351 |
layout |
|
2352 |
"returns current layout as layoutFrame |
|
2353 |
" |
|
2354 |
|layout| |
|
2355 |
||
2356 |
layout := Smalltalk::LayoutFrame new. |
|
2357 |
||
1581 | 2358 |
layout |
2359 |
leftFraction:(((self aspectFor:#leftFraction) value) ? 0) |
|
2360 |
offset:(((self aspectFor:#leftOffset) value) ? 0) |
|
2361 |
rightFraction:(((self aspectFor:#rightFraction) value) ? 0) |
|
2362 |
offset:(((self aspectFor:#rightOffset) value) ? 0) |
|
2363 |
topFraction:(((self aspectFor:#topFraction) value) ? 0) |
|
2364 |
offset:(((self aspectFor:#topOffset) value) ? 0) |
|
2365 |
bottomFraction:(((self aspectFor:#bottomFraction) value) ? 0) |
|
2366 |
offset:(((self aspectFor:#bottomOffset) value) ? 0). |
|
1409 | 2367 |
|
2368 |
^ layout |
|
2369 |
! ! |
|
2370 |
||
2371 |
!UILayoutTool::LayoutFrame methodsFor:'common frames'! |
|
2372 |
||
2373 |
setBottomFixPartFrame |
|
2374 |
self |
|
2375 |
setFrameLeft:0 offset:0 |
|
2376 |
right:1 offset:0 |
|
2377 |
top:1 offset:-30 |
|
2378 |
bottom:1 offset:0 |
|
2379 |
! |
|
2380 |
||
2381 |
setBottomHalfFrame |
|
2382 |
self |
|
2383 |
setFrameLeft:0 offset:0 |
|
2384 |
right:1 offset:0 |
|
2385 |
top:0.5 offset:0 |
|
2386 |
bottom:1 offset:0 |
|
2387 |
! |
|
2388 |
||
2389 |
setBottomLeftQuarterFrame |
|
2390 |
self |
|
2391 |
setFrameLeft:0 offset:0 |
|
2392 |
right:0.5 offset:0 |
|
2393 |
top:0.5 offset:0 |
|
2394 |
bottom:1 offset:0 |
|
2395 |
! |
|
2396 |
||
2397 |
setBottomRightQuarterFrame |
|
2398 |
self |
|
2399 |
setFrameLeft:0.5 offset:0 |
|
2400 |
right:1 offset:0 |
|
2401 |
top:0.5 offset:0 |
|
2402 |
bottom:1 offset:0 |
|
2403 |
! |
|
2404 |
||
2405 |
setFrameLeft:lF offset:lO right:rF offset:rO top:tF offset:tO bottom:bF offset:bO |
|
2406 |
(self aspectFor:#leftOffset) value:lO. |
|
2407 |
(self aspectFor:#rightOffset) value:rO. |
|
2408 |
(self aspectFor:#topOffset) value:tO. |
|
2409 |
(self aspectFor:#bottomOffset) value:bO. |
|
2410 |
||
2411 |
(self aspectFor:#leftFraction) value:lF. |
|
2412 |
(self aspectFor:#rightFraction) value:rF. |
|
2413 |
(self aspectFor:#topFraction) value:tF. |
|
2414 |
(self aspectFor:#bottomFraction) value:bF. |
|
2415 |
! |
|
2416 |
||
2417 |
setHorizontalFixPartFrame |
|
2418 |
self |
|
2419 |
setFrameLeft:0 offset:0 |
|
2420 |
right:1 offset:0 |
|
2421 |
top:0.5 offset:-15 |
|
2422 |
bottom:0.5 offset:15 |
|
2423 |
! |
|
2424 |
||
2425 |
setLeftFixPartFrame |
|
2426 |
self |
|
2427 |
setFrameLeft:0 offset:0 |
|
2428 |
right:0 offset:30 |
|
2429 |
top:0 offset:0 |
|
2430 |
bottom:1 offset:0 |
|
2431 |
! |
|
2432 |
||
2433 |
setLeftHalfFrame |
|
2434 |
self |
|
2435 |
setFrameLeft:0 offset:0 |
|
2436 |
right:0.5 offset:0 |
|
2437 |
top:0 offset:0 |
|
2438 |
bottom:1 offset:0 |
|
2439 |
! |
|
2440 |
||
2441 |
setRightFixPartFrame |
|
2442 |
self |
|
1447 | 2443 |
setFrameLeft:1 offset:-30 |
2444 |
right:1 offset:0 |
|
1409 | 2445 |
top:0 offset:0 |
2446 |
bottom:1 offset:0 |
|
2447 |
! |
|
2448 |
||
2449 |
setRightHalfFrame |
|
2450 |
self |
|
2451 |
setFrameLeft:0.5 offset:0 |
|
2452 |
right:1 offset:0 |
|
2453 |
top:0 offset:0 |
|
2454 |
bottom:1 offset:0 |
|
2455 |
! |
|
2456 |
||
2457 |
setTopFixPartFrame |
|
2458 |
self |
|
2459 |
setFrameLeft:0 offset:0 |
|
2460 |
right:1 offset:0 |
|
2461 |
top:0 offset:0 |
|
2462 |
bottom:0 offset:30 |
|
2463 |
! |
|
2464 |
||
2465 |
setTopHalfFrame |
|
2466 |
self |
|
2467 |
setFrameLeft:0 offset:0 |
|
2468 |
right:1 offset:0 |
|
2469 |
top:0 offset:0 |
|
2470 |
bottom:0.5 offset:0 |
|
2471 |
! |
|
2472 |
||
2473 |
setTopLeftQuarterFrame |
|
2474 |
self |
|
2475 |
setFrameLeft:0 offset:0 |
|
2476 |
right:0.5 offset:0 |
|
2477 |
top:0 offset:0 |
|
2478 |
bottom:0.5 offset:0 |
|
2479 |
! |
|
2480 |
||
2481 |
setTopRightQuarterFrame |
|
2482 |
self |
|
2483 |
setFrameLeft:0.5 offset:0 |
|
2484 |
right:1 offset:0 |
|
2485 |
top:0 offset:0 |
|
2486 |
bottom:0.5 offset:0 |
|
2487 |
! |
|
2488 |
||
2489 |
setVerticalFixPartFrame |
|
2490 |
self |
|
2491 |
setFrameLeft:0.5 offset:-15 |
|
2492 |
right:0.5 offset:15 |
|
2493 |
top:0 offset:0 |
|
2494 |
bottom:1 offset:0 |
|
2495 |
! ! |
|
2496 |
||
1447 | 2497 |
!UILayoutTool::LayoutOrigin class methodsFor:'interface specs'! |
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2498 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2499 |
windowSpec |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2500 |
"This resource specification was automatically generated |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2501 |
by the UIPainter of ST/X." |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2502 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2503 |
"Do not manually edit this!! If it is corrupted, |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2504 |
the UIPainter may not be able to read the specification." |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2505 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2506 |
" |
1447 | 2507 |
UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec |
2508 |
UILayoutTool::LayoutOrigin new openInterface:#windowSpec |
|
2509 |
UILayoutTool::LayoutOrigin open |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2510 |
" |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2511 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2512 |
<resource: #canvas> |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2513 |
|
1447 | 2514 |
^ |
2515 |
||
2516 |
#(#FullSpec |
|
2517 |
#window: |
|
2518 |
#(#WindowSpec |
|
2519 |
#name: 'UILayoutTool-LayoutOrigin' |
|
2520 |
#layout: #(#LayoutFrame 290 0 420 0 647 0 565 0) |
|
2521 |
#label: 'UILayoutTool-LayoutOrigin' |
|
2522 |
#min: #(#Point 10 10) |
|
2523 |
#max: #(#Point 1152 900) |
|
2524 |
#bounds: #(#Rectangle 290 420 648 566) |
|
2525 |
#usePreferredExtent: false |
|
2526 |
) |
|
2527 |
#component: |
|
2528 |
#(#SpecCollection |
|
2529 |
#collection: |
|
2530 |
#( |
|
2531 |
#(#UISubSpecification |
|
2532 |
#name: 'layoutOriginSpec' |
|
2533 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 110 0) |
|
2534 |
#majorKey: #UILayoutTool |
|
2535 |
#minorKey: #layoutOriginSpec |
|
2536 |
) |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2537 |
) |
1447 | 2538 |
) |
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2539 |
) |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2540 |
! ! |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2541 |
|
1447 | 2542 |
!UILayoutTool::LayoutOrigin methodsFor:'accessing'! |
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2543 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2544 |
fetch:aView spec:aSpec |
1447 | 2545 |
"fetch layoutOrigin |
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2546 |
" |
1447 | 2547 |
|layout| |
2548 |
||
2549 |
layout := UIPainterView asLayoutFrameFromView:aView. |
|
2550 |
||
2551 |
(self aspectFor:#leftOffset) value:(layout leftOffset). |
|
2552 |
(self aspectFor:#leftFraction) value:(layout leftFraction). |
|
2553 |
(self aspectFor:#topOffset) value:(layout topOffset). |
|
2554 |
(self aspectFor:#topFraction) value:(layout topFraction). |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2555 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2556 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2557 |
! |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2558 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2559 |
layout |
1447 | 2560 |
"returns current layout as layoutOrigin |
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2561 |
" |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2562 |
|layout| |
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2563 |
|
1447 | 2564 |
layout := Smalltalk::LayoutOrigin new. |
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2565 |
|
1581 | 2566 |
layout |
2567 |
leftFraction:(((self aspectFor:#leftFraction) value) ? 0) |
|
2568 |
offset:(((self aspectFor:#leftOffset) value) ? 0) |
|
2569 |
topFraction:(((self aspectFor:#topFraction) value) ? 0) |
|
2570 |
offset:(((self aspectFor:#topOffset) value) ? 0). |
|
1332
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2571 |
|
ba34b85c14d8
do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents:
1310
diff
changeset
|
2572 |
^ layout |
1304 | 2573 |
! ! |
2574 |
||
1343 | 2575 |
!UILayoutTool::Point class methodsFor:'interface specs'! |
2576 |
||
2577 |
windowSpec |
|
2578 |
"This resource specification was automatically generated |
|
2579 |
by the UIPainter of ST/X." |
|
2580 |
||
2581 |
"Do not manually edit this!! If it is corrupted, |
|
2582 |
the UIPainter may not be able to read the specification." |
|
2583 |
||
2584 |
" |
|
2585 |
UIPainter new openOnClass:UILayoutTool::Point andSelector:#windowSpec |
|
2586 |
UILayoutTool::Point new openInterface:#windowSpec |
|
2587 |
UILayoutTool::Point open |
|
2588 |
" |
|
2589 |
||
2590 |
<resource: #canvas> |
|
2591 |
||
2592 |
^ |
|
2593 |
||
2594 |
#(#FullSpec |
|
2595 |
#window: |
|
2596 |
#(#WindowSpec |
|
2597 |
#name: 'UILayoutTool-Point' |
|
2598 |
#layout: #(#LayoutFrame 324 0 410 0 618 0 547 0) |
|
2599 |
#label: 'UILayoutTool-Point' |
|
2600 |
#min: #(#Point 10 10) |
|
2601 |
#max: #(#Point 1152 900) |
|
2602 |
#bounds: #(#Rectangle 324 410 619 548) |
|
2603 |
#usePreferredExtent: false |
|
2604 |
) |
|
2605 |
#component: |
|
2606 |
#(#SpecCollection |
|
2607 |
#collection: |
|
2608 |
#( |
|
2609 |
#(#UISubSpecification |
|
2610 |
#name: 'layoutPointSpec' |
|
2611 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 100 0) |
|
2612 |
#majorKey: #UILayoutTool |
|
2613 |
#minorKey: #layoutPointSpec |
|
2614 |
) |
|
2615 |
) |
|
2616 |
) |
|
2617 |
) |
|
2618 |
! ! |
|
2619 |
||
2620 |
!UILayoutTool::Point methodsFor:'accessing'! |
|
2621 |
||
2622 |
fetch:aView spec:aSpec |
|
2623 |
"fetch point |
|
2624 |
" |
|
2625 |
|origin| |
|
2626 |
||
2627 |
origin := aView computeOrigin. |
|
2628 |
||
2629 |
(self aspectFor:#leftOffset) value:(origin x). |
|
2630 |
(self aspectFor:#topOffset) value:(origin y). |
|
2631 |
||
2632 |
||
2633 |
! |
|
2634 |
||
2635 |
layout |
|
2636 |
"returns current layout as point |
|
2637 |
" |
|
2638 |
^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
|
2639 |
y:(((self aspectFor:#topOffset) value) ? 0) |
|
2640 |
||
2641 |
! ! |
|
2642 |
||
1409 | 2643 |
!UILayoutTool::Rectangle class methodsFor:'interface specs'! |
2644 |
||
2645 |
windowSpec |
|
2646 |
"This resource specification was automatically generated |
|
2647 |
by the UIPainter of ST/X." |
|
2648 |
||
2649 |
"Do not manually edit this!! If it is corrupted, |
|
2650 |
the UIPainter may not be able to read the specification." |
|
2651 |
||
2652 |
" |
|
2653 |
UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec |
|
2654 |
UILayoutTool::Rectangle new openInterface:#windowSpec |
|
2655 |
UILayoutTool::Rectangle open |
|
2656 |
" |
|
2657 |
||
2658 |
<resource: #canvas> |
|
2659 |
||
2660 |
^ |
|
2661 |
||
2662 |
#(#FullSpec |
|
2663 |
#window: |
|
2664 |
#(#WindowSpec |
|
2665 |
#name: 'UILayoutTool-Rectangle' |
|
2666 |
#layout: #(#LayoutFrame 291 0 130 0 632 0 328 0) |
|
2667 |
#label: 'UILayoutTool-Rectangle' |
|
2668 |
#min: #(#Point 10 10) |
|
2669 |
#max: #(#Point 1152 900) |
|
2670 |
#bounds: #(#Rectangle 291 130 633 329) |
|
2671 |
#usePreferredExtent: false |
|
2672 |
) |
|
2673 |
#component: |
|
2674 |
#(#SpecCollection |
|
2675 |
#collection: |
|
2676 |
#( |
|
2677 |
#(#UISubSpecification |
|
2678 |
#name: 'subSpecification' |
|
2679 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 96 0) |
|
2680 |
#majorKey: #UILayoutTool |
|
2681 |
#minorKey: #layoutPointSpec |
|
2682 |
) |
|
2683 |
#(#FramedBoxSpec |
|
2684 |
#name: 'FramedBox' |
|
2685 |
#layout: #(#LayoutFrame 1 0.0 99 0 0 1.0 194 0) |
|
2686 |
#component: |
|
2687 |
#(#SpecCollection |
|
2688 |
#collection: |
|
2689 |
#( |
|
2690 |
#(#LabelSpec |
|
2691 |
#name: 'labelCornerY' |
|
2692 |
#layout: #(#AlignmentOrigin 83 0 16 0 1 0) |
|
2693 |
#label: 'Right:' |
|
2694 |
#adjust: #left |
|
2695 |
) |
|
2696 |
#(#InputFieldSpec |
|
2697 |
#name: 'fieldCornerX' |
|
2698 |
#layout: #(#LayoutFrame 85 0 13 0 135 0 35 0) |
|
2699 |
#activeHelpKey: #cornerX |
|
2700 |
#tabable: true |
|
2701 |
#model: #rightOffset |
|
2702 |
#group: #inputGroup |
|
2703 |
#type: #numberOrNil |
|
2704 |
#acceptOnLostFocus: true |
|
2705 |
#acceptChannel: #acceptChannel |
|
2706 |
#modifiedChannel: #modifiedChannel |
|
2707 |
) |
|
2708 |
#(#LabelSpec |
|
2709 |
#name: 'labelCornerX' |
|
2710 |
#layout: #(#AlignmentOrigin 83 0 41 0 1 0) |
|
2711 |
#label: 'Bottom:' |
|
2712 |
#adjust: #left |
|
2713 |
) |
|
2714 |
#(#InputFieldSpec |
|
2715 |
#name: 'fieldCornerY' |
|
2716 |
#layout: #(#LayoutFrame 85 0 38 0 135 0 60 0) |
|
2717 |
#activeHelpKey: #cornerY |
|
2718 |
#tabable: true |
|
2719 |
#model: #bottomOffset |
|
2720 |
#group: #inputGroup |
|
2721 |
#type: #numberOrNil |
|
2722 |
#acceptOnLostFocus: true |
|
2723 |
#acceptChannel: #acceptChannel |
|
2724 |
#modifiedChannel: #modifiedChannel |
|
2725 |
) |
|
2726 |
) |
|
2727 |
) |
|
2728 |
#label: 'Corner' |
|
2729 |
#labelPosition: #topLeft |
|
2730 |
) |
|
2731 |
) |
|
2732 |
) |
|
2733 |
) |
|
2734 |
||
2735 |
"Modified: / 13.8.1998 / 19:59:16 / cg" |
|
2736 |
! ! |
|
2737 |
||
2738 |
!UILayoutTool::Rectangle methodsFor:'accessing'! |
|
2739 |
||
2740 |
fetch:aView spec:aSpec |
|
2741 |
"fetch rectangle |
|
2742 |
" |
|
2743 |
|origin corner| |
|
2744 |
||
2745 |
origin := aView computeOrigin. |
|
2746 |
corner := aView computeCorner. |
|
2747 |
||
2748 |
(self aspectFor:#leftOffset) value:(origin x). |
|
2749 |
(self aspectFor:#rightOffset) value:(corner x). |
|
2750 |
(self aspectFor:#topOffset) value:(origin y). |
|
2751 |
(self aspectFor:#bottomOffset) value:(corner y). |
|
2752 |
||
2753 |
||
2754 |
! |
|
2755 |
||
2756 |
layout |
|
2757 |
"returns current layout as rectangle |
|
2758 |
" |
|
2759 |
^ Smalltalk::Rectangle left:(((self aspectFor:#leftOffset) value) ? 0) |
|
2760 |
top:(((self aspectFor:#topOffset) value) ? 0) |
|
2761 |
right:(((self aspectFor:#rightOffset) value) ? 0) |
|
2762 |
bottom:(((self aspectFor:#bottomOffset) value) ? 0) |
|
2763 |
||
2764 |
||
2765 |
! ! |
|
2766 |
||
163 | 2767 |
!UILayoutTool class methodsFor:'documentation'! |
2768 |
||
2769 |
version |
|
2770 |
^ '$Header$' |
|
2771 |
! ! |