214 |
216 |
215 #(#FullSpec |
217 #(#FullSpec |
216 #'window:' |
218 #'window:' |
217 #(#WindowSpec |
219 #(#WindowSpec |
218 #'name:' 'MenuEditor' |
220 #'name:' 'MenuEditor' |
219 #'layout:' #(#LayoutFrame 344 0 297 0 590 0 390 0) |
221 #'layout:' #(#LayoutFrame 262 0 426 0 508 0 519 0) |
220 #'label:' 'MenuEditor' |
222 #'label:' 'MenuEditor' |
221 #'min:' #(#Point 10 10) |
223 #'min:' #(#Point 10 10) |
222 #'max:' #(#Point 1152 900) |
224 #'max:' #(#Point 1152 900) |
223 #'bounds:' #(#Rectangle 344 297 591 391) |
225 #'bounds:' #(#Rectangle 262 426 509 520) |
224 #'usePreferredExtent:' false |
226 #'usePreferredExtent:' false |
225 ) |
227 ) |
226 #'component:' |
228 #'component:' |
227 #(#SpecCollection |
229 #(#SpecCollection |
228 #'collection:' |
230 #'collection:' |
229 #( |
231 #( |
230 #(#LabelSpec |
232 #(#LabelSpec |
231 #'name:' 'boxLabel' |
233 #'name:' 'boxLabel' |
232 #'layout:' #(#LayoutFrame 0 0.0 4 0 0 1.0 24 0) |
234 #'layout:' #(#LayoutFrame 2 0.0 4 0 -2 1.0 24 0) |
233 #'label:' 'Class for menu spec:' |
235 #'label:' 'Class for menu spec:' |
234 #'adjust:' #left |
236 #'adjust:' #left |
235 #'resizeForLabel:' true |
237 #'resizeForLabel:' true |
236 ) |
238 ) |
237 #(#InputFieldSpec |
239 #(#InputFieldSpec |
238 #'name:' 'classNameField' |
240 #'name:' 'classNameField' |
239 #'layout:' #(#LayoutFrame 0 0.0 27 0 0 1.0 49 0) |
241 #'layout:' #(#LayoutFrame 2 0.0 27 0 -2 1.0 49 0) |
240 #'tabable:' true |
242 #'tabable:' true |
241 #'model:' #classNameChannel |
243 #'model:' #classNameChannel |
242 #'acceptOnReturn:' false |
244 #'acceptOnReturn:' false |
243 #'acceptOnTab:' false |
245 #'acceptOnTab:' false |
244 ) |
246 ) |
245 #(#HorizontalPanelViewSpec |
247 #(#UISubSpecification |
246 #'name:' 'commitPanel' |
248 #'name:' 'SubSpecification' |
247 #'layout:' #(#LayoutFrame 10 0.0 -29 1.0 -10 1.0 -5 1.0) |
249 #'layout:' #(#LayoutFrame 0 0 -29 1 0 1 -5 1) |
248 #'component:' |
250 #'majorKey:' #ToolApplicationModel |
249 #(#SpecCollection |
251 #'minorKey:' #windowSpecForCommitWithoutChannels |
250 #'collection:' |
|
251 #( |
|
252 #(#ActionButtonSpec |
|
253 #'name:' 'button1' |
|
254 #'label:' 'Cancel' |
|
255 #'tabable:' true |
|
256 #'model:' #cancel |
|
257 #'extent:' #(#Point 109 24) |
|
258 ) |
|
259 #(#ActionButtonSpec |
|
260 #'name:' 'button2' |
|
261 #'label:' 'OK' |
|
262 #'tabable:' true |
|
263 #'model:' #accept |
|
264 #'isDefault:' true |
|
265 #'extent:' #(#Point 109 24) |
|
266 ) |
|
267 ) |
|
268 ) |
|
269 #'horizontalLayout:' #fitSpace |
|
270 #'verticalLayout:' #fit |
|
271 #'horizontalSpace:' 3 |
|
272 #'verticalSpace:' 3 |
|
273 ) |
252 ) |
274 ) |
253 ) |
275 ) |
254 ) |
276 ) |
255 ) |
277 ! |
256 ! |
1458 helpTool masterApplication:self. |
1437 helpTool masterApplication:self. |
1459 helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
1438 helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
1460 specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
1439 specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
1461 |
1440 |
1462 helpCanvas client:helpTool. |
1441 helpCanvas client:helpTool. |
1463 helpTool masterApplication:self. |
1442 helpTool masterApplication:self. |
1464 helpTool modifiedHolder: self valueOfEnablingCommitButtons. |
1443 helpTool modifiedHolder: self valueOfEnablingCommitButtons. |
1465 |
1444 |
1466 builder aspectAt:#noteBookView put:noteBook. |
1445 builder aspectAt:#noteBookView put:noteBook. |
1467 ]. |
1446 ]. |
1468 ^ noteBook |
1447 ^ noteBook |
1625 |
1604 |
1626 !MenuEditor methodsFor:'selection'! |
1605 !MenuEditor methodsFor:'selection'! |
1627 |
1606 |
1628 menuChanged |
1607 menuChanged |
1629 |
1608 |
1630 |node item slc sel old| |
1609 |node item slc sel old dep| |
1631 |
1610 |
1632 aspects do: [:holder| holder removeDependent:self]. |
1611 aspects do: [:holder| holder removeDependent:self]. |
1633 (node := self treeView selectedNode) notNil ifTrue:[ |
1612 (node := self treeView selectedNode) notNil ifTrue:[ |
1634 aspects do:[:anAspect| anAspect value:nil ]. |
1613 aspects do:[:anAspect| anAspect value:nil ]. |
1635 item := node contents. |
1614 item := node contents. |
1649 ]. |
1628 ]. |
1650 ] ifTrue:[ |
1629 ] ifTrue:[ |
1651 slc := self class perform:#slicesSeparatorMenu. |
1630 slc := self class perform:#slicesSeparatorMenu. |
1652 ] |
1631 ] |
1653 ]. |
1632 ]. |
1654 self helpTool helpKey:(self helpKey). |
1633 |
|
1634 self helpTool helpKey: self helpKey. |
|
1635 "Next line helps me to preserve myself against unnecessary settings of |
|
1636 valueOfEnablingCommitButtons to true in the help tool." |
|
1637 self valueOfEnablingCommitButtons value: false. |
1655 |
1638 |
1656 slc ~= slices ifTrue:[ |
1639 slc ~= slices ifTrue:[ |
1657 tabSelection ~~ 0 ifTrue:[ |
1640 tabSelection ~~ 0 ifTrue:[ |
1658 old := (slices at:tabSelection) first |
1641 old := (slices at:tabSelection) first |
1659 ]. |
1642 ]. |
1697 ]. |
1680 ]. |
1698 tabSelection == 1 ifTrue:[^ self]. |
1681 tabSelection == 1 ifTrue:[^ self]. |
1699 tabSelection := 1 |
1682 tabSelection := 1 |
1700 ]. |
1683 ]. |
1701 |
1684 |
1702 self isHelpToolSelected ifTrue:[ |
1685 self isHelpToolSelected ifTrue:[ |
1703 self helpTool helpKey:(self helpKey). |
1686 self helpTool helpKey:(self helpKey). |
1704 helpCanvas raise. |
1687 helpCanvas raise. |
1705 ] ifFalse:[ |
1688 ] ifFalse:[ |
1706 sel := (slices at:tabSelection) last. |
1689 sel := (slices at:tabSelection) last. |
1707 aspects do: [:holder| holder release]. |
1690 aspects do: [:holder| holder release]. |
1894 "invoked by button 'Cancel'" |
1877 "invoked by button 'Cancel'" |
1895 |
1878 |
1896 |node| |
1879 |node| |
1897 (node := self treeView selectedNode) notNil |
1880 (node := self treeView selectedNode) notNil |
1898 ifTrue: |
1881 ifTrue: |
1899 [ |
1882 [ |
1900 self helpTool helpKey:(self helpKey). |
1883 self helpTool helpKey:(self helpKey). |
1901 aspects do:[:anAspect| anAspect value:nil]. |
1884 aspects do:[:anAspect| anAspect value:nil]. |
1902 node contents toAspects:aspects |
1885 node contents toAspects:aspects |
1903 ]. |
1886 ]. |
1904 self valueOfEnablingCommitButtons value: false. |
1887 self valueOfEnablingCommitButtons value: false. |