diff -r 286a039ea7d1 -r f1b6d6b68510 UIPainter.st --- a/UIPainter.st Sun Sep 06 15:13:37 1998 +0200 +++ b/UIPainter.st Tue Sep 08 12:28:09 1998 +0200 @@ -1,6 +1,6 @@ " COPYRIGHT (c) 1995-1998 by eXept Software AG - All Rights Reserved + All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the @@ -31,7 +31,7 @@ copyright " COPYRIGHT (c) 1995-1998 by eXept Software AG - All Rights Reserved + All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the @@ -53,17 +53,17 @@ opening the application. [start with:] - UIPainter open + UIPainter open [author:] - Claus Gittinger, eXept Software AG - Claus Atzkern, eXept Software AG - Thomas Zwick, eXept Software AG + Claus Gittinger, eXept Software AG + Claus Atzkern, eXept Software AG + Thomas Zwick, eXept Software AG [see also:] - UIBuilder - ApplicationModel - UISpecification + UIBuilder + ApplicationModel + UISpecification " ! ! @@ -304,19 +304,19 @@ per line " |stream - max "{ Class:SmallInteger }" - size "{ Class:SmallInteger }" - start "{ Class:SmallInteger }" - stop "{ Class:SmallInteger }" - cpySz "{ Class:SmallInteger }" - lnSz "{ Class:SmallInteger }" - atBeginOfLine| + max "{ Class:SmallInteger }" + size "{ Class:SmallInteger }" + start "{ Class:SmallInteger }" + stop "{ Class:SmallInteger }" + cpySz "{ Class:SmallInteger }" + lnSz "{ Class:SmallInteger }" + atBeginOfLine| maxCharactersPerLine < 20 ifFalse:[max := maxCharactersPerLine - 1] - ifTrue:[max := 20]. + ifTrue:[max := 20]. (size := aString size) <= max ifTrue:[ - ^ aString + ^ aString ]. start := 1. lnSz := 0. @@ -325,35 +325,35 @@ atBeginOfLine := true. [start <= size] whileTrue:[ - (start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[ - ^ stream contents - ]. - (aString at:start) == $\ ifTrue:[ - skipLineFeed ifFalse:[ - stream nextPut:$\ - ]. - start := start + 1. - stream cr. - start := start + 1. - lnSz := 0. - ] ifFalse:[ - (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[ - stop := size + 1 - ]. - (aString at:(stop - 1)) == $\ ifTrue:[ - stop := stop - 1 - ]. - cpySz := stop - start. - - lnSz == 0 ifFalse:[ - (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz. atBeginOfLine := true. ] - ifFalse:[stream space. lnSz := lnSz + 1] - ] ifTrue:[ - lnSz := cpySz - ]. - stream nextPutAll:aString startingAt:start to:(stop - 1). - start := stop. - ] + (start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[ + ^ stream contents + ]. + (aString at:start) == $\ ifTrue:[ + skipLineFeed ifFalse:[ + stream nextPut:$\ + ]. + start := start + 1. + stream cr. + start := start + 1. + lnSz := 0. + ] ifFalse:[ + (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[ + stop := size + 1 + ]. + (aString at:(stop - 1)) == $\ ifTrue:[ + stop := stop - 1 + ]. + cpySz := stop - start. + + lnSz == 0 ifFalse:[ + (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz. atBeginOfLine := true. ] + ifFalse:[stream space. lnSz := lnSz + 1] + ] ifTrue:[ + lnSz := cpySz + ]. + stream nextPutAll:aString startingAt:start to:(stop - 1). + start := stop. + ] ]. ^ stream contents @@ -376,8 +376,8 @@ ^Icon - constantNamed:#'UIPainter iconAlignB' - ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself] + constantNamed:#'UIPainter iconAlignB' + ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself] ! iconAlignL @@ -394,8 +394,8 @@ ^Icon - constantNamed:#'UIPainter iconAlignL' - ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself] + constantNamed:#'UIPainter iconAlignL' + ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself] ! iconAlignLR @@ -412,8 +412,8 @@ ^Icon - constantNamed:#'UIPainter iconAlignLR' - ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself] + constantNamed:#'UIPainter iconAlignLR' + ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself] ! iconAlignR @@ -430,8 +430,8 @@ ^Icon - constantNamed:#'UIPainter iconAlignR' - ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself]! + constantNamed:#'UIPainter iconAlignR' + ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself]! iconAlignT "This resource specification was automatically generated @@ -447,8 +447,8 @@ ^Icon - constantNamed:#'UIPainter iconAlignT' - ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself] + constantNamed:#'UIPainter iconAlignT' + ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself] ! iconAlignTB @@ -465,8 +465,8 @@ ^Icon - constantNamed:#'UIPainter iconAlignTB' - ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself] + constantNamed:#'UIPainter iconAlignTB' + ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself] ! ! !UIPainter class methodsFor:'interface specs'! @@ -488,86 +488,86 @@ ^ #(#FullSpec - #window: - #(#WindowSpec - #name: 'GUI Painter' - #layout: #(#LayoutFrame 291 0 130 0 637 0 289 0) - #label: 'GUI Painter' - #min: #(#Point 350 160) - #max: #(#Point 500 160) - #bounds: #(#Rectangle 291 130 638 290) - #usePreferredExtent: false - ) - #component: - #(#SpecCollection - #collection: - #( - #(#FramedBoxSpec - #name: 'FramedBox' - #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) - #component: - #(#SpecCollection - #collection: - #( - #(#LabelSpec - #name: 'selectorLabel' - #layout: #(#AlignmentOrigin 67 0.11 29 0 1 0.5) - #label: 'Selector:' - #translateLabel: true - #adjust: #right - #resizeForLabel: true - ) - #(#InputFieldSpec - #name: 'methodNameField' - #layout: #(#LayoutFrame 70 0.11 18 0 4 1.0 40 0) - #tabable: true - #model: #methodNameChannel - #group: #inputGroup - ) - #(#LabelSpec - #name: 'classLabel' - #layout: #(#AlignmentOrigin 67 0.11 54 0 1 0.5) - #label: 'Class:' - #translateLabel: true - #adjust: #right - #resizeForLabel: true - ) - #(#InputFieldSpec - #name: 'classNameField' - #layout: #(#LayoutFrame 70 0.11 43 0 4 1.0 65 0) - #tabable: true - #model: #classNameChannel - #group: #inputGroup - ) - #(#LabelSpec - #name: 'superClassLabel' - #layout: #(#AlignmentOrigin 67 0.11 79 0 1 0.5) - #label: 'Superclass:' - #translateLabel: true - #adjust: #right - #resizeForLabel: true - ) - #(#ComboBoxSpec - #name: 'superclassNameComboBox' - #layout: #(#LayoutFrame 70 0.11 68 0 4 1.0 90 0) - #tabable: true - #model: #superclassNameChannel - #comboList: #superclassNameDefaults - ) - ) - ) - #label: 'Define Class And Selector' - #labelPosition: #topLeft - #translateLabel: true - ) - #(#UISubSpecification - #name: 'subSpec' - #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) - #majorKey: #ToolApplicationModel - #minorKey: #windowSpecForCommitWithoutChannels - ) - ) - ) + #window: + #(#WindowSpec + #name: 'GUI Painter' + #layout: #(#LayoutFrame 291 0 130 0 637 0 289 0) + #label: 'GUI Painter' + #min: #(#Point 350 160) + #max: #(#Point 500 160) + #bounds: #(#Rectangle 291 130 638 290) + #usePreferredExtent: false + ) + #component: + #(#SpecCollection + #collection: + #( + #(#FramedBoxSpec + #name: 'FramedBox' + #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) + #component: + #(#SpecCollection + #collection: + #( + #(#LabelSpec + #name: 'selectorLabel' + #layout: #(#AlignmentOrigin 67 0.11 29 0 1 0.5) + #label: 'Selector:' + #translateLabel: true + #adjust: #right + #resizeForLabel: true + ) + #(#InputFieldSpec + #name: 'methodNameField' + #layout: #(#LayoutFrame 70 0.11 18 0 4 1.0 40 0) + #tabable: true + #model: #methodNameChannel + #group: #inputGroup + ) + #(#LabelSpec + #name: 'classLabel' + #layout: #(#AlignmentOrigin 67 0.11 54 0 1 0.5) + #label: 'Class:' + #translateLabel: true + #adjust: #right + #resizeForLabel: true + ) + #(#InputFieldSpec + #name: 'classNameField' + #layout: #(#LayoutFrame 70 0.11 43 0 4 1.0 65 0) + #tabable: true + #model: #classNameChannel + #group: #inputGroup + ) + #(#LabelSpec + #name: 'superClassLabel' + #layout: #(#AlignmentOrigin 67 0.11 79 0 1 0.5) + #label: 'Superclass:' + #translateLabel: true + #adjust: #right + #resizeForLabel: true + ) + #(#ComboBoxSpec + #name: 'superclassNameComboBox' + #layout: #(#LayoutFrame 70 0.11 68 0 4 1.0 90 0) + #tabable: true + #model: #superclassNameChannel + #comboList: #superclassNameDefaults + ) + ) + ) + #label: 'Define Class And Selector' + #labelPosition: #topLeft + #translateLabel: true + ) + #(#UISubSpecification + #name: 'subSpec' + #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) + #majorKey: #ToolApplicationModel + #minorKey: #windowSpecForCommitWithoutChannels + ) + ) + ) ) "Modified: / 13.8.1998 / 19:59:44 / cg" @@ -590,83 +590,83 @@ ^ #(#FullSpec - #window: - #(#WindowSpec - #name: 'GUI Painter' - #layout: #(#LayoutFrame 291 0 130 0 572 0 327 0) - #label: 'GUI Painter' - #min: #(#Point 300 200) - #max: #(#Point 300 200) - #bounds: #(#Rectangle 291 130 573 328) - #usePreferredExtent: false - ) - #component: - #(#SpecCollection - #collection: - #( - #(#FramedBoxSpec - #name: 'FramedBox' - #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) - #component: - #(#SpecCollection - #collection: - #( - #(#CheckBoxSpec - #name: 'ShowGridCheckBox' - #layout: #(#Point 13 14) - #model: #showGrid - #label: 'Show Grid' - ) - #(#CheckBoxSpec - #name: 'AlignCheckBox' - #layout: #(#Point 13 42) - #model: #alignToGrid - #label: 'Align To Grid' - ) - #(#LabelSpec - #name: 'HorizontalPixelsLabel' - #layout: #(#AlignmentOrigin 138 0 89 0 1 0.5) - #label: 'Horizontal Pixels:' - #translateLabel: true - #adjust: #right - #resizeForLabel: true - ) - #(#InputFieldSpec - #name: 'HorizontalPixelsField' - #layout: #(#LayoutFrame 144 0 77 0 197 0 99 0) - #model: #hspace - #group: #inputGroup - #type: #numberOrNil - ) - #(#LabelSpec - #name: 'VerticalPixelsLabel' - #layout: #(#AlignmentOrigin 139 0 114 0 1 0.5) - #label: 'Vertical Pixels:' - #translateLabel: true - #adjust: #right - #resizeForLabel: true - ) - #(#InputFieldSpec - #name: 'VerticalPixelsField' - #layout: #(#LayoutFrame 144 0 102 0 197 0 124 0) - #model: #vspace - #group: #inputGroup - #type: #numberOrNil - ) - ) - ) - #label: 'Grid Parameter' - #labelPosition: #topLeft - #translateLabel: true - ) - #(#UISubSpecification - #name: 'subSpec' - #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) - #majorKey: #ToolApplicationModel - #minorKey: #windowSpecForCommitWithoutChannels - ) - ) - ) + #window: + #(#WindowSpec + #name: 'GUI Painter' + #layout: #(#LayoutFrame 291 0 130 0 572 0 327 0) + #label: 'GUI Painter' + #min: #(#Point 300 200) + #max: #(#Point 300 200) + #bounds: #(#Rectangle 291 130 573 328) + #usePreferredExtent: false + ) + #component: + #(#SpecCollection + #collection: + #( + #(#FramedBoxSpec + #name: 'FramedBox' + #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) + #component: + #(#SpecCollection + #collection: + #( + #(#CheckBoxSpec + #name: 'ShowGridCheckBox' + #layout: #(#Point 13 14) + #model: #showGrid + #label: 'Show Grid' + ) + #(#CheckBoxSpec + #name: 'AlignCheckBox' + #layout: #(#Point 13 42) + #model: #alignToGrid + #label: 'Align To Grid' + ) + #(#LabelSpec + #name: 'HorizontalPixelsLabel' + #layout: #(#AlignmentOrigin 138 0 89 0 1 0.5) + #label: 'Horizontal Pixels:' + #translateLabel: true + #adjust: #right + #resizeForLabel: true + ) + #(#InputFieldSpec + #name: 'HorizontalPixelsField' + #layout: #(#LayoutFrame 144 0 77 0 197 0 99 0) + #model: #hspace + #group: #inputGroup + #type: #numberOrNil + ) + #(#LabelSpec + #name: 'VerticalPixelsLabel' + #layout: #(#AlignmentOrigin 139 0 114 0 1 0.5) + #label: 'Vertical Pixels:' + #translateLabel: true + #adjust: #right + #resizeForLabel: true + ) + #(#InputFieldSpec + #name: 'VerticalPixelsField' + #layout: #(#LayoutFrame 144 0 102 0 197 0 124 0) + #model: #vspace + #group: #inputGroup + #type: #numberOrNil + ) + ) + ) + #label: 'Grid Parameter' + #labelPosition: #topLeft + #translateLabel: true + ) + #(#UISubSpecification + #name: 'subSpec' + #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) + #majorKey: #ToolApplicationModel + #minorKey: #windowSpecForCommitWithoutChannels + ) + ) + ) ) "Modified: / 13.8.1998 / 20:00:00 / cg" @@ -688,167 +688,169 @@ ^ - + #(#FullSpec - #window: - #(#WindowSpec - #name: 'GUI Painter' - #layout: #(#LayoutFrame 42 0 188 0 561 0 689 0) - #label: 'GUI Painter' - #min: #(#Point 560 460) - #max: #(#Point 1160 870) - #bounds: #(#Rectangle 42 188 562 690) - #menu: #menu - #usePreferredExtent: false - ) - #component: - #(#SpecCollection - #collection: - #( - #(#MenuPanelSpec - #name: 'menuToolbarView' - #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) - #tabable: true - #menu: #menuToolbar - ) - #(#VariableHorizontalPanelSpec - #name: 'hpanel' - #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) - #component: - #(#SpecCollection - #collection: - #( - #(#ArbitraryComponentSpec - #name: 'treeView' - #tabable: true - #menu: #menuEdit - #hasHorizontalScrollBar: true - #hasVerticalScrollBar: true - #miniScrollerHorizontal: true - #miniScrollerVertical: true - #component: #treeView - #hasBorder: false - ) - #(#ViewSpec - #name: 'specHolderView' - #component: - #(#SpecCollection - #collection: - #( - #(#MenuPanelSpec - #name: 'menuToolbar2View' - #layout: #(#LayoutFrame -1 0.0 -2 0 -1 1.0 30 0) - #enableChannel: #canMoveOrAlignSelection - #tabable: true - #menu: #menuToolbar2 - ) - #(#NoteBookViewSpec - #name: 'noteBook' - #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -30 1.0) - #enableChannel: #enableChannel - #tabable: true - #model: #tabModel - #menu: #tabList - #style: #(#FontDescription #helvetica #medium #roman 10) - #canvas: #noteBookView - ) - #(#HorizontalPanelViewSpec - #name: 'horizontalPanelView1' - #layout: #(#LayoutFrame -163 1 -1 0 -35 1.0 31 0) - #component: - #(#SpecCollection - #collection: - #( - #(#ArrowButtonSpec - #name: 'MoveLeftButton' - #activeHelpKey: #changePositionLeft - #tabable: true - #model: #moveSelectionLeft - #enableChannel: #canMoveOrAlignSelection - #isTriggerOnDown: true - #direction: #left - #extent: #(#Point 32 32) - ) - #(#ArrowButtonSpec - #name: 'MoveRightButton' - #activeHelpKey: #changePositionRight - #model: #moveSelectionRight - #enableChannel: #canMoveOrAlignSelection - #isTriggerOnDown: true - #direction: #right - #extent: #(#Point 32 32) - ) - #(#ArrowButtonSpec - #name: 'MoveDownButton' - #activeHelpKey: #changePositionDown - #model: #moveSelectionDown - #enableChannel: #canMoveOrAlignSelection - #isTriggerOnDown: true - #direction: #down - #extent: #(#Point 32 32) - ) - #(#ArrowButtonSpec - #name: 'MoveUpButton' - #activeHelpKey: #changePositionUp - #model: #moveSelectionUp - #enableChannel: #canMoveOrAlignSelection - #isTriggerOnDown: true - #direction: #up - #extent: #(#Point 32 32) - ) - ) - ) - #horizontalLayout: #fit - #verticalLayout: #fit - #horizontalSpace: 0 - #verticalSpace: 0 - ) - #(#ActionButtonSpec - #name: 'openWidgetDocumentationButton' - #layout: #(#LayoutFrame -32 1 -1 0 0 1 31 0) - #activeHelpKey: #editOpenSpecDocumentation - #hasCharacterOrientedLabel: false - #label: 'helpIcon' - #model: #doOpenWidgetDocumentation - ) - #(#ActionButtonSpec - #name: 'cancelButton' - #layout: #(#LayoutFrame 2 0 -26 1 -1 0.5 -2 1) - #activeHelpKey: #commitCancel - #label: 'Cancel' - #tabable: true - #model: #cancel - #enableChannel: #modifiedChannel - ) - #(#ActionButtonSpec - #name: 'acceptButton' - #layout: #(#LayoutFrame 1 0.5 -26 1 -2 1 -2 1) - #activeHelpKey: #commitOK - #label: 'OK' - #tabable: true - #model: #accept - #enableChannel: #modifiedChannel - ) - ) - ) - #borderWidth: 1 - ) - ) - ) - #level: 1 - #handles: #(#Any 0.318868 1.0) - ) - #(#UISubSpecification - #name: 'infoBarSubSpec' - #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) - #majorKey: #ToolApplicationModel - #minorKey: #windowSpecForInfoBar - ) - ) - ) + #window: + #(#WindowSpec + #name: 'GUI Painter' + #layout: #(#LayoutFrame 134 0 100 0 653 0 601 0) + #label: 'GUI Painter' + #min: #(#Point 560 460) + #max: #(#Point 1160 870) + #bounds: #(#Rectangle 134 100 654 602) + #menu: #menu + #usePreferredExtent: false + ) + #component: + #(#SpecCollection + #collection: + #( + #(#MenuPanelSpec + #name: 'menuToolbarView' + #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) + #tabable: true + #menu: #menuToolbar + ) + #(#VariableHorizontalPanelSpec + #name: 'hpanel' + #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) + #component: + #(#SpecCollection + #collection: + #( + #(#ArbitraryComponentSpec + #name: 'treeView' + #tabable: true + #menu: #menuEdit + #hasHorizontalScrollBar: true + #hasVerticalScrollBar: true + #miniScrollerHorizontal: true + #miniScrollerVertical: true + #component: #treeView + #hasBorder: false + ) + #(#ViewSpec + #name: 'specHolderView' + #component: + #(#SpecCollection + #collection: + #( + #(#MenuPanelSpec + #name: 'menuToolbar2View' + #layout: #(#LayoutFrame -1 0.0 -2 0 -1 1.0 30 0) + #enableChannel: #canMoveOrAlignSelection + #tabable: true + #menu: #menuToolbar2 + ) + #(#NoteBookViewSpec + #name: 'noteBook' + #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -30 1.0) + #enableChannel: #enableChannel + #tabable: true + #model: #tabModel + #menu: #tabList + #canvas: #noteBookView + ) + #(#HorizontalPanelViewSpec + #name: 'horizontalPanelView1' + #layout: #(#LayoutFrame -163 1 -1 0 -35 1.0 31 0) + #component: + #(#SpecCollection + #collection: + #( + #(#ArrowButtonSpec + #name: 'MoveLeftButton' + #activeHelpKey: #changePositionLeft + #tabable: true + #model: #moveSelectionLeft + #enableChannel: #canMoveOrAlignSelection + #isTriggerOnDown: true + #direction: #left + #extent: #(#Point 32 32) + ) + #(#ArrowButtonSpec + #name: 'MoveRightButton' + #activeHelpKey: #changePositionRight + #model: #moveSelectionRight + #enableChannel: #canMoveOrAlignSelection + #isTriggerOnDown: true + #direction: #right + #extent: #(#Point 32 32) + ) + #(#ArrowButtonSpec + #name: 'MoveDownButton' + #activeHelpKey: #changePositionDown + #model: #moveSelectionDown + #enableChannel: #canMoveOrAlignSelection + #isTriggerOnDown: true + #direction: #down + #extent: #(#Point 32 32) + ) + #(#ArrowButtonSpec + #name: 'MoveUpButton' + #activeHelpKey: #changePositionUp + #model: #moveSelectionUp + #enableChannel: #canMoveOrAlignSelection + #isTriggerOnDown: true + #direction: #up + #extent: #(#Point 32 32) + ) + ) + ) + #horizontalLayout: #fit + #verticalLayout: #fit + #horizontalSpace: 0 + #verticalSpace: 0 + ) + #(#ActionButtonSpec + #name: 'openWidgetDocumentationButton' + #layout: #(#LayoutFrame -32 1 -1 0 0 1 31 0) + #activeHelpKey: #editOpenSpecDocumentation + #hasCharacterOrientedLabel: false + #label: 'helpIcon' + #model: #doOpenWidgetDocumentation + ) + #(#ActionButtonSpec + #name: 'cancelButton' + #layout: #(#LayoutFrame 2 0 -26 1 -1 0.5 -2 1) + #activeHelpKey: #commitCancel + #label: 'Cancel' + #tabable: true + #model: #cancel + #enableChannel: #modifiedChannel + ) + #(#ActionButtonSpec + #name: 'acceptButton' + #layout: #(#LayoutFrame 1 0.5 -26 1 -2 1 -2 1) + #activeHelpKey: #commitOK + #label: 'OK' + #tabable: true + #model: #accept + #enableChannel: #modifiedChannel + ) + ) + ) + #borderWidth: 1 + ) + ) + ) + #level: 1 + #handles: #(#Any 0.318868 1.0) + ) + #(#UISubSpecification + #name: 'infoBarSubSpec' + #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) + #majorKey: #ToolApplicationModel + #minorKey: #windowSpecForInfoBar + ) + ) + ) ) + + "Modified: / 5.9.1998 / 17:42:12 / cg" ! ! + !UIPainter class methodsFor:'menu specs'! menu @@ -869,327 +871,327 @@ #(#Menu - #( - #(#MenuItem - #label: 'About' - #translateLabel: true - #activeHelpKey: #about - #labelImage: #(#ResourceRetriever nil #menuIcon) - #submenuChannel: #menuAbout - ) - #(#MenuItem - #label: 'File' - #translateLabel: true - #activeHelpKey: #file - #enabled: #enableChannel - #submenu: - #(#Menu + #( + #(#MenuItem + #label: 'About' + #translateLabel: true + #activeHelpKey: #about + #labelImage: #(#ResourceRetriever nil #menuIcon) + #submenuChannel: #menuAbout + ) + #(#MenuItem + #label: 'File' + #translateLabel: true + #activeHelpKey: #file + #enabled: #enableChannel + #submenu: + #(#Menu - #( - #(#MenuItem - #label: 'New' - #translateLabel: true - #value: #doNew - #activeHelpKey: #fileNew - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Load...' - #translateLabel: true - #value: #doLoad - #activeHelpKey: #fileLoad - ) - #(#MenuItem - #label: 'Load Subspec...' - #translateLabel: true - #value: #doLoadSubspec - #activeHelpKey: #fileLoadSubspec - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Save' - #translateLabel: true - #value: #doSave - #activeHelpKey: #fileSave - ) - #(#MenuItem - #label: 'Save As...' - #translateLabel: true - #value: #doSaveAs - #activeHelpKey: #fileSaveAs - ) - #(#MenuItem - #label: 'Define Class And Selector...' - #translateLabel: true - #value: #doDefineClassAndSelector - #activeHelpKey: #fileSaveAs - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Pick A Window Spec...' - #translateLabel: true - #value: #doPickAView - #activeHelpKey: #filePickAnInterface - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Show Window Spec' - #translateLabel: true - #value: #doWindowSpec - #activeHelpKey: #fileShowWindowSpec - ) - #(#MenuItem - #label: 'Browse Class' - #translateLabel: true - #value: #doBrowseClass - #activeHelpKey: #fileBrowseClass - #enabled: #hasSpecClass - ) - #(#MenuItem - #label: 'Browse Aspect Methods' - #translateLabel: true - #value: #doBrowseAspectMethods - #activeHelpKey: #fileBrowseAspectMethods - #enabled: #hasSpecClass - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Exit' - #translateLabel: true - #value: #closeRequest - #activeHelpKey: #fileExit - ) - ) nil - nil - ) - ) - #(#MenuItem - #label: 'Edit' - #translateLabel: true - #activeHelpKey: #edit - #submenuChannel: #menuEdit - ) - #(#MenuItem - #label: 'Align' - #translateLabel: true - #activeHelpKey: #align - #submenuChannel: #menuAlign - ) - #(#MenuItem - #label: 'Generate' - #translateLabel: true - #activeHelpKey: #generate - #submenu: - #(#Menu + #( + #(#MenuItem + #label: 'New' + #translateLabel: true + #value: #doNew + #activeHelpKey: #fileNew + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Load...' + #translateLabel: true + #value: #doLoad + #activeHelpKey: #fileLoad + ) + #(#MenuItem + #label: 'Load Subspec...' + #translateLabel: true + #value: #doLoadSubspec + #activeHelpKey: #fileLoadSubspec + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Save' + #translateLabel: true + #value: #doSave + #activeHelpKey: #fileSave + ) + #(#MenuItem + #label: 'Save As...' + #translateLabel: true + #value: #doSaveAs + #activeHelpKey: #fileSaveAs + ) + #(#MenuItem + #label: 'Define Class And Selector...' + #translateLabel: true + #value: #doDefineClassAndSelector + #activeHelpKey: #fileSaveAs + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Pick A Window Spec...' + #translateLabel: true + #value: #doPickAView + #activeHelpKey: #filePickAnInterface + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Show Window Spec' + #translateLabel: true + #value: #doWindowSpec + #activeHelpKey: #fileShowWindowSpec + ) + #(#MenuItem + #label: 'Browse Class' + #translateLabel: true + #value: #doBrowseClass + #activeHelpKey: #fileBrowseClass + #enabled: #hasSpecClass + ) + #(#MenuItem + #label: 'Browse Aspect Methods' + #translateLabel: true + #value: #doBrowseAspectMethods + #activeHelpKey: #fileBrowseAspectMethods + #enabled: #hasSpecClass + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Exit' + #translateLabel: true + #value: #closeRequest + #activeHelpKey: #fileExit + ) + ) nil + nil + ) + ) + #(#MenuItem + #label: 'Edit' + #translateLabel: true + #activeHelpKey: #edit + #submenuChannel: #menuEdit + ) + #(#MenuItem + #label: 'Align' + #translateLabel: true + #activeHelpKey: #align + #submenuChannel: #menuAlign + ) + #(#MenuItem + #label: 'Generate' + #translateLabel: true + #activeHelpKey: #generate + #submenu: + #(#Menu - #( - #(#MenuItem - #label: 'Aspect Methods' - #translateLabel: true - #value: #doGenerateAspectMethods - #activeHelpKey: #generateAspectMethods - #enabled: #hasSpecClass - ) - #(#MenuItem - #label: 'Menu Stub Methods' - #translateLabel: true - #value: #doGenerateMenuMethods - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Hook Methods' - #translateLabel: true - #value: #doGenerateHookMethods - #activeHelpKey: #generateHookMethods - #enabled: #hasSpecClass - ) - ) nil - nil - ) - ) - #(#MenuItem - #label: 'Test' - #translateLabel: true - #activeHelpKey: #test - #submenu: - #(#Menu + #( + #(#MenuItem + #label: 'Aspect Methods' + #translateLabel: true + #value: #doGenerateAspectMethods + #activeHelpKey: #generateAspectMethods + #enabled: #hasSpecClass + ) + #(#MenuItem + #label: 'Menu Stub Methods' + #translateLabel: true + #value: #doGenerateMenuMethods + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Hook Methods' + #translateLabel: true + #value: #doGenerateHookMethods + #activeHelpKey: #generateHookMethods + #enabled: #hasSpecClass + ) + ) nil + nil + ) + ) + #(#MenuItem + #label: 'Test' + #translateLabel: true + #activeHelpKey: #test + #submenu: + #(#Menu - #( - #(#MenuItem - #label: 'Start Application' - #translateLabel: true - #value: #doStartApplication - #activeHelpKey: #testStartApplication - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Geometry Test Mode' - #translateLabel: true - #activeHelpKey: #testGeometryTestMode - #indication: #testMode: - ) - ) nil - nil - ) - ) - #(#MenuItem - #label: 'Settings' - #translateLabel: true - #activeHelpKey: #settings - #submenu: - #(#Menu + #( + #(#MenuItem + #label: 'Start Application' + #translateLabel: true + #value: #doStartApplication + #activeHelpKey: #testStartApplication + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Geometry Test Mode' + #translateLabel: true + #activeHelpKey: #testGeometryTestMode + #indication: #testMode: + ) + ) nil + nil + ) + ) + #(#MenuItem + #label: 'Settings' + #translateLabel: true + #activeHelpKey: #settings + #submenu: + #(#Menu - #( - #(#MenuItem - #label: 'Canvas' - #translateLabel: true - #activeHelpKey: #settingsCanvas - #indication: #painterShown - ) - #(#MenuItem - #label: 'Gallery' - #translateLabel: true - #activeHelpKey: #settingsGallery - #indication: #galleryShown - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Redefine Aspect Methods' - #translateLabel: true - #activeHelpKey: #settingsRedefineAspectMethods - #enabled: #hasSpecClass - #indication: #redefineAspectMethods: - ) - #(#MenuItem - #label: 'Aspects As Instances' - #translateLabel: true - #activeHelpKey: #settingsAspectsAsInstances - #enabled: #hasSpecClass - #indication: #generateAspectsAsInstanceVariables: - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Fonts' - #submenuChannel: #menuFont - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Undo Manager...' - #translateLabel: true - #value: #openUndoMenu - #activeHelpKey: #settingsUndoManager - #enabled: #hasUndoHistory - ) - #(#MenuItem - #label: 'Grid Manager...' - #translateLabel: true - #value: #doDefineGrid - #activeHelpKey: #settingsGridManager - ) - ) nil - nil - ) - ) - #(#MenuItem - #label: 'History' - #translateLabel: true - #activeHelpKey: #history - #submenuChannel: #menuHistory - ) - #(#MenuItem - #label: 'Help' - #translateLabel: true - #startGroup: #right - #activeHelpKey: #help - #submenu: - #(#Menu + #( + #(#MenuItem + #label: 'Canvas' + #translateLabel: true + #activeHelpKey: #settingsCanvas + #indication: #painterShown + ) + #(#MenuItem + #label: 'Gallery' + #translateLabel: true + #activeHelpKey: #settingsGallery + #indication: #galleryShown + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Redefine Aspect Methods' + #translateLabel: true + #activeHelpKey: #settingsRedefineAspectMethods + #enabled: #hasSpecClass + #indication: #redefineAspectMethods: + ) + #(#MenuItem + #label: 'Aspects As Instances' + #translateLabel: true + #activeHelpKey: #settingsAspectsAsInstances + #enabled: #hasSpecClass + #indication: #generateAspectsAsInstanceVariables: + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Fonts' + #submenuChannel: #menuFont + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Undo Manager...' + #translateLabel: true + #value: #openUndoMenu + #activeHelpKey: #settingsUndoManager + #enabled: #hasUndoHistory + ) + #(#MenuItem + #label: 'Grid Manager...' + #translateLabel: true + #value: #doDefineGrid + #activeHelpKey: #settingsGridManager + ) + ) nil + nil + ) + ) + #(#MenuItem + #label: 'History' + #translateLabel: true + #activeHelpKey: #history + #submenuChannel: #menuHistory + ) + #(#MenuItem + #label: 'Help' + #translateLabel: true + #startGroup: #right + #activeHelpKey: #help + #submenu: + #(#Menu - #( - #(#MenuItem - #label: 'Tutorial' - #translateLabel: true - #value: #openHTMLDocument: - #activeHelpKey: #helpTutorial - #argument: 'tools/uipainter/TOP.html' - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Functions' - #translateLabel: true - #value: #openHTMLDocument: - #activeHelpKey: #helpFunctions - #argument: 'tools/uipainter/Functions.html' - ) - #(#MenuItem - #label: 'Examples' - #translateLabel: true - #value: #openHTMLDocument: - #activeHelpKey: #helpExamples - #argument: 'tools/uipainter/Examples.html' - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Help Tool' - #translateLabel: true - #value: #openHTMLDocument: - #activeHelpKey: #helpHelpTool - #argument: 'tools/uipainter/HelpTool.html' - ) - #(#MenuItem - #label: 'Layout Tool' - #translateLabel: true - #value: #openHTMLDocument: - #activeHelpKey: #helpLayoutTool - #argument: 'tools/uipainter/LayoutTool.html' - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Selected Widget' - #translateLabel: true - #value: #doOpenWidgetDocumentation - #activeHelpKey: #helpSelectedWidget - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Show Help Texts' - #translateLabel: true - #activeHelpKey: #helpShowHelp - #indication: #showingHelp: - ) - ) nil - nil - ) - ) - ) nil - nil + #( + #(#MenuItem + #label: 'Tutorial' + #translateLabel: true + #value: #openHTMLDocument: + #activeHelpKey: #helpTutorial + #argument: 'tools/uipainter/TOP.html' + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Functions' + #translateLabel: true + #value: #openHTMLDocument: + #activeHelpKey: #helpFunctions + #argument: 'tools/uipainter/Functions.html' + ) + #(#MenuItem + #label: 'Examples' + #translateLabel: true + #value: #openHTMLDocument: + #activeHelpKey: #helpExamples + #argument: 'tools/uipainter/Examples.html' + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Help Tool' + #translateLabel: true + #value: #openHTMLDocument: + #activeHelpKey: #helpHelpTool + #argument: 'tools/uipainter/HelpTool.html' + ) + #(#MenuItem + #label: 'Layout Tool' + #translateLabel: true + #value: #openHTMLDocument: + #activeHelpKey: #helpLayoutTool + #argument: 'tools/uipainter/LayoutTool.html' + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Selected Widget' + #translateLabel: true + #value: #doOpenWidgetDocumentation + #activeHelpKey: #helpSelectedWidget + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Show Help Texts' + #translateLabel: true + #activeHelpKey: #helpShowHelp + #indication: #showingHelp: + ) + ) nil + nil + ) + ) + ) nil + nil ) "Modified: / 23.8.1998 / 16:09:22 / cg" @@ -1213,108 +1215,108 @@ #(#Menu - #( - #(#MenuItem - #label: 'Left' - #translateLabel: true - #value: #alignSelectionLeft - #activeHelpKey: #alignSelectionLeft - #enabled: #canMoveOrAlignSelection - #labelImage: #(#ResourceRetriever #UIPainter #iconAlignL 'Left') - ) - #(#MenuItem - #label: 'Right' - #translateLabel: true - #value: #alignSelectionRight - #activeHelpKey: #alignSelectionRight - #enabled: #canMoveOrAlignSelection - #labelImage: #(#ResourceRetriever #UIPainter #iconAlignR 'Right') - ) - #(#MenuItem - #label: 'Left & Right' - #translateLabel: true - #value: #alignSelectionLeftAndRight - #activeHelpKey: #alignSelectionLeftAndRight - #enabled: #canMoveOrAlignSelection - #labelImage: #(#ResourceRetriever #UIPainter #iconAlignLR 'Left & Right') - ) - #(#MenuItem - #label: 'Top' - #translateLabel: true - #value: #alignSelectionTop - #activeHelpKey: #alignSelectionTop - #enabled: #canMoveOrAlignSelection - #labelImage: #(#ResourceRetriever #UIPainter #iconAlignT 'Top') - ) - #(#MenuItem - #label: 'Bottom' - #translateLabel: true - #value: #alignSelectionBottom - #activeHelpKey: #alignSelectionBottom - #enabled: #canMoveOrAlignSelection - #labelImage: #(#ResourceRetriever #UIPainter #iconAlignB 'Bottom') - ) - #(#MenuItem - #label: 'Top & Bottom' - #translateLabel: true - #value: #alignSelectionTopAndBottom - #activeHelpKey: #alignSelectionTopAndBottom - #enabled: #canMoveOrAlignSelection - #labelImage: #(#ResourceRetriever #UIPainter #iconAlignTB 'Top & Bottom') - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Centered Horizontal' - #translateLabel: true - #value: #alignSelectionCenterHor - #activeHelpKey: #alignSelectionCenterHor - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: 'Centered Vertical' - #translateLabel: true - #value: #alignSelectionCenterVer - #activeHelpKey: #alignSelectionCenterVer - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Center Horizontal In Frame' - #translateLabel: true - #value: #centerSelectionHor - #activeHelpKey: #centerSelectionHor - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: 'Center Vertical In Frame' - #translateLabel: true - #value: #centerSelectionVer - #activeHelpKey: #centerSelectionVer - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Spread Horizontal' - #translateLabel: true - #value: #spreadSelectionHor - #activeHelpKey: #spreadSelectionHor - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: 'Spread Vertical' - #translateLabel: true - #value: #spreadSelectionVer - #activeHelpKey: #spreadSelectionVer - #enabled: #canMoveOrAlignSelection - ) - ) nil - nil + #( + #(#MenuItem + #label: 'Left' + #translateLabel: true + #value: #alignSelectionLeft + #activeHelpKey: #alignSelectionLeft + #enabled: #canMoveOrAlignSelection + #labelImage: #(#ResourceRetriever #UIPainter #iconAlignL 'Left') + ) + #(#MenuItem + #label: 'Right' + #translateLabel: true + #value: #alignSelectionRight + #activeHelpKey: #alignSelectionRight + #enabled: #canMoveOrAlignSelection + #labelImage: #(#ResourceRetriever #UIPainter #iconAlignR 'Right') + ) + #(#MenuItem + #label: 'Left & Right' + #translateLabel: true + #value: #alignSelectionLeftAndRight + #activeHelpKey: #alignSelectionLeftAndRight + #enabled: #canMoveOrAlignSelection + #labelImage: #(#ResourceRetriever #UIPainter #iconAlignLR 'Left & Right') + ) + #(#MenuItem + #label: 'Top' + #translateLabel: true + #value: #alignSelectionTop + #activeHelpKey: #alignSelectionTop + #enabled: #canMoveOrAlignSelection + #labelImage: #(#ResourceRetriever #UIPainter #iconAlignT 'Top') + ) + #(#MenuItem + #label: 'Bottom' + #translateLabel: true + #value: #alignSelectionBottom + #activeHelpKey: #alignSelectionBottom + #enabled: #canMoveOrAlignSelection + #labelImage: #(#ResourceRetriever #UIPainter #iconAlignB 'Bottom') + ) + #(#MenuItem + #label: 'Top & Bottom' + #translateLabel: true + #value: #alignSelectionTopAndBottom + #activeHelpKey: #alignSelectionTopAndBottom + #enabled: #canMoveOrAlignSelection + #labelImage: #(#ResourceRetriever #UIPainter #iconAlignTB 'Top & Bottom') + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Centered Horizontal' + #translateLabel: true + #value: #alignSelectionCenterHor + #activeHelpKey: #alignSelectionCenterHor + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: 'Centered Vertical' + #translateLabel: true + #value: #alignSelectionCenterVer + #activeHelpKey: #alignSelectionCenterVer + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Center Horizontal In Frame' + #translateLabel: true + #value: #centerSelectionHor + #activeHelpKey: #centerSelectionHor + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: 'Center Vertical In Frame' + #translateLabel: true + #value: #centerSelectionVer + #activeHelpKey: #centerSelectionVer + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Spread Horizontal' + #translateLabel: true + #value: #spreadSelectionHor + #activeHelpKey: #spreadSelectionHor + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: 'Spread Vertical' + #translateLabel: true + #value: #spreadSelectionVer + #activeHelpKey: #spreadSelectionVer + #enabled: #canMoveOrAlignSelection + ) + ) nil + nil ) "Modified: / 20.5.1998 / 01:42:57 / cg" @@ -1338,178 +1340,178 @@ #(#Menu - #( - #(#MenuItem - #label: 'Undo' - #translateLabel: true - #nameKey: #undo - #value: #undoLast - #activeHelpKey: #editUndo - #enabled: #hasUndoHistory - #shortcutKeyCharacter: #Cmdu - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Cut' - #translateLabel: true - #value: #deleteSelection - #activeHelpKey: #editCut - #enabled: #valueOfCanCut - #shortcutKeyCharacter: #Cut - ) - #(#MenuItem - #label: 'Copy' - #translateLabel: true - #value: #copySelection - #activeHelpKey: #editCopy - #enabled: #valueOfCanCopy - #shortcutKeyCharacter: #Copy - ) - #(#MenuItem - #label: 'Paste' - #translateLabel: true - #value: #pasteBuffer - #activeHelpKey: #pasteBuffer - #enabled: #valueOfCanPaste - #shortcutKeyCharacter: #Paste - ) - #(#MenuItem - #label: 'Delete' - #translateLabel: true - #value: #deleteTotalSelection - #activeHelpKey: #editDelete - #enabled: #valueOfCanCut - #shortcutKeyCharacter: #Delete - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Paste With Layout' - #translateLabel: true - #value: #pasteWithLayout - #activeHelpKey: #pasteWithLayout - #enabled: #valueOfCanPasteWithKeepingLayout - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Move' - #translateLabel: true - #enabled: #canMoveSelection - #submenuChannel: #menuMove - ) - #(#MenuItem - #label: 'Dimension' - #translateLabel: true - #enabled: #hasSelection - #submenu: - #(#Menu + #( + #(#MenuItem + #label: 'Undo' + #translateLabel: true + #nameKey: #undo + #value: #undoLast + #activeHelpKey: #editUndo + #enabled: #hasUndoHistory + #shortcutKeyCharacter: #Cmdu + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Cut' + #translateLabel: true + #value: #deleteSelection + #activeHelpKey: #editCut + #enabled: #valueOfCanCut + #shortcutKeyCharacter: #Cut + ) + #(#MenuItem + #label: 'Copy' + #translateLabel: true + #value: #copySelection + #activeHelpKey: #editCopy + #enabled: #valueOfCanCopy + #shortcutKeyCharacter: #Copy + ) + #(#MenuItem + #label: 'Paste' + #translateLabel: true + #value: #pasteBuffer + #activeHelpKey: #pasteBuffer + #enabled: #valueOfCanPaste + #shortcutKeyCharacter: #Paste + ) + #(#MenuItem + #label: 'Delete' + #translateLabel: true + #value: #deleteTotalSelection + #activeHelpKey: #editDelete + #enabled: #valueOfCanCut + #shortcutKeyCharacter: #Delete + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Paste With Layout' + #translateLabel: true + #value: #pasteWithLayout + #activeHelpKey: #pasteWithLayout + #enabled: #valueOfCanPasteWithKeepingLayout + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Move' + #translateLabel: true + #enabled: #canMoveSelection + #submenuChannel: #menuMove + ) + #(#MenuItem + #label: 'Dimension' + #translateLabel: true + #enabled: #hasSelection + #submenu: + #(#Menu - #( - #(#MenuItem - #label: 'Default Extent' - #translateLabel: true - #value: #setToDefaultExtent - #activeHelpKey: #editDimensionDefaultExtent - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: 'Default Width' - #translateLabel: true - #value: #setToDefaultWidth - #activeHelpKey: #editDimensionDefaultWidth - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: 'Default Height' - #translateLabel: true - #value: #setToDefaultHeight - #activeHelpKey: #editDimensionDefaultHeight - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Copy Layout' - #translateLabel: true - #value: #copyLayout - #activeHelpKey: #editDimensionCopyLayout - #enabled: #hasSingleSelection - ) - #(#MenuItem - #label: 'Copy Extent' - #translateLabel: true - #value: #copyExtent - #activeHelpKey: #editDimensionCopyExtent - #enabled: #hasSingleSelection - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Paste Layout' - #translateLabel: true - #value: #pasteLayout - #activeHelpKey: #editDimensionPasteLayout - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: 'Paste Extent' - #translateLabel: true - #value: #pasteExtent - #activeHelpKey: #editDimensionPasteExtent - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: 'Paste Width' - #translateLabel: true - #value: #pasteWidth - #activeHelpKey: #editDimensionPasteWidth - #enabled: #canMoveOrAlignSelection - ) - #(#MenuItem - #label: 'Paste Height' - #translateLabel: true - #value: #pasteHeight - #activeHelpKey: #editDimensionPasteHeight - #enabled: #canMoveOrAlignSelection - ) - ) nil - nil - ) - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Open Widget Documentation' - #translateLabel: true - #value: #doOpenWidgetDocumentation - #activeHelpKey: #editOpenSpecDocumentation - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Inspect View' - #translateLabel: true - #value: #doInspectView - #activeHelpKey: #editInspectView - #enabled: #hasOneSelectionOtherThanCanvas - ) - #(#MenuItem - #label: 'Inspect Spec' - #translateLabel: true - #value: #doInspectSpec - #activeHelpKey: #editInspectSpec - ) - ) nil - nil + #( + #(#MenuItem + #label: 'Default Extent' + #translateLabel: true + #value: #setToDefaultExtent + #activeHelpKey: #editDimensionDefaultExtent + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: 'Default Width' + #translateLabel: true + #value: #setToDefaultWidth + #activeHelpKey: #editDimensionDefaultWidth + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: 'Default Height' + #translateLabel: true + #value: #setToDefaultHeight + #activeHelpKey: #editDimensionDefaultHeight + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Copy Layout' + #translateLabel: true + #value: #copyLayout + #activeHelpKey: #editDimensionCopyLayout + #enabled: #hasSingleSelection + ) + #(#MenuItem + #label: 'Copy Extent' + #translateLabel: true + #value: #copyExtent + #activeHelpKey: #editDimensionCopyExtent + #enabled: #hasSingleSelection + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Paste Layout' + #translateLabel: true + #value: #pasteLayout + #activeHelpKey: #editDimensionPasteLayout + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: 'Paste Extent' + #translateLabel: true + #value: #pasteExtent + #activeHelpKey: #editDimensionPasteExtent + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: 'Paste Width' + #translateLabel: true + #value: #pasteWidth + #activeHelpKey: #editDimensionPasteWidth + #enabled: #canMoveOrAlignSelection + ) + #(#MenuItem + #label: 'Paste Height' + #translateLabel: true + #value: #pasteHeight + #activeHelpKey: #editDimensionPasteHeight + #enabled: #canMoveOrAlignSelection + ) + ) nil + nil + ) + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Open Widget Documentation' + #translateLabel: true + #value: #doOpenWidgetDocumentation + #activeHelpKey: #editOpenSpecDocumentation + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'Inspect View' + #translateLabel: true + #value: #doInspectView + #activeHelpKey: #editInspectView + #enabled: #hasOneSelectionOtherThanCanvas + ) + #(#MenuItem + #label: 'Inspect Spec' + #translateLabel: true + #value: #doInspectSpec + #activeHelpKey: #editInspectSpec + ) + ) nil + nil ) "Modified: / 20.5.1998 / 01:46:00 / cg" @@ -1533,41 +1535,41 @@ #(#Menu - #( - #(#MenuItem - #label: 'Up' - #translateLabel: true - #value: #doStepUp - #activeHelpKey: #moveWidgetUp - #enabled: #canChangeOrderInContainer - #labelImage: #(#ResourceRetriever #Icon #upIcon 'Up') - ) - #(#MenuItem - #label: 'Down' - #translateLabel: true - #value: #doStepDown - #activeHelpKey: #moveWidgetDown - #enabled: #canChangeOrderInContainer - #labelImage: #(#ResourceRetriever #Icon #downIcon 'Down') - ) - #(#MenuItem - #label: 'Into' - #translateLabel: true - #value: #doStepIn - #activeHelpKey: #moveWidgetInto - #enabled: #canMoveSelectionIntoContainer - #labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Into') - ) - #(#MenuItem - #label: 'Out' - #translateLabel: true - #value: #doStepOut - #activeHelpKey: #moveWidgetOut - #enabled: #canMoveSelectionOutOfContainer - #labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Out') - ) - ) nil - nil + #( + #(#MenuItem + #label: 'Up' + #translateLabel: true + #value: #doStepUp + #activeHelpKey: #moveWidgetUp + #enabled: #canChangeOrderInContainer + #labelImage: #(#ResourceRetriever #Icon #upIcon 'Up') + ) + #(#MenuItem + #label: 'Down' + #translateLabel: true + #value: #doStepDown + #activeHelpKey: #moveWidgetDown + #enabled: #canChangeOrderInContainer + #labelImage: #(#ResourceRetriever #Icon #downIcon 'Down') + ) + #(#MenuItem + #label: 'Into' + #translateLabel: true + #value: #doStepIn + #activeHelpKey: #moveWidgetInto + #enabled: #canMoveSelectionIntoContainer + #labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Into') + ) + #(#MenuItem + #label: 'Out' + #translateLabel: true + #value: #doStepOut + #activeHelpKey: #moveWidgetOut + #enabled: #canMoveSelectionOutOfContainer + #labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Out') + ) + ) nil + nil ) ! @@ -1589,123 +1591,123 @@ #(#Menu - #( - #(#MenuItem - #label: 'Start' - #isButton: true - #value: #doStartApplication - #activeHelpKey: #testStartApplication - #labelImage: #(#ResourceRetriever #Icon #startIcon) - ) - #(#MenuItem - #label: '' - ) - #(#MenuItem - #label: 'New' - #isButton: true - #value: #doNew - #activeHelpKey: #fileNew - #labelImage: #(#ResourceRetriever #Icon #newIcon) - ) - #(#MenuItem - #label: 'Load' - #isButton: true - #value: #doLoad - #activeHelpKey: #fileLoad - #labelImage: #(#ResourceRetriever #Icon #loadIcon) - ) - #(#MenuItem - #label: 'Save' - #isButton: true - #value: #doSave - #activeHelpKey: #fileSave - #labelImage: #(#ResourceRetriever #Icon #saveIcon) - ) - #(#MenuItem - #label: '' - ) - #(#MenuItem - #label: 'Cut' - #isButton: true - #value: #deleteSelection - #activeHelpKey: #editCut - #enabled: #valueOfCanCut - #labelImage: #(#ResourceRetriever #Icon #cutIcon) - ) - #(#MenuItem - #label: 'Copy' - #isButton: true - #value: #copySelection - #activeHelpKey: #editCopy - #enabled: #valueOfCanCopy - #labelImage: #(#ResourceRetriever #Icon #copyIcon) - ) - #(#MenuItem - #label: 'Paste With Layout' - #isButton: true - #value: #pasteWithLayout - #activeHelpKey: #editPaste - #enabled: #valueOfCanPasteWithKeepingLayout - #labelImage: #(#ResourceRetriever #Icon #pasteIcon) - ) - #(#MenuItem - #label: 'Delete' - #isButton: true - #value: #deleteTotalSelection - #activeHelpKey: #editDelete - #enabled: #valueOfCanCut - #labelImage: #(#ResourceRetriever #Icon #deleteIcon) - ) - #(#MenuItem - #label: '' - ) - #(#MenuItem - #label: 'Move Up' - #isButton: true - #value: #doStepUp - #activeHelpKey: #moveWidgetUp - #enabled: #canChangeOrderInContainer - #labelImage: #(#ResourceRetriever #Icon #upIcon) - ) - #(#MenuItem - #label: 'Move Down' - #isButton: true - #value: #doStepDown - #activeHelpKey: #moveWidgetDown - #enabled: #canChangeOrderInContainer - #labelImage: #(#ResourceRetriever #Icon #downIcon) - ) - #(#MenuItem - #label: 'Move Into' - #isButton: true - #value: #doStepIn - #activeHelpKey: #moveWidgetInto - #enabled: #canMoveSelectionIntoContainer - #labelImage: #(#ResourceRetriever #Icon #downRightIcon) - ) - #(#MenuItem - #label: 'Move Out' - #isButton: true - #value: #doStepOut - #activeHelpKey: #moveWidgetOut - #enabled: #canMoveSelectionOutOfContainer - #labelImage: #(#ResourceRetriever #Icon #leftDownIcon) - ) - #(#MenuItem - #label: '' - ) - #(#MenuItem - #label: 'Canvas' - #activeHelpKey: #settingsCanvas - #indication: #painterShown - ) - #(#MenuItem - #label: 'Gallery' - #activeHelpKey: #settingsGallery - #indication: #galleryShown - ) - ) nil - nil + #( + #(#MenuItem + #label: 'Start' + #isButton: true + #value: #doStartApplication + #activeHelpKey: #testStartApplication + #labelImage: #(#ResourceRetriever #Icon #startIcon) + ) + #(#MenuItem + #label: '' + ) + #(#MenuItem + #label: 'New' + #isButton: true + #value: #doNew + #activeHelpKey: #fileNew + #labelImage: #(#ResourceRetriever #Icon #newIcon) + ) + #(#MenuItem + #label: 'Load' + #isButton: true + #value: #doLoad + #activeHelpKey: #fileLoad + #labelImage: #(#ResourceRetriever #Icon #loadIcon) + ) + #(#MenuItem + #label: 'Save' + #isButton: true + #value: #doSave + #activeHelpKey: #fileSave + #labelImage: #(#ResourceRetriever #Icon #saveIcon) + ) + #(#MenuItem + #label: '' + ) + #(#MenuItem + #label: 'Cut' + #isButton: true + #value: #deleteSelection + #activeHelpKey: #editCut + #enabled: #valueOfCanCut + #labelImage: #(#ResourceRetriever #Icon #cutIcon) + ) + #(#MenuItem + #label: 'Copy' + #isButton: true + #value: #copySelection + #activeHelpKey: #editCopy + #enabled: #valueOfCanCopy + #labelImage: #(#ResourceRetriever #Icon #copyIcon) + ) + #(#MenuItem + #label: 'Paste With Layout' + #isButton: true + #value: #pasteWithLayout + #activeHelpKey: #editPaste + #enabled: #valueOfCanPasteWithKeepingLayout + #labelImage: #(#ResourceRetriever #Icon #pasteIcon) + ) + #(#MenuItem + #label: 'Delete' + #isButton: true + #value: #deleteTotalSelection + #activeHelpKey: #editDelete + #enabled: #valueOfCanCut + #labelImage: #(#ResourceRetriever #Icon #deleteIcon) + ) + #(#MenuItem + #label: '' + ) + #(#MenuItem + #label: 'Move Up' + #isButton: true + #value: #doStepUp + #activeHelpKey: #moveWidgetUp + #enabled: #canChangeOrderInContainer + #labelImage: #(#ResourceRetriever #Icon #upIcon) + ) + #(#MenuItem + #label: 'Move Down' + #isButton: true + #value: #doStepDown + #activeHelpKey: #moveWidgetDown + #enabled: #canChangeOrderInContainer + #labelImage: #(#ResourceRetriever #Icon #downIcon) + ) + #(#MenuItem + #label: 'Move Into' + #isButton: true + #value: #doStepIn + #activeHelpKey: #moveWidgetInto + #enabled: #canMoveSelectionIntoContainer + #labelImage: #(#ResourceRetriever #Icon #downRightIcon) + ) + #(#MenuItem + #label: 'Move Out' + #isButton: true + #value: #doStepOut + #activeHelpKey: #moveWidgetOut + #enabled: #canMoveSelectionOutOfContainer + #labelImage: #(#ResourceRetriever #Icon #leftDownIcon) + ) + #(#MenuItem + #label: '' + ) + #(#MenuItem + #label: 'Canvas' + #activeHelpKey: #settingsCanvas + #indication: #painterShown + ) + #(#MenuItem + #label: 'Gallery' + #activeHelpKey: #settingsGallery + #indication: #galleryShown + ) + ) nil + nil ) ! @@ -1727,54 +1729,54 @@ #(#Menu - #( - #(#MenuItem - #label: 'Align Left' - #isButton: true - #value: #alignSelectionLeft - #activeHelpKey: #alignSelectionLeft - #labelImage: #(#ResourceRetriever nil #iconAlignL) - ) - #(#MenuItem - #label: 'Align Right' - #isButton: true - #value: #alignSelectionRight - #activeHelpKey: #alignSelectionRight - #labelImage: #(#ResourceRetriever nil #iconAlignR) - ) - #(#MenuItem - #label: 'Align Left & Right' - #isButton: true - #value: #alignSelectionLeftAndRight - #activeHelpKey: #alignSelectionLeftAndRight - #labelImage: #(#ResourceRetriever nil #iconAlignLR) - ) - #(#MenuItem - #label: '' - ) - #(#MenuItem - #label: 'Align Top' - #isButton: true - #value: #alignSelectionTop - #activeHelpKey: #alignSelectionTop - #labelImage: #(#ResourceRetriever nil #iconAlignT) - ) - #(#MenuItem - #label: 'Align Bottom' - #isButton: true - #value: #alignSelectionBottom - #activeHelpKey: #alignSelectionBottom - #labelImage: #(#ResourceRetriever nil #iconAlignB) - ) - #(#MenuItem - #label: 'Align Top & Bottom' - #isButton: true - #value: #alignSelectionTopAndBottom - #activeHelpKey: #alignSelectionTopAndBottom - #labelImage: #(#ResourceRetriever nil #iconAlignTB) - ) - ) nil - nil + #( + #(#MenuItem + #label: 'Align Left' + #isButton: true + #value: #alignSelectionLeft + #activeHelpKey: #alignSelectionLeft + #labelImage: #(#ResourceRetriever nil #iconAlignL) + ) + #(#MenuItem + #label: 'Align Right' + #isButton: true + #value: #alignSelectionRight + #activeHelpKey: #alignSelectionRight + #labelImage: #(#ResourceRetriever nil #iconAlignR) + ) + #(#MenuItem + #label: 'Align Left & Right' + #isButton: true + #value: #alignSelectionLeftAndRight + #activeHelpKey: #alignSelectionLeftAndRight + #labelImage: #(#ResourceRetriever nil #iconAlignLR) + ) + #(#MenuItem + #label: '' + ) + #(#MenuItem + #label: 'Align Top' + #isButton: true + #value: #alignSelectionTop + #activeHelpKey: #alignSelectionTop + #labelImage: #(#ResourceRetriever nil #iconAlignT) + ) + #(#MenuItem + #label: 'Align Bottom' + #isButton: true + #value: #alignSelectionBottom + #activeHelpKey: #alignSelectionBottom + #labelImage: #(#ResourceRetriever nil #iconAlignB) + ) + #(#MenuItem + #label: 'Align Top & Bottom' + #isButton: true + #value: #alignSelectionTopAndBottom + #activeHelpKey: #alignSelectionTopAndBottom + #labelImage: #(#ResourceRetriever nil #iconAlignTB) + ) + ) nil + nil ) ! ! @@ -1835,8 +1837,8 @@ |holder| (holder := builder bindingAt:#galleryShown) isNil ifTrue:[ - builder aspectAt:#galleryShown put:(holder := true asValue). - holder addDependent:self + builder aspectAt:#galleryShown put:(holder := true asValue). + holder addDependent:self ]. ^ holder @@ -1867,34 +1869,34 @@ |noteBook channel helpTool layoutTool specTool| (noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[ - noteBook := View new. - layoutTool := UILayoutTool new. - helpTool := UIHelpTool new. - helpTool buildFromClass:specClass. - specTool := UISpecificationTool new. - channel := self modifiedChannel. - - layoutTool masterApplication:self. - specTool masterApplication:self. - helpTool masterApplication:self. - - layoutCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. - helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. - specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. - - layoutCanvas client:layoutTool. - helpCanvas client:helpTool. - specTool builder:(specCanvas client:specTool). - - layoutTool masterApplication:self. - specTool masterApplication:self. - helpTool masterApplication:self. - - layoutTool modifiedHolder:channel. - helpTool modifiedHolder:channel. - specTool modifiedHolder:channel. - - builder aspectAt:#noteBookView put:noteBook. + noteBook := View new. + layoutTool := UILayoutTool new. + helpTool := UIHelpTool new. + helpTool buildFromClass:specClass. + specTool := UISpecificationTool new. + channel := self modifiedChannel. + + layoutTool masterApplication:self. + specTool masterApplication:self. + helpTool masterApplication:self. + + layoutCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. + helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. + specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. + + layoutCanvas client:layoutTool. + helpCanvas client:helpTool. + specTool builder:(specCanvas client:specTool). + + layoutTool masterApplication:self. + specTool masterApplication:self. + helpTool masterApplication:self. + + layoutTool modifiedHolder:channel. + helpTool modifiedHolder:channel. + specTool modifiedHolder:channel. + + builder aspectAt:#noteBookView put:noteBook. ]. ^ noteBook ! @@ -1905,8 +1907,8 @@ |holder| (holder := builder bindingAt:#painterShown) isNil ifTrue:[ - builder aspectAt:#painterShown put:(holder := true asValue). - holder addDependent:self + builder aspectAt:#painterShown put:(holder := true asValue). + holder addDependent:self ]. ^ holder @@ -1918,7 +1920,7 @@ |holder| (holder := builder bindingAt:#tabList) isNil ifTrue:[ - builder aspectAt:#tabList put:(holder := #(Basics Details Layout) asValue). + builder aspectAt:#tabList put:(holder := #(Basics Details Layout) asValue). ]. ^ holder ! @@ -1929,8 +1931,8 @@ |holder| (holder := builder bindingAt:#tabModel) isNil ifTrue:[ - holder := AspectAdaptor new subject:self; forAspect:#tabSelection. - builder aspectAt:#tabModel put:holder. + holder := AspectAdaptor new subject:self; forAspect:#tabSelection. + builder aspectAt:#tabModel put:holder. ]. ^ holder ! @@ -1945,7 +1947,7 @@ |holder| (holder := builder bindingAt:#valueOfCanPasteWithKeepingLayout) isNil ifTrue:[ - builder aspectAt:#valueOfCanPasteWithKeepingLayout put:(holder := false asValue). + builder aspectAt:#valueOfCanPasteWithKeepingLayout put:(holder := false asValue). ]. ^ holder @@ -1961,8 +1963,8 @@ |cls loadedFromClass loadedFromSpec editor tableColumnsOrSelector| (cls := self resolveName:specClass) isNil ifTrue:[ - self askForSaving ifFalse: [^self]. - cls := self resolveName:specClass. + self askForSaving ifFalse: [^self]. + cls := self resolveName:specClass. ]. loadedFromSpec := loadedFromClass := false. @@ -1972,34 +1974,34 @@ editor rowClassName:(self specTool specification rowClassName). ((tableColumnsOrSelector := self specTool specification columnHolder) notNil and: [cls class implements: tableColumnsOrSelector]) ifTrue: [ - editor openModalOnClass: cls andSelector: tableColumnsOrSelector. - loadedFromClass := true. + editor openModalOnClass: cls andSelector: tableColumnsOrSelector. + loadedFromClass := true. ] ifFalse: [ - (tableColumnsOrSelector := self specTool specification columns) isNil ifTrue: [ - editor openModal - ] ifFalse: [ - editor openModalOnResourceSpec:tableColumnsOrSelector. - loadedFromSpec := true - ]. + (tableColumnsOrSelector := self specTool specification columns) isNil ifTrue: [ + editor openModal + ] ifFalse: [ + editor openModalOnResourceSpec:tableColumnsOrSelector. + loadedFromSpec := true + ]. ]. loadedFromClass ifTrue: [ - self specTool specification columns:nil. - self specTool specification rowClassName:nil. - self modifiedChannel value:true. - self accept. + self specTool specification columns:nil. + self specTool specification rowClassName:nil. + self modifiedChannel value:true. + self accept. ]. (loadedFromSpec not and: [editor hasSaved and:[editor specSelector ~= tableColumnsOrSelector]]) ifTrue:[ - self specTool specification columnHolder:editor specSelector. - self modifiedChannel value:true. - self accept. - ^self + self specTool specification columnHolder:editor specSelector. + self modifiedChannel value:true. + self accept. + ^self ]. loadedFromClass ifFalse: [ - self specTool specification columns:(editor columns). - self specTool specification rowClassName:(editor rowClassName). - self modifiedChannel value: editor modified. + self specTool specification columns:(editor columns). + self specTool specification rowClassName:(editor rowClassName). + self modifiedChannel value: editor modified. ]. @@ -2011,42 +2013,42 @@ |cls selectorOrMenu editor selectedSpec spec| (cls := self resolveName:specClass) isNil ifTrue:[ - self askForSaving ifFalse: [^self]. - cls := self resolveName:specClass. + self askForSaving ifFalse: [^self]. + cls := self resolveName:specClass. ]. cls notNil ifTrue:[ - spec := self specTool specification. - (selectorOrMenu := spec menuSelector) notNil ifTrue:[ - selectorOrMenu := selectorOrMenu asSymbol - ] ifFalse:[ - "/ cg: q&d hack ... - - (selectedSpec := treeView propertySelected) notNil ifTrue:[ - Object errorSignal handle:[:ex | - selectorOrMenu := nil. - ] do:[ - selectorOrMenu := selectedSpec view asMenu. - ] - ]. - ]. - - editor := MenuEditor new. - editor masterApplication:self. - editor specClass: cls. - editor useHelpTool: self helpTool. - selectorOrMenu class ~~ Menu - ifTrue: [editor openModalOnClass:cls andSelector:selectorOrMenu] - ifFalse: [editor openModalOnMenu:selectorOrMenu]. - self helpTool updateList. - - editor specSelector ~= selectorOrMenu ifTrue:[ - editor hasSaved ifTrue:[ - spec menuSelector:editor specSelector. - self modifiedChannel value:true. - self accept - ] - ]. + spec := self specTool specification. + (selectorOrMenu := spec menuSelector) notNil ifTrue:[ + selectorOrMenu := selectorOrMenu asSymbol + ] ifFalse:[ + "/ cg: q&d hack ... + + (selectedSpec := treeView propertySelected) notNil ifTrue:[ + Object errorSignal handle:[:ex | + selectorOrMenu := nil. + ] do:[ + selectorOrMenu := selectedSpec view asMenu. + ] + ]. + ]. + + editor := MenuEditor new. + editor masterApplication:self. + editor specClass: cls. + editor useHelpTool: self helpTool. + selectorOrMenu class ~~ Menu + ifTrue: [editor openModalOnClass:cls andSelector:selectorOrMenu] + ifFalse: [editor openModalOnMenu:selectorOrMenu]. + self helpTool updateList. + + editor specSelector ~= selectorOrMenu ifTrue:[ + editor hasSaved ifTrue:[ + spec menuSelector:editor specSelector. + self modifiedChannel value:true. + self accept + ] + ]. ] "Modified: / 16.7.1998 / 18:16:42 / cg" @@ -2058,12 +2060,12 @@ |selector editor spec| (self resolveName:specClass) isNil ifTrue:[ - self askForSaving ifFalse: [^self] + self askForSaving ifFalse: [^self] ]. spec := self specTool specification. (selector := spec hierarchicalList) notNil ifTrue:[ - selector := selector asSymbol + selector := selector asSymbol ]. editor := HierarchicalListEditor new. @@ -2071,11 +2073,11 @@ editor openModalOnClass:specClass andSelector:selector. editor specSelector ~= selector ifTrue:[ - editor hasSaved ifTrue:[ - spec hierarchicalList:editor specSelector. - self modifiedChannel value:true. - self accept - ] + editor hasSaved ifTrue:[ + spec hierarchicalList:editor specSelector. + self modifiedChannel value:true. + self accept + ] ] "Modified: / 16.7.1998 / 18:15:46 / cg" @@ -2087,24 +2089,24 @@ |spec cls meta sel| (self resolveName:specClass) isNil ifTrue:[ - self askForSaving ifFalse: [^self] + self askForSaving ifFalse: [^self] ]. spec := self specTool specification. cls := spec majorKey. cls isNil ifTrue:[ - cls := specClass. + cls := specClass. ]. (cls := self resolveName:cls inClass:(Smalltalk at: specClass asSymbol)) isNil ifTrue:[ - spec majorKey isNil ifTrue:[ - ^ self warn:'Cannot find class (no majorKey specified)'. - ]. - ^ self warn:'Cannot find class ', spec majorKey asBoldText, '!!'. + spec majorKey isNil ifTrue:[ + ^ self warn:'Cannot find class (no majorKey specified)'. + ]. + ^ self warn:'Cannot find class ', spec majorKey asBoldText, '!!'. ]. sel := spec minorKey. meta := cls class whichClassIncludesSelector:sel. meta isNil ifTrue:[ - ^ self warn:'Cannot find selector #', (sel ? '') asBoldText, ' in class ', cls name asBoldText, '!!' + ^ self warn:'Cannot find selector #', (sel ? '') asBoldText, ' in class ', cls name asBoldText, '!!' ]. self class openOnClass:meta soleInstance andSelector:spec minorKey. @@ -2117,23 +2119,23 @@ |selector editor spec| (self resolveName:specClass) isNil ifTrue:[ - self askForSaving ifFalse: [^self] + self askForSaving ifFalse: [^self] ]. spec := self specTool specification. (selector := spec listSelector) isArray - ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!']. + ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!']. editor := TabListEditor new. editor masterApplication:self. editor openModalOnClass:specClass andSelector:selector. editor specSelector ~= selector ifTrue:[ - editor hasSaved ifTrue:[ - spec listSelector:editor specSelector. - self modifiedChannel value:true. - self accept. - ] + editor hasSaved ifTrue:[ + spec listSelector:editor specSelector. + self modifiedChannel value:true. + self accept. + ] ] "Modified: / 16.7.1998 / 18:15:14 / cg" @@ -2146,8 +2148,8 @@ widget has changed" self isModified ifFalse:[ - self layoutTool update. - self modifiedChannel value:false + self layoutTool update. + self modifiedChannel value:false ] ! @@ -2158,14 +2160,14 @@ |property| (property := treeView propertySelected) notNil ifTrue:[ - self specTool specification:(property spec copy). - self setViewInLayoutTool:(property view). - self modifiedChannel value:false + self specTool specification:(property spec copy). + self setViewInLayoutTool:(property view). + self modifiedChannel value:false ] ifFalse:[ - self layoutTool layoutView notNil ifTrue:[ - self modifiedChannel value:false. - self treeSelection - ] + self layoutTool layoutView notNil ifTrue:[ + self modifiedChannel value:false. + self treeSelection + ] ] ! @@ -2175,30 +2177,30 @@ |window| someObject == treeView model ifTrue:[ - (something == #selection - or:[something == #selectionIndex]) ifTrue:[self treeSelection]. + (something == #selection + or:[something == #selectionIndex]) ifTrue:[self treeSelection]. ^ self ]. someObject == self galleryShown ifTrue:[ - "/ galleryShown toggle changed - window := selectionPanel window. - (someObject value) ifTrue:[ - self raiseUIView:window - ] ifFalse:[ - self hideUIView:window - ]. + "/ galleryShown toggle changed + window := selectionPanel window. + (someObject value) ifTrue:[ + self raiseUIView:window + ] ifFalse:[ + self hideUIView:window + ]. ^ self ]. someObject == self painterShown ifTrue:[ - "/ canvasShown toggle changed - window := self painter topView. - (someObject value) ifTrue:[ - self raiseUIView:window - ] ifFalse:[ - self hideUIView:window - ]. + "/ canvasShown toggle changed + window := self painter topView. + (someObject value) ifTrue:[ + self raiseUIView:window + ] ifFalse:[ + self hideUIView:window + ]. ^ self ]. @@ -2219,18 +2221,18 @@ treeView notNil ifTrue: [ - treeSelection := treeView selection. - "/ the top-node cannot be cut, copied or pasted. - canCutOrCopy := treeSelection size >= 1 and:[treeSelection first ~~ 1]. - clipboard := self getSelection. - - clipboard isCollection ifTrue:[clipboard notEmpty ifTrue:[sel := clipboard first]] - ifFalse:[sel := clipboard]. - - canPaste := (sel isKindOf:UISpecification) and: - [treeSelection size = 1 - and:[treeSelection first == 1 - or: [self canPasteInto: treeView selectedNode contents view]]] + treeSelection := treeView selection. + "/ the top-node cannot be cut, copied or pasted. + canCutOrCopy := treeSelection size >= 1 and:[treeSelection first ~~ 1]. + clipboard := self getSelection. + + clipboard isCollection ifTrue:[clipboard notEmpty ifTrue:[sel := clipboard first]] + ifFalse:[sel := clipboard]. + + canPaste := (sel isKindOf:UISpecification) and: + [treeSelection size = 1 + and:[treeSelection first == 1 + or: [self canPasteInto: treeView selectedNode contents view]]] ]. self valueOfCanCut value: canCutOrCopy. @@ -2262,7 +2264,7 @@ painter := self painter. (painter respondsTo:(aMessage selector)) ifTrue:[ - ^ aMessage sendTo:painter + ^ aMessage sendTo:painter ]. super doesNotUnderstand:aMessage @@ -2290,13 +2292,13 @@ (modified or: [self painter isModified or: [self helpTool modified]]) ifTrue: [ - ((YesNoBox title:(resources string:'Window Spec was modified !!')) - noText:(resources string:'Cancel'); - yesText:(resources string:'Forget it and proceed'); - showAtPointer; - accepted) ifFalse: [^false]. - modified := false. - self painter resetModification + ((YesNoBox title:(resources string:'Window Spec was modified !!')) + noText:(resources string:'Cancel'); + yesText:(resources string:'Forget it and proceed'); + showAtPointer; + accepted) ifFalse: [^false]. + modified := false. + self painter resetModification ]. ^true @@ -2309,10 +2311,10 @@ self askForSectionModification. ((YesNoBox title:'No application class defined yet!!') - noText:'Cancel'; - yesText:'Define'; - showAtPointer; - accepted) ifFalse: [^false]. + noText:'Cancel'; + yesText:'Define'; + showAtPointer; + accepted) ifFalse: [^false]. self doSave. @@ -2323,11 +2325,11 @@ "asks for section modification in the notebook" self isModified ifTrue:[ - (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ - self accept - ] ifFalse: [ - self cancel - ] + (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ + self accept + ] ifFalse: [ + self cancel + ] ] ! @@ -2341,54 +2343,54 @@ cls := self resolveName:specClass. cls isNil ifTrue:[ - superclass := self resolveName:specSuperclass. - - superclass isNil ifTrue:[ - self warn:'No class named ' , specSuperclass , ' exists!!'. - ^ false. - ]. - (self confirm:'Create class ' , specClass asBoldText, '?') ifTrue:[ - superclass subclass:(specClass asSymbol) - instanceVariableNames:'' - classVariableNames:'' - poolDictionaries:'' - category:'Applications'. - ^ true. - ]. - ^ false. + superclass := self resolveName:specSuperclass. + + superclass isNil ifTrue:[ + self warn:'No class named ' , specSuperclass , ' exists!!'. + ^ false. + ]. + (self confirm:'Create class ' , specClass asBoldText, '?') ifTrue:[ + superclass subclass:(specClass asSymbol) + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'Applications'. + ^ true. + ]. + ^ false. ]. cls isBehavior ifFalse:[ - self warn:'A global named ' , specClass , ' exists, but it is no class.'. - ^ false. + self warn:'A global named ' , specClass , ' exists, but it is no class.'. + ^ false. ]. specSuperclass isBehavior ifFalse:[ - specSuperclass isEmpty ifFalse:[ - superclass := self resolveName:specSuperclass - ] ifTrue:[ - specSuperclass := nil. - ] + specSuperclass isEmpty ifFalse:[ + superclass := self resolveName:specSuperclass + ] ifTrue:[ + specSuperclass := nil. + ] ] ifTrue:[ - superclass := specSuperclass + superclass := specSuperclass ]. specSuperclass notNil ifTrue:[ - superclass isNil ifTrue:[ - self warn:'No class named ' , specSuperclass , ' exists!!'. - ^ false. - ]. - - (cls isSubclassOf:superclass) ifFalse:[ - self information:('A global named ' , specClass , ' exists,\' , - 'but is not a subclass of ' , superclass name , '.\\' , - 'Check and try again if that is not what you want.') withCRs. - ] + superclass isNil ifTrue:[ + self warn:'No class named ' , specSuperclass , ' exists!!'. + ^ false. + ]. + + (cls isSubclassOf:superclass) ifFalse:[ + self information:('A global named ' , specClass , ' exists,\' , + 'but is not a subclass of ' , superclass name , '.\\' , + 'Check and try again if that is not what you want.') withCRs. + ] ]. superclass isNil ifTrue:[ - cls notNil ifTrue:[ - specSuperclass := cls superclass name - ] + cls notNil ifTrue:[ + specSuperclass := cls superclass name + ] ]. ^ true @@ -2406,14 +2408,14 @@ raiseTabView self isLayoutToolSelected ifTrue:[ - layoutCanvas raise + layoutCanvas raise ] ifFalse:[ - self isHelpToolSelected ifTrue:[ - helpCanvas raise - ] ifFalse:[ - self specTool selection:tabSelection. - specCanvas raise - ] + self isHelpToolSelected ifTrue:[ + helpCanvas raise + ] ifFalse:[ + self specTool selection:tabSelection. + specCanvas raise + ] ] ! @@ -2430,17 +2432,17 @@ (aString notNil and: [self askForModification]) ifTrue: [ - |msg cls sel| - msg := aString asCollectionOfWords. - (msg size == 2 and: - [(cls := self resolveName:(msg at:1)) notNil]) - ifTrue: - [ - self specClass:cls. - specSuperclass := cls superclass name. - specSelector := (msg at: 2) asSymbol. - ^true - ] + |msg cls sel| + msg := aString asCollectionOfWords. + (msg size == 2 and: + [(cls := self resolveName:(msg at:1)) notNil]) + ifTrue: + [ + self specClass:cls. + specSuperclass := cls superclass name. + specSelector := (msg at: 2) asSymbol. + ^true + ] ]. ^false ! @@ -2458,17 +2460,17 @@ (self aspectFor:#superclassNameChannel) value:superClassName. self painter - className:clsName - superclassName:superClassName - selector:(selector ? ''). + className:clsName + superclassName:superClassName + selector:(selector ? ''). self specClass:clsName. specSelector := (selector ? ''). specSuperclass := superClassName. specClass notNil & selector notNil ifTrue:[ - self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. - self updateInfoLabel + self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. + self updateInfoLabel ]. "Modified: / 5.2.1998 / 09:44:58 / stefan" @@ -2480,7 +2482,7 @@ |type| self painter topView == aView ifTrue:[ - type := #Extent + type := #Extent ]. self layoutTool layoutView:aView type:type @@ -2490,7 +2492,7 @@ "sets the specClass and updates the Help Tool" specClass := aClass isBehavior ifTrue:[aClass name] - ifFalse:[aClass]. + ifFalse:[aClass]. self helpTool buildFromClass:specClass. self helpTool updateList. @@ -2504,7 +2506,7 @@ "returns the help tool" helpCanvas isNil ifTrue:[ - self noteBookView + self noteBookView ]. ^ helpCanvas application ! @@ -2513,7 +2515,7 @@ "returns the layout tool" layoutCanvas isNil ifTrue:[ - self noteBookView + self noteBookView ]. ^ layoutCanvas application ! @@ -2528,7 +2530,7 @@ "returns the spec tool" specCanvas isNil ifTrue:[ - self noteBookView + self noteBookView ]. ^ specCanvas application ! ! @@ -2546,7 +2548,7 @@ the window spec is stored is defined" specSelector size > 1 ifTrue:[ - ^ self hasSpecClass + ^ self hasSpecClass ]. ^ false ! @@ -2589,20 +2591,20 @@ |whatToDo| (something isNil or:[tabSelection = something]) ifTrue:[ - ^ self + ^ self ]. self isModified ifTrue:[ - whatToDo := DialogBox - confirmWithCancel:'Accept modifications in section ' , tabSelection printString asBoldText, '?' - labels:#('Cancel' 'Ignore' 'Accept') - default:3. - whatToDo isNil ifTrue:[^self]. - whatToDo == true ifTrue:[ - self accept - ] ifFalse:[ - self cancel - ] + whatToDo := DialogBox + confirmWithCancel:'Accept modifications in section ' , tabSelection printString asBoldText, '?' + labels:#('Cancel' 'Ignore' 'Accept') + default:3. + whatToDo isNil ifTrue:[^self]. + whatToDo == true ifTrue:[ + self accept + ] ifFalse:[ + self cancel + ] ]. tabSelection := something. @@ -2617,62 +2619,62 @@ |view list spec slices size property tabComponent| self isModified ifTrue:[ - (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ - self accept - ] + (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ + self accept + ] ]. treeView isCanvasSelected ifTrue:[ - spec := treeView canvasSpec. - view := self painter topView. + spec := treeView canvasSpec. + view := self painter topView. ] ifFalse:[ - (property := treeView propertySelected) notNil ifTrue:[ - treeView canResizeSelectedWidget ifTrue:[ - view := property view. - ]. - spec := property spec copy. - ] + (property := treeView propertySelected) notNil ifTrue:[ + treeView canResizeSelectedWidget ifTrue:[ + view := property view. + ]. + spec := property spec copy. + ] ]. tabComponent := builder componentAt:#noteBook. self setViewInLayoutTool:view. self specTool specification:spec. spec notNil ifTrue:[ - self helpTool helpKey:(spec activeHelpKey). - slices := spec class slices. - size := slices size. - - view notNil ifTrue:[ - self treeView isCanvasSelected - ifFalse: - [ - list := Array new:(size + 2). - list at:(size + 2) put:(UILayoutTool label). - ] - ifTrue: - [ - list := Array new:(size + 1). - list at:(size + 1) put:(UILayoutTool label). - ]. - ] ifFalse:[ - list := Array new:(size + 1). - ]. - - 1 to:size do:[:i| list at:i put:((slices at:i) first asString)]. - self treeView isCanvasSelected ifFalse: [list at:(size + 1) put:(UIHelpTool label)]. - - self tabList value:list. - self showHelp:spec class name for:self. - tabComponent enabled:true. - - (tabSelection := tabComponent selection) isNil ifTrue:[ - tabComponent setSelection:(tabSelection := list first) - ]. - self raiseTabView + self helpTool helpKey:(spec activeHelpKey). + slices := spec class slices. + size := slices size. + + view notNil ifTrue:[ + self treeView isCanvasSelected + ifFalse: + [ + list := Array new:(size + 2). + list at:(size + 2) put:(UILayoutTool label). + ] + ifTrue: + [ + list := Array new:(size + 1). + list at:(size + 1) put:(UILayoutTool label). + ]. + ] ifFalse:[ + list := Array new:(size + 1). + ]. + + 1 to:size do:[:i| list at:i put:((slices at:i) first asString)]. + self treeView isCanvasSelected ifFalse: [list at:(size + 1) put:(UIHelpTool label)]. + + self tabList value:list. + self showHelp:spec class name for:self. + tabComponent enabled:true. + + (tabSelection := tabComponent selection) isNil ifTrue:[ + tabComponent setSelection:(tabSelection := list first) + ]. + self raiseTabView ] ifFalse:[ - self helpTool helpKey:nil. - tabComponent enabled:false. - self defaultInfoLabel. + self helpTool helpKey:nil. + tabComponent enabled:false. + self defaultInfoLabel. ]. self modifiedChannel value:false. @@ -2728,8 +2730,8 @@ self painter release. selectionPanel notNil ifTrue:[ - selectionPanel masterApplication:nil. - selectionPanel closeRequest + selectionPanel masterApplication:nil. + selectionPanel closeRequest ]. selectionPanel := nil. treeView := nil. @@ -2744,18 +2746,18 @@ |topView| (topView := self window) == aTopView ifTrue:[ - super closeRequestFor:aTopView + super closeRequestFor:aTopView ] ifFalse:[ - aTopView = selectionPanel window ifTrue:[ - self galleryShown value:false - ] ifFalse:[ - aTopView == (self painter topView) ifTrue:[ - self painterShown value:false - ] ifFalse:[ - aTopView closeRequest - ] - ]. - topView raise. + aTopView = selectionPanel window ifTrue:[ + self galleryShown value:false + ] ifFalse:[ + aTopView == (self painter topView) ifTrue:[ + self painterShown value:false + ] ifFalse:[ + aTopView closeRequest + ] + ]. + topView raise. ]. ! @@ -2765,19 +2767,19 @@ ((aMessage size > 0) and: [self askForModification]) ifTrue: [ - |readStream aClass aSelector| - readStream := aMessage readStream. - (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil - ifTrue: - [ - aSelector := readStream upToEnd asSymbol. - self setClass: aClass selector: aSelector. - (aClass respondsTo:aSelector) - ifTrue: - [ - self painter setupFromSpec:(aClass perform:aSelector) - ] - ] + |readStream aClass aSelector| + readStream := aMessage readStream. + (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil + ifTrue: + [ + aSelector := readStream upToEnd asSymbol. + self setClass: aClass selector: aSelector. + (aClass respondsTo:aSelector) + ifTrue: + [ + self painter setupFromSpec:(aClass perform:aSelector) + ] + ] ] ! @@ -2791,24 +2793,24 @@ aspects := IdentityDictionary new. aspects at:#classNameChannel put:( - (specClass notNil ifTrue:[specClass] - ifFalse:['NewApplication']) asValue + (specClass notNil ifTrue:[specClass] + ifFalse:['NewApplication']) asValue ). specSuperclass isNil ifTrue:[ - specClass notNil ifTrue:[ - (cls := self resolveName:specClass) notNil ifTrue:[ - specSuperclass := cls superclass name. - ] - ] + specClass notNil ifTrue:[ + (cls := self resolveName:specClass) notNil ifTrue:[ + specSuperclass := cls superclass name. + ] + ] ]. aspects at:#superclassNameChannel put:( - (specSuperclass notNil ifTrue:[specSuperclass] - ifFalse:['ApplicationModel']) asValue + (specSuperclass notNil ifTrue:[specSuperclass] + ifFalse:['ApplicationModel']) asValue ). aspects at:#superclassNameDefaults put:#('ApplicationModel' 'SimpleDialog') asValue. aspects at:#methodNameChannel put:( - (specSelector notNil ifTrue:[specSelector asValue] - ifFalse:[#windowSpec]) asValue + (specSelector notNil ifTrue:[specSelector asValue] + ifFalse:[#windowSpec]) asValue ). treeView := TreeView new. @@ -2863,8 +2865,8 @@ "opens the GUI Painter on aClass and aSelector " aClass isNil ifTrue:[ - (self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs) - ifFalse:[^ nil]. + (self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs) + ifFalse:[^ nil]. ]. specSelector := aSelector. @@ -2888,7 +2890,7 @@ cls := specClass. cls isString ifTrue:[ - cls := Smalltalk at:(cls string asSymbol) + cls := Smalltalk at:(cls string asSymbol) ]. sel := specSelector. specSelector := nil. @@ -2906,11 +2908,11 @@ painter clear. cls notNil ifTrue:[ - self setClass:cls selector:sel. - - (cls respondsTo:sel) ifTrue:[ - painter setupFromSpec:(cls perform:sel). - ] + self setClass:cls selector:sel. + + (cls respondsTo:sel) ifTrue:[ + painter setupFromSpec:(cls perform:sel). + ] ]. treeView selection: #(1). @@ -2930,27 +2932,27 @@ painter := self painter. self isLayoutToolSelected ifTrue:[ - layoutTool := self layoutTool. - - (layout := layoutTool layout) notNil ifTrue:[ - layoutTool layoutType == #Extent ifTrue:[ - layoutTool layoutView == painter topView ifTrue:[ - layoutTool layoutView extent:layout - ] ifFalse:[ - painter setExtent:layout - ] - ] ifFalse:[ - painter setLayout:layout - ] - ] + layoutTool := self layoutTool. + + (layout := layoutTool layout) notNil ifTrue:[ + layoutTool layoutType == #Extent ifTrue:[ + layoutTool layoutView == painter topView ifTrue:[ + layoutTool layoutView extent:layout + ] ifFalse:[ + painter setExtent:layout + ] + ] ifFalse:[ + painter setLayout:layout + ] + ] ] ifFalse:[ - spec := self specTool specification. - - self isHelpToolSelected ifTrue:[ - self helpTool accept. - spec activeHelpKey:self helpTool helpKey. - ]. - painter updateFromSpec:spec + spec := self specTool specification. + + self isHelpToolSelected ifTrue:[ + self helpTool accept. + spec activeHelpKey:self helpTool helpKey. + ]. + painter updateFromSpec:spec ] @@ -2970,20 +2972,20 @@ (newSel := self pasteSpecifications:aSpec keepLayout:false at:0@0) notNil ifTrue: [ - self select: newSel + self select: newSel ] ifFalse: [ - ((treeView selection size = 0) or: [treeView selectedNode isNil]) - ifTrue: - [ - treeView selection: #(1). - ] - ifFalse: - [ - treeView selectNode: (treeView detectNode: [:n| n = treeView selectedNode parent]) - ]. - self addWidgetOfSpec: aSpec + ((treeView selection size = 0) or: [treeView selectedNode isNil]) + ifTrue: + [ + treeView selection: #(1). + ] + ifFalse: + [ + treeView selectNode: (treeView detectNode: [:n| n = treeView selectedNode parent]) + ]. + self addWidgetOfSpec: aSpec ] ! @@ -2995,23 +2997,23 @@ |spec key view| self isModified ifTrue:[ - (spec := self painter specForSelection) notNil ifTrue:[ - key := spec activeHelpKey. - ]. - self helpTool helpKey:key. - - treeView isCanvasSelected ifTrue: [ - spec := treeView canvasSpec. - ]. - self specTool specification:spec. - view := self layoutTool layoutView. - - self setViewInLayoutTool:view. - spec class == DataSetSpec ifTrue:[ - view columnDescriptors:(spec columns) - ]. - self modifiedChannel value:false. - modified := false + (spec := self painter specForSelection) notNil ifTrue:[ + key := spec activeHelpKey. + ]. + self helpTool helpKey:key. + + treeView isCanvasSelected ifTrue: [ + spec := treeView canvasSpec. + ]. + self specTool specification:spec. + view := self layoutTool layoutView. + + self setViewInLayoutTool:view. + spec class == DataSetSpec ifTrue:[ + view columnDescriptors:(spec columns) + ]. + self modifiedChannel value:false. + modified := false ] ! @@ -3021,12 +3023,12 @@ |methods| self painter isModified ifTrue:[ - self warn:'The current window spec has not yet been saved!!\\The System Browser may show the code of the old aspect methods.' withCRs. + self warn:'The current window spec has not yet been saved!!\\The System Browser may show the code of the old aspect methods.' withCRs. ]. (methods := self painter aspectMethods) isEmpty ifTrue:[ - self warn:'No aspect methods found!!'. - ^ self. + self warn:'No aspect methods found!!'. + ^ self. ]. SystemBrowser browseMethods:methods title:'Aspect methods'. @@ -3036,7 +3038,7 @@ "opens a System Browser on the specClass" self painter isModified ifTrue:[ - self warn:'The current window spec has not yet been saved!!\\The System Browser will show the code of the old window spec.' withCRs. + self warn:'The current window spec has not yet been saved!!\\The System Browser will show the code of the old window spec.' withCRs. ]. SystemBrowser openInClass:(self resolveName:specClass) @@ -3049,39 +3051,39 @@ |again tmp helpDict helpKey helpTool| [ - again := false. - - (tmp := specClass) isNil ifTrue:[tmp := 'NewApplication']. - aspects at:#classNameChannel put:tmp asValue. - - (tmp := specSelector) isNil ifTrue:[tmp := 'windowSpec']. - aspects at:#methodNameChannel put:tmp asValue. - - (tmp := specSuperclass) isNil ifTrue:[tmp := 'ApplicationModel']. - aspects at:#superclassNameChannel put:tmp asValue. - - (self openDialogInterface:#dialogSpecForDefiningClassAndSelector) ifTrue:[ - - specClass := (self aspectFor:#classNameChannel) value. - specSelector := (self aspectFor:#methodNameChannel) value. - specSelector notNil ifTrue:[specSelector := specSelector asSymbol]. - specSuperclass := (self aspectFor:#superclassNameChannel) value. - - (again := self checkClassAndSelector not) ifFalse:[ - self painter className:specClass - superclassName:specSuperclass - selector:specSelector. - ] - ] - ifFalse: - [ - ^nil - ] + again := false. + + (tmp := specClass) isNil ifTrue:[tmp := 'NewApplication']. + aspects at:#classNameChannel put:tmp asValue. + + (tmp := specSelector) isNil ifTrue:[tmp := 'windowSpec']. + aspects at:#methodNameChannel put:tmp asValue. + + (tmp := specSuperclass) isNil ifTrue:[tmp := 'ApplicationModel']. + aspects at:#superclassNameChannel put:tmp asValue. + + (self openDialogInterface:#dialogSpecForDefiningClassAndSelector) ifTrue:[ + + specClass := (self aspectFor:#classNameChannel) value. + specSelector := (self aspectFor:#methodNameChannel) value. + specSelector notNil ifTrue:[specSelector := specSelector asSymbol]. + specSuperclass := (self aspectFor:#superclassNameChannel) value. + + (again := self checkClassAndSelector not) ifFalse:[ + self painter className:specClass + superclassName:specSuperclass + selector:specSelector. + ] + ] + ifFalse: + [ + ^nil + ] ] doWhile:[again]. specClass := specClass isBehavior ifTrue:[specClass name] - ifFalse:[specClass]. + ifFalse:[specClass]. helpTool := self helpTool. helpDict := helpTool dictionary. @@ -3113,7 +3115,7 @@ bindings at:#vspace put:((gridPara at:2) asValue). (self openDialogInterface:#dialogSpecForDefiningGridParameters withBindings:bindings) ifFalse:[ - ^ self + ^ self ]. hspace := (bindings at:#hspace) value ? 5. @@ -3172,12 +3174,12 @@ |spec| (spec := self specForSelection) isNil ifTrue:[ - treeView isCanvasSelected ifTrue:[ - spec := treeView canvasSpec. - ] + treeView isCanvasSelected ifTrue:[ + spec := treeView canvasSpec. + ] ]. spec notNil ifTrue:[ - spec inspect + spec inspect ] @@ -3189,9 +3191,9 @@ |selection| ((selection := self painter selection) isCollection and: [selection size >= 1]) ifTrue:[ - selection first inspect + selection first inspect ] ifFalse: [ - selection inspect + selection inspect ] ! @@ -3202,12 +3204,12 @@ self askForModification ifFalse: [^nil]. self loadFromMessage: - (ResourceSelectionBrowser - request: 'Load Window Spec From Class' - onSuperclass: nil - andClass: specClass - andSelector: specSelector ? #windowSpec - withResourceTypes: #(canvas)) + (ResourceSelectionBrowser + request: 'Load Window Spec From Class' + onSuperclass: nil + andClass: specClass + andSelector: specSelector ? #windowSpec + withResourceTypes: #(canvas)) ! doLoadSubspec @@ -3218,26 +3220,26 @@ self askForSectionModification. (subSpecMessage := ResourceSelectionBrowser - request: 'Load Subspec From Class' - onSuperclass: nil - andClass: specClass - andSelector: specSelector - withResourceTypes: #(canvas)) notNil + request: 'Load Subspec From Class' + onSuperclass: nil + andClass: specClass + andSelector: specSelector + withResourceTypes: #(canvas)) notNil ifTrue: [ - |readStream aClass aSelector| - readStream := subSpecMessage readStream. - (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil - ifTrue: - [ - aSelector := readStream upToEnd asSymbol. - (aClass name == specClass and: [aSelector == specSelector]) ifTrue: [^self warn: 'Current interface as subspec not allowed!!']. - (aClass respondsTo:aSelector) - ifTrue: - [ - self addWidgetOfSpec: (Array with: (UISubSpecification new majorKey: aClass name; minorKey: aSelector)) - ] - ] + |readStream aClass aSelector| + readStream := subSpecMessage readStream. + (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil + ifTrue: + [ + aSelector := readStream upToEnd asSymbol. + (aClass name == specClass and: [aSelector == specSelector]) ifTrue: [^self warn: 'Current interface as subspec not allowed!!']. + (aClass respondsTo:aSelector) + ifTrue: + [ + self addWidgetOfSpec: (Array with: (UISubSpecification new majorKey: aClass name; minorKey: aSelector)) + ] + ] ] ! @@ -3262,14 +3264,14 @@ |spec document| (spec := self specForSelection) isNil ifTrue:[ - treeView isCanvasSelected ifTrue:[ - spec := nil - ] + treeView isCanvasSelected ifTrue:[ + spec := nil + ] ]. spec notNil ifTrue:[ - document := 'tools/uipainter/', spec userFriendlyName,'.html' + document := 'tools/uipainter/', spec userFriendlyName,'.html' ] ifFalse: [ - document := 'tools/uipainter/WindowSpec.html' + document := 'tools/uipainter/WindowSpec.html' ]. HTMLDocumentView openFullOnDocumentationFile: document @@ -3284,9 +3286,9 @@ self askForModification ifFalse: [^nil]. (view := Screen current viewFromUser) notNil ifTrue:[ - view == Screen current rootView ifFalse:[ - self painter setupFromSpec:(UISpecification fromView:view topView). - ] + view == Screen current rootView ifFalse:[ + self painter setupFromSpec:(UISpecification fromView:view topView). + ] ]. self updateInfoLabel @@ -3301,20 +3303,20 @@ self askForSectionModification. self hasSpecClassAndSelector ifFalse:[ - self doDefineClassAndSelector isNil ifTrue: [^nil] + self doDefineClassAndSelector isNil ifTrue: [^nil] ]. (specClass notNil and: [(Smalltalk at: specClass asSymbol) isClass]) ifFalse: [ - ^nil + ^nil ]. painter := self painter. painter className:specClass superclassName:specSuperclass - selector:specSelector. + selector:specSelector. code := painter generateWindowSpecMethodSource withCRs. @@ -3329,7 +3331,7 @@ ((Smalltalk at: specClass asSymbol) class implements: specSelector) ifTrue: [ - self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. + self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. ]. @@ -3343,21 +3345,21 @@ self askForSectionModification. (resourceMessage := ResourceSelectionBrowser - request: 'Save Window Spec In Class' - onSuperclass: #Object - andClass: (specClass ? #ApplicationModel) asSymbol - andSelector: specSelector ? #windowSpec - withResourceTypes: #(canvas)) notNil + request: 'Save Window Spec In Class' + onSuperclass: #Object + andClass: (specClass ? #ApplicationModel) asSymbol + andSelector: specSelector ? #windowSpec + withResourceTypes: #(canvas)) notNil ifTrue: [ - modified := false. - self painter resetModification. - (self resourceMessage: resourceMessage) - ifTrue: - [ - self doSave. - ^true - ] + modified := false. + self painter resetModification. + (self resourceMessage: resourceMessage) + ifTrue: + [ + self doSave. + ^true + ] ] ! @@ -3368,23 +3370,23 @@ |application| self hasSpecClassAndSelector ifFalse:[ - self doSave isNil ifTrue: [^nil]. + self doSave isNil ifTrue: [^nil]. ] ifTrue: [ - self askForSectionModification. - (modified or: [self painter isModified or: [self helpTool modified]]) - ifTrue: - [ - ((YesNoBox title:'Window Spec was modified!!') - noText:'Cancel'; - yesText:'Save it and start'; - showAtPointer; - accepted) ifFalse: [^nil]. - self doSave isNil ifTrue: [^nil] - ] + self askForSectionModification. + (modified or: [self painter isModified or: [self helpTool modified]]) + ifTrue: + [ + ((YesNoBox title:'Window Spec was modified!!') + noText:'Cancel'; + yesText:'Save it and start'; + showAtPointer; + accepted) ifFalse: [^nil]. + self doSave isNil ifTrue: [^nil] + ] ]. ((application := (self resolveName:specClass) new) respondsTo:#openInterface:) ifFalse:[ - ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs. + ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs. ]. application openInterface:specSelector ! @@ -3419,8 +3421,8 @@ self askForSectionModification. CodeView - openWith: self painter generateWindowSpecMethodSource - title: 'Window Spec' + openWith: self painter generateWindowSpecMethodSource + title: 'Window Spec' ! ! @@ -3431,13 +3433,13 @@ selection in tree view; only used by the UIPainter [see also:] - SelectionInTreeView - SelectionInTree - TreeItem - UIPainter + SelectionInTreeView + SelectionInTree + TreeItem + UIPainter [author:] - Claus Atzkern + Claus Atzkern " @@ -3475,7 +3477,7 @@ spec fromView:(self canvas topView) callBack:nil. windowSpec notNil ifTrue:[ - spec copyValuesFromSpec:windowSpec + spec copyValuesFromSpec:windowSpec ]. ^ spec @@ -3498,9 +3500,9 @@ "returns item assigned to view or nil" aView notNil ifTrue:[ - self allItemsDo:[:anItem| - (anItem contents view == aView) ifTrue:[^ anItem] - ] + self allItemsDo:[:anItem| + (anItem contents view == aView) ifTrue:[^ anItem] + ] ]. ^ nil @@ -3529,7 +3531,7 @@ "evaluates the block on each property" self allItemsDo:[:anItem| - (aOneArgBlock value:(anItem contents)) ifTrue:[^ anItem contents] + (aOneArgBlock value:(anItem contents)) ifTrue:[^ anItem contents] ]. ^ nil @@ -3542,9 +3544,9 @@ |idx| selection size == 1 ifTrue:[ - (idx := selection first) ~~ 1 ifTrue:[ "canvas: not yet supported" - ^ (listOfNodes at:idx) contents - ] + (idx := selection first) ~~ 1 ifTrue:[ "canvas: not yet supported" + ^ (listOfNodes at:idx) contents + ] ]. ^ nil @@ -3560,7 +3562,7 @@ parent := self detectItemRespondsToView:(aProperty view superView). parent notNil ifTrue:[ - model add:(TreeItem new contents:aProperty) below:parent + model add:(TreeItem new contents:aProperty) below:parent ] ! @@ -3572,7 +3574,7 @@ windowSpec := nil. self canvas subViews copy do:[:aView| - (aView isKindOf:InputView) ifFalse:[aView destroy] + (aView isKindOf:InputView) ifFalse:[aView destroy] ]. model root name: UIPainter defaultNameOfCanvas asBoldText. model removeAllOtherThanRoot. @@ -3585,9 +3587,9 @@ |item prnt| ((item := self itemOfView:aView) notNil and:[(prnt := item parent) notNil]) ifTrue:[ - aView destroy. - prnt contents view sizeChanged:nil. - model remove:item + aView destroy. + prnt contents view sizeChanged:nil. + model remove:item ] @@ -3603,12 +3605,12 @@ fullSpec := FullSpec new. fullSpec fromBuilder:(self canvas topView) - components:(SpecCollection new collection:aSpecArray). + components:(SpecCollection new collection:aSpecArray). windowSpec notNil ifTrue:[ - winSpec := fullSpec window. - winSpec copyValuesFromSpec:windowSpec. - winSpec name: winSpec label. + winSpec := fullSpec window. + winSpec copyValuesFromSpec:windowSpec. + winSpec name: winSpec label. ]. ^ fullSpec literalArrayEncoding. @@ -3631,19 +3633,19 @@ |sel list size| ((sel := aSelection) isNil or:[sel isCollection]) ifFalse:[ - sel := Array with:sel + sel := Array with:sel ]. (size := sel size) ~~ 0 ifTrue:[ - list := OrderedCollection new:size. - - sel do:[:aView||item| - (item := self itemOfView:aView) notNil ifTrue:[ - list add:item. - model doMakeVisible:item. - ] - ]. - sel := list collect:[:anItem| self indexOfNode:anItem ]. + list := OrderedCollection new:size. + + sel do:[:aView||item| + (item := self itemOfView:aView) notNil ifTrue:[ + list add:item. + model doMakeVisible:item. + ] + ]. + sel := list collect:[:anItem| self indexOfNode:anItem ]. ]. self cvsEventsDisabledDo:[ self selection:sel ]. @@ -3660,13 +3662,13 @@ item := self itemOfView:aView. item notNil ifTrue:[ - model doMakeVisible:item. - - (index := self indexOfNode:item) ~~ 0 ifTrue:[ - oldSel := selection copy. - self addToSelection:index. - self selectionChangedFrom:oldSel - ] + model doMakeVisible:item. + + (index := self indexOfNode:item) ~~ 0 ifTrue:[ + oldSel := selection copy. + self addToSelection:index. + self selectionChangedFrom:oldSel + ] ] @@ -3682,9 +3684,9 @@ and:[(index := self indexOfNode:item) ~~ 0 and:[self isInSelection:index]] ) ifTrue:[ - oldSel := selection copy. - self removeFromSelection:index. - self selectionChangedFrom:oldSel. + oldSel := selection copy. + self removeFromSelection:index. + self selectionChangedFrom:oldSel. ]. @@ -3704,8 +3706,8 @@ and:[(self propertyDetect:[:p| p name = name]) isNil and:[node name ~= name]]] ) ifTrue:[ - node name: name asBoldText. - node changed. + node name: name asBoldText. + node changed. ]. ! @@ -3714,7 +3716,7 @@ application will be informed to update its layout " selection size == 1 ifTrue:[ - self application layoutChanged + self application layoutChanged ] @@ -3728,29 +3730,29 @@ item := self itemOfView:(aProperty view). item notNil ifTrue:[ - item contents:aProperty. - - item name = aProperty name ifFalse:[ - idx := self firstLineShown. - - (end := self lastLineShown) > listOfNodes size ifTrue:[ - end := listOfNodes size - ]. - item changed. - - [idx <= end] whileTrue:[ - (listOfNodes at:idx) == item ifTrue:[ - self redrawLine:idx. "/ is visible; redraw line - end := 0 - ] ifFalse:[ - idx := idx + 1 - ] - ] - ]. - - self selectedNode == item ifTrue:[ "/ inform application - self application propertyChanged - ] + item contents:aProperty. + + item name = aProperty name ifFalse:[ + idx := self firstLineShown. + + (end := self lastLineShown) > listOfNodes size ifTrue:[ + end := listOfNodes size + ]. + item changed. + + [idx <= end] whileTrue:[ + (listOfNodes at:idx) == item ifTrue:[ + self redrawLine:idx. "/ is visible; redraw line + end := 0 + ] ifFalse:[ + idx := idx + 1 + ] + ] + ]. + + self selectedNode == item ifTrue:[ "/ inform application + self application propertyChanged + ] ]. @@ -3800,7 +3802,7 @@ "disables collapsing of the root item" self selectedNode == model root ifFalse:[ - super doubleClicked + super doubleClicked ] @@ -3814,12 +3816,12 @@ super redrawLabelAt:x y:yTop index:anIndex. ((selection size > 1) and: [selection first == anIndex]) ifTrue:[ - dX := textInset - 1. - self paint:(Color red). "/ self application painter handleMasterColor. - self fillRectangleX:(x - dX - 2) - y:yTop + ((fontHeight - dX) // 2) - width:dX - height:dX + dX := textInset - 1. + self paint:(Color red). "/ self application painter handleMasterColor. + self fillRectangleX:(x - dX - 2) + y:yTop + ((fontHeight - dX) // 2) + width:dX + height:dX ] ! ! @@ -3837,18 +3839,18 @@ self model iconAction: [:aNode| - |specClass| - (specClass := aNode contents spec) isNil - ifTrue: [WindowSpec icon] - ifFalse:[specClass class icon] + |specClass| + (specClass := aNode contents spec) isNil + ifTrue: [WindowSpec icon] + ifFalse:[specClass class icon] ]. self model labelAction: [:aNode| - |spec| - (spec := aNode contents spec) notNil - ifTrue: [self nameForSpecInList:spec] - ifFalse:[aNode name] + |spec| + (spec := aNode contents spec) notNil + ifTrue: [self nameForSpecInList:spec] + ifFalse:[aNode name] ] ! ! @@ -3870,32 +3872,32 @@ size := selection size. cvsEventsDisabled ifFalse:[ - (size ~~ 0 and:[size ~~ 1 or:[selection first ~~ 1]]) ifTrue:[ - sel := OrderedCollection new. - - selection do:[:i| - i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view] - ] - ]. - self canvas updateSelectionFromModel:sel + (size ~~ 0 and:[size ~~ 1 or:[selection first ~~ 1]]) ifTrue:[ + sel := OrderedCollection new. + + selection do:[:i| + i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view] + ] + ]. + self canvas updateSelectionFromModel:sel ]. size = 1 ifTrue:[ - oldSelection size > 1 ifTrue: [ - (listOfNodes at:lastDrawnMaster) retrieveLabel. - self redrawLine: lastDrawnMaster. - lastDrawnMaster := selection first - ] + oldSelection size > 1 ifTrue: [ + (listOfNodes at:lastDrawnMaster) retrieveLabel. + self redrawLine: lastDrawnMaster. + lastDrawnMaster := selection first + ] ]. size > 1 ifTrue:[ - selection first ~~ lastDrawnMaster ifTrue: [ - (listOfNodes at:selection first) retrieveLabel. - lastDrawnMaster notNil ifTrue: [(listOfNodes at:lastDrawnMaster) retrieveLabel]. - self redrawLine: lastDrawnMaster. - self redrawLine: (lastDrawnMaster := selection first) - ] + selection first ~~ lastDrawnMaster ifTrue: [ + (listOfNodes at:selection first) retrieveLabel. + lastDrawnMaster notNil ifTrue: [(listOfNodes at:lastDrawnMaster) retrieveLabel]. + self redrawLine: lastDrawnMaster. + self redrawLine: (lastDrawnMaster := selection first) + ] ] ifFalse: [ - lastDrawnMaster := nil + lastDrawnMaster := nil ] ! ! @@ -3917,15 +3919,15 @@ can change their layout through to a move or align operation" selection size == 0 ifTrue:[ - ^ false + ^ false ]. selection do:[:i| - i == 1 ifTrue:[^ false]. - - (self canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[ - ^ false - ] + i == 1 ifTrue:[^ false]. + + (self canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[ + ^ false + ] ]. ^ true ! @@ -3941,7 +3943,7 @@ or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil or:[prnt contents spec class supportsSubComponents not]]] ) ifTrue:[ - ^ false + ^ false ]. ^ true ! @@ -3956,7 +3958,7 @@ or:[(prnt := item parent) isNil or:[prnt parent isNil]] ) ifTrue:[ - ^ false + ^ false ]. ^ true ! @@ -3968,9 +3970,9 @@ |selectedNode| (selectedNode := self selectedNode) notNil ifTrue:[ - (selectedNode := selectedNode parent) notNil ifTrue:[ - ^ (selectedNode parent isNil or:[selectedNode contents spec class canResizeSubComponents]) - ] + (selectedNode := selectedNode parent) notNil ifTrue:[ + ^ (selectedNode parent isNil or:[selectedNode contents spec class canResizeSubComponents]) + ] ]. ^ false ! @@ -3998,9 +4000,9 @@ |view item| (view := aView) notNil ifTrue:[ - [(item := self itemOfView:view) isNil] whileTrue:[ - (view := view superView) isNil ifTrue:[^ listOfNodes at:1] - ]. + [(item := self itemOfView:view) isNil] whileTrue:[ + (view := view superView) isNil ifTrue:[^ listOfNodes at:1] + ]. ]. ^ item @@ -4013,7 +4015,7 @@ |canvas| anItem isNil ifTrue:[ - ^ self + ^ self ]. self setSelection:nil. @@ -4031,7 +4033,7 @@ or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil or:[prnt contents spec class supportsSubComponents not]]] ) ifFalse:[ - self doChangeHierarchyOf:prnt + self doChangeHierarchyOf:prnt ] ! @@ -4039,7 +4041,7 @@ |item| ((item := self selectedNode) notNil and:[(item := item parent) notNil]) ifTrue:[ - self doChangeHierarchyOf:(item parent) + self doChangeHierarchyOf:(item parent) ]. ! @@ -4053,12 +4055,12 @@ or:[(size := prnt children size) < 2 or:[(idx := prnt indexOfChild:item) == 0]]] ) ifTrue:[ - ^ self + ^ self ]. idx := idx + anIndex. idx < 1 ifTrue:[idx := size] - ifFalse:[idx > size ifTrue:[idx := 1]]. + ifFalse:[idx > size ifTrue:[idx := 1]]. self setSelection:nil. model remove:item. @@ -4073,13 +4075,13 @@ "/ input view might by contained in sequence ((size := canvas findInputViewIn:spVw) ~~ 0 and:[idx >= size]) ifTrue:[ - idx := idx + 1 + idx := idx + 1 ]. spVw changeSequenceOrderFor:view to:idx. spVw specClass isLayoutContainer ifFalse:[ - spVw subViews do:[:v| v raise ]. - canvas inputView raise + spVw subViews do:[:v| v raise ]. + canvas inputView raise ]. canvas showSelection. self selectNode:item.