--- a/UIPainter.st Mon Feb 17 18:22:30 1997 +0100
+++ b/UIPainter.st Mon Feb 17 18:23:19 1997 +0100
@@ -952,29 +952,53 @@
+!
+
+propertyFrameSpec
+ "this window spec was automatically generated by the ST/X UIPainter"
+
+ "do not manually edit this - the painter/builder may not be able to
+ handle the specification if its corrupted."
+
+ "UIPainter new openOnClass:UIPainter andSelector:#propertyFrameSpec"
+ "UIPainter new openInterface:#propertyFrameSpec"
+
+ <resource: #canvas>
+
+ ^
+
+ #(#FullSpec
+ #'window:'
+ #(#WindowSpec
+ #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+ #'label:' 'unnamed'
+ #'bounds:' #(#Rectangle 0 0 309 326)
+ )
+ #'component:'
+ #(#SpecCollection
+ #'collection:'
+ #(
+ #(#ArbitraryComponentSpec
+ #'name:' 'view1'
+ #'layout:' #(#LayoutFrame 0 0 0 0 0 1.0 -40 1.0)
+ )
+ #(#ActionButtonSpec
+ #'name:' 'button1'
+ #'layout:' #(#LayoutFrame 108 0 291 0 200 0 323 0)
+ #'label:' 'apply'
+ )
+ )
+ )
+ )
! !
!UIPainter methodsFor:'BuilderView interface'!
-setUndoLabel:aString
- aString isNil ifTrue:[
- (menu menuAt:#edit) labelAt:#undoAction put:'undo'.
- (menu menuAt:#edit) disable:#undoAction
- ] ifFalse:[
- (menu menuAt:#edit) labelAt:#undoAction put:'undo: ' , aString.
- (menu menuAt:#edit) enable:#undoAction
- ]
-!
-
-update:something with:parameter
+update:something
|singleSelection|
elementMenu deselect.
- something == #undoHistory ifTrue:[
- ^ self setUndoLabel:parameter
- ].
-
singleSelection := workView singleSelection.
(something == #layout or:[something == #any]) ifTrue:[
@@ -1220,12 +1244,10 @@
initPullDownMenu
menu labels:(resources array:#(
'file'
- 'edit'
'font'
'type'
'align'
'dimension'
- 'form'
'special'
'code'
'debug'
@@ -1233,15 +1255,12 @@
)).
menu selectors:#(#file
- #edit
#font
#type
#align
#dimension
- #form
#special
#code
- #debugging
#test
).
@@ -1283,21 +1302,6 @@
)
receiver:self.
- menu at:#edit
- putLabels:(resources array:#(
- 'undo'
-"/ 'copy'
- 'cut'
-"/ 'paste'
- ))
- selectors:#(
- undoAction
-"/ copySelection
- deleteSelection
-"/ pasteBuffer
- )
- receiver:workView.
-
menu at:#font
putLabels:(resources array:#(
'larger'
@@ -1344,80 +1348,8 @@
)
receiver:self.
- menu at:#align
- putLabels:(resources array:#(
-"/ 'raise'
-"/ 'lower'
-"/ '-'
- 'align left'
- 'align right'
- 'align left & right'
- 'align top'
- 'align bottom'
- 'align centered vertical'
- 'align centered horizontal'
- '-'
- 'spread horizontal'
- 'spread vertical'
- 'center horizontal in frame'
- 'center vertical in frame'
- ) )
- selectors:#(
-"/ raiseSelection
-"/ lowerSelection
-"/ nil
- alignSelectionLeft
- alignSelectionRight
- alignSelectionLeftAndRight
- alignSelectionTop
- alignSelectionBottom
- alignSelectionCenterHor
- alignSelectionCenterVer
- nil
- spreadSelectionHor
- spreadSelectionVer
- centerSelectionHor
- centerSelectionVer
- )
- receiver:workView.
-
- menu at:#dimension
- putLabels:(resources array:#(
- 'default extent'
- 'default width'
- 'default height'
- '-'
- 'copy extent'
- 'paste extent'
- 'paste width'
- 'paste height'
- '-'
- 'insert'
- ) )
- selectors:#(
- setToDefaultExtent
- setToDefaultWidth
- setToDefaultHeight
- nil
- copyExtent
- pasteExtent
- pasteWidth
- pasteHeight
- nil
- insertSelection
- )
- receiver:workView.
-
- menu at:#form
- putLabels:(resources array:#(
- 'align to grid'
- 'show grid'
- ) )
- selectors:#(
- alignOn
- toggleGrid
- )
- receiver:self.
+ menu at:#align putMenu:(workView subMenuAlign menuView).
+ menu at:#dimension putMenu:(workView subMenuDimension menuView).
menu at:#special
putLabels:(resources array:#(
@@ -1439,17 +1371,6 @@
)
receiver:self.
- menu at:#debugging
- putLabels:(resources array:#(
- 'inspect'
- 'inspect attributes'
- ) )
- selectors:#(
- inspectSelection
- inspectAttributes
- )
- receiver:workView.
-
menu at:#test
putLabels:(resources array:#(
'test on'
@@ -1457,8 +1378,6 @@
selectors:#(toggleTest
)
receiver:self.
-
- self setUndoLabel:nil.
!
openInterface
@@ -2106,40 +2025,6 @@
self setupPropertyFromSpec:(self class geometrySpecForLayoutOrigin)
! !
-!UIPainter methodsFor:'user actions - form'!
-
-alignOff
- |m|
-
- m := menu menuAt:#form.
- m labelAt:#alignOff put:(resources string:'align to grid').
- m selectorAt:#alignOff put:#alignOn.
- workView alignOff
-!
-
-alignOn
- |m|
-
- m := menu menuAt:#form.
- m labelAt:#alignOn put:(resources string:'do not align to grid').
- m selectorAt:#alignOn put:#alignOff.
- workView alignOn
-!
-
-toggleGrid
- |m|
-
- m := menu menuAt:#form.
-
- workView gridShown ifFalse:[
- m labelAt:#toggleGrid put:(resources string:'hide grid').
- workView showGrid
- ] ifTrue:[
- m labelAt:#toggleGrid put:(resources string:'show grid').
- workView hideGrid
- ]
-! !
-
!UIPainter methodsFor:'user interaction'!
closeRequest