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