-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLayoutAlgebra.pck.st
More file actions
207 lines (145 loc) · 6.07 KB
/
Copy pathLayoutAlgebra.pck.st
File metadata and controls
207 lines (145 loc) · 6.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
'From Cuis7.1 [latest update: #7041] on 31 January 2025 at 12:27:37 pm'!
'Description '!
!provides: 'LayoutAlgebra' 1 12!
SystemOrganization addCategory: #LayoutAlgebra!
!classDefinition: #Quantity category: #LayoutAlgebra!
Object subclass: #Quantity
instanceVariableNames: 'quantity'
classVariableNames: ''
poolDictionaries: ''
category: 'LayoutAlgebra'!
!classDefinition: 'Quantity class' category: #LayoutAlgebra!
Quantity class
instanceVariableNames: ''!
!classDefinition: #FixedQuantity category: #LayoutAlgebra!
Quantity subclass: #FixedQuantity
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'LayoutAlgebra'!
!classDefinition: 'FixedQuantity class' category: #LayoutAlgebra!
FixedQuantity class
instanceVariableNames: ''!
!classDefinition: #ProportionalQuantity category: #LayoutAlgebra!
Quantity subclass: #ProportionalQuantity
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'LayoutAlgebra'!
!classDefinition: 'ProportionalQuantity class' category: #LayoutAlgebra!
ProportionalQuantity class
instanceVariableNames: ''!
!Quantity methodsFor: 'as yet unclassified' stamp: 'DF 3/20/2024 15:48:24'!
changeHeightOf: aMorph
self subclassResponsibility ! !
!Quantity methodsFor: 'as yet unclassified' stamp: 'DF 3/20/2024 15:48:09'!
changeWidthOf: aMorph
self subclassResponsibility ! !
!Quantity methodsFor: 'as yet unclassified' stamp: 'DF 3/20/2024 15:40:10'!
value
^quantity! !
!Quantity methodsFor: 'as yet unclassified' stamp: 'DF 3/20/2024 15:40:40'!
value: aNumber
quantity := aNumber! !
!FixedQuantity methodsFor: 'as yet unclassified' stamp: 'DF 3/20/2024 15:49:21'!
changeHeightOf: aMorph
aMorph layoutSpec fixedHeight: quantity. ^aMorph! !
!FixedQuantity methodsFor: 'as yet unclassified' stamp: 'DF 3/20/2024 15:49:11'!
changeWidthOf: aMorph
aMorph layoutSpec fixedWidth: quantity. ^aMorph! !
!ProportionalQuantity methodsFor: 'as yet unclassified' stamp: 'DF 3/20/2024 15:49:31'!
changeHeightOf: aMorph
aMorph layoutSpec proportionalHeight: quantity. ^aMorph! !
!ProportionalQuantity methodsFor: 'as yet unclassified' stamp: 'DF 3/20/2024 15:49:41'!
changeWidthOf: aMorph
aMorph layoutSpec proportionalWidth: quantity. ^aMorph! !
!Collection methodsFor: '*LayoutAlgebra' stamp: 'DF 10/3/2024 15:48:50'!
morph
^PluggableListMorph withModel: self listGetter: #yourself indexGetter: nil indexSetter: nil ! !
!CharacterSequence methodsFor: '*LayoutAlgebra' stamp: 'DF 9/30/2024 14:59:04'!
button
^(PluggableButtonMorph model: (Switch new) stateGetter: nil action: #switch) label:self! !
!CharacterSequence methodsFor: '*LayoutAlgebra' stamp: 'DF 1/5/2025 17:27:53'!
edit
^TextEntryMorph contents: self! !
!CharacterSequence methodsFor: '*LayoutAlgebra' stamp: 'DF 1/4/2025 19:30:23'!
morph
^LabelMorph contents: self! !
!Number methodsFor: '*LayoutAlgebra' stamp: 'DF 3/20/2024 15:41:52'!
f
^ FixedQuantity new value: self ; yourself! !
!Number methodsFor: '*LayoutAlgebra' stamp: 'DF 1/5/2025 18:43:24'!
morph
^LabelMorph contents: ('{1}' format:{self})! !
!Number methodsFor: '*LayoutAlgebra' stamp: 'DF 3/20/2024 15:42:11'!
p
^ ProportionalQuantity new value: self ; yourself! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 9/7/2024 21:22:43'!
+ aPlacedMorph
^LayoutMorph newRow addMorph: self ; addMorph: aPlacedMorph ; yourself
! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 3/20/2024 15:48:44'!
- aQuantity
^ aQuantity changeWidthOf: self! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 9/7/2024 21:43:05'!
/ aPlacedMorph
^LayoutMorph newColumn addMorph: self ; addMorph: aPlacedMorph ; yourself
! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 9/7/2024 21:43:09'!
<+> aPlacedMorph
^LayoutMorph newRow addMorph: self ; addAdjusterMorph ; addMorph: aPlacedMorph ; yourself
! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 9/7/2024 21:43:13'!
</> aPlacedMorph
^LayoutMorph newColumn addMorph: self ; addAdjusterMorph; addMorph: aPlacedMorph ; yourself
! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 3/20/2024 15:50:05'!
| aQuantity
^ aQuantity changeHeightOf: self! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 1/5/2024 21:10:47'!
align: aSymbolOrNumber
self layoutSpec offAxisEdgeWeight: aSymbolOrNumber.
^self ! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 1/5/2024 21:07:49'!
fh: aNumber
self layoutSpec fixedHeight: aNumber. ^self! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 1/5/2024 21:07:55'!
fw: aNumber
self layoutSpec fixedWidth: aNumber. ^self! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 3/20/2024 16:28:57'!
open: aString
self embeddedInMorphicWindowLabeled: aString :: openInWorld ! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 1/4/2024 20:18:15'!
ph: aNumber
self layoutSpec proportionalHeight: aNumber. ^self! !
!PlacedMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 1/4/2024 19:25:22'!
pw: aNumber
self layoutSpec proportionalWidth: aNumber. ^self! !
!LayoutMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 12/27/2024 17:40:08'!
+ aPlacedMorph
self isRow
ifTrue:[self addMorph: aPlacedMorph. ^self]
ifFalse:[^LayoutMorph newRow addMorph: self ; addMorph: aPlacedMorph ; yourself]
! !
!LayoutMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 10/3/2024 23:29:28'!
/ aPlacedMorph
self isColumn
ifTrue:[self addMorph: aPlacedMorph. ^self]
ifFalse:[^LayoutMorph newColumn addMorph: self ; addMorph: aPlacedMorph ; yourself]
! !
!LayoutMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 12/27/2024 17:40:01'!
<+> aPlacedMorph
self isRow
ifTrue:[self addAdjusterMorph; addMorph: aPlacedMorph. ^self]
ifFalse:[^LayoutMorph newRow addMorph: self ; addAdjusterMorph; addMorph: aPlacedMorph ; yourself]
! !
!LayoutMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 12/27/2024 17:39:51'!
</> aPlacedMorph
self isColumn
ifTrue:[self addAdjusterMorph; addMorph: aPlacedMorph. ^self]
ifFalse:[^LayoutMorph newColumn addMorph: self ; addAdjusterMorph; addMorph: aPlacedMorph ; yourself]
! !
!LayoutMorph methodsFor: '*LayoutAlgebra' stamp: 'DF 1/4/2024 19:26:30'!
@ aNumber
self separation: aNumber.
^self! !