--- a/UIPainter.st Mon Mar 09 21:41:42 1998 +0100
+++ b/UIPainter.st Mon Mar 09 21:42:44 1998 +0100
@@ -105,6 +105,15 @@
^'GUI Builder'
! !
+!UIPainter class methodsFor:'accessing-defaults'!
+
+defaultNameOfCanvas
+ "returns the default name (id) of the application
+ "
+ ^'NewApplication'
+
+! !
+
!UIPainter class methodsFor:'help specs'!
helpSpec
@@ -117,119 +126,149 @@
^ super helpSpec addPairsFrom:#(
-#accept
-'Writes back changes.'
-
#alignSelectionBottom
-'Aligns selected widgets to the bottom edge of the dominant widget.'
+'Aligns the selected widgets to the bottom edge of the dominant widget.'
#alignSelectionCenterHor
-'Aligns selected widgets vertical to the center of the dominant widget.'
+'Aligns the selected widgets vertically to the center of the dominant widget.'
#alignSelectionCenterVer
-'Aligns selected widgets horizontal to the center of the dominant widget.'
+'Aligns the selected widgets horizontally to the center of the dominant widget.'
#alignSelectionLeft
-'Aligns selected widgets to the left edge of the dominant widget.'
+'Aligns the selected widgets to the left edge of the dominant widget.'
#alignSelectionLeftAndRight
-'Aligns selected widgets to the right and left edge of the dominant widget.'
+'Aligns the selected widgets to the right and left edge of the dominant widget.'
#alignSelectionRight
-'Aligns selected widgets to the right edge of the dominant widget.'
+'Aligns the selected widgets to the right edge of the dominant widget.'
#alignSelectionTop
-'Aligns selected widgets to the top edge of the dominant widget.'
+'Aligns the selected widgets to the top edge of the dominant widget.'
#alignSelectionTopAndBottom
-'Aligns selected widgets to the top and bottom edge of the dominant widget.'
-
-#cancel
-'Rereads specification and layout.'
+'Aligns the selected widgets to the top and bottom edge of the dominant widget.'
#centerSelectionHor
-'Centers widgets horizontal to their top widget.'
+'Centers the selected widgets horizontally to their contained widget.'
#centerSelectionVer
-'Centers vertical horizontal in contained view.'
-
-#copyExtent
-'Copies extent of the selected widget.'
-
-#copyLayout
-'Copies layout of the selected widget.'
+'Centers the selected widgets vertically in their contained widget.'
+
+#changePositionDown
+'Changes the position of the widgets to the bottom.'
+
+#changePositionLeft
+'Changes the position of the widgets to the left.'
+
+#changePositionRight
+'Changes the position of the widgets to the right.'
+
+#changePositionUp
+'Changes the position of the widgets to the top.'
+
+#editDimensionCopyExtent
+'Copies the extent of the selected widgets.'
+
+#editDimensionCopyLayout
+'Copies the layout of the selected widgets.'
+
+#editDimensionDefaultExtent
+'Sets the selected widgets to their default extent.'
+
+#editDimensionDefaultHeight
+'Sets the selected widgets to their default height.'
+
+#editDimensionDefaultWidth
+'Sets the selected widgets to their default width.'
+
+#editDimensionPasteExtent
+'Sets the extent of the selected widgets to the last copied extent.'
+
+#editDimensionPasteHeight
+'Sets the height of the selected widgets to the height of the last copied layout/extent.'
+
+#editDimensionPasteLayout
+'Sets the layout of the selected widgets to the last copied layout.'
+
+#editDimensionPasteWidth
+'Sets the width of the selected widgets to the width of the last copied layout/extent.'
+
+#fileBrowseAspectMethods
+'Opens a System Browser to browse the aspect methods.'
#fileLoad
-'Opens dialog to load an interface from a class.'
+'Opens a dialog to load a window spec from a class.'
#fileLoadSubspec
-'Opens dialog to load an subspec interface from a class.'
+'Opens a dialog to load an sub spec from a class.'
#fileNew
-'Creates new interface.'
+'Creates a new window spec.'
#filePickAnInterface
-'Changes the cursor for moving it over another view to load its interface.'
+'Changes the cursor for moving it over another interface application to load its window spec.'
#fileSave
-'Saves current interface.'
-
-#galleryShown
-'Shows or hide gallery view.'
-
-#menuAlignment
-'Provides a set of alignment operation on the current selected widgets.'
-
-#moveSelectionDown
-'Moves selected widgets down.'
-
-#moveSelectionLeft
-'Moves selected widgets out of parent widget.'
-
-#moveSelectionRight
-'Moves selected widgets into next widget as child.'
-
-#moveSelectionUp
-'Moves selected widgets up.'
-
-#painterShown
-'Shows or hide painter view.'
+'Saves current window spec on current class and if modified the help spec.'
+
+#fileSaveAs
+'Opens a dialog to select or create a class and selector in order to save current window spec.'
+
+#fileShowWindowSpec
+'Opens a Workspace showing the current window spec.'
+
+#generateAspectMethods
+'Generates aspect methods for defined aspect selectors of the widgets.'
+
+#generateHookMethods
+'Generates startup/release methods. (#closeRequest, #postBuildWith:, #postOpenWith:)'
+
+#moveWidgetDown
+'Moves the selected widget one step down.'
+
+#moveWidgetInto
+'Moves the selected widget into next widget as child widget.'
+
+#moveWidgetOut
+'Moves the selected widget out of its parent widget.'
+
+#moveWidgetUp
+'Moves the selected widget one step up.'
#pasteBuffer
-'Pastes widgets at current mouse position.'
-
-#pasteExtent
-'Changes extent of all selected widgets to the last copied extent.'
-
-#pasteHeight
-'Changes height of all selected widgets to the last copied extent height.'
-
-#pasteLayout
-'Changes layout of all selected widgets to the last copied layout.'
-
-#pasteWidth
-'Changes width of all selected widgets to the last copied extent width.'
+'Pastes the widgets of the clipboard at current mouse position.'
#pasteWithLayout
-'Pastes widgets without changing their layouts.'
-
-#setToDefaultExtent
-'Sets selected widgets to their default extent.'
-
-#setToDefaultHeight
-'Sets selected widgets to their default height.'
-
-#setToDefaultWidth
-'Sets selected widgets to their default width.'
+'Pastes the widgets of the clipboard without a changing of their layouts.'
+
+#settingsCanvas
+'Shows or hides the canvas window.'
+
+#settingsGallery
+'Shows or hides the gallery window.'
+
+#settingsGridManager
+'Opens a dialog to show/hide the grid points or to change the distances between them.'
+
+#settingsRedefineAspectMethods
+'Turns on/off the permission of redefinition of the aspect methods.'
+
+#settingsUndoManager
+'Opens a dialog to reverse a certain number of last edit action.'
#spreadSelectionHor
-'Sets horizontal spaces between selected widgets as the same.'
+'Sets the horizontal spaces between the selected widgets as the same.'
#spreadSelectionVer
-'Sets vertical spaces between selected widgets as the same.'
+'Sets the vertical spaces between the selected widgets as the same.'
+
+#testGeometryTestMode
+'Turns on/off the geometry test mode in order to define ratios of variable panels.'
#testStartApplication
-'Starts current application on loaded interface.'
+'Starts current application on current window spec.'
)
! !
@@ -315,75 +354,75 @@
^
#(#FullSpec
- #'window:'
+ #window:
#(#WindowSpec
- #'name:' 'GUI Builder'
- #'layout:' #(#LayoutFrame 44 0 416 0 325 0 613 0)
- #'label:' 'GUI Builder'
- #'min:' #(#Point 10 10)
- #'max:' #(#Point 1280 1024)
- #'bounds:' #(#Rectangle 44 416 326 614)
- #'usePreferredExtent:' false
+ #name: 'GUI Painter'
+ #layout: #(#LayoutFrame 171 0 570 0 452 0 767 0)
+ #label: 'GUI Painter'
+ #min: #(#Point 10 10)
+ #max: #(#Point 1280 1024)
+ #bounds: #(#Rectangle 171 570 453 768)
+ #usePreferredExtent: false
)
- #'component:'
+ #component:
#(#SpecCollection
- #'collection:'
+ #collection:
#(
#(#FramedBoxSpec
- #'name:' 'framedBox'
- #'layout:' #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
- #'component:'
+ #name: 'FramedBox'
+ #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
+ #component:
#(#SpecCollection
- #'collection:'
+ #collection:
#(
#(#CheckBoxSpec
- #'name:' 'show'
- #'layout:' #(#Point 23 24)
- #'model:' #showGrid
- #'label:' 'Show grid'
+ #name: 'ShowGridCheckBox'
+ #layout: #(#Point 23 24)
+ #model: #showGrid
+ #label: 'Show Grid'
)
#(#CheckBoxSpec
- #'name:' 'align'
- #'layout:' #(#Point 23 52)
- #'model:' #alignToGrid
- #'label:' 'Align to Grid'
+ #name: 'AlignCheckBox'
+ #layout: #(#Point 23 52)
+ #model: #alignToGrid
+ #label: 'Align to Grid'
)
#(#LabelSpec
- #'name:' 'hrzLabel'
- #'layout:' #(#AlignmentOrigin 148 0 99 0 1 0.5)
- #'label:' 'Horizontal Pixels:'
- #'adjust:' #right
- #'resizeForLabel:' true
+ #name: 'HorizontalPixelsLabel'
+ #layout: #(#AlignmentOrigin 148 0 99 0 1 0.5)
+ #label: 'Horizontal Pixels:'
+ #adjust: #right
+ #resizeForLabel: true
)
#(#InputFieldSpec
- #'name:' 'hrzField'
- #'layout:' #(#LayoutFrame 154 0 87 0 207 0 109 0)
- #'model:' #hspace
- #'type:' #numberOrNil
+ #name: 'HorizontalPixelsField'
+ #layout: #(#LayoutFrame 154 0 87 0 207 0 109 0)
+ #model: #hspace
+ #type: #numberOrNil
)
#(#LabelSpec
- #'name:' 'vrtLabel'
- #'layout:' #(#AlignmentOrigin 149 0 124 0 1 0.5)
- #'label:' 'Vertical Pixels:'
- #'adjust:' #right
- #'resizeForLabel:' true
+ #name: 'VerticalPixelsLabel'
+ #layout: #(#AlignmentOrigin 149 0 124 0 1 0.5)
+ #label: 'Vertical Pixels:'
+ #adjust: #right
+ #resizeForLabel: true
)
#(#InputFieldSpec
- #'name:' 'vrtField'
- #'layout:' #(#LayoutFrame 154 0 112 0 207 0 134 0)
- #'model:' #vspace
- #'type:' #numberOrNil
+ #name: 'VerticalPixelsField'
+ #layout: #(#LayoutFrame 154 0 112 0 207 0 134 0)
+ #model: #vspace
+ #type: #numberOrNil
)
)
)
- #'label:' 'Grid Parameter'
- #'labelPosition:' #topLeft
+ #label: 'Grid Parameter'
+ #labelPosition: #topLeft
)
#(#UISubSpecification
- #'name:' 'uISubSpecifica1'
- #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
- #'majorKey:' #ToolApplicationModel
- #'minorKey:' #windowSpecForCommitWithoutChannels
+ #name: 'CommitButtonsSubSpecView'
+ #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
+ #majorKey: #ToolApplicationModel
+ #minorKey: #windowSpecForCommitWithoutChannels
)
)
)
@@ -404,7 +443,7 @@
<resource: #canvas>
^
-
+
#(#FullSpec
#'window:'
#(#WindowSpec
@@ -469,7 +508,7 @@
)
)
)
- #'label:' 'Class and selector for interface'
+ #'label:' 'Define Class And Selector'
#'labelPosition:' #topLeft
)
#(#UISubSpecification
@@ -481,6 +520,7 @@
)
)
)
+
!
windowSpec
@@ -500,213 +540,182 @@
^
#(#FullSpec
- #'window:'
+ #window:
#(#WindowSpec
- #'name:' 'Tree-View'
- #'layout:' #(#LayoutFrame 340 0 328 0 892 0 853 0)
- #'label:' 'Tree-View'
- #'min:' #(#Point 10 10)
- #'max:' #(#Point 1160 870)
- #'bounds:' #(#Rectangle 340 328 893 854)
- #'menu:' #menu
- #'usePreferredExtent:' false
+ #name: 'GUI Painter'
+ #layout: #(#LayoutFrame 282 0 281 0 834 0 818 0)
+ #label: 'GUI Painter'
+ #min: #(#Point 10 10)
+ #max: #(#Point 1160 870)
+ #bounds: #(#Rectangle 282 281 835 819)
+ #menu: #menu
+ #usePreferredExtent: false
)
- #'component:'
+ #component:
#(#SpecCollection
- #'collection:'
+ #collection:
#(
#(#MenuPanelSpec
- #'name:' 'menuToolbarView'
- #'layout:' #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0)
- #'tabable:' true
- #'menu:' #menuToolbar
- #'showSeparatingLines:' true
+ #name: 'menuToolbarView'
+ #layout: #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0)
+ #tabable: true
+ #menu: #menuToolbar
)
#(#VariableVerticalPanelSpec
- #'name:' 'vpanel'
- #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
- #'component:'
+ #name: 'vpanel'
+ #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
+ #component:
#(#SpecCollection
- #'collection:'
+ #collection:
#(
#(#VariableHorizontalPanelSpec
- #'name:' 'hpanel'
- #'component:'
+ #name: 'hpanel'
+ #component:
#(#SpecCollection
- #'collection:'
+ #collection:
#(
#(#ArbitraryComponentSpec
- #'name:' 'treeView'
- #'tabable:' true
- #'menu:' #menuEdit
- #'hasHorizontalScrollBar:' true
- #'hasVerticalScrollBar:' true
- #'miniScrollerHorizontal:' true
- #'miniScrollerVertical:' true
- #'component:' #treeView
- #'hasBorder:' false
+ #name: 'treeView'
+ #tabable: true
+ #menu: #menuEdit
+ #hasHorizontalScrollBar: true
+ #hasVerticalScrollBar: true
+ #miniScrollerHorizontal: true
+ #miniScrollerVertical: true
+ #component: #treeView
+ #hasBorder: false
)
#(#ViewSpec
- #'name:' 'specHolderView'
- #'component:'
+ #name: 'specHolderView'
+ #component:
#(#SpecCollection
- #'collection:'
+ #collection:
#(
- #(#ViewSpec
- #'name:' 'View'
- #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 28 0)
- #'component:'
+ #(#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 -128 1 -1 0 0 1.0 31 0)
+ #component:
#(#SpecCollection
- #'collection:'
+ #collection:
#(
- #(#HorizontalPanelViewSpec
- #'name:' 'panelViewButtons'
- #'layout:' #(#LayoutFrame 0 0.0 2 0 0 0.5 26 0)
- #'component:'
- #(#SpecCollection
- #'collection:'
- #(
- #(#CheckBoxSpec
- #'name:' 'checkBox1'
- #'model:' #galleryShown
- #'label:' 'Gallery'
- #'extent:' #(#Point 82 22)
- )
- #(#CheckBoxSpec
- #'name:' 'checkBox2'
- #'model:' #painterShown
- #'label:' 'Canvas'
- #'extent:' #(#Point 119 22)
- )
- )
- )
- #'horizontalLayout:' #left
- #'verticalLayout:' #top
- #'horizontalSpace:' 4
- #'verticalSpace:' 4
+ #(#ArrowButtonSpec
+ #name: 'MoveLeftButton'
+ #activeHelpKey: #changePositionLeft
+ #tabable: true
+ #model: #moveSelectionLeft
+ #enableChannel: #canMoveOrAlignSelection
+ #isTriggerOnDown: true
+ #direction: #left
+ #extent: #(#Point 32 32)
)
- #(#HorizontalPanelViewSpec
- #'name:' 'horizontalPanelView1'
- #'layout:' #(#LayoutFrame 0 0.5 2 0 0 1.0 26 0)
- #'component:'
- #(#SpecCollection
- #'collection:'
- #(
- #(#ArrowButtonSpec
- #'name:' 'arrowButton1'
- #'activeHelpKey:' #moveSelectionLeft
- #'tabable:' true
- #'model:' #moveSelectionLeft
- #'enableChannel:' #canMoveOrAlignSelection
- #'isTriggerOnDown:' true
- #'direction:' #left
- #'extent:' #(#Point 22 22)
- )
- #(#ArrowButtonSpec
- #'name:' 'arrowButton2'
- #'activeHelpKey:' #moveSelectionRight
- #'model:' #moveSelectionRight
- #'enableChannel:' #canMoveOrAlignSelection
- #'isTriggerOnDown:' true
- #'direction:' #right
- #'extent:' #(#Point 22 22)
- )
- #(#ArrowButtonSpec
- #'name:' 'arrowButton3'
- #'activeHelpKey:' #moveSelectionDown
- #'model:' #moveSelectionDown
- #'enableChannel:' #canMoveOrAlignSelection
- #'isTriggerOnDown:' true
- #'direction:' #down
- #'extent:' #(#Point 22 22)
- )
- #(#ArrowButtonSpec
- #'name:' 'arrowButton4'
- #'activeHelpKey:' #moveSelectionUp
- #'model:' #moveSelectionUp
- #'enableChannel:' #canMoveOrAlignSelection
- #'isTriggerOnDown:' true
- #'direction:' #up
- #'extent:' #(#Point 22 22)
- )
- )
- )
- #'horizontalLayout:' #right
- #'verticalLayout:' #top
- #'horizontalSpace:' 4
- #'verticalSpace:' 4
+ #(#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)
)
)
)
- #'level:' 1
- )
- #(#NoteBookViewSpec
- #'name:' 'noteBook'
- #'layout:' #(#LayoutFrame 0 0.0 29 0.0 0 1.0 -30 1.0)
- #'enableChannel:' #enableChannel
- #'tabable:' true
- #'model:' #tabModel
- #'menu:' #tabList
- #'style:' #(#FontDescription #helvetica #medium #roman 10)
- #'canvas:' #noteBookView
+ #horizontalLayout: #fit
+ #verticalLayout: #fit
+ #horizontalSpace: 0
+ #verticalSpace: 0
)
#(#HorizontalPanelViewSpec
- #'name:' 'modifyPanel'
- #'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0)
- #'component:'
+ #name: 'modifyPanel'
+ #layout: #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0)
+ #component:
#(#SpecCollection
- #'collection:'
+ #collection:
#(
#(#ActionButtonSpec
- #'name:' 'cancelButton'
- #'activeHelpKey:' #cancel
- #'label:' 'Cancel'
- #'tabable:' true
- #'model:' #cancel
- #'enableChannel:' #modifiedChannel
- #'extent:' #(#Point 179 24)
+ #name: 'cancelButton'
+ #activeHelpKey: #cancel
+ #label: 'Cancel'
+ #tabable: true
+ #model: #cancel
+ #enableChannel: #modifiedChannel
+ #extent: #(#Point 183 24)
)
#(#ActionButtonSpec
- #'name:' 'acceptButton'
- #'activeHelpKey:' #accept
- #'label:' 'OK'
- #'tabable:' true
- #'model:' #accept
- #'enableChannel:' #modifiedChannel
- #'extent:' #(#Point 180 24)
+ #name: 'acceptButton'
+ #activeHelpKey: #accept
+ #label: 'OK'
+ #tabable: true
+ #model: #accept
+ #enableChannel: #modifiedChannel
+ #extent: #(#Point 183 24)
)
)
)
- #'horizontalLayout:' #fitSpace
- #'verticalLayout:' #fitSpace
- #'horizontalSpace:' 3
- #'verticalSpace:' 3
+ #horizontalLayout: #fitSpace
+ #verticalLayout: #fitSpace
+ #horizontalSpace: 3
+ #verticalSpace: 3
)
)
)
- #'borderWidth:' 1
+ #borderWidth: 1
)
)
)
- #'level:' 1
- #'handles:' #(#Any 0.329435 1.0)
+ #level: 1
+ #handles: #(#Any 0.318264 1.0)
)
#(#TextEditorSpec
- #'name:' 'Transcript'
- #'hasHorizontalScrollBar:' true
- #'hasVerticalScrollBar:' true
- #'miniScrollerHorizontal:' true
- #'miniScrollerVertical:' true
+ #name: 'Transcript'
+ #hasHorizontalScrollBar: true
+ #hasVerticalScrollBar: true
+ #miniScrollerHorizontal: true
+ #miniScrollerVertical: true
)
)
)
- #'handles:' #(#Any 0.880597 1.0)
+ #handles: #(#Any 0.880597 1.0)
)
#(#UISubSpecification
- #'name:' 'infoBarSubSpec'
- #'layout:' #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
- #'majorKey:' #ToolApplicationModel
- #'minorKey:' #windowSpecForInfoBarWithClock
+ #name: 'infoBarSubSpec'
+ #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
+ #majorKey: #ToolApplicationModel
+ #minorKey: #windowSpecForInfoBar
)
)
)
@@ -740,7 +749,6 @@
)
#(#MenuItem
#label: 'File'
- #value: #file
#enabled: #enableChannel
#submenu:
#(#Menu
@@ -756,12 +764,12 @@
)
#(#MenuItem
#label: 'Load...'
- #value: #doFromClass
+ #value: #doLoad
#activeHelpKey: #fileLoad
)
#(#MenuItem
#label: 'Load Subspec...'
- #value: #loadSubspec
+ #value: #doLoadSubspec
#activeHelpKey: #fileLoadSubspec
)
#(#MenuItem
@@ -769,34 +777,24 @@
)
#(#MenuItem
#label: 'Save'
- #value: #doInstallSpec
+ #value: #doSave
#activeHelpKey: #fileSave
)
#(#MenuItem
- #label: '-'
+ #label: 'Save As...'
+ #value: #doSaveAs
+ #activeHelpKey: #fileSaveAs
)
#(#MenuItem
#label: 'Define Class And Selector...'
#value: #defineClassAndSelector
+ #activeHelpKey: #fileSaveAs
)
#(#MenuItem
#label: '-'
)
#(#MenuItem
- #label: 'Create Aspect Methods'
- #value: #doInstallAspects
- #enabled: #hasSpecClass
- )
- #(#MenuItem
- #label: 'Create Hook Methods'
- #value: #doInstallHooks
- #enabled: #hasSpecClass
- )
- #(#MenuItem
- #label: '-'
- )
- #(#MenuItem
- #label: 'Pick An Interface'
+ #label: 'Pick A Window Spec...'
#value: #doPickAView
#activeHelpKey: #filePickAnInterface
)
@@ -804,17 +802,20 @@
#label: '-'
)
#(#MenuItem
- #label: 'Show Interface Spec'
+ #label: 'Show Window Spec'
#value: #doWindowSpec
+ #activeHelpKey: #fileShowWindowSpec
)
#(#MenuItem
- #label: 'Browse Interface Class'
- #value: #doBrowseAppClass
+ #label: 'Browse Class'
+ #value: #doBrowseClass
+ #activeHelpKey: #fileBrowseClass
#enabled: #hasSpecClass
)
#(#MenuItem
#label: 'Browse Aspect Methods'
#value: #doBrowseAspectMethods
+ #activeHelpKey: #fileBrowseAspectMethods
#enabled: #hasSpecClass
)
#(#MenuItem
@@ -838,6 +839,31 @@
#submenuChannel: #menuAlign
)
#(#MenuItem
+ #label: 'Generate'
+ #submenu:
+ #(#Menu
+
+ #(
+ #(#MenuItem
+ #label: 'Aspect Methods'
+ #value: #doInstallAspects
+ #activeHelpKey: #generateAspectMethods
+ #enabled: #hasSpecClass
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Hook Methods'
+ #value: #doInstallHooks
+ #activeHelpKey: #generateHookMethods
+ #enabled: #hasSpecClass
+ )
+ ) nil
+ nil
+ )
+ )
+ #(#MenuItem
#label: 'Test'
#submenu:
#(#Menu
@@ -853,6 +879,7 @@
)
#(#MenuItem
#label: 'Geometry Test Mode'
+ #activeHelpKey: #testGeometryTestMode
#indication: #testMode:
)
) nil
@@ -866,15 +893,36 @@
#(
#(#MenuItem
- #label: 'Undo Manager...'
- #value: #openUndoMenu
+ #label: 'Canvas'
+ #activeHelpKey: #settingsCanvas
+ #indication: #painterShown
+ )
+ #(#MenuItem
+ #label: 'Gallery'
+ #activeHelpKey: #settingsGallery
+ #indication: #galleryShown
)
#(#MenuItem
#label: '-'
)
#(#MenuItem
+ #label: 'Undo Manager...'
+ #value: #openUndoMenu
+ #activeHelpKey: #settingsUndoManager
+ )
+ #(#MenuItem
#label: 'Grid Manager...'
#value: #gridMenu
+ #activeHelpKey: #settingsGridManager
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Redefine Aspect Methods'
+ #activeHelpKey: #settingsRedefineAspectMethods
+ #enabled: #hasSpecClass
+ #indication: #doRedefineMethods:
)
) nil
nil
@@ -887,349 +935,32 @@
#(#MenuItem
#label: 'Help'
#startGroup: #right
- #submenuChannel: #menuHelp
- )
- ) nil
- nil
- )
-
- "Modified: / 27.2.1998 / 16:15:24 / cg"
-!
-
-menuAdd
- "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:#menuAdd
- (Menu new fromLiteralArrayEncoding:(UIPainter menuAdd)) startUp
- "
-
- <resource: #menu>
-
- ^
-
- #(#Menu
-
- #(
- #(#MenuItem
- #'label:' 'Buttons'
- #'submenu:'
- #(#Menu
-
- #(
- #(#MenuItem
- #'label:' 'Action Button'
- #'value:' #'addWidget:'
- #'argument:' #ActionButtonSpec
- #'labelImage:' #(#ResourceRetriever #ActionButtonSpec #icon 'Action Button')
- )
- #(#MenuItem
- #'label:' 'Arrow Button'
- #'value:' #'addWidget:'
- #'argument:' #ArrowButtonSpec
- #'labelImage:' #(#ResourceRetriever #ArrowButtonSpec #icon 'Arrow Button')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Toggle'
- #'value:' #'addWidget:'
- #'argument:' #ToggleSpec
- #'labelImage:' #(#ResourceRetriever #ToggleSpec #icon 'Toggle')
- )
- #(#MenuItem
- #'label:' 'Radio Button'
- #'value:' #'addWidget:'
- #'argument:' #RadioButtonSpec
- #'labelImage:' #(#ResourceRetriever #RadioButtonSpec #icon 'Radio Button')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Check Box'
- #'value:' #'addWidget:'
- #'argument:' #CheckBoxSpec
- #'labelImage:' #(#ResourceRetriever #CheckBoxSpec #icon 'Check Box')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Up Down Button'
- #'value:' #'addWidget:'
- #'argument:' #UpDownButtonSpec
- #'labelImage:' #(#ResourceRetriever #UpDownButtonSpec #icon 'Up Down Button')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Slider'
- #'value:' #'addWidget:'
- #'argument:' #SliderSpec
- #'labelImage:' #(#ResourceRetriever #SliderSpec #icon 'Slider')
- )
- #(#MenuItem
- #'label:' 'Thumb Wheel'
- #'value:' #'addWidget:'
- #'argument:' #ThumbWheelSpec
- #'labelImage:' #(#ResourceRetriever #ThumbWheelSpec #icon 'Thumb Wheel')
- )
- ) nil
- nil
- )
- )
- #(#MenuItem
- #'label:' 'Menus'
- #'submenu:'
- #(#Menu
-
- #(
- #(#MenuItem
- #'label:' 'Combo Box'
- #'value:' #'addWidget:'
- #'argument:' #ComboBoxSpec
- #'labelImage:' #(#ResourceRetriever #ComboBoxSpec #icon 'Combo Box')
- )
- #(#MenuItem
- #'label:' 'Combo List'
- #'value:' #'addWidget:'
- #'argument:' #ComboListSpec
- #'labelImage:' #(#ResourceRetriever #ComboListSpec #icon 'Combo List')
- )
- #(#MenuItem
- #'label:' 'PopUp List'
- #'value:' #'addWidget:'
- #'argument:' #PopUpListSpec
- #'labelImage:' #(#ResourceRetriever #ComboListSpec #icon 'PopUp List')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Tab'
- #'value:' #'addWidget:'
- #'argument:' #TabViewSpec
- #'labelImage:' #(#ResourceRetriever #TabViewSpec #icon 'Tab')
- )
- #(#MenuItem
- #'label:' 'Note Book'
- #'value:' #'addWidget:'
- #'argument:' #NoteBookViewSpec
- #'labelImage:' #(#ResourceRetriever #NoteBookViewSpec #icon 'Note Book')
- )
- #(#MenuItem
- #'label:' 'Gallery'
- #'value:' #'addWidget:'
- #'argument:' #UIGalleryViewSpec
- #'labelImage:' #(#ResourceRetriever #UIGalleryViewSpec #icon 'Gallery')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Menu Panel'
- #'value:' #'addWidget:'
- #'argument:' #MenuPanelSpec
- #'labelImage:' #(#ResourceRetriever #MenuPanelSpec #icon 'Menu Panel')
- )
- ) nil
- nil
- )
- )
- #(#MenuItem
- #'label:' 'Text Views'
- #'submenu:'
+ #submenu:
#(#Menu
#(
#(#MenuItem
- #'label:' 'Text Editor'
- #'value:' #'addWidget:'
- #'argument:' #TextEditorSpec
- #'labelImage:' #(#ResourceRetriever #TextEditorSpec #icon 'Text Editor')
- )
- #(#MenuItem
- #'label:' 'Input Field'
- #'value:' #'addWidget:'
- #'argument:' #InputFieldSpec
- #'labelImage:' #(#ResourceRetriever #InputFieldSpec #icon 'Input Field')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Label'
- #'value:' #'addWidget:'
- #'argument:' #LabelSpec
- #'labelImage:' #(#ResourceRetriever #LabelSpec #icon 'Label')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'HTML View'
- #'value:' #'addWidget:'
- #'argument:' #HTMLViewSpec
- #'labelImage:' #(#ResourceRetriever #HTMLViewSpec #icon 'HTML View')
- )
- ) nil
- nil
- )
- )
- #(#MenuItem
- #'label:' 'Lists'
- #'submenu:'
- #(#Menu
-
- #(
- #(#MenuItem
- #'label:' 'List'
- #'value:' #'addWidget:'
- #'argument:' #SequenceViewSpec
- #'labelImage:' #(#ResourceRetriever #SequenceViewSpec #icon 'List')
- )
- #(#MenuItem
- #'label:' 'Data Set List'
- #'value:' #'addWidget:'
- #'argument:' #DataSetSpec
- #'labelImage:' #(#ResourceRetriever #DataSetSpec #icon 'Data Set List')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Tree List'
- #'value:' #'addWidget:'
- #'argument:' #SelectionInTreeViewSpec
- #'labelImage:' #(#ResourceRetriever #SelectionInTreeViewSpec #icon 'Tree List')
- )
- #(#MenuItem
- #'label:' 'File Tree List'
- #'value:' #'addWidget:'
- #'argument:' #FileSelectionTreeSpec
- #'labelImage:' #(#ResourceRetriever #FileSelectionTreeSpec #icon 'File Tree List')
- )
- ) nil
- nil
- )
- )
- #(#MenuItem
- #'label:' 'Boxes'
- #'submenu:'
- #(#Menu
-
- #(
- #(#MenuItem
- #'label:' 'Box'
- #'value:' #'addWidget:'
- #'argument:' #ViewSpec
- #'labelImage:' #(#ResourceRetriever #ViewSpec #icon 'Box')
- )
- #(#MenuItem
- #'label:' 'Framed Box'
- #'value:' #'addWidget:'
- #'argument:' #FramedBoxSpec
- #'labelImage:' #(#ResourceRetriever #FramedBoxSpec #icon 'Framed Box')
+ #label: 'Documentation'
+ #translateLabel: true
+ #value: #openDocumentation
+ #activeHelpKey: #helpTutorial
+ #enabled: #valueOfHavingDocumentation
)
#(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Horizontal Panel'
- #'value:' #'addWidget:'
- #'argument:' #HorizontalPanelViewSpec
- #'labelImage:' #(#ResourceRetriever #HorizontalPanelViewSpec #icon 'Horizontal Panel')
- )
- #(#MenuItem
- #'label:' 'Vertical Panel'
- #'value:' #'addWidget:'
- #'argument:' #VerticalPanelViewSpec
- #'labelImage:' #(#ResourceRetriever #VerticalPanelViewSpec #icon 'Vertical Panel')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Area Panel'
- #'value:' #'addWidget:'
- #'argument:' #PanelViewSpec
- #'labelImage:' #(#ResourceRetriever #PanelViewSpec #icon 'Area Panel')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Variable Horizontal Panel'
- #'value:' #'addWidget:'
- #'argument:' #VariableHorizontalPanelSpec
- #'labelImage:' #(#ResourceRetriever #VariableHorizontalPanelSpec #icon 'Variable Horizontal Panel')
+ #label: 'Examples'
+ #translateLabel: true
+ #value: #openExamples
+ #activeHelpKey: #helpTutorial
+ #enabled: #valueOfHavingExamples
)
#(#MenuItem
- #'label:' 'Variable Vertical Panel'
- #'value:' #'addWidget:'
- #'argument:' #VariableVerticalPanelSpec
- #'labelImage:' #(#ResourceRetriever #VariableVerticalPanelSpec #icon 'Variable Vertical Panel')
- )
- ) nil
- nil
- )
- )
- #(#MenuItem
- #'label:' 'Misc'
- #'submenu:'
- #(#Menu
-
- #(
- #(#MenuItem
- #'label:' 'Arbitrary Component'
- #'value:' #'addWidget:'
- #'argument:' #ArbitraryComponentSpec
- #'labelImage:' #(#ResourceRetriever #ArbitraryComponentSpec #icon 'Arbitrary Component')
- )
- #(#MenuItem
- #'label:' '-'
+ #label: '-'
)
#(#MenuItem
- #'label:' 'Sub Specification'
- #'value:' #'addWidget:'
- #'argument:' #UISubSpecification
- #'labelImage:' #(#ResourceRetriever #ArbitraryComponentSpec #icon 'Sub Specification')
- )
- #(#MenuItem
- #'label:' 'Sub Canvas'
- #'value:' #'addWidget:'
- #'argument:' #SubCanvasSpec
- #'labelImage:' #(#ResourceRetriever #SubCanvasSpec #icon 'Sub Canvas')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Progress Indicator'
- #'value:' #'addWidget:'
- #'argument:' #ProgressIndicatorSpec
- #'labelImage:' #(#ResourceRetriever #ProgressIndicatorSpec #icon 'Progress Indicator')
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Divider'
- #'value:' #'addWidget:'
- #'argument:' #DividerSpec
- #'labelImage:' #(#ResourceRetriever #DividerSpec #icon 'Divider')
- )
- #(#MenuItem
- #'label:' 'Region'
- #'value:' #'addWidget:'
- #'argument:' #RegionSpec
- #'labelImage:' #(#ResourceRetriever #RegionSpec #icon 'Region')
+ #label: 'Show Help Texts'
+ #translateLabel: true
+ #activeHelpKey: #helpShowHelp
+ #indication: #showHelp:
)
) nil
nil
@@ -1259,96 +990,95 @@
#(
#(#MenuItem
- #'label:' 'Align Left'
- #'value:' #alignSelectionLeft
- #'activeHelpKey:' #alignSelectionLeft
- #'enabled:' #hasSelection
- #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignL 'Align Left')
+ #label: 'Left'
+ #value: #alignSelectionLeft
+ #activeHelpKey: #alignSelectionLeft
+ #enabled: #canMoveOrAlignSelection
+ #labelImage: #(#ResourceRetriever #UIPainter #iconAlignL 'Left')
)
#(#MenuItem
- #'label:' 'Align Right'
- #'value:' #alignSelectionRight
- #'activeHelpKey:' #alignSelectionRight
- #'enabled:' #hasSelection
- #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignR 'Align Right')
+ #label: 'Right'
+ #value: #alignSelectionRight
+ #activeHelpKey: #alignSelectionRight
+ #enabled: #canMoveOrAlignSelection
+ #labelImage: #(#ResourceRetriever #UIPainter #iconAlignR 'Right')
)
#(#MenuItem
- #'label:' 'Align Left & Right'
- #'value:' #alignSelectionLeftAndRight
- #'activeHelpKey:' #alignSelectionLeftAndRight
- #'enabled:' #hasSelection
- #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignLR 'Align Left & Right')
+ #label: 'Left & Right'
+ #value: #alignSelectionLeftAndRight
+ #activeHelpKey: #alignSelectionLeftAndRight
+ #enabled: #canMoveOrAlignSelection
+ #labelImage: #(#ResourceRetriever #UIPainter #iconAlignLR 'Left & Right')
)
#(#MenuItem
- #'label:' 'Align top'
- #'value:' #alignSelectionTop
- #'activeHelpKey:' #alignSelectionTop
- #'enabled:' #hasSelection
- #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignT 'Align top')
+ #label: 'Top'
+ #value: #alignSelectionTop
+ #activeHelpKey: #alignSelectionTop
+ #enabled: #canMoveOrAlignSelection
+ #labelImage: #(#ResourceRetriever #UIPainter #iconAlignT 'Top')
)
#(#MenuItem
- #'label:' 'Align Bottom'
- #'value:' #alignSelectionBottom
- #'activeHelpKey:' #alignSelectionBottom
- #'enabled:' #hasSelection
- #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignB 'Align Bottom')
+ #label: 'Bottom'
+ #value: #alignSelectionBottom
+ #activeHelpKey: #alignSelectionBottom
+ #enabled: #canMoveOrAlignSelection
+ #labelImage: #(#ResourceRetriever #UIPainter #iconAlignB 'Bottom')
)
#(#MenuItem
- #'label:' 'Align Top & Bottom'
- #'value:' #alignSelectionTopAndBottom
- #'activeHelpKey:' #alignSelectionTopAndBottom
- #'enabled:' #hasSelection
- #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignTB 'Align Top & Bottom')
+ #label: 'Top & Bottom'
+ #value: #alignSelectionTopAndBottom
+ #activeHelpKey: #alignSelectionTopAndBottom
+ #enabled: #canMoveOrAlignSelection
+ #labelImage: #(#ResourceRetriever #UIPainter #iconAlignTB 'Top & Bottom')
)
#(#MenuItem
- #'label:' 'Align Centered Horizontal'
- #'value:' #alignSelectionCenterHor
- #'activeHelpKey:' #alignSelectionCenterHor
- #'enabled:' #hasSelection
- #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterH 'Align Centered Horizontal')
+ #label: '-'
)
#(#MenuItem
- #'label:' 'Align Centered Vertical'
- #'value:' #alignSelectionCenterVer
- #'activeHelpKey:' #alignSelectionCenterVer
- #'enabled:' #hasSelection
- #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterV 'Align Centered Vertical')
+ #label: 'Centered Horizontal'
+ #value: #alignSelectionCenterHor
+ #activeHelpKey: #alignSelectionCenterHor
+ #enabled: #canMoveOrAlignSelection
)
#(#MenuItem
- #'label:' '-'
+ #label: 'Centered Vertical'
+ #value: #alignSelectionCenterVer
+ #activeHelpKey: #alignSelectionCenterVer
+ #enabled: #canMoveOrAlignSelection
+ )
+ #(#MenuItem
+ #label: '-'
)
#(#MenuItem
- #'label:' 'Spread Horizontal'
- #'value:' #spreadSelectionHor
- #'activeHelpKey:' #spreadSelectionHor
- #'enabled:' #hasSelection
+ #label: 'Center Horizontal In Frame'
+ #value: #centerSelectionHor
+ #activeHelpKey: #centerSelectionHor
+ #enabled: #canMoveOrAlignSelection
)
#(#MenuItem
- #'label:' 'Spread Vertical'
- #'value:' #spreadSelectionVer
- #'activeHelpKey:' #spreadSelectionVer
- #'enabled:' #hasSelection
+ #label: 'Center Vertical In Frame'
+ #value: #centerSelectionVer
+ #activeHelpKey: #centerSelectionVer
+ #enabled: #canMoveOrAlignSelection
)
#(#MenuItem
- #'label:' '-'
+ #label: '-'
)
#(#MenuItem
- #'label:' 'Center Horizontal In Frame'
- #'value:' #centerSelectionHor
- #'activeHelpKey:' #centerSelectionHor
- #'enabled:' #hasSelection
+ #label: 'Spread Horizontal'
+ #value: #spreadSelectionHor
+ #activeHelpKey: #spreadSelectionHor
+ #enabled: #canMoveOrAlignSelection
)
#(#MenuItem
- #'label:' 'Center Vertical In Frame'
- #'value:' #centerSelectionVer
- #'activeHelpKey:' #centerSelectionVer
- #'enabled:' #hasSelection
+ #label: 'Spread Vertical'
+ #value: #spreadSelectionVer
+ #activeHelpKey: #spreadSelectionVer
+ #enabled: #canMoveOrAlignSelection
)
) nil
nil
)
-
- "Modified: / 27.1.1998 / 21:27:33 / cg"
!
menuEdit
@@ -1370,137 +1100,125 @@
#(
#(#MenuItem
- #'label:' 'Cut'
- #'value:' #deleteSelection
- #'activeHelpKey:' #editCut
- #'enabled:' #hasSelection
- #'shortcutKeyCharacter:' #Cut
+ #label: 'Undo'
+ #nameKey: #undo
+ #value: #undoLast
+ #activeHelpKey: #editUndo
+ #enabled: #hasUndoHistory
+ #shortcutKeyCharacter: #Cmdu
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Cut'
+ #value: #cutSelection
+ #activeHelpKey: #editCut
+ #enabled: #valueOfCanCut
+ #shortcutKeyCharacter: #Cut
+ )
+ #(#MenuItem
+ #label: 'Copy'
+ #value: #copySelection
+ #activeHelpKey: #editCopy
+ #enabled: #valueOfCanCopy
+ #shortcutKeyCharacter: #Copy
)
#(#MenuItem
- #'label:' 'Copy'
- #'value:' #copySelection
- #'activeHelpKey:' #editCopy
- #'enabled:' #hasSelection
- #'shortcutKeyCharacter:' #Copy
+ #label: 'Paste'
+ #value: #pasteBuffer
+ #activeHelpKey: #pasteBuffer
+ #enabled: #valueOfCanPaste
+ #shortcutKeyCharacter: #Paste
+ )
+ #(#MenuItem
+ #label: 'Delete'
+ #value: #deleteSelection
+ #enabled: #valueOfCanCut
+ #shortcutKeyCharacter: #Delete
+ )
+ #(#MenuItem
+ #label: '-'
)
#(#MenuItem
- #'label:' 'Paste'
- #'nameKey:' #paste
- #'value:' #paste
- #'activeHelpKey:' #editPaste
- #'enabled:' #canPaste
- #'submenu:'
+ #label: 'Paste With Layout'
+ #value: #pasteWithLayout
+ #activeHelpKey: #pasteWithLayout
+ #enabled: #canKeepLayoutInSelection
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Move'
+ #submenuChannel: #menuMove
+ )
+ #(#MenuItem
+ #label: 'Dimension'
+ #enabled: #hasSelection
+ #submenu:
#(#Menu
#(
#(#MenuItem
- #'label:' 'Paste'
- #'value:' #pasteBuffer
- #'activeHelpKey:' #pasteBuffer
- #'shortcutKeyCharacter:' #Paste
+ #label: 'Default Extent'
+ #value: #setToDefaultExtent
+ #activeHelpKey: #editDimensionDefaultExtent
+ #enabled: #canMoveOrAlignSelection
+ )
+ #(#MenuItem
+ #label: 'Default Width'
+ #value: #setToDefaultWidth
+ #activeHelpKey: #editDimensionDefaultWidth
+ #enabled: #canMoveOrAlignSelection
)
#(#MenuItem
- #'label:' 'Keep Layout'
- #'value:' #pasteWithLayout
- #'activeHelpKey:' #pasteWithLayout
- #'enabled:' #canKeepLayoutInSelection
+ #label: 'Default Height'
+ #value: #setToDefaultHeight
+ #activeHelpKey: #editDimensionDefaultHeight
+ #enabled: #canMoveOrAlignSelection
)
- ) nil
- nil
- )
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Undo'
- #'nameKey:' #undo
- #'value:' #undoLast
- #'activeHelpKey:' #editUndo
- #'enabled:' #hasUndoHistory
- #'shortcutKeyCharacter:' #Cmdu
- )
- #(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Align'
- #'submenuChannel:' #menuAlign
- )
- #(#MenuItem
- #'label:' 'Move'
- #'submenuChannel:' #menuMove
- )
- #(#MenuItem
- #'label:' 'Dimension'
- #'value:' #dimension
- #'enabled:' #hasSelection
- #'submenu:'
- #(#Menu
-
- #(
+ #(#MenuItem
+ #label: '-'
+ )
#(#MenuItem
- #'label:' 'Default Extent'
- #'value:' #setToDefaultExtent
- #'activeHelpKey:' #setToDefaultExtent
- #'enabled:' #canMoveOrAlignSelection
+ #label: 'Copy Layout'
+ #value: #copyLayout
+ #activeHelpKey: #editDimensionCopyLayout
+ #enabled: #hasSingleSelection
)
#(#MenuItem
- #'label:' 'Default Width'
- #'value:' #setToDefaultWidth
- #'activeHelpKey:' #setToDefaultWidth
- #'enabled:' #canMoveOrAlignSelection
+ #label: 'Copy Extent'
+ #value: #copyExtent
+ #activeHelpKey: #editDimensionCopyExtent
+ #enabled: #hasSingleSelection
)
#(#MenuItem
- #'label:' 'Default Height'
- #'value:' #setToDefaultHeight
- #'activeHelpKey:' #setToDefaultHeight
- #'enabled:' #canMoveOrAlignSelection
+ #label: '-'
)
#(#MenuItem
- #'label:' '-'
- )
- #(#MenuItem
- #'label:' 'Copy Extent'
- #'value:' #copyExtent
- #'activeHelpKey:' #copyExtent
- #'enabled:' #hasSingleSelection
- )
- #(#MenuItem
- #'label:' '-'
+ #label: 'Paste Layout'
+ #value: #pasteLayout
+ #activeHelpKey: #editDimensionPasteLayout
+ #enabled: #canMoveOrAlignSelection
)
#(#MenuItem
- #'label:' 'Paste Extent'
- #'value:' #pasteExtent
- #'activeHelpKey:' #pasteExtent
- #'enabled:' #canMoveOrAlignSelection
- )
- #(#MenuItem
- #'label:' 'Paste Width'
- #'value:' #pasteWidth
- #'activeHelpKey:' #pasteWidth
- #'enabled:' #canMoveOrAlignSelection
+ #label: 'Paste Extent'
+ #value: #pasteExtent
+ #activeHelpKey: #editDimensionPasteExtent
+ #enabled: #canMoveOrAlignSelection
)
#(#MenuItem
- #'label:' 'Paste Height'
- #'value:' #pasteHeight
- #'activeHelpKey:' #pasteHeight
- #'enabled:' #canMoveOrAlignSelection
- )
- #(#MenuItem
- #'label:' '-'
+ #label: 'Paste Width'
+ #value: #pasteWidth
+ #activeHelpKey: #editDimensionPasteWidth
+ #enabled: #canMoveOrAlignSelection
)
#(#MenuItem
- #'label:' 'Copy Layout'
- #'value:' #copyLayout
- #'activeHelpKey:' #copyLayout
- #'enabled:' #hasSingleSelection
- )
- #(#MenuItem
- #'label:' 'Paste Layout'
- #'value:' #pasteLayout
- #'activeHelpKey:' #pasteLayout
- #'enabled:' #canMoveOrAlignSelection
+ #label: 'Paste Height'
+ #value: #pasteHeight
+ #activeHelpKey: #editDimensionPasteHeight
+ #enabled: #canMoveOrAlignSelection
)
) nil
nil
@@ -1530,32 +1248,32 @@
#(
#(#MenuItem
- #'label:' 'Move Up'
- #'value:' #doStepUp
- #'activeHelpKey:' #moveSelectionUp
- #'enabled:' #canMoveOrAlignSelection
- #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #upIcon 'Move Up')
+ #label: 'Up'
+ #value: #doStepUp
+ #activeHelpKey: #moveWidgetUp
+ #enabled: #canMoveOrAlignSelection
+ #labelImage: #(#ResourceRetriever #ToolApplicationModel #upIcon 'Up')
)
#(#MenuItem
- #'label:' 'Move Down'
- #'value:' #doStepDown
- #'activeHelpKey:' #moveSelectionDown
- #'enabled:' #canMoveOrAlignSelection
- #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #downIcon 'Move Down')
+ #label: 'Down'
+ #value: #doStepDown
+ #activeHelpKey: #moveWidgetDown
+ #enabled: #canMoveOrAlignSelection
+ #labelImage: #(#ResourceRetriever #ToolApplicationModel #downIcon 'Down')
)
#(#MenuItem
- #'label:' 'Move In'
- #'value:' #doStepIn
- #'activeHelpKey:' #moveSelectionRight
- #'enabled:' #canMoveSelectionIntoContainer
- #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #downRightIcon 'Move In')
+ #label: 'Into'
+ #value: #doStepIn
+ #activeHelpKey: #moveWidgetInto
+ #enabled: #canMoveSelectionIntoContainer
+ #labelImage: #(#ResourceRetriever #ToolApplicationModel #downRightIcon 'Into')
)
#(#MenuItem
- #'label:' 'Move Out'
- #'value:' #doStepOut
- #'activeHelpKey:' #moveSelectionLeft
- #'enabled:' #canMoveSelectionOutOfContainer
- #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #leftDownIcon 'Move Out')
+ #label: 'Out'
+ #value: #doStepOut
+ #activeHelpKey: #moveWidgetOut
+ #enabled: #canMoveSelectionOutOfContainer
+ #labelImage: #(#ResourceRetriever #ToolApplicationModel #leftDownIcon 'Out')
)
) nil
nil
@@ -1581,132 +1299,186 @@
#(
#(#MenuItem
- #'label:' 'Start'
- #'isButton:' true
- #'value:' #doStartApplication
- #'activeHelpKey:' #testStartApplication
- #'labelImage:' #(#ResourceRetriever nil #startIcon)
+ #label: 'Start'
+ #isButton: true
+ #value: #doStartApplication
+ #activeHelpKey: #testStartApplication
+ #labelImage: #(#ResourceRetriever nil #startIcon)
)
#(#MenuItem
- #'label:' ''
+ #label: ''
+ )
+ #(#MenuItem
+ #label: 'New'
+ #isButton: true
+ #value: #doNew
+ #activeHelpKey: #fileNew
+ #labelImage: #(#ResourceRetriever nil #newIcon)
)
#(#MenuItem
- #'label:' 'New'
- #'isButton:' true
- #'value:' #doNew
- #'activeHelpKey:' #fileNew
- #'labelImage:' #(#ResourceRetriever nil #newIcon)
+ #label: 'Load'
+ #isButton: true
+ #value: #doLoad
+ #activeHelpKey: #fileLoad
+ #labelImage: #(#ResourceRetriever nil #loadIcon)
)
#(#MenuItem
- #'label:' 'Load'
- #'isButton:' true
- #'value:' #doFromClass
- #'activeHelpKey:' #fileLoad
- #'labelImage:' #(#ResourceRetriever nil #loadIcon)
+ #label: 'Save'
+ #isButton: true
+ #value: #doSave
+ #activeHelpKey: #fileSave
+ #labelImage: #(#ResourceRetriever nil #saveIcon)
+ )
+ #(#MenuItem
+ #label: ''
+ )
+ #(#MenuItem
+ #label: 'Cut'
+ #isButton: true
+ #value: #cutSelection
+ #activeHelpKey: #editCut
+ #enabled: #valueOfCanCut
+ #labelImage: #(#ResourceRetriever nil #cutIcon)
)
#(#MenuItem
- #'label:' 'Save'
- #'isButton:' true
- #'value:' #doInstallSpec
- #'activeHelpKey:' #fileSave
- #'labelImage:' #(#ResourceRetriever nil #saveIcon)
+ #label: 'Copy'
+ #isButton: true
+ #value: #copySelection
+ #activeHelpKey: #editCopy
+ #enabled: #valueOfCanCopy
+ #labelImage: #(#ResourceRetriever nil #copyIcon)
)
#(#MenuItem
- #'label:' ''
+ #label: 'Paste'
+ #isButton: true
+ #value: #pasteBuffer
+ #activeHelpKey: #editPaste
+ #enabled: #valueOfCanPaste
+ #labelImage: #(#ResourceRetriever nil #pasteIcon)
)
#(#MenuItem
- #'label:' 'Move Up'
- #'isButton:' true
- #'value:' #doStepUp
- #'activeHelpKey:' #moveSelectionUp
- #'enabled:' #canChangeOrderInContainer
- #'labelImage:' #(#ResourceRetriever nil #upIcon)
+ #label: 'Delete'
+ #isButton: true
+ #value: #deleteSelection
+ #activeHelpKey: #editDelete
+ #enabled: #valueOfCanCut
+ #labelImage: #(#ResourceRetriever nil #deleteIcon)
+ )
+ #(#MenuItem
+ #label: ''
)
#(#MenuItem
- #'label:' 'Move Down'
- #'isButton:' true
- #'value:' #doStepDown
- #'activeHelpKey:' #moveSelectionDown
- #'enabled:' #canChangeOrderInContainer
- #'labelImage:' #(#ResourceRetriever nil #downIcon)
+ #label: 'Move Up'
+ #isButton: true
+ #value: #doStepUp
+ #activeHelpKey: #moveWidgetUp
+ #enabled: #canChangeOrderInContainer
+ #labelImage: #(#ResourceRetriever nil #upIcon)
)
#(#MenuItem
- #'label:' 'Move In'
- #'isButton:' true
- #'value:' #doStepIn
- #'activeHelpKey:' #moveSelectionRight
- #'enabled:' #canMoveSelectionIntoContainer
- #'labelImage:' #(#ResourceRetriever nil #downRightIcon)
+ #label: 'Move Down'
+ #isButton: true
+ #value: #doStepDown
+ #activeHelpKey: #moveWidgetDown
+ #enabled: #canChangeOrderInContainer
+ #labelImage: #(#ResourceRetriever nil #downIcon)
)
#(#MenuItem
- #'label:' 'Move Out'
- #'isButton:' true
- #'value:' #doStepOut
- #'activeHelpKey:' #moveSelectionLeft
- #'enabled:' #canMoveSelectionOutOfContainer
- #'labelImage:' #(#ResourceRetriever nil #leftDownIcon)
- )
- #(#MenuItem
- #'label:' ''
+ #label: 'Move Into'
+ #isButton: true
+ #value: #doStepIn
+ #activeHelpKey: #moveWidgetInto
+ #enabled: #canMoveSelectionIntoContainer
+ #labelImage: #(#ResourceRetriever nil #downRightIcon)
)
#(#MenuItem
- #'label:' 'Align left'
- #'isButton:' true
- #'value:' #alignSelectionLeft
- #'activeHelpKey:' #alignSelectionLeft
- #'labelImage:' #(#ResourceRetriever nil #iconAlignL)
+ #label: 'Move Out'
+ #isButton: true
+ #value: #doStepOut
+ #activeHelpKey: #moveWidgetOut
+ #enabled: #canMoveSelectionOutOfContainer
+ #labelImage: #(#ResourceRetriever nil #leftDownIcon)
)
#(#MenuItem
- #'label:' 'Align right'
- #'isButton:' true
- #'value:' #alignSelectionRight
- #'activeHelpKey:' #alignSelectionRight
- #'labelImage:' #(#ResourceRetriever nil #iconAlignR)
+ #label: ''
)
#(#MenuItem
- #'label:' 'Align left & right'
- #'isButton:' true
- #'value:' #alignSelectionLeftAndRight
- #'activeHelpKey:' #alignSelectionLeftAndRight
- #'labelImage:' #(#ResourceRetriever nil #iconAlignLR)
+ #label: 'Canvas'
+ #activeHelpKey: #settingsCanvas
+ #indication: #painterShown
)
#(#MenuItem
- #'label:' 'Align top'
- #'isButton:' true
- #'value:' #alignSelectionTop
- #'activeHelpKey:' #alignSelectionTop
- #'labelImage:' #(#ResourceRetriever nil #iconAlignT)
+ #label: 'Gallery'
+ #activeHelpKey: #settingsGallery
+ #indication: #galleryShown
)
+ ) nil
+ nil
+ )
+!
+
+menuToolbar2
+ "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:#menuToolbar2
+ (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar2)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+
+ #(#Menu
+
+ #(
#(#MenuItem
- #'label:' 'Align bottom'
- #'isButton:' true
- #'value:' #alignSelectionBottom
- #'activeHelpKey:' #alignSelectionBottom
- #'labelImage:' #(#ResourceRetriever nil #iconAlignB)
+ #label: 'Align Left'
+ #isButton: true
+ #value: #alignSelectionLeft
+ #activeHelpKey: #alignSelectionLeft
+ #labelImage: #(#ResourceRetriever nil #iconAlignL)
)
#(#MenuItem
- #'label:' 'Align top & bottom'
- #'isButton:' true
- #'value:' #alignSelectionTopAndBottom
- #'activeHelpKey:' #alignSelectionTopAndBottom
- #'labelImage:' #(#ResourceRetriever nil #iconAlignTB)
+ #label: 'Align Right'
+ #isButton: true
+ #value: #alignSelectionRight
+ #activeHelpKey: #alignSelectionRight
+ #labelImage: #(#ResourceRetriever nil #iconAlignR)
)
#(#MenuItem
- #'label:' ''
+ #label: 'Align Left & Right'
+ #isButton: true
+ #value: #alignSelectionLeftAndRight
+ #activeHelpKey: #alignSelectionLeftAndRight
+ #labelImage: #(#ResourceRetriever nil #iconAlignLR)
+ )
+ #(#MenuItem
+ #label: ''
)
#(#MenuItem
- #'label:' 'Align centered horizontal'
- #'isButton:' true
- #'value:' #alignSelectionCenterHor
- #'activeHelpKey:' #alignSelectionCenterHor
- #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterH)
+ #label: 'Align Top'
+ #isButton: true
+ #value: #alignSelectionTop
+ #activeHelpKey: #alignSelectionTop
+ #labelImage: #(#ResourceRetriever nil #iconAlignT)
)
#(#MenuItem
- #'label:' 'Align centered vertical'
- #'isButton:' true
- #'value:' #alignSelectionCenterVer
- #'activeHelpKey:' #alignSelectionCenterVer
- #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterV)
+ #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
@@ -1725,31 +1497,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*****(@@@@@@@@@@@@@@@@@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); 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]!
-
-iconAlignCenterH
- "Generated by the Image Editor"
- "
- ImageEditor openOnClass:self andSelector:#iconAlignCenterH
- "
-
- <resource: #image>
-
- ^Icon
- constantNamed:#'UIPainter iconAlignCenterH'
- ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUUUUUUPV*****)PV*****)PUUUMUUUPUUT?UUUPUUS?5UU\UUO?=UUWUT???UUPUTUUUUUPUUUUUUUPV*****)PV*****)PUUUMUUUPUUT?UUUPUUS?5UUPUUO?=UUPUT???UUWUTUUUUUPUUUUUUUPUUUUUUUP'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BO??0O??0@G@@@O @@_0@@?8@A?<@A?<@@@@@O??0O??3@G@@@O @@_0@@?8@A?<@A?<@@@@@@@@@'); yourself); yourself]!
-
-iconAlignCenterV
- "Generated by the Image Editor"
- "
- ImageEditor openOnClass:self andSelector:#iconAlignCenterV
- "
-
- <resource: #image>
-
- ^Icon
- constantNamed:#'UIPainter iconAlignCenterV'
- ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUV%UV%PUUV%UV%PUUV%UV%PTEV$EV%PT=V$=V%PT?V$?V%PT?6$?6%WT?>$?>%PT?>$?>%_T?6$?6%PT?V$?V%PT=V$=V%PT5V$5V%WUUV%UV%PUUV%UV%PUUV%UV%_UUV%UV%WUUV%UV%PUUUUUUUPUUUUUUUQ'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@LA!!@LA @LA LM!! NM1 OM9 O-= O=? O=? O=? O-= OM9 NM1 DL!!#@LA @LA @LA @LA @@@C@@@@'); yourself); yourself]!
+ 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
"Generated by the Image Editor"
@@ -1761,7 +1510,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@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); 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]!
+ 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
"Generated by the Image Editor"
@@ -1773,7 +1523,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@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); 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]!
+ 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
"Generated by the Image Editor"
@@ -1785,7 +1536,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@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); 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]!
+ 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
"Generated by the Image Editor"
@@ -1797,7 +1549,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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); 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]!
+ 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
"Generated by the Image Editor"
@@ -1809,7 +1562,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@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); 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]! !
+ 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 methodsFor:'actions'!
@@ -1985,7 +1739,7 @@
hasOneSelectionOtherThanCanvas
"returns a value holder which is true in case that one component is selected
other than the canvas.
- "
+ "
^ builder booleanValueAspectFor:#hasOneSelectionOtherThanCanvas
!
@@ -2119,7 +1873,7 @@
cls := self resolveName:specClass.
cls isNil ifTrue:[
- ^ self information:'No application class defined yet!!'
+ ^ self warn:'No application class defined yet!!'
].
cls notNil ifTrue:[
@@ -2140,7 +1894,8 @@
editor := MenuEditor new.
editor masterApplication:self.
- editor useHelpDictionary:(self helpTool dictionary).
+ editor specClass: cls.
+ editor useHelpTool: self helpTool.
editor openModalOnClass:cls andSelector:aspect.
self helpTool updateList.
@@ -2231,7 +1986,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 listSelector.
editor := TabItemEditor new.
@@ -2331,9 +2086,14 @@
^specClass printString, ' >> ', specSelector
!
-openTutorial
-
- self openTutorial: 'tools/uipainter/TOP.html'
+openDocumentation
+
+ self openHTMLDocument: 'tools/uipainter/TOP.html'
+!
+
+openExamples
+
+ self openHTMLDocument: 'tools/uipainter/Examples.html'
!
showHelp:aHelpText for:view
@@ -2368,11 +2128,11 @@
checkModified
"check interface modification
- "
- self painter isModified
+ "
+ (self painter isModified or: [self helpTool isModified])
ifTrue:
[
- ((YesNoBox title:'Interface was modified!!')
+ ((YesNoBox title:'Window Spec was modified!!')
noText:'Cancel';
yesText:'Waste it and proceed';
showAtPointer;
@@ -2410,6 +2170,26 @@
aView bePartner.
!
+resourceMessage: aString
+
+ aString notNil "and: [self askForModification])"
+ ifTrue:
+ [
+ |msg cls sel|
+ msg := aString asCollectionOfWords.
+ (msg size == 2 and:
+ [(cls := self resolveName:(msg at:1)) notNil])
+ ifTrue:
+ [
+ specClass := cls name.
+ specSuperclass := cls superclass name.
+ specSelector := (msg at: 2) asSymbol.
+ ^true
+ ]
+ ].
+ ^false
+!
+
setClass:cls selector:selector
"set the application class and the selector under which the
window specification should be stored
@@ -2561,7 +2341,7 @@
self isModified ifTrue:[
whatToDo := DialogBox
- confirmWithCancel:'Accept change made in ' , tabSelection printString , ' section?'
+ confirmWithCancel:'Accept modifications in section ' , tabSelection printString , '?'
labels:#('Cancel' 'Ignore' 'Accept')
default:3.
whatToDo isNil ifTrue:[^self].
@@ -2582,13 +2362,14 @@
treeSelection
"called whenever the selection of the treeview changed
"
- |view list spec slices size property tabComponent|
+ |view list spec slices size property tabComponent canCutOrCopy canPaste clipboard sel|
self isModified ifTrue:[
- (self confirm:'Accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
+ (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[
self accept
]
].
+
self canMoveOrAlignSelection value:(treeView canMoveOrAlignSelection).
self canChangeOrderInContainer value:(treeView canChangeOrderInContainer).
self canMoveSelectionIntoContainer value:(treeView canMoveSelectionIntoContainer).
@@ -2638,6 +2419,26 @@
self show:nil.
].
self modifiedChannel value:false.
+
+ treeView notNil
+ ifTrue:
+ [
+ canCutOrCopy := treeView selection size >= 1 and:[treeView selection first ~~ 1].
+ clipboard := self getSelection.
+
+ clipboard isCollection ifTrue:[clipboard notEmpty ifTrue:[sel := clipboard first]]
+ ifFalse:[sel := clipboard].
+
+ canPaste := (sel isKindOf:UISpecification) and:
+ [treeView selection size = 1
+ and:[treeView selection first == 1
+ or: [self canPasteInto: treeView selectedNode contents view]]]
+ ].
+
+ self valueOfCanCut value: canCutOrCopy.
+ self valueOfCanCopy value: canCutOrCopy.
+ self valueOfCanPaste value: canPaste
+
! !
!UIPainter methodsFor:'startup / release'!
@@ -2645,6 +2446,7 @@
closeRequest
"close all windows open by builder
"
+
self checkModified ifFalse:[^self].
treeView model removeDependent:self.
@@ -2718,7 +2520,8 @@
treeView := TreeView new.
painterView := StandardSystemView new.
- painterView label:'unnamed canvas'.
+ painterView name: self class defaultNameOfCanvas.
+ painterView label: self class defaultNameOfCanvas.
painterView extent:300@300.
painter := UIPainterView in:painterView.
@@ -2732,9 +2535,11 @@
transcript := (self builder componentAt:#Transcript) scrolledView.
topView := self window.
+
topView label:'GUI Painter'.
painterView openInGroup:(topView windowGroup).
+
painterView application:self.
painterView open.
@@ -2742,6 +2547,7 @@
selectionPanel := UISelectionPanel new.
selectionPanel allButOpenInterface:#windowSpec.
selectionPanel window openInGroup:(topView windowGroup).
+
selectionPanel openWindow.
selectionPanel masterApplication:self.
@@ -2759,13 +2565,6 @@
selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
ActiveHelp startFor:self.
-!
-
-openNewWindowCanvas
- "open new
- "
- self open.
-
!
@@ -2782,7 +2581,7 @@
|painter|
aClass isNil ifTrue:[
- (self confirm:'nil class given to UIPainter (class was probably renamed ?)\\Open anyway (to create a new interface) ?' withCRs)
+ (self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs)
ifFalse:[^ nil].
].
@@ -2793,40 +2592,33 @@
self setClass:aClass selector:aSelector.
(aClass respondsTo:aSelector) ifTrue:[
painter setupFromSpec:(aClass perform:aSelector).
+ treeView selection: #(1).
]
]
"Modified: / 25.10.1997 / 19:11:51 / cg"
"Modified: / 5.2.1998 / 09:48:15 / stefan"
+!
+
+postOpenWith: aBuilder
+
+ super postOpenWith: aBuilder.
+
+ treeView selection: (Array with: 1).
+ self treeSelection.
+ self tabSelection: 'Basics'
+
! !
!UIPainter methodsFor:'user interactions'!
-doBrowseAppClass
- "open a browser on the class"
-
- |cls|
-
- self painter isModified ifTrue:[
- self warn:'The current interface has not yet been saved.\\The browser will show the code of the old interface.' withCRs.
- ].
- cls := self resolveName:specClass.
-
- cls notNil ifTrue:[
- SystemBrowser openInClass:cls
- ] ifFalse:[
- self information:'No class defined!!'.
- ].
-
-!
-
doBrowseAspectMethods
"open a browser on the aspect methods"
|cls methods|
self painter isModified ifTrue:[
- self warn:'The current interface has not yet been saved.\\The 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.
].
cls := self resolveName:specClass.
@@ -2844,15 +2636,22 @@
"Created: / 25.10.1997 / 19:07:55 / cg"
!
-doFromClass
-
- self loadFromMessage:
- (ResourceSelectionBrowser
- request: 'Load Interface From Class'
- onSuperclass: nil
- andClass: specClass
- andSelector: specSelector
- withResourceTypes: #(canvas))
+doBrowseClass
+ "open a browser on the class"
+
+ |cls|
+
+ 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.
+ ].
+ cls := self resolveName:specClass.
+
+ cls notNil ifTrue:[
+ SystemBrowser openInClass:cls
+ ] ifFalse:[
+ self information:'No class defined!!'.
+ ].
+
!
doInstallAspects
@@ -2900,47 +2699,49 @@
"Created: / 31.10.1997 / 17:37:54 / cg"
!
-doInstallSpec
- "install window specification
- "
- |code painter|
-
- self hasSpecClassAndSelector ifFalse:[
- self defineClassAndSelector
- ].
-
- self checkClassAndSelector ifFalse:[
- ^ self
- ].
-
- self isModified ifTrue:[
- (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[
- self accept
- ] ifFalse:[
- (self confirm:'Load old interface?') ifFalse:[
- ^ self
+doLoad
+
+ self loadFromMessage:
+ (ResourceSelectionBrowser
+ request: 'Load Window Spec From Class'
+ onSuperclass: nil
+ andClass: specClass
+ andSelector: specSelector
+ withResourceTypes: #(canvas))
+!
+
+doLoadSubspec
+
+ |subSpecMessage|
+ (subSpecMessage := ResourceSelectionBrowser
+ 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))
]
]
- ].
-
- painter := self painter.
-
- painter className:specClass
- superclassName:specSuperclass
- selector:specSelector.
-
- code := painter generateWindowSpecMethodSource withCRs.
- painter resetModification.
- (ReadStream on:code) fileIn.
-
- self helpTool installHelpSpecInto:specClass
+ ]
!
doNew
"remove all components and associated resources
"
self painter isModified ifTrue:[
- (self confirm:'Edit a new interface without saving current?') ifFalse:[
+ (self confirm:'Edit a new window spec without saving current?') ifFalse:[
^ self
]
].
@@ -2953,7 +2754,7 @@
|painter view cls spec app|
self painter isModified ifTrue:[
- (self confirm:'pick another interface without saving your modifications ?') ifFalse:[
+ (self confirm:'Pick another window spec without saving your modifications?') ifFalse:[
^ self
]
].
@@ -2979,40 +2780,106 @@
"Modified: / 1.11.1997 / 13:47:49 / cg"
!
+doRedefineMethods
+ "redefine methods yes or no. If a method is defined in super class
+ should the message be reinstalled ?
+ "
+ ^ UIPainterView redefineMethods
+
+
+!
+
+doRedefineMethods:aBool
+ "redefine methods yes or no. If a method is defined in super class
+ should the message be reinstalled ?
+ "
+ UIPainterView redefineMethods:aBool
+
+
+!
+
+doSave
+ "install window spec
+ "
+ |code painter|
+
+ self hasSpecClassAndSelector ifFalse:[
+ self defineClassAndSelector
+ ].
+
+ (specClass notNil and: [(Smalltalk at: specClass asSymbol) isClass])
+ ifFalse:
+ [
+ ^nil
+ ].
+
+ self isModified ifTrue:[
+ (self confirm:'Accept modifications in section ' , tabSelection printString , '?') ifTrue:[
+ self accept
+ ] ifFalse:[
+ (self confirm:'Load old window spec?') ifFalse:[
+ ^ self
+ ]
+ ]
+ ].
+
+ painter := self painter.
+
+ painter className:specClass
+ superclassName:specSuperclass
+ selector:specSelector.
+
+ code := painter generateWindowSpecMethodSource withCRs.
+ painter resetModification.
+ (ReadStream on:code) fileIn.
+
+ self helpTool installHelpSpecInto:specClass.
+
+ self updateInfoLabel.
+ self painter resetModification.
+
+ ((Smalltalk at: specClass asSymbol) class implements: specSelector)
+ ifTrue:
+ [
+ self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:.
+ ].
+
+
+!
+
+doSaveAs
+ "launch a dialog to define class, superclass and method"
+
+ |resourceMessage|
+
+ (resourceMessage := ResourceSelectionBrowser
+ request: 'Save In Class'
+ onSuperclass: #Object
+ andClass: specClass ? #ApplicationModel
+ andSelector: specSelector ? #windowSpec
+ withResourceTypes: #(canvas)) notNil
+ ifTrue:
+ [
+ (self resourceMessage: resourceMessage)
+ ifTrue:
+ [
+ self doSave.
+ ^true
+ ]
+ ]
+
+!
+
doStartApplication
"start current edited application
"
|cls app infoMessage|
- self isModified ifTrue:[
- (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[
- self accept.
- "/ "XXX must be fixed - canvas changes are not recorded in the history
- "/ so isModified returns false here
- "/
- "/ self painter isModified ifTrue:[
- "/
- (self confirm:'Reinstall the new interface?' withCRs) ifTrue:[
- self doInstallSpec
- ]
- "/ ].
- ]
- ].
-
- (specClass notNil and:[specSelector size >= 2]) ifTrue:[
- "/ box suppressed, if no-class box is coming anyway ...
- self painter isModified ifTrue:[
- (self confirm:'The current interface has not yet been reinstalled!!\\Start anyway (based upon the previous interface)?' withCRs) ifFalse:[
- ^ self
- ]
- ].
- ].
-
(specClass isNil or:[specSelector size < 2]) ifTrue:[
self painter isModified ifTrue:[
- infoMessage := 'Class and selector must be defined,\and the interface must be saved first !!' withCRs.
+ infoMessage := 'Class and selector must be defined,\and the window spec must be saved first!!' withCRs.
] ifFalse:[
- infoMessage := 'No class and selector defined !!'.
+ infoMessage := 'No class and selector defined!!'.
]
] ifFalse:[
cls := self resolveName:specClass.
@@ -3023,7 +2890,7 @@
(cls respondsTo:specSelector) ifFalse:[
infoMessage := ('No method for: #'
, specSelector , ' in ' , cls name
- , '\\(did you install the interface?)') withCRs.
+ , '\\(did you save the window spec?)') withCRs.
]
]
].
@@ -3031,13 +2898,31 @@
infoMessage notNil ifTrue:[
^ self information:infoMessage
].
- app := cls new.
- (app respondsTo:#openInterface:) ifFalse:[
+
+ self isModified ifTrue:[
+ (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[
+ self accept.
+ "/ "XXX must be fixed - canvas changes are not recorded in the history
+ "/ so isModified returns false here
+ "/
+ "/ self painter isModified ifTrue:[
+ "/
+ (self confirm:'Save the new window spec?' withCRs) ifTrue:[
+ self doSave
+ ]
+ ]
+ ].
+
+ self painter isModified ifTrue:[
+ (self confirm:'The current window spec has not yet been saved!!\\Start anyway (based upon the previous window spec)?' withCRs) ifFalse:[
+ ^ self
+ ]
+ ].
+
+ ((app := cls 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.
].
app openInterface:specSelector
-
- "Modified: / 5.3.1998 / 03:25:36 / cg"
!
doWindowSpec
@@ -3070,34 +2955,7 @@
ifTrue:
[
self painter setupFromSpec:(aClass perform:aSelector).
- ]
- ]
- ]
-
-!
-
-loadSubspec
-
- |subSpecMessage|
- (subSpecMessage := ResourceSelectionBrowser
- 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))
+ treeView selection: #(1).
]
]
]
@@ -3132,7 +2990,7 @@
^ false.
].
cls isBehavior ifFalse:[
- self warn:'A global named ' , specClass , ' exists, but is no class.'.
+ self warn:'A global named ' , specClass , ' exists, but it is no class.'.
^ false.
].
@@ -3204,6 +3062,7 @@
] doWhile:[again].
self specClass:specClass.
+ self helpTool isModified: true
!
gridMenu
@@ -3270,14 +3129,6 @@
treeView doStepOver:-1
! !
-!UIPainter::TreeView class methodsFor:'constants'!
-
-defaultNameOfCanvas
- "returns the default name (id) of the application
- "
- ^ 'WindowSpec'
-! !
-
!UIPainter::TreeView class methodsFor:'documentation'!
documentation
@@ -3314,11 +3165,10 @@
props := UIPainterView::ViewProperty new.
props view:aCanvas.
- model root:(TreeItem name:(self class defaultNameOfCanvas asBoldText) contents:props).
+ model root:(TreeItem name: UIPainter defaultNameOfCanvas asBoldText contents:props).
model root expand.
self enableChannel:(aCanvas enableChannel).
- "Modified: / 27.2.1998 / 16:10:03 / cg"
!
canvasSpec
@@ -3329,7 +3179,6 @@
spec := WindowSpec new.
spec fromView:(self canvas topView) callBack:nil.
-
windowSpec notNil ifTrue:[
spec copyValuesFromSpec:windowSpec
].
@@ -3423,7 +3272,7 @@
self canvas subViews copy do:[:aView|
(aView isKindOf:InputView) ifFalse:[aView destroy]
].
- model root name: self class defaultNameOfCanvas asBoldText.
+ model root name: UIPainter defaultNameOfCanvas asBoldText.
model root children:(OrderedCollection new).
model recomputeList.
self selection:nil.
@@ -3459,7 +3308,8 @@
windowSpec notNil ifTrue:[
winSpec := fullSpec window.
- winSpec copyValuesFromSpec:windowSpec
+ winSpec copyValuesFromSpec:windowSpec.
+ winSpec name: winSpec label.
].
^ fullSpec literalArrayEncoding.
@@ -3468,7 +3318,7 @@
setAttributesFromWindowSpec:aWindowSpec
"set windowSpec from argument a WindowSpec
- "
+ "
windowSpec := WindowSpec new copyValuesFromSpec:aWindowSpec.
self canvasNameChanged:aWindowSpec name.
@@ -3587,11 +3437,9 @@
and:[(self propertyDetect:[:p| p name = name]) isNil
and:[node name ~= name]]]
) ifTrue:[
- node name: (name asBoldText , ': [', self class defaultNameOfCanvas , ']').
- self redrawLine:1.
+ node name: name asBoldText.
+ node changed.
].
-
- "Modified: / 27.2.1998 / 16:13:31 / cg"
!
layoutChanged
@@ -3711,7 +3559,6 @@
initialize
"initialization; set multiple select and model
"
-
super initialize.
self multipleSelectOk:true.
@@ -3723,34 +3570,37 @@
[:aNode|
|specClass|
(specClass := aNode contents spec) isNil
- ifTrue: [WindowSpec icon]
- ifFalse: [specClass class icon]
+ ifTrue:
+ [
+ WindowSpec icon
+ ]
+ ifFalse:
+ [
+ ((selection size > 1) and: [(listOfNodes at:selection first) == aNode])
+ ifTrue:
+ [
+ specClass class icon copyWithColorMapProcessing:[:clr | clr blendWith:Color red]
+ ]
+ ifFalse:
+ [
+ specClass class icon
+ ]
+ ]
].
- self model
- labelAction:
- [:aNode|
- |spec|
- spec := aNode contents spec.
- spec name asBoldText , ': [', spec viewClass name , ']'
- ]
-
- "Modified: / 27.2.1998 / 16:12:37 / cg"
+ self model labelAction:
+ [:aNode|
+ |spec|
+ (spec := aNode contents spec) notNil
+ ifTrue: [self nameForSpecInList:spec]
+ ifFalse: [aNode name]
+ ]
! !
!UIPainter::TreeView methodsFor:'private'!
-figureFor:aNode
- "returns image for an spec item"
-
- |cls icon|
-
- cls := aNode contents spec class.
- aNode contents spec isNil ifTrue: [cls := WindowSpec].
- icon := cls icon.
- icon extent y > 16 ifTrue: [icon := icon magnifiedBy: 16/icon extent y].
- icon device ~~ device ifTrue: [icon := icon onDevice: device].
- ^icon
+nameForSpecInList:aSpec
+ ^ aSpec name asBoldText, ': [', aSpec viewClass name , ']'
!
selectionChangedFrom:oldSelection
@@ -3772,13 +3622,16 @@
].
self canvas updateSelectionFromModel:sel
].
-
- size ~~ 0 ifTrue:[
- sel := selection first.
-
- (listOfNodes at:sel) == lastDrawnMaster ifFalse:[
- self redrawLine:sel
- ]
+ size = 1 ifTrue:[
+ oldSelection size = 2 ifTrue: [
+ self redrawLine: (lastDrawnMaster := selection first)]
+ ].
+ size > 1 ifTrue:[
+ selection first ~~ lastDrawnMaster ifTrue: [
+ self redrawLine: (lastDrawnMaster := selection first)]
+ ]
+ ifFalse: [
+ lastDrawnMaster := nil
]
! !