88
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
93
|
3 |
All Rights Reserved
|
88
|
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 |
|
77
|
13 |
Object subclass:#Layout
|
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
83
|
17 |
category:'Graphics-Geometry'
|
77
|
18 |
!
|
|
19 |
|
88
|
20 |
!Layout class methodsFor:'documentation'!
|
|
21 |
|
|
22 |
copyright
|
|
23 |
"
|
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
93
|
25 |
All Rights Reserved
|
88
|
26 |
|
|
27 |
This software is furnished under a license and may be used
|
|
28 |
only in accordance with the terms of that license and with the
|
|
29 |
inclusion of the above copyright notice. This software may not
|
|
30 |
be provided or otherwise made available to, or used by, any
|
|
31 |
other person. No title to or ownership of the software is
|
|
32 |
hereby transferred.
|
|
33 |
"
|
|
34 |
!
|
|
35 |
|
93
|
36 |
documentation
|
|
37 |
"
|
|
38 |
This is an abstract superclass for geometry controlling objects.
|
|
39 |
While old smalltalks used relative origin/extent/corner and absolute
|
|
40 |
origin/corner/extents, these mechanisms are now being removed from the
|
|
41 |
view itself into geometry controlling objects, which are given a superviews
|
|
42 |
size and are to return a components size upon request.
|
|
43 |
This allows more flexible geometry management, since any algorithm can
|
|
44 |
be implemented (if the existing ones are not sufficient, add you own subclass
|
96
|
45 |
and install it as layout-object in your view).
|
93
|
46 |
|
|
47 |
See more info & examples in concrete subclasses:
|
|
48 |
LayoutOrigin LayoutFrame AlignmentOrigin
|
|
49 |
|
|
50 |
Notice: this class was implemented using protocol information
|
|
51 |
from alpha testers - it may not be complete or compatible to
|
|
52 |
the corresponding ST-80 class. If you encounter any incompatibilities,
|
|
53 |
please forward a note to the ST/X team.
|
94
|
54 |
"
|
93
|
55 |
!
|
|
56 |
|
88
|
57 |
version
|
|
58 |
"
|
96
|
59 |
$Header: /cvs/stx/stx/libview2/Layout.st,v 1.6 1995-08-29 17:44:04 claus Exp $
|
88
|
60 |
"
|
|
61 |
! !
|
|
62 |
|
77
|
63 |
!Layout class methodsFor:'instance creation'!
|
|
64 |
|
|
65 |
new
|
|
66 |
^ self basicNew initialize
|
|
67 |
! !
|
|
68 |
|
|
69 |
!Layout methodsFor:'queries'!
|
|
70 |
|
|
71 |
rectangleRelativeTo:superRectangle preferred:prefRect
|
|
72 |
^ self subclassResponsibility
|
|
73 |
!
|
|
74 |
|
|
75 |
isLayout
|
|
76 |
^ true
|
|
77 |
! !
|
|
78 |
|
|
79 |
!Layout methodsFor:'initialization'!
|
|
80 |
|
|
81 |
initialize
|
|
82 |
^ self subclassResponsibility
|
|
83 |
! !
|