--- a/UIPainter.st Wed Jan 28 14:31:28 1998 +0100
+++ b/UIPainter.st Wed Jan 28 14:58:00 1998 +0100
@@ -118,103 +118,115 @@
^ super helpSpec addPairsFrom:#(
#accept
-'write back changes'
+'Writes back changes.'
#alignSelectionBottom
-'align selected widgets to the bottom edge of the dominant widget'
+'Aligns selected widgets to the bottom edge of the dominant widget.'
#alignSelectionCenterHor
-'align selected widgets vertical to the center of the dominant widget'
+'Aligns selected widgets vertical to the center of the dominant widget.'
#alignSelectionCenterVer
-'align selected widgets horizontal to the center of the dominant widget'
+'Aligns selected widgets horizontal to the center of the dominant widget.'
#alignSelectionLeft
-'align selected widgets to the left edge of the dominant widget'
+'Aligns selected widgets to the left edge of the dominant widget.'
#alignSelectionLeftAndRight
-'align selected widgets to the right and left edge of the dominant widget'
+'Aligns selected widgets to the right and left edge of the dominant widget.'
#alignSelectionRight
-'align selected widgets to the right edge of the dominant widget'
+'Aligns selected widgets to the right edge of the dominant widget.'
#alignSelectionTop
-'align selected widgets to the top edge of the dominant widget'
+'Aligns selected widgets to the top edge of the dominant widget.'
#alignSelectionTopAndBottom
-'align selected widgets to the top and bottom edge of the dominant widget'
+'Aligns selected widgets to the top and bottom edge of the dominant widget.'
#cancel
-'reread specification and layout'
+'Rereads specification and layout.'
#centerSelectionHor
-'center widgets horizontal to their top widget'
+'Centers widgets horizontal to their top widget.'
#centerSelectionVer
-'center vertical horizontal in contained view'
+'Centers vertical horizontal in contained view.'
#copyExtent
-'copy extent of the selected widget'
+'Copies extent of the selected widget.'
#copyLayout
-'copy layout of the selected widget'
+'Copies layout of the selected widget.'
+
+#fileLoad
+'Opens dialog to load an interface from a class.'
+
+#fileNew
+'Creates new interface.'
+
+#filePickAnInterface
+'Changes the cursor for moving it over another view to load its interface.'
+
+#fileSave
+'Saves current interface.'
#galleryShown
-'show or hide gallery view'
+'Shows or hide gallery view.'
#menuAlignment
-'provides a set of alignment operation on the current selected widgets'
-
-#menuChangeHierarchy
-'change hierarchy of the selected widget'
+'Provides a set of alignment operation on the current selected widgets.'
#moveSelectionDown
-'move selected widgets down while pressing the button'
+'Moves selected widgets down.'
#moveSelectionLeft
-'move selected widgets left while pressing the button'
+'Moves selected widgets out of parent widget.'
#moveSelectionRight
-'move selected widgets right while pressing the button'
+'Moves selected widgets into next widget as child.'
#moveSelectionUp
-'move selected widgets up while pressing the button'
+'Moves selected widgets up.'
#painterShown
-'show or hide painter view'
+'Shows or hide painter view.'
#pasteBuffer
-'paste widgets at current mouse position'
+'Pastes widgets at current mouse position.'
#pasteExtent
-'change extent of all selected widgets to the last copied extent'
+'Changes extent of all selected widgets to the last copied extent.'
#pasteHeight
-'change height of all selected widgets to the last copied extent height'
+'Changes height of all selected widgets to the last copied extent height.'
#pasteLayout
-'change layout of all selected widgets to the last copied layout'
+'Changes layout of all selected widgets to the last copied layout.'
#pasteWidth
-'change width of all selected widgets to the last copied extent width'
+'Changes width of all selected widgets to the last copied extent width.'
#pasteWithLayout
-'paste widgets without changing their layouts'
+'Pastes widgets without changing their layouts.'
#setToDefaultExtent
-'set selected widgets to their default extent'
+'Sets selected widgets to their default extent.'
#setToDefaultHeight
-'set selected widgets to their default height'
+'Sets selected widgets to their default height.'
#setToDefaultWidth
-'set selected widgets to their default width'
+'Sets selected widgets to their default width.'
#spreadSelectionHor
-'horizontal spacing between selected widgets is made the same'
+'Sets horizontal spaces between selected widgets as the same.'
#spreadSelectionVer
-'vertical spacing between selected widgets is made the same'
+'Sets vertical spaces between selected widgets as the same.'
+
+#testStartApplication
+'Starts current application on loaded interface.'
)
! !
@@ -481,7 +493,6 @@
#(#MenuPanelSpec
#'name:' 'menuToolbarView'
#'layout:' #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0)
- #'activeHelpKey:' #menuChangeHierarchy
#'tabable:' true
#'menu:' #menuToolbar
#'showSeparatingLines:' true
@@ -677,17 +688,15 @@
#(#MenuItem
#'label:' 'New'
#'value:' #doNew
+ #'activeHelpKey:' #fileNew
)
#(#MenuItem
#'label:' '-'
)
#(#MenuItem
- #'label:' 'Load From Class...'
+ #'label:' 'Load...'
#'value:' #doFromClass
- )
- #(#MenuItem
- #'label:' 'Load From Class With Superclass...'
- #'value:' #loadFromClassWithSuperclass
+ #'activeHelpKey:' #fileLoad
)
#(#MenuItem
#'label:' '-'
@@ -695,6 +704,7 @@
#(#MenuItem
#'label:' 'Save'
#'value:' #doInstallSpec
+ #'activeHelpKey:' #fileSave
)
#(#MenuItem
#'label:' '-'
@@ -720,11 +730,19 @@
#'label:' '-'
)
#(#MenuItem
- #'label:' 'Show Window Spec'
+ #'label:' 'Pick An Interface'
+ #'value:' #doPickAView
+ #'activeHelpKey:' #filePickAnInterface
+ )
+ #(#MenuItem
+ #'label:' '-'
+ )
+ #(#MenuItem
+ #'label:' 'Show Interface Spec'
#'value:' #doWindowSpec
)
#(#MenuItem
- #'label:' 'Browse Application'
+ #'label:' 'Browse Interface Class'
#'value:' #doBrowseAppClass
#'enabled:' #hasSpecClass
)
@@ -737,15 +755,9 @@
#'label:' '-'
)
#(#MenuItem
- #'label:' 'Pick a View '
- #'value:' #doPickAView
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
#'label:' 'Exit'
#'value:' #closeRequest
+ #'activeHelpKey:' #fileExit
)
) nil
nil
@@ -768,6 +780,7 @@
#(#MenuItem
#'label:' 'Start Application'
#'value:' #doStartApplication
+ #'activeHelpKey:' #testStartApplication
)
#(#MenuItem
#'label:' '-'
@@ -806,6 +819,10 @@
#'submenuChannel:' #menuHistory
)
#(#MenuItem
+ #'label:' 'Help'
+ #'submenuChannel:' #menuHelp
+ )
+ #(#MenuItem
#'label:' ''
)
#(#MenuItem
@@ -819,8 +836,6 @@
) nil
nil
)
-
- "Modified: / 27.1.1998 / 21:25:27 / cg"
!
menuAlign
@@ -955,12 +970,14 @@
#(#MenuItem
#'label:' 'Cut'
#'value:' #deleteSelection
+ #'activeHelpKey:' #editCut
#'enabled:' #hasSelection
#'shortcutKeyCharacter:' #Cut
)
#(#MenuItem
#'label:' 'Copy'
#'value:' #copySelection
+ #'activeHelpKey:' #editCopy
#'enabled:' #hasSelection
#'shortcutKeyCharacter:' #Copy
)
@@ -968,6 +985,7 @@
#'label:' 'Paste'
#'nameKey:' #paste
#'value:' #paste
+ #'activeHelpKey:' #editPaste
#'enabled:' #canPaste
#'submenu:'
#(#Menu
@@ -996,6 +1014,7 @@
#'label:' 'Undo'
#'nameKey:' #undo
#'value:' #undoLast
+ #'activeHelpKey:' #editUndo
#'enabled:' #hasUndoHistory
#'shortcutKeyCharacter:' #Cmdu
)
@@ -1003,6 +1022,14 @@
#'label:' '-'
)
#(#MenuItem
+ #'label:' 'Align'
+ #'submenuChannel:' #menuAlign
+ )
+ #(#MenuItem
+ #'label:' 'Move'
+ #'submenuChannel:' #menuMove
+ )
+ #(#MenuItem
#'label:' 'Dimension'
#'value:' #dimension
#'enabled:' #hasSelection
@@ -1077,9 +1104,56 @@
nil
)
)
+ ) nil
+ nil
+ )
+!
+
+menuMove
+ "this window spec was automatically generated by the ST/X MenuEditor"
+
+ "do not manually edit this - the builder may not be able to
+ handle the specification if its corrupted."
+
+ "
+ MenuEditor new openOnClass:UIPainter andSelector:#menuMove
+ (Menu new fromLiteralArrayEncoding:(UIPainter menuMove)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+
+ #(#Menu
+
+ #(
#(#MenuItem
- #'label:' 'Align'
- #'submenuChannel:' #menuAlign
+ #'label:' 'Move Up'
+ #'value:' #doStepUp
+ #'activeHelpKey:' #moveSelectionUp
+ #'enabled:' #canMoveOrAlignSelection
+ #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #upIcon 'Move Up')
+ )
+ #(#MenuItem
+ #'label:' 'Move Down'
+ #'value:' #doStepDown
+ #'activeHelpKey:' #moveSelectionDown
+ #'enabled:' #canMoveOrAlignSelection
+ #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #downIcon 'Move Down')
+ )
+ #(#MenuItem
+ #'label:' 'Move In'
+ #'value:' #doStepIn
+ #'activeHelpKey:' #moveSelectionRight
+ #'enabled:' #canMoveSelectionIntoContainer
+ #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #downRightIcon 'Move In')
+ )
+ #(#MenuItem
+ #'label:' 'Move Out'
+ #'value:' #doStepOut
+ #'activeHelpKey:' #moveSelectionLeft
+ #'enabled:' #canMoveSelectionOutOfContainer
+ #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #leftDownIcon 'Move Out')
)
) nil
nil
@@ -1105,10 +1179,11 @@
#(
#(#MenuItem
- #'label:' 'Run'
+ #'label:' 'Start'
#'isButton:' true
#'value:' #doStartApplication
- #'labelImage:' #(#ResourceRetriever nil #runIcon)
+ #'activeHelpKey:' #testStartApplication
+ #'labelImage:' #(#ResourceRetriever nil #startIcon)
)
#(#MenuItem
#'label:' '-'
@@ -1117,91 +1192,98 @@
#'label:' 'New'
#'isButton:' true
#'value:' #doNew
+ #'activeHelpKey:' #fileNew
#'labelImage:' #(#ResourceRetriever nil #newIcon)
)
#(#MenuItem
#'label:' 'Load'
#'isButton:' true
#'value:' #doFromClass
+ #'activeHelpKey:' #fileLoad
#'labelImage:' #(#ResourceRetriever nil #loadIcon)
)
#(#MenuItem
#'label:' 'Save'
#'isButton:' true
#'value:' #doInstallSpec
+ #'activeHelpKey:' #fileSave
#'labelImage:' #(#ResourceRetriever nil #saveIcon)
)
#(#MenuItem
#'label:' '-'
)
#(#MenuItem
- #'label:' 'stepUp'
+ #'label:' 'Move Up'
#'isButton:' true
#'value:' #doStepUp
- #'enabled:' #enabledStepOver
+ #'activeHelpKey:' #moveSelectionUp
+ #'enabled:' #canMoveOrAlignSelection
#'labelImage:' #(#ResourceRetriever nil #upIcon)
)
#(#MenuItem
- #'label:' 'stepDown'
+ #'label:' 'Move Down'
#'isButton:' true
#'value:' #doStepDown
- #'enabled:' #enabledStepOver
+ #'activeHelpKey:' #moveSelectionDown
+ #'enabled:' #canMoveOrAlignSelection
#'labelImage:' #(#ResourceRetriever nil #downIcon)
)
#(#MenuItem
- #'label:' 'stepIn'
+ #'label:' 'Move In'
#'isButton:' true
#'value:' #doStepIn
- #'enabled:' #enabledStepIn
+ #'activeHelpKey:' #moveSelectionRight
+ #'enabled:' #canMoveSelectionIntoContainer
#'labelImage:' #(#ResourceRetriever nil #downRightIcon)
)
#(#MenuItem
- #'label:' 'stepOut'
+ #'label:' 'Move Out'
#'isButton:' true
#'value:' #doStepOut
- #'enabled:' #enabledStepOut
+ #'activeHelpKey:' #moveSelectionLeft
+ #'enabled:' #canMoveSelectionOutOfContainer
#'labelImage:' #(#ResourceRetriever nil #leftDownIcon)
)
#(#MenuItem
#'label:' '-'
)
#(#MenuItem
- #'label:' 'align left'
+ #'label:' 'Align left'
#'isButton:' true
#'value:' #alignSelectionLeft
#'activeHelpKey:' #alignSelectionLeft
#'labelImage:' #(#ResourceRetriever nil #iconAlignL)
)
#(#MenuItem
- #'label:' 'align right'
+ #'label:' 'Align right'
#'isButton:' true
#'value:' #alignSelectionRight
#'activeHelpKey:' #alignSelectionRight
#'labelImage:' #(#ResourceRetriever nil #iconAlignR)
)
#(#MenuItem
- #'label:' 'align left & right'
+ #'label:' 'Align left & right'
#'isButton:' true
#'value:' #alignSelectionLeftAndRight
#'activeHelpKey:' #alignSelectionLeftAndRight
#'labelImage:' #(#ResourceRetriever nil #iconAlignLR)
)
#(#MenuItem
- #'label:' 'align top'
+ #'label:' 'Align top'
#'isButton:' true
#'value:' #alignSelectionTop
#'activeHelpKey:' #alignSelectionTop
#'labelImage:' #(#ResourceRetriever nil #iconAlignT)
)
#(#MenuItem
- #'label:' 'align bottom'
+ #'label:' 'Align bottom'
#'isButton:' true
#'value:' #alignSelectionBottom
#'activeHelpKey:' #alignSelectionBottom
#'labelImage:' #(#ResourceRetriever nil #iconAlignB)
)
#(#MenuItem
- #'label:' 'align top & bottom'
+ #'label:' 'Align top & bottom'
#'isButton:' true
#'value:' #alignSelectionTopAndBottom
#'activeHelpKey:' #alignSelectionTopAndBottom
@@ -1211,14 +1293,14 @@
#'label:' '-'
)
#(#MenuItem
- #'label:' 'align centered horizontal'
+ #'label:' 'Align centered horizontal'
#'isButton:' true
#'value:' #alignSelectionCenterHor
#'activeHelpKey:' #alignSelectionCenterHor
#'labelImage:' #(#ResourceRetriever nil #iconAlignCenterH)
)
#(#MenuItem
- #'label:' 'align centered vertical'
+ #'label:' 'Align centered vertical'
#'isButton:' true
#'value:' #alignSelectionCenterVer
#'activeHelpKey:' #alignSelectionCenterVer
@@ -1426,7 +1508,7 @@
cls := self resolveName:specClass.
cls isNil ifTrue:[
- ^ self information:'no application class defined yet'
+ ^ self information:'No application class defined yet!!'
].
aspect := self specTool specification columns.
editor := DataSetBuilder new.
@@ -1450,7 +1532,7 @@
cls := self resolveName:specClass.
cls isNil ifTrue:[
- ^ self information:'no application class defined yet'
+ ^ self information:'No application class defined yet!!'
].
cls notNil ifTrue:[
@@ -1495,7 +1577,7 @@
cls := self resolveName:specClass.
cls isNil ifTrue:[
- ^ self information:'no application class defined yet'
+ ^ self information:'No application class defined yet!!'
].
(aspect := self specTool specification hierarchicalList) notNil ifTrue:[
@@ -2464,33 +2546,6 @@
!
-loadFromClassWithSuperclass
-
- |box|
- box := EnterBox new.
- box title:'Name of superclass:'.
- box okText:'OK'.
- box abortText:'Cancel'.
- box initialText: 'ApplicationModel'.
- box entryCompletionBlock:[:contents |
- |s what m|
-
- s := contents withoutSpaces.
- what := Smalltalk classnameCompletion:s.
- box contents:what first.
- (what at:2) size ~~ 1 ifTrue:[
- self beep
- ]
- ].
- box showAtPointer.
- box accepted
- ifTrue:[
- self loadFromInClassesOf: box contents asSymbol
- ]
-
- "Modified: / 27.1.1998 / 09:30:27 / stefan"
-!
-
loadFromInClassesOf: aSuperclassOrSymbol
self loadFromMessage: