255 initialize |
255 initialize |
256 leftOffset := rightOffset := bottomOffset := topOffset := 0. |
256 leftOffset := rightOffset := bottomOffset := topOffset := 0. |
257 leftFraction := topFraction := 0. |
257 leftFraction := topFraction := 0. |
258 bottomFraction := rightFraction := 1. |
258 bottomFraction := rightFraction := 1. |
259 ! ! |
259 ! ! |
|
260 |
|
261 !LayoutFrame methodsFor:'converting'! |
|
262 |
|
263 literalArrayEncoding |
|
264 "encode myself as an array. |
|
265 The encoding is: |
|
266 (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)" |
|
267 |
|
268 ^ super literalArrayEncoding |
|
269 , (Array |
|
270 with:rightOffset |
|
271 with:rightFraction |
|
272 with:bottomOffset |
|
273 with:bottomFraction) |
|
274 |
|
275 "Modified: 1.9.1995 / 02:43:35 / claus" |
|
276 ! |
|
277 |
|
278 fromLiteralArrayEncoding:encoding |
|
279 "read my values from an encoding. |
|
280 The encoding is supposed to be of the form: |
|
281 (LayoutFrame orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY) |
|
282 This is the reverse to literalArrayEncoding." |
|
283 |
|
284 leftOffset := encoding at:2. |
|
285 leftFraction := encoding at:3. |
|
286 topOffset := encoding at:4. |
|
287 topFraction := encoding at:5. |
|
288 rightOffset := encoding at:6. |
|
289 rightFraction := encoding at:7. |
|
290 bottomOffset := encoding at:8. |
|
291 bottomFraction := encoding at:9. |
|
292 |
|
293 " |
|
294 LayoutFrame new fromLiteralArrayEncoding:#(#LayoutFrame 70 0 2 0 0 1 25 0 ) |
|
295 #(#LayoutFrame 70 0 2 0 0 1 25 0 ) decodeAsLiteralArray |
|
296 " |
|
297 ! ! |