--- a/UILayoutTool.st Mon Feb 07 12:52:27 2000 +0100
+++ b/UILayoutTool.st Tue Feb 08 10:29:46 2000 +0100
@@ -21,7 +21,14 @@
category:'Interface-UIPainter'
!
-ApplicationModel subclass:#Rectangle
+ApplicationModel subclass:#Extent
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:UILayoutTool
+!
+
+ApplicationModel subclass:#LayoutOrigin
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
@@ -35,13 +42,6 @@
privateIn:UILayoutTool
!
-ApplicationModel subclass:#LayoutOrigin
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- privateIn:UILayoutTool
-!
-
ApplicationModel subclass:#Point
instanceVariableNames:''
classVariableNames:''
@@ -49,14 +49,14 @@
privateIn:UILayoutTool
!
-ApplicationModel subclass:#Extent
+ApplicationModel subclass:#LayoutFrame
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
privateIn:UILayoutTool
!
-ApplicationModel subclass:#LayoutFrame
+ApplicationModel subclass:#Rectangle
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
@@ -811,7 +811,7 @@
appl := toolsDictionary at:key ifAbsent:nil.
appl isNil ifTrue:[
- view := SimpleView new.
+ view := ApplicationSubView new.
slice := self selectedSlice.
appl := slice last asString.
appl := Smalltalk classNamed:(self class name asString, '::', appl).
@@ -834,7 +834,33 @@
"Modified: / 4.2.2000 / 22:31:41 / cg"
! !
-!UILayoutTool::Rectangle class methodsFor:'interface specs'!
+!UILayoutTool::Extent class methodsFor:'help specs'!
+
+helpSpec
+ "This resource specification was automatically generated
+ by the UIHelpTool of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIHelpTool may not be able to read the specification."
+
+ "
+ UIHelpTool openOnClass:UILayoutTool::Extent
+ "
+
+ <resource: #help>
+
+ ^super helpSpec addPairsFrom:#(
+
+#hrzExtent
+'Horizontal extent of the selected widget.'
+
+#vrtExtent
+'Vertical extent of the selected widget.'
+
+)
+! !
+
+!UILayoutTool::Extent class methodsFor:'interface specs'!
windowSpec
"This resource specification was automatically generated
@@ -844,9 +870,142 @@
the UIPainter may not be able to read the specification."
"
- UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec
- UILayoutTool::Rectangle new openInterface:#windowSpec
- UILayoutTool::Rectangle open
+ UIPainter new openOnClass:UILayoutTool::Extent andSelector:#windowSpec
+ UILayoutTool::Extent new openInterface:#windowSpec
+ UILayoutTool::Extent open
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(#FullSpec
+ #name: #windowSpec
+ #window:
+ #(#WindowSpec
+ #label: 'UILayoutTool-Extent'
+ #name: 'UILayoutTool-Extent'
+ #min: #(#Point 10 10)
+ #max: #(#Point 1152 900)
+ #bounds: #(#Rectangle 506 24 832 173)
+ )
+ #component:
+ #(#SpecCollection
+ #collection: #(
+ #(#FramedBoxSpec
+ #label: 'Extent'
+ #name: 'FramedBox'
+ #layout: #(#LayoutFrame 0 0.0 6 0.0 0 1.0 137 0)
+ #labelPosition: #topLeft
+ #component:
+ #(#SpecCollection
+ #collection: #(
+ #(#LabelSpec
+ #label: 'Width:'
+ #name: 'labelWidth'
+ #layout: #(#AlignmentOrigin 89 0 24 0 1 0.5)
+ #adjust: #right
+ )
+ #(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
+ #name: 'fieldLeftOffset'
+ #layout: #(#LayoutFrame 90 0 13 0 140 0 35 0)
+ #activeHelpKey: #hrzExtent
+ #enableChannel: #notUsingDefaultExtent
+ #tabable: true
+ #model: #leftOffset
+ #group: #inputGroup
+ #type: #numberOrNil
+ #acceptOnLostFocus: true
+ #acceptChannel: #acceptChannel
+ #modifiedChannel: #modifiedChannel
+ #acceptOnPointerLeave: false
+ )
+ #(#LabelSpec
+ #label: 'Height:'
+ #name: 'labelHeight'
+ #layout: #(#AlignmentOrigin 89 0 49 0 1 0.5)
+ #adjust: #right
+ )
+ #(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
+ #name: 'fieldRightOffset'
+ #layout: #(#LayoutFrame 90 0 38 0 140 0 60 0)
+ #activeHelpKey: #vrtExtent
+ #enableChannel: #notUsingDefaultExtent
+ #tabable: true
+ #model: #rightOffset
+ #group: #inputGroup
+ #type: #numberOrNil
+ #acceptOnLostFocus: true
+ #acceptChannel: #acceptChannel
+ #modifiedChannel: #modifiedChannel
+ #acceptOnPointerLeave: false
+ )
+ #(#CheckBoxSpec
+ #attributes:
+ #(#tabable
+ true
+ )
+ #label: 'Use Widgets Default Extent'
+ #name: 'useDefaultExtentCheckBox'
+ #layout: #(#Point 5 74)
+ #enableChannel: #defaultExtentEnabled
+ #tabable: true
+ #model: #useDefaultExtent
+ #translateLabel: true
+ )
+ )
+
+ )
+ )
+ )
+
+ )
+ )
+! !
+
+!UILayoutTool::Extent methodsFor:'accessing'!
+
+fetch:aView spec:aSpec
+ "fetch extent
+ "
+ |extent|
+
+ extent := aView computeExtent.
+
+ (self aspectFor:#leftOffset) value:(extent x).
+ (self aspectFor:#rightOffset) value:(extent y).
+
+ (self aspectFor:#useDefaultExtent) value:aSpec useDefaultExtent
+!
+
+layout
+ "returns current extent
+ "
+ ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0)
+ y:(((self aspectFor:#rightOffset) value) ? 0)
+
+! !
+
+!UILayoutTool::LayoutOrigin class methodsFor:'interface specs'!
+
+windowSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec
+ UILayoutTool::LayoutOrigin new openInterface:#windowSpec
+ UILayoutTool::LayoutOrigin open
"
<resource: #canvas>
@@ -856,12 +1015,12 @@
#(#FullSpec
#window:
#(#WindowSpec
- #name: 'UILayoutTool-Rectangle'
- #layout: #(#LayoutFrame 291 0 130 0 632 0 328 0)
- #label: 'UILayoutTool-Rectangle'
+ #name: 'UILayoutTool-LayoutOrigin'
+ #layout: #(#LayoutFrame 290 0 420 0 647 0 565 0)
+ #label: 'UILayoutTool-LayoutOrigin'
#min: #(#Point 10 10)
#max: #(#Point 1152 900)
- #bounds: #(#Rectangle 291 130 633 329)
+ #bounds: #(#Rectangle 290 420 648 566)
#usePreferredExtent: false
)
#component:
@@ -869,92 +1028,46 @@
#collection:
#(
#(#UISubSpecification
- #name: 'subSpecification'
- #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 96 0)
+ #name: 'layoutOriginSpec'
+ #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 110 0)
#majorKey: #UILayoutTool
- #minorKey: #layoutPointSpec
- )
- #(#FramedBoxSpec
- #name: 'FramedBox'
- #layout: #(#LayoutFrame 1 0.0 99 0 0 1.0 194 0)
- #component:
- #(#SpecCollection
- #collection:
- #(
- #(#LabelSpec
- #name: 'labelCornerY'
- #layout: #(#AlignmentOrigin 83 0 16 0 1 0)
- #label: 'Right:'
- #adjust: #left
- )
- #(#InputFieldSpec
- #name: 'fieldCornerX'
- #layout: #(#LayoutFrame 85 0 13 0 135 0 35 0)
- #activeHelpKey: #cornerX
- #tabable: true
- #model: #rightOffset
- #group: #inputGroup
- #type: #numberOrNil
- #acceptOnLostFocus: true
- #acceptChannel: #acceptChannel
- #modifiedChannel: #modifiedChannel
- )
- #(#LabelSpec
- #name: 'labelCornerX'
- #layout: #(#AlignmentOrigin 83 0 41 0 1 0)
- #label: 'Bottom:'
- #adjust: #left
- )
- #(#InputFieldSpec
- #name: 'fieldCornerY'
- #layout: #(#LayoutFrame 85 0 38 0 135 0 60 0)
- #activeHelpKey: #cornerY
- #tabable: true
- #model: #bottomOffset
- #group: #inputGroup
- #type: #numberOrNil
- #acceptOnLostFocus: true
- #acceptChannel: #acceptChannel
- #modifiedChannel: #modifiedChannel
- )
- )
- )
- #label: 'Corner'
- #labelPosition: #topLeft
+ #minorKey: #layoutOriginSpec
)
)
)
)
-
- "Modified: / 13.8.1998 / 19:59:16 / cg"
! !
-!UILayoutTool::Rectangle methodsFor:'accessing'!
+!UILayoutTool::LayoutOrigin methodsFor:'accessing'!
fetch:aView spec:aSpec
- "fetch rectangle
+ "fetch layoutOrigin
"
- |origin corner|
+ |layout|
- origin := aView computeOrigin.
- corner := aView computeCorner.
+ layout := UIPainterView asLayoutFrameFromView:aView.
- (self aspectFor:#leftOffset) value:(origin x).
- (self aspectFor:#rightOffset) value:(corner x).
- (self aspectFor:#topOffset) value:(origin y).
- (self aspectFor:#bottomOffset) value:(corner y).
+ (self aspectFor:#leftOffset) value:(layout leftOffset).
+ (self aspectFor:#leftFraction) value:(layout leftFraction).
+ (self aspectFor:#topOffset) value:(layout topOffset).
+ (self aspectFor:#topFraction) value:(layout topFraction).
!
layout
- "returns current layout as rectangle
+ "returns current layout as layoutOrigin
"
- ^ Smalltalk::Rectangle left:(((self aspectFor:#leftOffset) value) ? 0)
- top:(((self aspectFor:#topOffset) value) ? 0)
- right:(((self aspectFor:#rightOffset) value) ? 0)
- bottom:(((self aspectFor:#bottomOffset) value) ? 0)
+ |layout|
+
+ layout := Smalltalk::LayoutOrigin new.
+ layout leftOffset:((self aspectFor:#leftOffset) value) ? 0.
+ layout topOffset:((self aspectFor:#topOffset) value) ? 0.
+ layout leftFraction:((self aspectFor:#leftFraction) value) ? 0.
+ layout topFraction:((self aspectFor:#topFraction) value) ? 0.
+
+ ^ layout
! !
@@ -1374,84 +1487,6 @@
! !
-!UILayoutTool::LayoutOrigin class methodsFor:'interface specs'!
-
-windowSpec
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIPainter may not be able to read the specification."
-
- "
- UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec
- UILayoutTool::LayoutOrigin new openInterface:#windowSpec
- UILayoutTool::LayoutOrigin open
- "
-
- <resource: #canvas>
-
- ^
-
- #(#FullSpec
- #window:
- #(#WindowSpec
- #name: 'UILayoutTool-LayoutOrigin'
- #layout: #(#LayoutFrame 290 0 420 0 647 0 565 0)
- #label: 'UILayoutTool-LayoutOrigin'
- #min: #(#Point 10 10)
- #max: #(#Point 1152 900)
- #bounds: #(#Rectangle 290 420 648 566)
- #usePreferredExtent: false
- )
- #component:
- #(#SpecCollection
- #collection:
- #(
- #(#UISubSpecification
- #name: 'layoutOriginSpec'
- #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 110 0)
- #majorKey: #UILayoutTool
- #minorKey: #layoutOriginSpec
- )
- )
- )
- )
-! !
-
-!UILayoutTool::LayoutOrigin methodsFor:'accessing'!
-
-fetch:aView spec:aSpec
- "fetch layoutOrigin
- "
- |layout|
-
- layout := UIPainterView asLayoutFrameFromView:aView.
-
- (self aspectFor:#leftOffset) value:(layout leftOffset).
- (self aspectFor:#leftFraction) value:(layout leftFraction).
- (self aspectFor:#topOffset) value:(layout topOffset).
- (self aspectFor:#topFraction) value:(layout topFraction).
-
-
-!
-
-layout
- "returns current layout as layoutOrigin
- "
- |layout|
-
- layout := Smalltalk::LayoutOrigin new.
-
- layout leftOffset:((self aspectFor:#leftOffset) value) ? 0.
- layout topOffset:((self aspectFor:#topOffset) value) ? 0.
- layout leftFraction:((self aspectFor:#leftFraction) value) ? 0.
- layout topFraction:((self aspectFor:#topFraction) value) ? 0.
-
- ^ layout
-
-! !
-
!UILayoutTool::Point class methodsFor:'interface specs'!
windowSpec
@@ -1520,165 +1555,6 @@
! !
-!UILayoutTool::Extent class methodsFor:'help specs'!
-
-helpSpec
- "This resource specification was automatically generated
- by the UIHelpTool of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIHelpTool may not be able to read the specification."
-
- "
- UIHelpTool openOnClass:UILayoutTool::Extent
- "
-
- <resource: #help>
-
- ^super helpSpec addPairsFrom:#(
-
-#hrzExtent
-'Horizontal extent of the selected widget.'
-
-#vrtExtent
-'Vertical extent of the selected widget.'
-
-)
-! !
-
-!UILayoutTool::Extent class methodsFor:'interface specs'!
-
-windowSpec
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIPainter may not be able to read the specification."
-
- "
- UIPainter new openOnClass:UILayoutTool::Extent andSelector:#windowSpec
- UILayoutTool::Extent new openInterface:#windowSpec
- UILayoutTool::Extent open
- "
-
- <resource: #canvas>
-
- ^
- #(#FullSpec
- #name: #windowSpec
- #window:
- #(#WindowSpec
- #label: 'UILayoutTool-Extent'
- #name: 'UILayoutTool-Extent'
- #min: #(#Point 10 10)
- #max: #(#Point 1152 900)
- #bounds: #(#Rectangle 506 24 832 173)
- )
- #component:
- #(#SpecCollection
- #collection: #(
- #(#FramedBoxSpec
- #label: 'Extent'
- #name: 'FramedBox'
- #layout: #(#LayoutFrame 0 0.0 6 0.0 0 1.0 137 0)
- #labelPosition: #topLeft
- #component:
- #(#SpecCollection
- #collection: #(
- #(#LabelSpec
- #label: 'Width:'
- #name: 'labelWidth'
- #layout: #(#AlignmentOrigin 89 0 24 0 1 0.5)
- #adjust: #right
- )
- #(#InputFieldSpec
- #attributes:
- #(#tabable
- true
- )
- #name: 'fieldLeftOffset'
- #layout: #(#LayoutFrame 90 0 13 0 140 0 35 0)
- #activeHelpKey: #hrzExtent
- #enableChannel: #notUsingDefaultExtent
- #tabable: true
- #model: #leftOffset
- #group: #inputGroup
- #type: #numberOrNil
- #acceptOnLostFocus: true
- #acceptChannel: #acceptChannel
- #modifiedChannel: #modifiedChannel
- #acceptOnPointerLeave: false
- )
- #(#LabelSpec
- #label: 'Height:'
- #name: 'labelHeight'
- #layout: #(#AlignmentOrigin 89 0 49 0 1 0.5)
- #adjust: #right
- )
- #(#InputFieldSpec
- #attributes:
- #(#tabable
- true
- )
- #name: 'fieldRightOffset'
- #layout: #(#LayoutFrame 90 0 38 0 140 0 60 0)
- #activeHelpKey: #vrtExtent
- #enableChannel: #notUsingDefaultExtent
- #tabable: true
- #model: #rightOffset
- #group: #inputGroup
- #type: #numberOrNil
- #acceptOnLostFocus: true
- #acceptChannel: #acceptChannel
- #modifiedChannel: #modifiedChannel
- #acceptOnPointerLeave: false
- )
- #(#CheckBoxSpec
- #attributes:
- #(#tabable
- true
- )
- #label: 'Use Widgets Default Extent'
- #name: 'useDefaultExtentCheckBox'
- #layout: #(#Point 5 74)
- #enableChannel: #defaultExtentEnabled
- #tabable: true
- #model: #useDefaultExtent
- #translateLabel: true
- )
- )
-
- )
- )
- )
-
- )
- )
-! !
-
-!UILayoutTool::Extent methodsFor:'accessing'!
-
-fetch:aView spec:aSpec
- "fetch extent
- "
- |extent|
-
- extent := aView computeExtent.
-
- (self aspectFor:#leftOffset) value:(extent x).
- (self aspectFor:#rightOffset) value:(extent y).
-
- (self aspectFor:#useDefaultExtent) value:aSpec useDefaultExtent
-!
-
-layout
- "returns current extent
- "
- ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0)
- y:(((self aspectFor:#rightOffset) value) ? 0)
-
-! !
-
!UILayoutTool::LayoutFrame class methodsFor:'help specs'!
helpSpec
@@ -2383,6 +2259,130 @@
bottom:0.5 offset:0
! !
+!UILayoutTool::Rectangle class methodsFor:'interface specs'!
+
+windowSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec
+ UILayoutTool::Rectangle new openInterface:#windowSpec
+ UILayoutTool::Rectangle open
+ "
+
+ <resource: #canvas>
+
+ ^
+
+ #(#FullSpec
+ #window:
+ #(#WindowSpec
+ #name: 'UILayoutTool-Rectangle'
+ #layout: #(#LayoutFrame 291 0 130 0 632 0 328 0)
+ #label: 'UILayoutTool-Rectangle'
+ #min: #(#Point 10 10)
+ #max: #(#Point 1152 900)
+ #bounds: #(#Rectangle 291 130 633 329)
+ #usePreferredExtent: false
+ )
+ #component:
+ #(#SpecCollection
+ #collection:
+ #(
+ #(#UISubSpecification
+ #name: 'subSpecification'
+ #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 96 0)
+ #majorKey: #UILayoutTool
+ #minorKey: #layoutPointSpec
+ )
+ #(#FramedBoxSpec
+ #name: 'FramedBox'
+ #layout: #(#LayoutFrame 1 0.0 99 0 0 1.0 194 0)
+ #component:
+ #(#SpecCollection
+ #collection:
+ #(
+ #(#LabelSpec
+ #name: 'labelCornerY'
+ #layout: #(#AlignmentOrigin 83 0 16 0 1 0)
+ #label: 'Right:'
+ #adjust: #left
+ )
+ #(#InputFieldSpec
+ #name: 'fieldCornerX'
+ #layout: #(#LayoutFrame 85 0 13 0 135 0 35 0)
+ #activeHelpKey: #cornerX
+ #tabable: true
+ #model: #rightOffset
+ #group: #inputGroup
+ #type: #numberOrNil
+ #acceptOnLostFocus: true
+ #acceptChannel: #acceptChannel
+ #modifiedChannel: #modifiedChannel
+ )
+ #(#LabelSpec
+ #name: 'labelCornerX'
+ #layout: #(#AlignmentOrigin 83 0 41 0 1 0)
+ #label: 'Bottom:'
+ #adjust: #left
+ )
+ #(#InputFieldSpec
+ #name: 'fieldCornerY'
+ #layout: #(#LayoutFrame 85 0 38 0 135 0 60 0)
+ #activeHelpKey: #cornerY
+ #tabable: true
+ #model: #bottomOffset
+ #group: #inputGroup
+ #type: #numberOrNil
+ #acceptOnLostFocus: true
+ #acceptChannel: #acceptChannel
+ #modifiedChannel: #modifiedChannel
+ )
+ )
+ )
+ #label: 'Corner'
+ #labelPosition: #topLeft
+ )
+ )
+ )
+ )
+
+ "Modified: / 13.8.1998 / 19:59:16 / cg"
+! !
+
+!UILayoutTool::Rectangle methodsFor:'accessing'!
+
+fetch:aView spec:aSpec
+ "fetch rectangle
+ "
+ |origin corner|
+
+ origin := aView computeOrigin.
+ corner := aView computeCorner.
+
+ (self aspectFor:#leftOffset) value:(origin x).
+ (self aspectFor:#rightOffset) value:(corner x).
+ (self aspectFor:#topOffset) value:(origin y).
+ (self aspectFor:#bottomOffset) value:(corner y).
+
+
+!
+
+layout
+ "returns current layout as rectangle
+ "
+ ^ Smalltalk::Rectangle left:(((self aspectFor:#leftOffset) value) ? 0)
+ top:(((self aspectFor:#topOffset) value) ? 0)
+ right:(((self aspectFor:#rightOffset) value) ? 0)
+ bottom:(((self aspectFor:#bottomOffset) value) ? 0)
+
+
+! !
+
!UILayoutTool class methodsFor:'documentation'!
version