NewLauncher.st
author penk
Fri, 13 Dec 2002 17:30:18 +0100
changeset 4381 48e99071d865
parent 4323 f867421ae6e1
child 4389 f51e4bb42b75
permissions -rw-r--r--
remove obsolete settingsApplication acess method

"
 COPYRIGHT (c) 1997-1998 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice. This software may not
 be provided or otherwise made available to, or used by, any
 other person. No title to or ownership of the software is
 hereby transferred.
"



"{ Package: 'stx:libtool' }"

AbstractLauncherApplication subclass:#NewLauncher
	instanceVariableNames:'isMainLauncher helpIsOn useNewSettinsApplication'
	classVariableNames:'UserAddedMenuItems UserAddedToolBarItems'
	poolDictionaries:''
	category:'Interface-Smalltalk'
!

Object subclass:#AddedToolInfo
	instanceVariableNames:'item where positionSpec space before menuWithNewItem'
	classVariableNames:''
	poolDictionaries:''
	privateIn:NewLauncher
!

!NewLauncher class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1997-1998 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice. This software may not
 be provided or otherwise made available to, or used by, any
 other person. No title to or ownership of the software is
 hereby transferred.
"


!

documentation
"
    The new launcher.
    This one provides all of the Launchers functionality, 
    but has been written using the new GUI painter tools.
    (i.e. its menu and toolbar is defined by specs, which can be
     easily modified).
    Functionality which can be shared with the old launcher
    has been moved to a common superclass.

    If you want to write your own (application-)launcher, we recommend
    creating a subclass, and redefining the appropriate menu & menuToolBar
    methods there.

    [start with:]
        NewLauncher open

    [see also:]
        Launcher

    [author:]
        Thomas Zwick, eXept Software AG
        Claus Gittinger, eXept Software AG
"

!

examples
"
    reopening a standard launcher (without any added tools)
                                                                        [exBegin]
     NewLauncher removeAllUserAddedTools.
     NewLauncher open.
                                                                        [exEnd]



    adding your own menu items (for user-applications)

    an additional item in the tools menu:
                                                                        [exBegin]
     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Foo';
                        value: [Transcript showCR:'foo invoked'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #foo;
                        activeHelpKey: #Foo)
        in:#menu
        position:(#before #workspace)
        space:true
                                                                        [exEnd]

    an additional item in the tools menu:
                                                                        [exBegin]
     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Foo';
                        value: [Transcript showCR:'foo invoked'];
                        isButton: false;
                        labelImage: nil;
                        activeHelpKey: #Foo)
        in:#menu
        position:(#after #guiPainter)
        space:true
                                                                        [exEnd]

    an additional item in one of the tools sub menus:
                                                                        [exBegin]
     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Foo';
                        value: [Transcript showCR:'foo invoked'];
                        isButton: false;
                        labelImage: nil;
                        activeHelpKey: #Foo)
        in:#menu
        position:'Workspace'
        before:true
        space:true
                                                                        [exEnd]
"

! !

!NewLauncher class methodsFor:'accessing'!

label

    ^'ST/X Launcher'


! !

!NewLauncher class methodsFor:'defaults'!

windowIcon
    ^ Icon stxIcon

    "Created: / 16.8.1998 / 13:11:58 / cg"
    "Modified: / 17.8.1998 / 10:07:09 / cg"
! !

!NewLauncher class methodsFor:'help specs'!

flyByHelpSpec
    <resource: #help>

    ^super flyByHelpSpec addPairsFrom:#(

#fileFileBrowser
'FileBrowser'

#fileBrowserV2
'New FileBrowser'

#fileSaveImage
'Save Image'

#fileSaveImageAs
'Save Image'

#helpSTXOnlineDocumentation
'Online Manual'

#classesSystemBrowserOnClass
'Browser history'

#classesSystemBrowser
'SystemBrowser'

#newSystemBrowser
'New SystemBrowser'

#systemGarbageCollect
'GarbageCollect'

#systemGarbageCollectAndCompress
'GarbageCollect'

#toolsGUIPainter
'GUIPainter'

#toolsImageEditor
'BitmapEditor'

#toolsMenuEditor
'MenuEditor'

#toolsChangesBrowser
'Changes Browser'

#toolsMiscProjectsNewProject
'New Project'

#toolsNewChangesBrowser
'ChangesBrowser (new GUI)'

#toolsOldChangesBrowser
'ChangesBrowser (old GUI)'

#toolsWorkspace
'Workspace'

)
!

helpSpec
    "This resource specification was automatically generated
     by the UIHelpTool of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIHelpTool may not be able to read the specification."

    "
     UIHelpTool openOnClass:NewLauncher    
    "

    <resource: #help>

    ^super helpSpec addPairsFrom:#(

#aboutLicenseConditions
'Show the license conditions of ST/X.'

#chickenFun
'Watch your views'

#classes
'Class functions.'

#classesClassBrowser
'Open a dialog for defining and opening a Class Browser on a class.'

#startChangeSetBrowser
'Open a Browser on recent changes (the ChangeSet)'

#classesClassBrowserOnChanges
'Open a Browser on changed classes'

#'classBrowserOnChangedClasses'
'Open a Browser on changed classes'

#'classBrowserOnChangedMethods'
'Open a Browser on changed methods'

#classesClassHierarchyBrowser
'Open a dialog for defining and opening a Class Hierarchy Browser on a class.'

#classesClassTreeBrowser
'Open a Class Tree View.'

#classesFullClassBrowser
'Open a dialog for defining and opening a Full Class Browser on a class.'

#classesImplementors
'Find all methods which implement a particular message'

#classesRemoveAllTracePoints
'Remove all trace- and break-points.'

#classesResourceMethods
'Open a dialog for searching resource methods.'

#classesSenders
'Find all methods which send a particular message.'

#classesShowTracePoints
'Browse mthods with a Trace- or Break-point.'

#classesSpecial
'Special class functions.'

#classesSpecialReferencesToUndeclared
'Browse methods refering to undeclared variables.'

#classesSpecialReferencesToUnboundGlobals
'rbowse methods refering to unbound globals.'

#classesSystemBrowser
'Open a System Browser.'

#classesSystemBrowserOnClass
'Open a System Browser on a previously visited class.'

#demos
'Demo programs.'

#demos3D
'3D GL graphic demos.'

#demos3DcubeSolid
'A rotating solid cube.'

#demos3DcubeWire
'A rotating wireframe cube.'

#demos3Ddoughnut
'A rotating wireframe doughnut.'

#demos3Dlogo
'The ST/X logo.'

#demos3Dplane
'A rotating plane.'

#demos3Dplanet
'Two spheres - one rotating around the other.'

#demos3Drubics
'A rubics cube - with interaction.'

#demos3Dsphere
'A rotating wireframe sphere.'

#demos3Dteapot
'A teopot.'

#demos3Dtetra
'A rotating tetrahedron.'

#demosAnimations
'Simple animation demos.'

#demosCalculator
'Opens a calculator with decimal to hex conversion.'

#demosCalendar
'Opens a GUI on the cal unix program.'

#demosClock
'Opens an analog clock application.'

#demosCommander
'Opens a demo for the Commander class.'

#demosDigitalClock
'Opens a digital clock application'

#demosFTP
'Opens a simple FTP interface demo.'

#demosFractalPatterns
'Opens a view displaying fractal patterns.'

#demosFractalPlants
'Opens a view displaying fractal plants (iterated function systems).'

#demosGUI
'GUI builder demos.'

#demosGUICalculator
'Calculator built using the GUI builder.'

#demosGUIWidgets
'GUI widgets usage.'

#demosGames
'Games.'

#demosGeometric
'Various demos displaying geometric designs.'

#demosGlobe
'Opens a rotating globe animation demo.'

#demosGoodies
'Goodies and Utilities.'

#demosGraphicEditors
'Graphic editing demos.'

#demosGraphicEditorsDrawTool
'Object drawing demo.'

#demosGraphicEditorsLogicTool
'Simulating Logic demo.'

#demosGraphicEditorsPaintTool
'Painting demo.'

#demosLSystems
'Opens a view displaying fractal patterns using Lindenmayer Systems.'

#demosMail
'Opens a simple mail viewer demo.'

#demosMandel
'Opens a view displaying the mandelbrot set.'

#demosMoreFractalPatterns
'Opens a view with more fractal patterns.'

#demosNews
'Opens a simple news reader demo.'

#demosPen
'Opens a demo for the Pen class.'

#demosRemoteLauncher
'Opens a launcher on a remote display.'

#demosTelnet
'Opens a Telnet terminal demo.'

#demosWalkingMan
'Opens a walking man animation demo.'

#fileApplicationBuilder
'Open an Application Builder for building stand alone ST/X-applications.'

#fileFileBrowser
'Open a FileBrowser to manipulate files.'

#fileBrowserV2
'Open a new, improved FileBrowser to manipulate files.'

#fileLibraryBuilder
'Open a Library Builder for building binary class libraries.'

#fileModules
'Show class libraries and other modules.'

#fileSaveImage
'Save a snapshot image of ST/X into the current snapshot file.'

#fileSaveImageAs
'Save a snapshot image of ST/X into a file.'

#gamesPingPong
'Play classic PingPong against the computer.'

#gamesPingPong2
'Play classic PingPong against a friend.'

#gamesReversi
'The game of reversi (an embedded Java applet)'

#gamesTetris
'The tetris game - written in Smalltalk.'

#gamesTicTacToe
'Play TicTacToe against the computer.'

#gamesTicTacToe2
'Play TicTacToe against a friend.'

#helpActiveHelp
'Toggle display of active help texts in browsers.'

#helpClassDocumentation
'Show the smalltalk class documentation.'

#helpIndex
'Show the index of the online documentation.'

#helpPrintDocumentation
'Print various parts of the ST/X documentation.'

#helpSTXOnlineDocumentation
'Show the ST/X online documentation.'

#helpWhatsNew
'Show the latest news about the ST/X documentation.'

#newSystemBrowser
'Open the new, improved System Browser.'

#settingsCommunications
'Change communication settings.'

#settingsCompilation
'Change compiler settings.'

#settingsFonts
'Change of the font defaults.'

#settingsKeyboardMappings
'Show the keyboard mappings.'

#settingsLanguage
'Change the national language.'

#settingsLoadSettings
'Restore the settings from a file.'

#settingsMessages
'Change the settings for info- / error-messagess.'

#settingsMisc
'Misc other settings.'

#settingsMouse
'Configure the mouse'

#settingsObjectMemory
'Change the object memory settings.'

#settingsPrinter
'Change the printer setup.'

#settingsSaveSettings
'Save the current settings to a file.'

#settingsScreen
'Change the display screen settings.'

#settingsSourceAndDebugger
'Change the settings of the source code management.'

#settingsTools
'Change tool settings.'

#settingsViewStyle
'Change the current view style.'

#system
'System tools.'

#systemEventTrace
'Select a view to toggle the event trace for it.'

#systemEventView
'Open a view and trace its window events on the console.'

#systemGarbageCollect
'Reclaim unused memory.'

#systemGarbageCollectAndCompress
'Reclaim unused memory and minimize the amount of used memory.'

#systemInterruptLatency
'Open an Interrupt Latency Monitor displaying methods which block interrupts for longer than a given time goal.'

#systemMemory
'Display object memory statistics.'

#systemMemoryUsage
'Display object memory usage by class.'

#systemProcesses
'Open a Process Monitor displaying ST/X processes.'

#systemSemaphores
'Open a Semaphore Monitor displaying ST/X semaphores.'

#tools
'Tools.'

#toolsChangesBrowser
'Open a Changes Browser.'

#toolsGUIPainter
'Open a GUI Painter for graphical user interface construction.'

#toolsImageEditor
'Open a Bitmap Image Editor.'

#toolsMenuEditor
'Open a Menu Editor for building menus and toolBars.'

#toolsMisc
'Misc Tools.'

#toolsMiscNewChangesBrowser
'Open a ChangesBrowser (new GUI).'

#toolsMiscNewLauncher
'(Re-)open a Launcher (new GUI).'

#toolsMiscOldChangesBrowser
'Open a ChangesBrowser (old GUI).'

#toolsMiscOldLauncher
'Open an OldLauncher.'

#toolsMiscProjects
'Project functions.'

#toolsMiscProjectsNewProject
'Create a new project.'

#toolsMiscProjectsSelectProject
'Select an existing project and reopen its windows.'

#toolsNewChangesBrowser
'Open the new changes browser.'

#toolsOldChangesBrowser
'Open the old changes browser.'

#toolsProjects
''

#toolsTerminal
'Open a terminal view (aka xterm)'

#toolsWorkspace
'Open a Workspace for evaluating smalltalk expressions.'

#windows
'Window functions.'

#windowsDeiconifyAll
'Restore all minimized ST/X windows.'

#windowsFindAndDestroy
'Select an ST/X window by name and destroy it.'

#windowsFindAndMigrate
'Select an ST/X window by name and move it to another display.'

#windowsFindAndMigrateBack
'Select an ST/X window by name and move it (back) to this screen.'

#windowsFindAndRaise
'Select an ST/X window by name and raise it.'

#windowsGrapScreen
'Grab the whole screen and save it to a bitmap-file.'

#windowsGrapScreenArea
'Grab an area of the screen and save it to a bitmap-file.'

#windowsGrapWidget
'Grab a single widget and save it to a bitmap-file.'

#windowsGrapWindow
'Grab a window and save it to a bitmap-file.'

#windowsIconifyAll
'Minimize all ST/X windows to icons.'

#windowsMigrateAllWindows
'Migrate all ST/X windows to some other display.'

#windowsRedrawAll
'Redraw all ST/X windows.'

#windowsSelectAndDestroy
'Select a window and destroy it.'

#windowsSelectAndInspect
'Select an ST/X window and open an Inspector on it.'

#windowsSelectAndMigrate
'Select an ST/X window and move it to another display.'

#windowsViewTree
'Select an ST/X window and display its widget hierarchy.'

#windowsViewTreeAllScreens
'Display the widget hierarchies of all ST/X windows (on all displays).'

#windowsViewTreeAllViews
'Display the widget hierarchies of all ST/X windows (on this display).'

)
! !

!NewLauncher class methodsFor:'image specs'!

helpIcon
    <resource: #programImage>

    ^ToolbarIconLibrary help28x28Icon1
!

helpIcon2
    <resource: #programImage>

    ^ ToolbarIconLibrary help28x28Icon2
!

helpIcon3
    <resource: #programImage>

    ^ ToolbarIconLibrary help28x28Icon3
! !

!NewLauncher class methodsFor:'interface specs'!

windowSpec
    "This resource specification was automatically generated
     by the UIPainter of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIPainter may not be able to read the specification."

    "
     UIPainter new openOnClass:NewLauncher andSelector:#windowSpec
     NewLauncher new openInterface:#windowSpec
     NewLauncher open
    "

    <resource: #canvas>

    ^ 
     #(#FullSpec
        #name: #windowSpec
        #window: 
       #(#WindowSpec
          #label: 'Launcher'
          #name: 'Launcher'
          #min: #(#Point 374 44)
          #bounds: #(#Rectangle 13 23 304 225)
          #menu: #menu
          #icon: #windowIcon
        )
        #component: 
       #(#SpecCollection
          #collection: #(
           #(#MenuPanelSpec
              #name: 'menuToolbarView'
              #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 38 0)
              #menu: #menuToolbar
              #style: #(#FontDescription #helvetica #medium #roman 10)
            )
           #(#WorkspaceSpec
              #name: 'transcriptView'
              #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 -26 1.0)
              #hasHorizontalScrollBar: true
              #hasVerticalScrollBar: true
              #miniScrollerHorizontal: true
            )
           #(#UISubSpecification
              #name: 'infoBarSubSpec'
              #layout: #(#LayoutFrame 0 0.0 -26 1 0 1.0 0 1.0)
              #majorKey: #ToolApplicationModel
              #minorKey: #windowSpecForInfoBarWithClock
            )
           )
         
        )
      )

    "Modified: / 15.11.2001 / 22:42:53 / cg"
!

windowSpec_pda
    "This resource specification was automatically generated
     by the UIPainter of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIPainter may not be able to read the specification."

    "
     UIPainter new openOnClass:NewLauncher andSelector:#windowSpec_pda
     NewLauncher new openInterface:#windowSpec_pda
    "

    <resource: #canvas>

    ^ 
     #(#FullSpec
        #name: #'windowSpec_pda'
        #window: 
       #(#WindowSpec
          #label: 'Launcher'
          #name: 'Launcher'
          #min: #(#Point 100 20)
          #max: #(#Point 240 300)
          #bounds: #(#Rectangle 16 46 200 247)
          #menu: #'menu_pda'
          #icon: #windowIcon
        )
        #component: 
       #(#SpecCollection
          #collection: #(
           #(#MenuPanelSpec
              #name: 'menuToolbarView'
              #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 38 0)
              #menu: #'menuToolbar_pda'
              #style: #(#FontDescription #helvetica #medium #roman 10)
            )
           #(#WorkspaceSpec
              #name: 'transcriptView'
              #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 -26 1.0)
              #hasHorizontalScrollBar: true
              #hasVerticalScrollBar: true
              #miniScrollerHorizontal: true
              #miniScrollerVertical: false
            )
           #(#UISubSpecification
              #name: 'infoBarSubSpec'
              #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
              #majorKey: #ToolApplicationModel
              #minorKey: #windowSpecForInfoBarWithClock
            )
           )
         
        )
      )
! !

!NewLauncher class methodsFor:'menu configuration'!

addMenuItem:newItem in:where position:positionSpecOrNilArg space:space
    |positionSpecOrNil itemNameOrNil before launcherApp|

    (Transcript notNil 
    and:[ Transcript isStream not
    and:[ (launcherApp := Transcript application) notNil
    and:[ launcherApp isKindOf:self]]]) ifTrue:[
        "/ add to instance
        launcherApp addMenuItem:newItem in:where position:positionSpecOrNilArg space:space.
        ^ self
    ].

    positionSpecOrNil := positionSpecOrNilArg.
    positionSpecOrNil isArray ifTrue:[
        positionSpecOrNil size > 1 ifTrue:[
            itemNameOrNil := positionSpecOrNil at:2.
        ].
        positionSpecOrNil := positionSpecOrNil at:1.
    ].
    before := (positionSpecOrNil == #first) or:[positionSpecOrNil == #before].

    (where isNil or: [where = 'toolbar']) ifTrue:[
        UserAddedToolBarItems isNil ifTrue: [UserAddedToolBarItems := Dictionary new].
        (UserAddedToolBarItems contains:[:info | info item nameKey = newItem nameKey])
        ifFalse:[
            UserAddedToolBarItems
                at:newItem put:(AddedToolInfo new
                                            item:newItem;
                                            where:where;
                                            positionSpec:positionSpecOrNilArg;
                                            space:space;
                                            before:before;
                                            menuWithNewItem:nil;
                                            yourself)
        ]
    ].
    (where isNil or:[where startsWith:'menu']) ifTrue:[
        UserAddedMenuItems isNil ifTrue: [UserAddedMenuItems := Dictionary new].
        (UserAddedMenuItems contains:[:info | info item nameKey = newItem nameKey])
        ifFalse:[
            UserAddedMenuItems 
                at:newItem put:(AddedToolInfo new
                                            item:newItem;
                                            where:where;
                                            positionSpec:positionSpecOrNilArg;
                                            space:space;
                                            before:before;
                                            menuWithNewItem:nil;
                                            yourself)
        ]
    ]
!

removeAllUserAddedTools
    UserAddedToolBarItems := nil.
    UserAddedMenuItems := nil.

    "
     self removeAllUserAddedTools
    "
!

removeUserTool:toolNameOrMenuItem
    "removes a menu item labeled toolName
     This can be invoked by a classes #deinitialize method, 
     to remove its item from the toolbar or menu.
    "

    self removeUserTool:toolNameOrMenuItem from:UserAddedToolBarItems.
    self removeUserTool:toolNameOrMenuItem from:UserAddedMenuItems.

    "
     Transcript topView application
        removeUserTool:'Bar' 
    "
    "
     Transcript topView application
        removeUserTool:'Foo' 
    "


!

removeUserTool:toolNameOrMenuItem from:addedToolsCollection
    "removes a menu item labeled toolName
     This can be invoked by a classes #deinitialize method, 
     to remove its item from the toolbar or menu.
    "

    |info space menuIndex whichMenu before menuItemToRemove|

    addedToolsCollection size == 0 ifTrue: [^nil].

    [true] whileTrue:[
        (toolNameOrMenuItem isString or:[toolNameOrMenuItem isSymbol]) ifTrue:[
            info := addedToolsCollection detect:[:eachInfo | |eachItem|
                                            eachItem := eachInfo item.
                                            (eachItem nameKey notNil and:[ toolNameOrMenuItem = eachItem nameKey])
                                            or:[ (eachItem activeHelpKey notNil and:[ toolNameOrMenuItem = eachItem activeHelpKey])
                                            or:[ (eachItem label notNil and:[ toolNameOrMenuItem = eachItem label])]]
                                          ]
                                   ifNone:nil.
        ] ifFalse:[
            info := addedToolsCollection detect:[:eachInfo | |eachItem| eachItem := eachInfo item. (eachItem == toolNameOrMenuItem)] ifNone:nil.
        ].
        info isNil ifTrue:[^ self].

        space     := info space.
        whichMenu := info menuWithNewItem.
        menuItemToRemove := info item.
        before := info before.

        whichMenu notNil ifTrue:[
            menuIndex := whichMenu findFirst:[:item | 
                                                    (item nameKey notNil and:[item nameKey == menuItemToRemove nameKey])
                                                    or:[ (item activeHelpKey notNil and:[item activeHelpKey == menuItemToRemove activeHelpKey])
                                                    or:[ (item label notNil and:[item label = menuItemToRemove label]) ]]
                                             ].
            menuIndex ~~ 0 ifTrue:[              
                whichMenu remove: menuIndex.
                space ifTrue: [
                    whichMenu remove:(menuIndex - (before ifTrue:0 ifFalse:1))
                ].
            ].
        ].
        addedToolsCollection removeKey:menuItemToRemove. 
        ^ self
    ].


    "
     Transcript topView application
        removeUserTool:'Bar' 
    "
    "
     Transcript topView application
        removeUserTool:'Foo' 
    "
! !

!NewLauncher class methodsFor:'menu specs'!

aboutMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#aboutMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher aboutMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'About Smalltalk/X...'
            #translateLabel: true
            #value: #openAbout
            #activeHelpKey: #aboutSTX
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Licence Conditions'
            #translateLabel: true
            #value: #openLicenseConditions
            #activeHelpKey: #aboutLicenseConditions
          )
         )
        nil
        nil
      )
!

classesMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#classesMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher classesMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'System Browser'
            #translateLabel: true
            #nameKey: #systemBrowser
            #value: #openApplication:
            #activeHelpKey: #classesSystemBrowser
            #showBusyCursorWhilePerforming: true
            #argument: 'SystemBrowser'
            #labelImage: #(#ResourceRetriever nil #startSystemBrowserIcon '')
            #submenuChannel: #menuClassHistory
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Recent Changes'
            #translateLabel: true
            #nameKey: #startChangeSetBrowser
            #value: #startChangeSetBrowser
            #activeHelpKey: #startChangeSetBrowser
            #showBusyCursorWhilePerforming: true
          )
         #(#MenuItem
            #label: 'Changed Classes'
            #translateLabel: true
            #nameKey: #classBrowserOnChanges
            #value: #startClassBrowserOnChanges
            #activeHelpKey: #classesClassBrowserOnChanges
            #showBusyCursorWhilePerforming: true
          )
         #(#MenuItem
            #label: 'Changed Methods'
            #translateLabel: true
            #nameKey: #classBrowserOnChangedMethods
            #value: #startClassBrowserOnChangedMethods
            #activeHelpKey: #classBrowserOnChangedMethods
            #showBusyCursorWhilePerforming: true
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Special Browsers'
            #translateLabel: true
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Class Browser On...'
                  #translateLabel: true
                  #nameKey: #classBrowserOn
                  #value: #startClassBrowser
                  #activeHelpKey: #classesClassBrowser
                  #showBusyCursorWhilePerforming: true
                )
               #(#MenuItem
                  #label: 'Full Class Browser On...'
                  #translateLabel: true
                  #value: #startFullClassBrowser
                  #activeHelpKey: #classesFullClassBrowser
                  #showBusyCursorWhilePerforming: true
                )
               #(#MenuItem
                  #label: 'Class Hierarchy Browser On...'
                  #translateLabel: true
                  #value: #startClassHierarchyBrowser
                  #activeHelpKey: #classesClassHierarchyBrowser
                  #showBusyCursorWhilePerforming: true
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Snapshot Image Browser...'
                  #translateLabel: true
                  #value: #startSnapshotImageBrowser
                  #showBusyCursorWhilePerforming: true
                )
               #(#MenuItem
                  #label: 'Remote Image Browser...'
                  #translateLabel: true
                  #value: #startRemoteImageBrowser
                  #enabled: #remoteImageBrowserAvailable
                  #showBusyCursorWhilePerforming: true
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: 'Class Tree'
            #translateLabel: true
            #value: #openApplication:
            #activeHelpKey: #classesClassTreeBrowser
            #showBusyCursorWhilePerforming: true
            #argument: 'ClassTreeGraphView'
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Implementors Of...'
            #translateLabel: true
            #value: #browseImplementors
            #activeHelpKey: #classesImplementors
            #showBusyCursorWhilePerforming: true
          )
         #(#MenuItem
            #label: 'Senders Of...'
            #translateLabel: true
            #value: #browseSenders
            #activeHelpKey: #classesSenders
            #showBusyCursorWhilePerforming: true
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Special'
            #translateLabel: true
            #nameKey: #special
            #activeHelpKey: #classesSpecial
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Method Finder'
                  #translateLabel: true
                  #value: #openMethodFinder
                )
               #(#MenuItem
                  #label: 'Find Resource Methods...'
                  #translateLabel: true
                  #value: #browseResources
                  #activeHelpKey: #classesResourceMethods
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'References to Unbound Globals'
                  #translateLabel: true
                  #value: #browseUnboundGlobals
                  #activeHelpKey: #classesSpecialReferencesToUnboundGlobals
                )
               #(#MenuItem
                  #label: 'References to Undeclared'
                  #translateLabel: true
                  #value: #browseUndeclared
                  #activeHelpKey: #classesSpecialReferencesToUndeclared
                )
               #(#MenuItem
                  #label: 'Clear Undeclared Variables'
                  #translateLabel: true
                  #value: #clearUndeclaredVariables
                  #activeHelpKey: #classesSpecialReferencesToUndeclared
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Show all Break && Trace Points'
                  #translateLabel: true
                  #value: #browseAllBreakAndTracePoints
                  #activeHelpKey: #classesShowTracePoints
                )
               #(#MenuItem
                  #label: 'Remove all Break && Trace Points'
                  #translateLabel: true
                  #value: #removeAllBreakAndTracePoints
                  #activeHelpKey: #classesRemoveAllTracePoints
                )
               )
              nil
              nil
            )
          )
         )
        nil
        nil
      )
!

demosMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#demosMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher demosMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'Goodies'
            #translateLabel: true
            #activeHelpKey: #demosGoodies
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Clock'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosClock
                  #argument: 'Clock'
                )
               #(#MenuItem
                  #label: 'Digital Clock'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosDigitalClock
                  #argument: 'DigitalClockView'
                )
               #(#MenuItem
                  #label: 'Calendar'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosCalendar
                  #argument: 'Calendar'
                )
               #(#MenuItem
                  #label: 'Calculator'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosCalculator
                  #argument: 'CalculatorView'
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Mail Tool'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosMail
                  #argument: 'MailView'
                )
               #(#MenuItem
                  #label: 'News Tool'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosNews
                  #argument: 'NewsView'
                )
               #(#MenuItem
                  #label: 'FTP Tool'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosFTP
                  #argument: 'FTPTool'
                )
               #(#MenuItem
                  #label: 'Telnet Tool'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosTelnet
                  #argument: 'TelnetTool'
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Remote Launcher...'
                  #translateLabel: true
                  #value: #startRemoteLauncher
                  #activeHelpKey: #demosRemoteLauncher
                )
               #(#MenuItem
                  #label: 'PDA Launcher...'
                  #translateLabel: true
                  #value: #startPDALauncher
                  #activeHelpKey: #demosPDALauncher
                  #isVisible: #hasPDALauncher
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: 'Games'
            #translateLabel: true
            #activeHelpKey: #demosGames
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Blocks (Tetris look alike)'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #gamesTetris
                  #argument: 'Games::Tetris'
                )
               #(#MenuItem
                  #label: 'Tic Tac Toe'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #gamesTicTacToe
                  #argument: 'Games::TicTacToeGame'
                )
               #(#MenuItem
                  #label: 'Tic Tac Toe (2 Players)'
                  #translateLabel: true
                  #value: #startTicTacToe2
                  #activeHelpKey: #gamesTicTacToe2
                )
               #(#MenuItem
                  #label: 'PingPong'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #gamesPingPong
                  #argument: 'Games::PingPongGame'
                )
               #(#MenuItem
                  #label: 'PingPong - (2 Players)'
                  #translateLabel: true
                  #value: #startPingPong2
                  #activeHelpKey: #gamesPingPong2
                )
               #(#MenuItem
                  #label: 'Reversi (Java)'
                  #translateLabel: true
                  #value: #startReversi
                  #activeHelpKey: #gamesReversi
                )
               #(#MenuItem
                  #label: 'Towers of Hanoi (Prolog)'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'Prolog::TowersOfHanoiApplication'
                )
               #(#MenuItem
                  #label: 'MasterMind (Prolog)'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'Prolog::MasterMind'
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: 'Geometric Designs'
            #translateLabel: true
            #activeHelpKey: #demosGeometric
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Pen Demo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosPen
                  #argument: 'PenDemo'
                )
               #(#MenuItem
                  #label: 'Commander Demo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosCommander
                  #argument: 'CommanderDemo'
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Mandel'
                  #translateLabel: true
                  #value: #openMandelbrotDemo
                  #activeHelpKey: #demosMandel
                )
               #(#MenuItem
                  #label: 'Fractal Plants Demo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosFractalPlants
                  #argument: 'FractalPlantsDemo'
                )
               #(#MenuItem
                  #label: 'Fractal Patterns Demo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosFractalPatterns
                  #argument: 'FractalPatternsDemo'
                )
               #(#MenuItem
                  #label: 'Lindenmayer Patterns Demo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosLSystems
                  #argument: 'LSystemsDemo'
                )
               #(#MenuItem
                  #label: 'More Fractal Patterns Demo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosMoreFractalPatterns
                  #argument: 'ArmchairUniverseDemo'
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: 'Simple Animations'
            #translateLabel: true
            #activeHelpKey: #demosAnimations
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Walking Man'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosWalkingMan
                  #argument: 'Animation'
                )
               #(#MenuItem
                  #label: 'Walking Girl'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosWalkingMan
                  #argument: 'WalkingGirl'
                )
               #(#MenuItem
                  #label: 'Globe Demo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosGlobe
                  #argument: 'GlobeDemo'
                )
               #(#MenuItem
                  #label: 'Chicken Fun'
                  #translateLabel: true
                  #value: #startStopDemo:
                  #activeHelpKey: #chickenFun
                  #argument: 'ChickenFun'
                  #indication: #chickenFunIsRunning
                )
               #(#MenuItem
                  #label: 'Chicks Eyes'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #chickenFun
                  #argument: 'ChickenEyes'
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: '3D GL Graphics'
            #translateLabel: true
            #isVisible: #displaySupportsGLDrawing
            #activeHelpKey: #demos3D
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Plane'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3Dplane
                  #argument: 'GLPlaneDemoView2'
                )
               #(#MenuItem
                  #label: 'Tetra'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3Dtetra
                  #argument: 'GLTetraDemoView'
                )
               #(#MenuItem
                  #label: 'Cube (Wireframe)'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3DcubeWire
                  #argument: 'GLWireCubeDemoView'
                )
               #(#MenuItem
                  #label: 'Cube (Solid)'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3DcubeSolid
                  #argument: 'GLCubeDemoView'
                )
               #(#MenuItem
                  #label: 'Sphere (Wireframe)'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3Dsphere
                  #argument: 'GLWireSphereDemoView'
                )
               #(#MenuItem
                  #label: 'Doughnut (Wireframe)'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3Ddoughnut
                  #argument: 'GLDoughnutDemoView'
                )
               #(#MenuItem
                  #label: 'Planet'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3Dplanet
                  #argument: 'GLPlanetDemoView'
                )
               #(#MenuItem
                  #label: 'Teapot'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3Dteapot
                  #argument: 'GLTeapotDemo'
                )
               #(#MenuItem
                  #label: 'Logo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demos3Dlogo
                  #argument: 'Logo3DView1'
                )
               #(#MenuItem
                  #label: 'Rubics Cube'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosCommander
                  #argument: 'RubicsCubeView'
                )
               #(#MenuItem
                  #label: 'X/Y Graph'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'GLXYGraph'
                )
               #(#MenuItem
                  #label: 'X/Y Graph Widget'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'CodingExamples_GUI::GLXYGraph3DDemo'
                )
               #(#MenuItem
                  #label: 'X/Y Graph Animated'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'CodingExamples_GUI::AnimatedGLXYGraph3DDemo'
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Cube (Light)'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'GLCubeDemoView2'
                )
               #(#MenuItem
                  #label: 'Cube (Light and Texture)'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'GLBrickCubeDemoView'
                )
               #(#MenuItem
                  #label: 'Sphere (Light)'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'GLSphereDemoView2'
                )
               #(#MenuItem
                  #label: 'Colored Octahedron'
                  #translateLabel: true
                  #value: #openDemo:
                  #argument: 'GLOctaHedronDemoView'
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: 'Graphic Editors'
            #translateLabel: true
            #activeHelpKey: #demosGraphicEditors
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Draw Tool'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosGraphicEditorsDrawTool
                  #argument: 'DrawTool'
                )
               #(#MenuItem
                  #label: 'Logic Tool'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosGraphicEditorsLogicTool
                  #argument: 'LogicTool'
                )
               #(#MenuItem
                  #label: 'Paint Demo'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosGraphicEditorsPaintTool
                  #argument: 'ColorDrawDemo3'
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: 'GUI'
            #translateLabel: true
            #activeHelpKey: #demosGUI
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Widget Gallery'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosGUIWidgets
                  #argument: 'CodingExamples_GUI::GUIDemo'
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Calculator'
                  #translateLabel: true
                  #value: #openDemo:
                  #activeHelpKey: #demosGUICalculator
                  #argument: 'CodingExamples_GUI::GUIDemoCalculator'
                )
               )
              nil
              nil
            )
          )
         )
        nil
        nil
      )
!

fileMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#fileMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher fileMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'File Browser'
            #translateLabel: true
            #nameKey: #fileBrowser
            #value: #openApplication:
            #activeHelpKey: #fileFileBrowser
            #argument: 'FileBrowser'
            #labelImage: #(#ResourceRetriever nil #startFileBrowserIcon '')
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Save Image'
            #translateLabel: true
            #nameKey: #saveImage
            #value: #saveImage
            #activeHelpKey: #fileSaveImage
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
          )
         #(#MenuItem
            #label: 'Save Image As...'
            #translateLabel: true
            #nameKey: #saveImageAs
            #value: #saveImageAs
            #activeHelpKey: #fileSaveImageAs
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Exit Smalltalk...'
            #translateLabel: true
            #nameKey: #exitSmalltalk
            #isVisible: #isMainLauncherHolder
            #value: #exit
            #activeHelpKey: #fileExit
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
          )
         #(#MenuItem
            #label: 'Close...'
            #translateLabel: true
            #isVisible: #isNotMainLauncherHolder
            #value: #closeRequest
            #activeHelpKey: #fileClose
          )
         )
        nil
        nil
      )
!

helpMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#helpMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher helpMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'What''s New in the Documentation'
            #translateLabel: true
            #value: #startWhatsNewDocumentation
            #activeHelpKey: #helpWhatsNew
          )
         #(#MenuItem
            #label: 'What''s New in ST/X'
            #translateLabel: true
            #value: #startWhatsNewSTX
            #activeHelpKey: #helpReleaseNotes
          )
         #(#MenuItem
            #label: 'Keyword Index'
            #translateLabel: true
            #value: #startDocumentationIndex
            #activeHelpKey: #helpIndex
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'ST/X Online Documentation'
            #translateLabel: true
            #value: #startDocumentationTool
            #activeHelpKey: #helpSTXOnlineDocumentation
            #labelImage: #(#ResourceRetriever nil #helpIcon2 'ST/X Online Documentation')
          )
         #(#MenuItem
            #label: 'Class Documentation'
            #translateLabel: true
            #value: #startClassDocumentation
            #activeHelpKey: #helpClassDocumentation
            #labelImage: #(#ResourceRetriever nil #helpIcon 'Class Documentation')
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Print Documentation...'
            #translateLabel: true
            #value: #showBookPrintDocument
            #activeHelpKey: #helpPrintDocumentation
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'FlyBy Help'
            #translateLabel: true
            #value: #toggleFlyByHelp:
            #activeHelpKey: #helpActiveHelp
            #indication: #activeHelp
          )
         #(#MenuItem
            #label: 'Show Help Texts'
            #translateLabel: true
            #activeHelpKey: #helpShowHelp
            #indication: #showingHelp:
          )
         )
        nil
        nil
      )
!

menu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#menu
     (Menu new fromLiteralArrayEncoding:(NewLauncher menu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #activeHelpKey: #about
            #label: 'About'
            #nameKey: #about
            #translateLabel: true
            #submenuChannel: #aboutMenu
            #labelImage: #(#ResourceRetriever nil #menuIcon)
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #activeHelpKey: #file
            #label: '&File'
            #nameKey: #file
            #translateLabel: true
            #submenuChannel: #fileMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #activeHelpKey: #classes
            #label: 'Classes'
            #nameKey: #classes
            #translateLabel: true
            #submenuChannel: #classesMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #activeHelpKey: #tools
            #label: 'Tools'
            #nameKey: #tools
            #translateLabel: true
            #submenuChannel: #toolsMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #activeHelpKey: #system
            #label: 'System'
            #nameKey: #system
            #translateLabel: true
            #submenuChannel: #systemMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #activeHelpKey: #settings
            #label: 'Settings'
            #nameKey: #settings
            #translateLabel: true
            #isVisible: #useOldSettinsApplication
            #submenuChannel: #settingsMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #activeHelpKey: #windows
            #label: 'Windows'
            #nameKey: #windows
            #translateLabel: true
            #submenuChannel: #windowsMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #activeHelpKey: #demos
            #label: 'Demos'
            #nameKey: #demos
            #translateLabel: true
            #submenuChannel: #demosMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #activeHelpKey: #help
            #label: '&Help'
            #nameKey: #help
            #translateLabel: true
            #startGroup: #right
            #submenuChannel: #helpMenu
            #keepLinkedMenu: true
          )
         )
        nil
        nil
      )
!

menuToolbar
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#menuToolbar
     (Menu new fromLiteralArrayEncoding:(NewLauncher menuToolbar)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #activeHelpKey: #toolsWorkspace
            #label: 'open workspace'
            #itemValue: #openWorkspace
            #nameKey: #workspace
            #translateLabel: true
            #isButton: true
            #labelImage: #(#ResourceRetriever nil #startWorkspaceIcon)
          )
         #(#MenuItem
            #activeHelpKey: #fileFileBrowser
            #label: 'open file browser'
            #itemValue: #openApplication:
            #nameKey: #fileBrowser
            #translateLabel: true
            #isButton: true
            #isVisible: #fileBrowserItemVisible
            #submenuChannel: #menuFileHistory
            #labelImage: #(#ResourceRetriever nil #startFileBrowserIcon)
            #argument: 'FileBrowser'
          )
         #(#MenuItem
            #activeHelpKey: #fileSaveImage
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'save image'
            #itemValue: #saveImage
            #nameKey: #saveImage
            #translateLabel: true
            #isButton: true
            #labelImage: #(#ResourceRetriever nil #saveImageIcon)
          )
         #(#MenuItem
            #label: ''
          )
         #(#MenuItem
            #activeHelpKey: #classesSystemBrowser
            #label: 'open system browser'
            #itemValue: #openApplication:
            #nameKey: #systemBrowser
            #translateLabel: true
            #isButton: true
            #isVisible: #systemBrowserItemVisible
            #submenuChannel: #menuClassHistory
            #labelImage: #(#ResourceRetriever nil #startSystemBrowserIcon)
            #argument: 'SystemBrowser'
          )
         #(#MenuItem
            #activeHelpKey: #classesSystemBrowserOnClass
            #label: 'System Browser On Class'
            #translateLabel: true
            #isButton: true
            #isVisible: false
            #submenuChannel: #menuClassHistory
            #labelImage: #(#ResourceRetriever nil #startSystemBrowserOnHistoryClassIcon)
          )
         #(#MenuItem
            #activeHelpKey: #toolsChangesBrowser
            #label: 'open changes browser'
            #itemValue: #startChangesBrowser
            #nameKey: #changesBrowser
            #translateLabel: true
            #isButton: true
            #submenuChannel: #menuChangeHistory
            #labelImage: #(#ResourceRetriever nil #startChangesBrowserIcon)
          )
         #(#MenuItem
            #label: ''
          )
         #(#MenuItem
            #activeHelpKey: #toolsGUIPainter
            #label: 'open GUI Builder'
            #itemValue: #openApplication:
            #nameKey: #guiBuilder
            #translateLabel: true
            #isButton: true
            #labelImage: #(#ResourceRetriever nil #startUIPainterIcon)
            #argument: 'UIPainter'
          )
         #(#MenuItem
            #activeHelpKey: #toolsMenuEditor
            #label: 'open menu editor'
            #itemValue: #openApplication:
            #nameKey: #menuEditor
            #translateLabel: true
            #isButton: true
            #labelImage: #(#ResourceRetriever nil #startMenuEditorIcon)
            #argument: 'MenuEditor'
          )
         #(#MenuItem
            #activeHelpKey: #toolsImageEditor
            #label: 'open image editor'
            #itemValue: #openApplication:
            #nameKey: #imageEditor
            #translateLabel: true
            #isButton: true
            #labelImage: #(#ResourceRetriever nil #startImageEditorIcon)
            #argument: 'ImageEditor'
          )
         #(#MenuItem
            #label: ''
          )
         #(#MenuItem
            #activeHelpKey: #systemGarbageCollectAndCompress
            #label: 'garbage collect and compress'
            #itemValue: #compressingGarbageCollect
            #nameKey: #garbageCollect
            #translateLabel: true
            #isButton: true
            #isVisible: false
            #labelImage: #(#ResourceRetriever nil #garbageCollectIcon)
          )
         #(#MenuItem
            #activeHelpKey: #helpSTXOnlineDocumentation
            #label: 'help'
            #itemValue: #startDocumentationTool
            #nameKey: #help
            #translateLabel: true
            #isButton: true
            #startGroup: #right
            #labelImage: #(#ResourceRetriever nil #helpIcon2)
          )
         )
        nil
        nil
      )
!

menuToolbar_pda
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#menuToolbar_pda
     (Menu new fromLiteralArrayEncoding:(NewLauncher menuToolbar_pda)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'open file browser'
            #isButton: true
            #nameKey: #fileBrowser
            #value: #openApplication:
            #activeHelpKey: #fileFileBrowser
            #argument: 'FileBrowser'
            #labelImage: #(#ResourceRetriever nil #startFileBrowserIcon)
          )
         #(#MenuItem
            #label: ''
          )
         #(#MenuItem
            #label: 'open system browser'
            #isButton: true
            #nameKey: #systemBrowser
            #value: #openApplication:
            #activeHelpKey: #classesSystemBrowser
            #argument: 'SystemBrowser'
            #labelImage: #(#ResourceRetriever nil #startSystemBrowserIcon)
            #submenuChannel: #menuClassHistory
          )
         #(#MenuItem
            #label: ''
          )
         #(#MenuItem
            #label: 'help'
            #translateLabel: true
            #isButton: true
            #nameKey: #help
            #startGroup: #right
            #value: #startDocumentationTool
            #activeHelpKey: #helpSTXOnlineDocumentation
            #labelImage: #(#ResourceRetriever nil #helpIcon2)
          )
         )
        nil
        nil
      )
!

menu_pda
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#menu_pda
     (Menu new fromLiteralArrayEncoding:(NewLauncher menu_pda)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'About'
            #translateLabel: true
            #nameKey: #about
            #activeHelpKey: #settings
            #labelImage: #(#ResourceRetriever nil #menuIcon)
            #submenuChannel: #aboutMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #label: '&File'
            #translateLabel: true
            #nameKey: #file
            #activeHelpKey: #settings
            #submenuChannel: #fileMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #label: 'Apps'
            #translateLabel: true
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Classes'
                  #translateLabel: true
                  #nameKey: #classes
                  #activeHelpKey: #settings
                  #submenuChannel: #classesMenu
                  #keepLinkedMenu: true
                )
               #(#MenuItem
                  #label: 'Tools'
                  #translateLabel: true
                  #nameKey: #tools
                  #activeHelpKey: #settings
                  #submenuChannel: #toolsMenu
                  #keepLinkedMenu: true
                )
               #(#MenuItem
                  #label: 'System'
                  #translateLabel: true
                  #nameKey: #system
                  #activeHelpKey: #settings
                  #submenuChannel: #systemMenu
                  #keepLinkedMenu: true
                )
               #(#MenuItem
                  #label: 'Demos'
                  #translateLabel: true
                  #nameKey: #demos
                  #activeHelpKey: #settings
                  #submenuChannel: #demosMenu
                  #keepLinkedMenu: true
                )
               )
              nil
              nil
            )
          )
         #(#MenuItem
            #label: 'Views'
            #translateLabel: true
            #nameKey: #windows
            #activeHelpKey: #settings
            #submenuChannel: #windowsMenu
            #keepLinkedMenu: true
          )
         #(#MenuItem
            #label: '&Help'
            #translateLabel: true
            #nameKey: #help
            #startGroup: #right
            #activeHelpKey: #settings
            #submenuChannel: #helpMenu
            #keepLinkedMenu: true
          )
         )
        nil
        nil
      )
!

settingsMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#settingsMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher settingsMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #activeHelpKey: #settingsLanguage
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Language...'
            #itemValue: #languageSetting
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsKeyboardMappings
            #label: 'Keyboard Mappings...'
            #itemValue: #keyboardSetting
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsViewStyle
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'View Style...'
            #itemValue: #viewStyleSetting
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsFonts
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Fonts...'
            #itemValue: #fontSettings
            #translateLabel: true
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #activeHelpKey: #settingsMessages
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Messages...'
            #itemValue: #messageSettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsCompilation
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Compilation...'
            #itemValue: #compilerSettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsObjectMemory
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Object Memory...'
            #itemValue: #memorySettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsSourceAndDebugger
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Source and Debugger...'
            #itemValue: #sourceAndDebuggerSettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsTools
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Tools...'
            #itemValue: #toolSettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsJava
            #label: 'Java...'
            #itemValue: #javaSettings
            #translateLabel: true
            #isVisible: #javaSupportPresent
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #activeHelpKey: #settingsPrinter
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Printer...'
            #itemValue: #printerSettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsScreen
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Screen...'
            #itemValue: #displaySettings
            #translateLabel: true
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #activeHelpKey: #settingsMisc
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Editing...'
            #itemValue: #editSettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsMisc
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Misc...'
            #itemValue: #miscSettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsCommunications
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Communications...'
            #itemValue: #communicationsSettings
            #translateLabel: true
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #activeHelpKey: #settingsSaveSettings
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Save Settings...'
            #itemValue: #saveSettings
            #translateLabel: true
          )
         #(#MenuItem
            #activeHelpKey: #settingsLoadSettings
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
            #label: 'Load Settings...'
            #itemValue: #loadSettings
            #translateLabel: true
          )
         )
        nil
        nil
      )
!

systemMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#systemMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher systemMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #activeHelpKey: #systemMemory
            #label: 'Memory'
            #itemValue: #openApplication:
            #translateLabel: true
            #argument: 'MemoryMonitor'
          )
         #(#MenuItem
            #activeHelpKey: #systemMemoryUsage
            #label: 'Memory Usage'
            #itemValue: #openApplication:
            #translateLabel: true
            #argument: 'MemoryUsageView'
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #activeHelpKey: #systemProcesses
            #label: 'Processes'
            #itemValue: #openApplication:
            #translateLabel: true
            #argument: 'ProcessMonitor'
          )
         #(#MenuItem
            #activeHelpKey: #systemSemaphores
            #label: 'Semaphores'
            #itemValue: #openApplication:
            #translateLabel: true
            #argument: 'SemaphoreMonitor'
          )
         #(#MenuItem
            #label: 'Modules...'
            #translateLabel: true
            #value: #objectModuleDialog
            #activeHelpKey: #fileModules
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
          )
         #(#MenuItem
            #label: 'Packages...'
            #translateLabel: true
            #isVisible: #packageDialogVisible
            #value: #packageDialog
            #activeHelpKey: #filePackages
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #activeHelpKey: #systemInterruptLatency
            #label: 'Interrupt Latency'
            #itemValue: #startLatencyMonitor
            #translateLabel: true
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #activeHelpKey: #systemEventView
            #label: 'Event View'
            #itemValue: #openApplication:
            #translateLabel: true
            #argument: 'EventMonitor'
          )
         #(#MenuItem
            #activeHelpKey: #systemEventTrace
            #label: 'Event Trace'
            #itemValue: #startStopEventTrace
            #translateLabel: true
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #activeHelpKey: #systemGarbageCollect
            #label: 'Collect Garbage'
            #itemValue: #garbageCollect
            #translateLabel: true
            #labelImage: #(#ResourceRetriever nil #garbageCollectIcon 'Collect Garbage')
          )
         #(#MenuItem
            #activeHelpKey: #systemGarbageCollectAndCompress
            #label: 'Collect Garbage and Compress'
            #itemValue: #compressingGarbageCollect
            #translateLabel: true
            #labelImage: #(#ResourceRetriever nil #garbageCollectIcon 'Collect Garbage And Compress')
          )
         #(#MenuItem
            #label: '-'
            #isVisible: #useNewSettinsApplication
          )
         #(#MenuItem
            #activeHelpKey: #systemMemory
            #label: 'Settings...'
            #itemValue: #openSettings
            #translateLabel: true
            #isVisible: #useNewSettinsApplication
          )
         )
        nil
        nil
      )
!

toolsMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#toolsMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher toolsMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'Workspace'
            #nameKey: #workspace
            #value: #openWorkspace
            #activeHelpKey: #toolsWorkspace
            #labelImage: #(#ResourceRetriever nil #startWorkspaceIcon 'Workspace')
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'GUI Painter'
            #nameKey: #guiPainter
            #value: #openApplication:
            #activeHelpKey: #toolsGUIPainter
            #argument: 'UIPainter'
            #labelImage: #(#ResourceRetriever nil #startUIPainterIcon 'GUI Painter')
          )
         #(#MenuItem
            #label: 'Menu Editor'
            #nameKey: #menuEditor
            #value: #openApplication:
            #activeHelpKey: #toolsMenuEditor
            #argument: 'MenuEditor'
            #labelImage: #(#ResourceRetriever nil #startMenuEditorIcon 'Menu Editor')
          )
         #(#MenuItem
            #label: 'Image Editor'
            #nameKey: #imageEditor
            #value: #openApplication:
            #activeHelpKey: #toolsImageEditor
            #argument: 'ImageEditor'
            #labelImage: #(#ResourceRetriever nil #startImageEditorIcon 'Image Editor')
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Change File Browser'
            #translateLabel: true
            #nameKey: #changesBrowser
            #value: #startChangesBrowser
            #activeHelpKey: #toolsChangesBrowser
            #labelImage: #(#ResourceRetriever nil #startChangesBrowserIcon 'Change File Browser')
          )
         #(#MenuItem
            #label: 'Bug Reporter'
            #translateLabel: true
            #nameKey: #bugMessages
            #isVisible: #bugReporterAvailable
            #value: #startBugMessages
            #labelImage: #(#ResourceRetriever #NewLauncher #bugReporterIcon 'Bug Reporter')
          )
         #(#MenuItem
            #label: 'SUnit Test'
            #translateLabel: true
            #nameKey: #startSUnitTestRunner
            #value: #startSUnitTestRunner
            #labelImage: #(#ResourceRetriever #NewLauncher #startSUnitIcon 'SUnit Test')
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Library Builder'
            #translateLabel: true
            #isVisible: #libraryBuilderAvailable
            #value: #openApplication:
            #activeHelpKey: #fileLibraryBuilder
            #argument: 'LibraryBuilder'
          )
         #(#MenuItem
            #label: 'Application Builder'
            #translateLabel: true
            #isVisible: #libraryBuilderAvailable
            #value: #openApplication:
            #activeHelpKey: #fileApplicationBuilder
            #argument: 'ApplicationBuilder'
          )
         #(#MenuItem
            #label: '-'
            #isVisible: #libraryBuilderAvailable
          )
         #(#MenuItem
            #label: 'Misc'
            #translateLabel: true
            #nameKey: #misc
            #activeHelpKey: #toolsMisc
            #submenu: 
           #(#Menu
              #(
               #(#MenuItem
                  #label: 'Projects'
                  #translateLabel: true
                  #activeHelpKey: #toolsMiscProjects
                  #submenu: 
                 #(#Menu
                    #(
                     #(#MenuItem
                        #label: 'New Project'
                        #translateLabel: true
                        #value: #newProject
                        #activeHelpKey: #toolsMiscProjectsNewProject
                      )
                     #(#MenuItem
                        #label: '-'
                      )
                     #(#MenuItem
                        #label: 'Select Project...'
                        #translateLabel: true
                        #value: #selectProject
                        #activeHelpKey: #toolsMiscProjectsSelectProject
                      )
                     )
                    nil
                    nil
                  )
                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'Reopen Launcher'
                  #translateLabel: true
                  #value: #startNewLauncher
                  #activeHelpKey: #toolsMiscNewLauncher
                )
"/               #(#MenuItem
"/                  #label: 'Old Launcher'
"/                  #translateLabel: true
"/                  #value: #startOldLauncher
"/                  #activeHelpKey: #toolsMiscOldLauncher
"/                )
               #(#MenuItem
                  #label: '-'
                )
               #(#MenuItem
                  #label: 'New Changes Browser'
                  #translateLabel: true
                  #value: #startNewChangesBrowser
                  #activeHelpKey: #toolsMiscNewChangesBrowser
                )
               #(#MenuItem
                  #label: 'Old Changes Browser'
                  #translateLabel: true
                  #value: #startOldChangesBrowser
                  #activeHelpKey: #toolsMiscOldChangesBrowser
                )
               #(#MenuItem
                  #label: '-'
                  #isVisible: #canDoTerminal
                )
               #(#MenuItem
                  #label: 'Terminal'
                  #translateLabel: true
                  #isVisible: #canDoTerminal
                  #value: #openTerminal
                  #activeHelpKey: #toolsTerminal
                )
               #(#MenuItem
                  #label: '-'
                  #isVisible: #canDoTerminal
                )
               #(#MenuItem
                  #label: 'Inspect Global Variables'
                  #translateLabel: true
                  #value: #inspectGlobalVariables
                )
               #(#MenuItem
                  #label: 'Inspect Workspace Variables'
                  #translateLabel: true
                  #value: #inspectWorkspaceVariables
                )
               #(#MenuItem
                  #label: 'Remove all Workspace Variables'
                  #translateLabel: true
                  #value: #removeAllWorkspaceVariables
                )
               )
              nil
              nil
            )
          )
         )
        nil
        nil
      )
!

windowsMenu
    "This resource specification was automatically generated
     by the MenuEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the MenuEditor may not be able to read the specification."

    "
     MenuEditor new openOnClass:NewLauncher andSelector:#windowsMenu
     (Menu new fromLiteralArrayEncoding:(NewLauncher windowsMenu)) startUp
    "

    <resource: #menu>

    ^ 
     #(#Menu
        #(
         #(#MenuItem
            #label: 'Redraw All'
            #translateLabel: true
            #value: #redrawAllWindows
            #activeHelpKey: #windowsRedrawAll
          )
         #(#MenuItem
            #label: 'Iconify All'
            #translateLabel: true
            #value: #iconifyAllWindows
            #activeHelpKey: #windowsIconifyAll
          )
         #(#MenuItem
            #label: 'Deiconify All'
            #translateLabel: true
            #value: #deIconifyAllWindows
            #activeHelpKey: #windowsDeiconifyAll
          )
         #(#MenuItem
            #label: 'Migrate All To...'
            #translateLabel: true
            #value: #migrateAllWindows
            #activeHelpKey: #windowsMigrateAllWindows
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Window Tree'
            #translateLabel: true
            #value: #startWindowTreeView
            #activeHelpKey: #windowsViewTree
          )
         #(#MenuItem
            #label: 'Window Tree (All Windows)'
            #translateLabel: true
            #value: #openApplication:
            #activeHelpKey: #windowsViewTreeAllViews
            #argument: 'WindowTreeView'
          )
         #(#MenuItem
            #label: 'Window Tree (All on All Screens)'
            #translateLabel: true
            #value: #startWindowTreeViewForAll
            #activeHelpKey: #windowsViewTreeAllScreens
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Select and Inspect'
            #translateLabel: true
            #value: #viewInspect
            #activeHelpKey: #windowsSelectAndInspect
          )
         #(#MenuItem
            #label: 'Select and Destroy'
            #translateLabel: true
            #value: #viewDestroy
            #activeHelpKey: #windowsSelectAndDestroy
          )
         #(#MenuItem
            #label: 'Select and Migrate To...'
            #translateLabel: true
            #value: #viewMigrate
            #activeHelpKey: #windowsSelectAndMigrate
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Find and Raise...'
            #translateLabel: true
            #value: #findAndRaiseWindow
            #activeHelpKey: #windowsFindAndRaise
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
          )
         #(#MenuItem
            #label: 'Find and Destroy...'
            #translateLabel: true
            #value: #findAndDestroyWindow
            #activeHelpKey: #windowsFindAndDestroy
            #enabled: #enableDangerousMenuItemsInRemoteLauncher
          )
         #(#MenuItem
            #label: 'Find and Migrate To...'
            #translateLabel: true
            #value: #findAndMigrateWindow
            #activeHelpKey: #windowsFindAndMigrate
          )
         #(#MenuItem
            #label: 'Find and Migrate Back...'
            #translateLabel: true
            #value: #findAndMigrateWindowBack
            #activeHelpKey: #windowsFindAndMigrateBack
          )
         #(#MenuItem
            #label: '-'
          )
         #(#MenuItem
            #label: 'Grab Window...'
            #translateLabel: true
            #value: #viewHardcopy
            #activeHelpKey: #windowsGrapWindow
          )
         #(#MenuItem
            #label: 'Grab Widget...'
            #translateLabel: true
            #value: #widgetHardcopy
            #activeHelpKey: #windowsGrapWidget
          )
         #(#MenuItem
            #label: 'Grab Screen...'
            #translateLabel: true
            #value: #fullScreenHardcopy
            #activeHelpKey: #windowsGrapScreen
          )
         #(#MenuItem
            #label: 'Grab Screen Area...'
            #translateLabel: true
            #value: #screenHardcopy
            #activeHelpKey: #windowsGrapScreenArea
          )
         )
        nil
        nil
      )
! !

!NewLauncher class methodsFor:'resources'!

bugReporterIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary bugReporter24x24Icon    
    "/ ^ ToolbarIconLibrary bugReporter28x28Icon    
!

garbageCollectIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary garbageCollect24x24Icon
    "/ ^ ToolbarIconLibrary garbageCollect28x28Icon
!

saveImageIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary saveImage24x24Icon
    "/ ^ ToolbarIconLibrary saveImage28x28Icon
!

startChangesBrowserIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary changesBrowser24x24Icon
    "/ ^ ToolbarIconLibrary changesBrowser28x28Icon
!

startFileBrowserIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary fileBrowser24x24Icon
    "/ ^ ToolbarIconLibrary fileBrowser28x28Icon
!

startImageEditorIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary imageEditor24x24Icon
    "/ ^ ToolbarIconLibrary imageEditor28x28Icon
!

startMenuEditorIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary menuEditor24x24Icon
    "/ ^ ToolbarIconLibrary menuEditor28x28Icon
!

startNewFileBrowserIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary newFileBrowser24x24Icon
!

startNewSystemBrowserIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary newSystemBrowser24x24Icon
!

startSUnitIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary sUnit24x24Icon    
    "/ ^ ToolbarIconLibrary sUnit28x28Icon    
!

startSystemBrowserIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary systemBrowser24x24Icon
"/    ^ SystemBrowser defaultIcon
!

startSystemBrowserOnHistoryClassIcon
    <resource: #programImage>

    ^ToolbarIconLibrary systemBrowserClassHistory28x28Icon
!

startUIPainterIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary uiPainter24x24Icon
    "/ ^ ToolbarIconLibrary uiPainter28x28Icon
!

startWorkspaceIcon
    <resource: #programImage>

    ^ ToolbarIconLibrary workspace24x24Icon
    "/ ^ ToolbarIconLibrary workspace28x28Icon
! !

!NewLauncher methodsFor:'accessing'!

menuToolbar
    |menu|

    menu := Menu new fromLiteralArrayEncoding:(self class menuToolbar).
    "/ menu receiver:self. -- now done in findGuiResources ...
    menu findGuiResourcesIn:self.

    ^ menu
! !

!NewLauncher methodsFor:'aspects'!

canDoTerminal
    "return a 'valueHolder', which returns true if the terminal application
     is available. For now, this is true if we run under unix"

    ^ OperatingSystem isUNIXlike 
      or:[OperatingSystem isMSWINDOWSlike]

    "Created: / 27.7.1998 / 12:47:54 / cg"
    "Modified: / 28.4.1999 / 11:55:24 / cg"
!

chickenFunIsRunning
    "return a 'valueHolder', which returns true if the chickenFun demo is running."

    ^ [Demos::ChickenFun notNil
      and:[Demos::ChickenFun isLoaded
      and:[Demos::ChickenFun isRunning]]]
!

chickenFunRunning
    "return a 'valueHolder', which returns true if the chickenFun demo is running."

    ^ [Demos::ChickenFun notNil
      and:[Demos::ChickenFun isLoaded
      and:[Demos::ChickenFun isRunning]]]
!

displaySupportsGLDrawing
    "return a 'valueHolder', which returns true if the GL support
     is available."

    ^ [Screen current supportsGLDrawing]

    "Modified: / 13.2.1998 / 14:26:31 / cg"
    "Created: / 3.5.1999 / 16:47:22 / cg"
!

enableDangerousMenuItemsInRemoteLauncher

    |holder|

    (holder := builder bindingAt:#enableDangerousMenuItemsInRemoteLauncher) isNil ifTrue:[
        builder aspectAt:#enableDangerousMenuItemsInRemoteLauncher put:(holder :=  true asValue).
    ].
    ^ holder
!

fileBrowserItemVisible
    |holder|

    (holder := builder bindingAt:#fileBrowserItemVisible) isNil ifTrue:[
        builder 
            aspectAt:#fileBrowserItemVisible 
            put:(holder := UserPreferences current useNewFileBrowser not asValue)
    ].
    ^ holder
!

isMainLauncherHolder
    ^ [ isMainLauncher ]
!

isNotMainLauncherHolder
    ^ [ isMainLauncher not ]
!

javaSupportPresent
    "return a 'valueHolder', which returns true if the java support
     is available."

    ^ [JavaVM notNil and:[JavaVM isBehavior and:[JavaVM isLoaded]]]

    "Created: / 13.2.1998 / 14:25:59 / cg"
    "Modified: / 13.2.1998 / 14:26:31 / cg"
!

libraryBuilderAvailable
    ^ false

    "Created: / 20.6.1998 / 16:54:31 / cg"
!

packageDialogVisible
    ^ false
!

showActiveHelpMenuItem
    ^ false
!

systemBrowserItemVisible
    |holder|

    (holder := builder bindingAt:#systemBrowserItemVisible) isNil ifTrue:[
        builder 
            aspectAt:#systemBrowserItemVisible 
            put:(holder := UserPreferences current useNewSystemBrowser not asValue).
    ].
    ^ holder
! !

!NewLauncher methodsFor:'change & update'!

update:something with:aParameter from:changedObject
    "care for project changes & update my infoView"

    (something == helpIsOn) ifTrue:[
        self toggleActiveHelp:helpIsOn value
    ].
    ((something == #currentProject) or:[changedObject == Project]) ifTrue: [self updateInfo]
!

updateInfo
    "update the infoView from the current project"

    |project projectName projectDir packageName defNameSpace msg args projectInfo|

    (Project isNil or:[(project := Project current) isNil]) ifTrue:[
        projectName := '* none *'.
        projectDir := '.'.
        packageName := '* none *'.
    ] ifFalse:[
        projectName := project name.
        projectDir := project directory.
        packageName := project package.
        defNameSpace := project defaultNameSpace.
    ].
    defNameSpace isNil ifTrue:[
        defNameSpace := Smalltalk.
    ].

    msg := 'Project: ''%1'' fileOut to: ''%3'' package: ''%2'''.
    defNameSpace == Smalltalk ifTrue:[
        args := Array 
                    with:projectName
                    with:packageName 
                    with:(projectDir contractTo:30).
    ] ifFalse:[
        msg := msg , '  nameSpace: %4'.
        args := Array 
                        with:projectName
                        with:packageName 
                        with:(projectDir contractTo:30)
                        with:defNameSpace name.
    ].

    self valueOfInfoLabel value:(projectInfo := resources string:msg withArgs:args).
    ^projectInfo
! !

!NewLauncher methodsFor:'help'!

defaultInfoLabel

    ^self updateInfo

! !

!NewLauncher methodsFor:'menu configuration'!

addMenuItem:newItem in:where position:positionSpecOrNilArg space:space
    "adds a menu item;
       where == #menu        - menu item is added at the end of the sub menu 'Tools',
       where == #toolbar     - menu item is added at the end of the tool bar,
       where == #menu.<name> - menu item is added at the end of the sub menu named 'name',

    position may be one of:
        ( #before <someItemPath> )
        ( #after  <someItemPath> )
        ( #first )   or #first
        ( #last )    or #last
        nil   (same as last)

     If space is true, some empty space is inserted.
     This can be invoked by a classes #initialize method, to add an item
     for itself to the toolbar or menu.
    "

    |what menuPanel freeMenuIndex mainMenuPanel item subViews subMenuPath 
     rest subMenu subItem nItems idx 
     positionSpecOrNil itemNameOrNil before|

    newItem findGuiResourcesIn:self rememberResourcesIn:nil.

    positionSpecOrNil := positionSpecOrNilArg.
    positionSpecOrNil isArray ifTrue:[
        positionSpecOrNil size > 1 ifTrue:[
            itemNameOrNil := positionSpecOrNil at:2.
        ].
        positionSpecOrNil := positionSpecOrNil at:1.
    ].
    before := (positionSpecOrNil == #first) or:[positionSpecOrNil == #before].

    what := where.
    (what isNil or: [what = 'toolbar']) ifTrue:[
        "/ look if not already in the toolBar
        menuPanel := builder namedComponents at: #menuToolbarView ifAbsent:nil.
        menuPanel isNil ifTrue:[
            'NewLauncher [warning]: addUserTool failed - no menuPanel' infoPrintCR.
        ] ifFalse:[
            idx := 0.
            newItem nameKey notNil ifTrue:[
                idx := menuPanel findFirst: [:i| i nameKey = newItem nameKey].
            ].
            idx == 0 ifTrue:[
                idx := menuPanel findFirst: [:i| (newItem activeHelpKey notNil and:[ i activeHelpKey = newItem activeHelpKey])
                                                  or:[ newItem label notNil and:[ i label = newItem label] ]]
            ].
            idx == 0 ifTrue:[
                "/ ok, not there; search for the position to put the item
                nItems := menuPanel numberOfItems.
                freeMenuIndex := 0.
                itemNameOrNil notNil ifTrue:[
                    freeMenuIndex := menuPanel findFirst: [:i| i nameKey = itemNameOrNil].
                    freeMenuIndex == 0 ifTrue:[
                        freeMenuIndex := menuPanel findFirst: [:i| i activeHelpKey = itemNameOrNil or:[i label = itemNameOrNil]].
                    ]
                ].

                freeMenuIndex == 0 ifTrue:[
                    freeMenuIndex := before ifTrue:1 ifFalse:[nItems + 1].
                ] ifFalse:[
                    before ifFalse:[freeMenuIndex := freeMenuIndex +1].
                ].

                space ifTrue:[
                    (menuPanel createAtIndex: freeMenuIndex) menuItem: (MenuItem labeled: '').
                    freeMenuIndex := freeMenuIndex + (before ifTrue:0 ifFalse:1).

                ].

                (menuPanel createAtIndex: freeMenuIndex) menuItem:newItem.

                UserAddedToolBarItems isNil ifTrue: [UserAddedToolBarItems := Dictionary new].
                UserAddedToolBarItems at:newItem put:(AddedToolInfo new
                                                    item:newItem;
                                                    where:where;
                                                    positionSpec:positionSpecOrNilArg;
                                                    space:space;
                                                    before:before;
                                                    menuWithNewItem:menuPanel;
                                                    yourself)
            ].
        ].
    ].

    subMenuPath := #( 'tools' ).
    (what notNil and:[what includes:$.]) ifTrue:[
        subMenuPath := (what asCollectionOfSubstringsSeparatedBy:$.) copyFrom:2.
        what := #menu.
    ].

    (what isNil or: [what = 'menu']) ifTrue:[
        mainMenuPanel := self builder menuBar.
        mainMenuPanel isNil ifTrue:[
            subViews := self builder window subViews.
            subViews notNil ifTrue:[
                mainMenuPanel := subViews at:1 ifAbsent:nil.
            ]
        ].
        mainMenuPanel isNil ifTrue:[
            'NewLauncher [warning]: addUserTool failed - no mainMenu' infoPrintCR.
            ^ self
        ].

        item := mainMenuPanel itemAt:(subMenuPath first).
        item isNil ifTrue:[
            item := mainMenuPanel itemAt:'tools'.
"/            item isNil ifTrue:[
"/                item := mainMenuPanel itemAt:4
"/            ].
        ].
        item isNil ifTrue:[
            'NewLauncher [warning]: addUserTool failed - no tools menu' infoPrintCR.
            ^ self
        ].

        rest := subMenuPath copyFrom:2.
        [rest size >= 1] whileTrue:[
            subMenu := item submenu.
            subMenu isNil ifTrue:[
                rest := nil
            ] ifFalse:[
                subItem := subMenu itemAt:(rest first).
                subItem isNil ifTrue:[
                    rest := nil
                ] ifFalse:[
                    item := subItem.
                    rest := rest copyFrom:2.
                ]
            ]
        ].

        item isNil ifTrue:[^ self].
        menuPanel := item submenu.

        "/ look if not already in the menu
        idx := 0.
        newItem nameKey notNil ifTrue:[
            idx := menuPanel findFirst: [:i| i nameKey = newItem nameKey].
        ].
        idx == 0 ifTrue:[
            idx := menuPanel findFirst: [:i| (newItem activeHelpKey notNil and:[ i activeHelpKey = newItem activeHelpKey])
                                              or:[ newItem label notNil and:[ i label = newItem label] ]]
        ].

        idx == 0 ifTrue:[
            "/ ok, not there; search for the position to put the item

            nItems := menuPanel numberOfItems.
            freeMenuIndex := 0.
            itemNameOrNil notNil ifTrue:[
                freeMenuIndex := menuPanel findFirst: [:i| i nameKey = itemNameOrNil].
                freeMenuIndex == 0 ifTrue:[
                    freeMenuIndex := menuPanel findFirst: [:i| i activeHelpKey = itemNameOrNil or:[i label = itemNameOrNil]].
                ]
            ].
            freeMenuIndex == 0 ifTrue:[
                freeMenuIndex := before ifTrue:1 ifFalse:[nItems + 1].
            ] ifFalse:[
                before ifFalse:[freeMenuIndex := freeMenuIndex +1].
            ].
            space ifTrue:[
                (menuPanel createAtIndex: freeMenuIndex) menuItem: (MenuItem labeled: '-').
                freeMenuIndex := freeMenuIndex + (before ifTrue:0 ifFalse:1).
            ].

            (menuPanel createAtIndex:freeMenuIndex) menuItem:newItem.

            UserAddedMenuItems isNil ifTrue: [UserAddedMenuItems := Dictionary new].
            UserAddedMenuItems at:newItem put:(AddedToolInfo new
                                                item:newItem;
                                                where:where;
                                                positionSpec:positionSpecOrNilArg;
                                                space:space;
                                                before:before;
                                                menuWithNewItem:menuPanel;
                                                yourself)
        ].
    ].

    "
     UserAddedToolBarItems := nil.
     UserAddedMenuItems := nil.
     NewLauncher open.

     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Foo';
                        value: [Transcript showCR:'foo'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #foo)
        in:#menu
        position:#(#before 'Workspace')
        space:true

     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Bar';
                        value: [Transcript showCR:'bar'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #bar)
        in:#menu
        position:#(#after #foo)
        space:true

     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Baz';
                        value: [Transcript showCR:'baz'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #baz)
        in:#menu
        position:#(#before #bar)
        space:false

     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Baz2';
                        value: [Transcript showCR:'baz2'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #baz2)
        in:#menu
        position:#(#after #bar)
        space:false

     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Foo2';
                        value: [Transcript showCR:'foo2'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #foo2)
        in:'menu.classes'
        position:#last
        space:false

     Transcript topView application
        addMenuItem:(MenuItem new 
                        label: 'Foo3';
                        value: [Transcript showCR:'foo3'];
                        isButton: false;
                        labelImage: nil;
                        nameKey: #foo3)
        in:'menu.classes.special'
        position:#first
        space:true
    "
!

addUserTool:toolName action:actionBlock icon:iconOrNil
    "adds a menu item labeled toolName, and action and icon both to the
     sub menu 'Tools' and the tool bar.
     This can be invoked by a classes #initialize method, to add an item
     for itself to the toolbar.
     OBSOLETE
    "
    <resource: #obsolete>

    self 
        addUserTool:toolName 
        action:actionBlock 
        in:nil 
        icon:iconOrNil 
        space:true

    "
     Transcript topView application
        addUserTool:'Foo' 
        action:[Transcript showCR:'foo'] 
        icon:nil
    "
!

addUserTool:toolName action:actionBlock in:where after:afterOrNil icon:icon space:space
    "adds a menu item labeled toolName, and actionBlock and icon;
       where == #menu        - menu item is added at the end of the sub menu 'Tools',
       where == #toolbar     - menu item is added at the end of the tool bar,
       where == #menu.<name> - menu item is added at the end of the sub menu named 'name',

     If space is true, some empty space is inserted.
     This can be invoked by a classes #initialize method, to add an item
     for itself to the toolbar or menu.
     OBSOLETE
    "
    <resource: #obsolete>

    ^ self
        addUserTool:toolName action:actionBlock in:where position:afterOrNil before:false icon:icon space:space

    "
     Transcript topView application
        addUserTool:'Foo' 
        action:[Transcript showCR:'foo']
        in:#menu
        icon:nil
        space:false
    "
    "
     Transcript topView application
        addUserTool:'Bar' 
        action:[Transcript showCR:'bar']
        in:#menu
        icon:nil
        space:false
    "
!

addUserTool:toolName action:actionBlock in:where before:afterOrNil icon:icon space:space
    "adds a menu item labeled toolName, and actionBlock and icon;
       where == #menu        - menu item is added at the end of the sub menu 'Tools',
       where == #toolbar     - menu item is added at the end of the tool bar,
       where == #menu.<name> - menu item is added at the end of the sub menu named 'name',

     If space is true, some empty space is inserted.
     This can be invoked by a classes #initialize method, to add an item
     for itself to the toolbar or menu.
     OBSOLETE
    "
    <resource: #obsolete>

    ^ self
        addUserTool:toolName action:actionBlock in:where position:afterOrNil before:true icon:icon space:space
!

addUserTool:toolName action:actionBlock in:what icon:icon space:space
    "adds a menu item labeled toolName, and actionBlock and icon;
     for what == #menu    menu item is added at the end of the sub menu 'Tools',
     for what == #toolbar menu item is added at the end of the tool bar,
     If space is true, some empty space is inserted.
     This can be invoked by a classes #initialize method, to add an item
     for itself to the toolbar or menu.
     OBSOLETE
    "
    <resource: #obsolete>

    ^ self
        addUserTool:toolName 
        action:actionBlock 
        in:what 
        after:nil 
        icon:icon 
        space:space

    "
     UserAddedTools := nil.
     NewLauncher open.

     Transcript topView application
        addUserTool:'Foo' 
        action:[Transcript showCR:'foo']
        in:#menu
        icon:nil
        space:false
    "
    "
     Transcript topView application
        addUserTool:'Bar' 
        action:[Transcript showCR:'bar']
        in:#menu
        icon:nil
        space:true
    "
!

addUserTool:toolName action:actionBlock in:where position:itemNameOrNil before:before icon:icon space:space
    "adds a menu item labeled toolName, and actionBlock and icon;
       where == #menu        - menu item is added at the end of the sub menu 'Tools',
       where == #toolbar     - menu item is added at the end of the tool bar,
       where == #menu.<name> - menu item is added at the end of the sub menu named 'name',

     If space is true, some empty space is inserted.
     This can be invoked by a classes #initialize method, to add an item
     for itself to the toolbar or menu.
     OBSOLETE
    "

    <resource: #obsolete>

    |newItem positionSpecOrNilArg|

    newItem := (MenuItem new 
                    label: toolName;
                    value: actionBlock;
                    isButton: false;
                    labelImage: icon;
                    nameKey: toolName asSymbol;
                    activeHelpKey: toolName asSymbol).

    itemNameOrNil isNil ifTrue:[
        positionSpecOrNilArg := before ifTrue:[#first] ifFalse:[#last].
    ] ifFalse:[
        positionSpecOrNilArg := before ifTrue:[#before] ifFalse:[#after].
        positionSpecOrNilArg := Array with:itemNameOrNil with:positionSpecOrNilArg.
    ].

    ^ self addMenuItem:newItem in:where position:positionSpecOrNilArg space:space
!

removeUserTool:toolNameOrMenuItem
    "removes a menu item labeled toolName
     This can be invoked by a classes #deinitialize method, 
     to remove its item from the toolbar or menu.
    "
    self class removeUserTool:toolNameOrMenuItem
!

removeUserTool:toolNameOrMenuItem from:addedToolsCollection
    "removes a menu item labeled toolName
     This can be invoked by a classes #deinitialize method, 
     to remove its item from the toolbar or menu.
    "

    self class removeUserTool:toolNameOrMenuItem from:addedToolsCollection

    "
     Transcript topView application
        removeUserTool:'Bar' 
    "
    "
     Transcript topView application
        removeUserTool:'Foo' 
    "

!

userAddedMenuItems
    "return a dictionary of user-added menu item infos.
    "

    ^ UserAddedMenuItems ? #()


!

userAddedToolBarItems
    "return a dictionary of user-added toolBar item infos.
    "

    ^ UserAddedToolBarItems ? #()


! !

!NewLauncher methodsFor:'menus - dynamic'!

menuChangeHistory
    "returns a sub menu on the last changes"

    |changeSet menu changeHistory|

    changeSet := ChangeSet current.
    changeHistory := OrderedCollection new.

    [:exit |
        changeSet reverseDo:[:change |
            change isMethodChange ifTrue:[
                (changeHistory contains:[:chg | chg className = change className
                                             and:[chg selector = change selector]])
                ifFalse:[
                    changeHistory add:change.
                    changeHistory size > 15 ifTrue:[
                        exit value:nil
                    ]
                ].
            ].
        ]
    ] valueWithExit.

    changeHistory isEmpty ifTrue:[
        ^ nil
    ].

    menu := Menu new receiver: self.
    menu addItemGroup: 
        (changeHistory collect:[:change|
            MenuItem new 
                label: (change className , ' ' , (change selector ? '???')); 
                value: [UserPreferences systemBrowserClass openInClass:change changeClass selector:change selector]; 
                activeHelpKey: #classesSystemBrowserOnClass
        ]
    ).

    menu findGuiResourcesIn:self.
    ^menu
!

menuClassHistory
    "returns a sub menu on the history of the classes"

    |menu classHistory|

    SystemBrowser checkClassHistory.

    classHistory := SystemBrowser classHistory.
    classHistory isEmpty ifTrue:[
        ^ nil
    ].

    menu := Menu new receiver: self.
    menu addItemGroup: 
        (classHistory collect:[:histEntry|
            MenuItem new 
                label: (histEntry className); 
                value: [UserPreferences systemBrowserClass openInClass:histEntry theClass selector:histEntry selector]; 
                activeHelpKey: #classesSystemBrowserOnClass
        ]
    ).
    menu addItem: (MenuItem new 
                        label: 'Clear History'; 
                        value: [classHistory removeAll]; 
                        translateLabel: true;
                        enabled:(classHistory notEmpty);
                        activeHelpKey: #historyEmptyMenu).

    menu findGuiResourcesIn:self.
    ^menu

    "Modified: / 8.7.1998 / 00:59:50 / cg"
!

menuFileHistory
    "returns a subMenu on the history of the filebrowsers directories"

    |menu dirHistory|

    dirHistory := AbstractFileBrowser directoryHistory.
    dirHistory isEmpty ifTrue:[^nil].

    menu := Menu new receiver: self.
    menu addItemGroup: 
        (dirHistory collect:[:item|
            |dirNameString| 
            dirNameString := item path.
            MenuItem new 
                label: dirNameString; 
                value: [UserPreferences fileBrowserClass openOn:dirNameString]; 
                activeHelpKey: #FileBrowserOnDirectory
        ]
    ).
    menu addItem: (MenuItem new 
                        label: 'Clear History'; 
                        value: [dirHistory removeAll]; 
                        translateLabel: true;
                        enabled:(dirHistory notEmpty);
                        activeHelpKey: #historyEmptyMenu).

    menu findGuiResourcesIn:self.
    ^menu
! !

!NewLauncher methodsFor:'private - settings callBacks'!

reopenLauncher
    "reopen a new launcher.
     for now (since style & language settings currently do
     not affect living views ...)
     WARNING: bad design: Message known in LauncherDialogs"

    |newLauncher wasShowingHelp|

    wasShowingHelp := self showingHelp.
    newLauncher := super reopenLauncher.
    newLauncher showingHelp:wasShowingHelp.
    ^ newLauncher
! !

!NewLauncher methodsFor:'queries'!

preferredExtent

    ^super preferredExtent max: Screen current extent // (2.5 @ 3.5)
!

useNewSettinsApplication

    useNewSettinsApplication isNil ifTrue:[
        useNewSettinsApplication := UserPreferences current useNewSettinsApplication
    ].
    ^ useNewSettinsApplication
!

useOldSettinsApplication

    ^ self useNewSettinsApplication not
! !

!NewLauncher methodsFor:'startup / release'!

allButOpenInterface:anInterface
    "sent by my superclass to open up my interface"

    "/ if there is already a transcript on my device,
    "/ I am a slave launcher with limited functionality.

    Transcript notNil ifTrue:[
        Transcript ~~ Stderr ifTrue:[
            isMainLauncher := (Transcript graphicsDevice == device).
            self enableDangerousMenuItemsInRemoteLauncher value: isMainLauncher.
        ] ifFalse:[
            isMainLauncher := true
        ]
    ] ifFalse:[
        isMainLauncher := true
    ].

    super allButOpenInterface:anInterface.

    self setupTranscript; updateInfo.
    Project notNil ifTrue: [Project addDependent:self].
    self class openLaunchers add: self.
    ^ builder

    "Created: / 5.2.1998 / 19:45:07 / cg"
    "Modified: / 20.6.1998 / 14:53:58 / cg"
!

postBuildWith:aBuilder
    "setup my preferred size"

    |win hMin|

    super postBuildWith:aBuilder.
    win := aBuilder window .
    win extent:(self preferredExtent).

"/ TODO: somehow find out how much decoration is added by the window manager ...
"/
"/    hMin := aBuilder menuBar height
"/            + (aBuilder componentAt:#menuToolbarView) height.
    hMin := 100.

    win minExtent:( win minExtent x @ hMin ).
!

postOpenWith:aBuilder
    |toolInfo|

    "/ increase my priority"
"/    self windowGroup process priority:(Processor userSchedulingPriority + 1).
    Processor activeProcess priority:(Processor userSchedulingPriority + 1).

    "/ add user tools
    UserAddedToolBarItems notNil ifTrue:[
        toolInfo := UserAddedToolBarItems.
        UserAddedToolBarItems := nil.
        toolInfo do:[:toolInfo| 
            self 
                addMenuItem:toolInfo item 
                in:toolInfo where
                position:toolInfo positionSpec
                space:toolInfo space
        ].
    ].
    UserAddedMenuItems notNil ifTrue:[
        toolInfo := UserAddedMenuItems.
        UserAddedMenuItems := nil.
        toolInfo do:[:toolInfo| 
            self 
                addMenuItem:toolInfo item 
                in:toolInfo where
                position:toolInfo positionSpec
                space:toolInfo space
        ].
    ].

    super postOpenWith:aBuilder.

    "/ set the time-block
    UserPreferences current showClockInLauncher ifTrue:[
        self startClock
    ].

    "/ change my minimum height ...
    self window minExtent:(self window minExtent x
                           @
                           (self window minExtent y
                            "/ + (builder componentAt:'infoBarSubSpec') height
                            - 12
                           )
                          ).
!

reOpen
    "reopen a new launcher.
     for now (since style & language settings currently do
     not affect living views ...)"

    self reopenLauncher "/ WARNING: bad design: Message known in LauncherDialogs

    "Modified: / 31.7.1998 / 22:48:12 / cg"
!

requestForWindowClose
    |answer|

    isMainLauncher ifFalse:[
        "/ remote launchers may not finish ST/X

        answer := Dialog 
                    confirmWithCancel:(resources string:'Really close %1 (slave)?' with:self class name)
                    labels:(resources array:#('Cancel' 'Close'))
                    default:1.
        answer isNil ifTrue:[
            "/ cancel
            ^ false
        ].
        ^ true
    ].

    ^ super requestForWindowClose
!

restarted
    "image restart - since WindowGroup recreates the process with
     the default priority, we have to raise the prio again.
     Mhmh - this looks like a bug to me ...
     Also, the cursor (which was stored as a write or waitCursor) must
     be reset to normal."

    Processor activeProcess priority:(Processor userSchedulingPriority + 1).
"/    builder window extent: self preferredExtent.
    super restarted

!

setupTranscript 
    "create the transcript view"

    |launcher oldLauncherClass|

    "/ check if this is an additional launcher on a remote display.
    "/ if so, do not close the real launcher.

    (Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[
        isMainLauncher ifTrue:[
            launcher := Transcript topView application
        ] ifFalse:[
            launcher := self class current.
        ].

        (launcher notNil and:[launcher ~~ self]) ifTrue:[
            launcher window graphicsDevice == device ifTrue:[
                OpenLaunchers notNil ifTrue:[
                    OpenLaunchers remove:launcher ifAbsent:nil.
                ].
                ((oldLauncherClass := Smalltalk at:#Launcher) notNil 
                and:[oldLauncherClass isLoaded]) ifTrue: [
                    oldLauncherClass openLaunchers remove:launcher ifAbsent:nil
                ].
                launcher close
            ]
        ]
    ].

    transcript := (self componentAt: #transcriptView) subViews first.

    isMainLauncher ifTrue:[
        transcript beTranscript.
    ] ifFalse:[
        transcript showCR:'**************** Notice ***********************'.
        transcript showCR:'**       this is NOT the Transcript          **'.
        transcript showCR:'** The real Transcript is on the main screen **'.
        transcript showCR:'**                                           **'.
        transcript showCR:'** Menus affecting common state are disabled **'.
        transcript showCR:'***********************************************'.
    ]

    "Modified: / 5.3.1999 / 18:00:36 / cg"
!

uninitialize

    super uninitialize.

    OpenLaunchers notNil ifTrue:[OpenLaunchers remove:self ifAbsent:nil].
    Project notNil ifTrue:[Project removeDependent:self]
! !

!NewLauncher methodsFor:'user actions - classes'!

openMethodFinder
    "open the methodFinder (poerted from squeak)"

   MethodFinderWindow open
! !

!NewLauncher methodsFor:'user actions - demos'!

openDemo:className
    "open a demo, given its name.
     Looks in both the Smalltalk- and the Demos-Namespace
     for that class."

    self openApplication:className nameSpace:Demos

!

openMandelbrotDemo
    self openDemo:#ComplexIterationView 

    "Created: / 8.7.1998 / 20:36:37 / cg"
!

startPingPong2
    "opens a 2-user PingPong game"

    self openApplication:'PingPongGame' nameSpace:Games with:#open2PlayerGame

    "Modified: / 13.12.1999 / 22:24:15 / cg"
!

startReversi
    "opens a reversi game (java)"

    self openApplication:'JavaAppletDemo3' nameSpace:CodingExamples_GUI

    "Modified: / 13.12.1999 / 22:24:15 / cg"
!

startStopDemo:className
    "start/stop a demo, given its name.
     Looks in both the Smalltalk- and the Demos-Namespace
     for that class."

    |cls|

    cls := self findApplicationClass:className nameSpace:Demos.
    cls isNil ifTrue:[
        ^ self
    ].

    Autoload autoloadFailedSignal handle:[:ex |
        self warn:(resources string:'Sorry, the %1 class seems to be not available.' with:cls name)
    ] do:[
        self withWaitCursorDo:[
            cls isRunning ifTrue:[
                cls stop
            ] ifFalse:[
                cls start
            ]
        ]
    ]
!

startTicTacToe2
    "opens a 2-user ticTacToe game"

    self openApplication:'TicTacToeGame' nameSpace:Games with:#open2UserGame
! !

!NewLauncher methodsFor:'user actions - file'!

exit
    "saves a snapshot image and exits, after asking for a fileName"

    |fileName saveAndExit box|

    box := EnterBox2 title:(resources string:'Save image before exiting?')
        okText:(resources string:'Exit') 
        abortText:(resources string:'Cancel')
        action:[:str | saveAndExit := false].
    box label: (resources string:'Exiting ST/X').
    box initialText: ObjectMemory nameForSnapshot.
    box okText2:(resources string:'Save & Exit') action2:[:str|fileName := str. saveAndExit := true].
    box showAtPointer.

    saveAndExit notNil ifTrue:[
        saveAndExit ifTrue:[
            self saveImageAs: fileName
        ].
        Smalltalk exit
    ]

    "Modified: / 23.4.1998 / 18:37:46 / cg"
!

saveImage
    "save image"

    self saveImageAs:ObjectMemory nameForSnapshot.
!

saveImageAs
    "save image, after asking for a file name"

    self saveImageAs: (
        Dialog 
            requestFileName:(resources string:'Save Image As') 
            default:ObjectMemory nameForSnapshot
            pattern:'*.img'
            fromDirectory:Filename currentDirectory
    )

    "Modified: / 23.4.1998 / 18:25:17 / cg"
! !

!NewLauncher methodsFor:'user actions - help'!

activeHelp

    helpIsOn isNil ifTrue:[
        helpIsOn := FlyByHelp isActive asValue.
        helpIsOn addDependent:self.
    ].
    ^ helpIsOn
!

toggleFlyByHelp:aBoolean
    "turn on/off active help"

    FlyByHelp notNil ifTrue:[
        aBoolean ifTrue:[
            FlyByHelp start.
        ] ifFalse:[
            FlyByHelp stop.
        ].
    ].

    "Modified: / 18.8.1998 / 16:06:27 / cg"
! !

!NewLauncher methodsFor:'user actions - system'!

initJavaVM
    JavaVM initializeVM

    "Created: / 9.2.1998 / 12:06:07 / cg"
!

startLatencyMonitor
    "open an interruptLatencyMonitor view"

    InterruptLatencyMonitor notNil ifTrue:[
        Autoload autoloadFailedSignal catch:[
            InterruptLatencyMonitor autoload.
        ].
        InterruptLatencyMonitor isLoaded ifTrue:[
            InterruptLatencyMonitor open.
            ^ self.
        ]
    ].
    self warn:'Sorry - the irq latency monitor is not available
in this release'.

! !

!NewLauncher methodsFor:'user actions - windows'!

redrawAllWindows
    device redrawAllWindows.
!

widgetHardcopy
    "after a second (to allow redraw of views under menu ...),
     let user specify a widget and save its contents."

    Processor 
        addTimedBlock:[
                        |v|
                        (v := Screen current viewFromUser) notNil ifTrue:[
                            self saveScreenImage:(Image fromView:v) defaultName:'hardcopy'
                        ]
                      ] 
        afterSeconds:1

    "Created: / 21.8.1998 / 20:44:12 / cg"
! !

!NewLauncher::AddedToolInfo methodsFor:'accessing'!

before
    "return the value of the instance variable 'before' (automatically generated)"

    ^ before
!

before:something
    "set the value of the instance variable 'before' (automatically generated)"

    before := something.
!

item
    "return the value of the instance variable 'item' (automatically generated)"

    ^ item
!

item:something
    "set the value of the instance variable 'item' (automatically generated)"

    item := something.
!

menuWithNewItem
    "return the value of the instance variable 'menuWithNewItem' (automatically generated)"

    ^ menuWithNewItem
!

menuWithNewItem:something
    "set the value of the instance variable 'menuWithNewItem' (automatically generated)"

    menuWithNewItem := something.
!

positionSpec
    "return the value of the instance variable 'positionSpec' (automatically generated)"

    ^ positionSpec
!

positionSpec:something
    "set the value of the instance variable 'positionSpec' (automatically generated)"

    positionSpec := something.
!

space
    "return the value of the instance variable 'space' (automatically generated)"

    ^ space
!

space:something
    "set the value of the instance variable 'space' (automatically generated)"

    space := something.
!

where
    "return the value of the instance variable 'where' (automatically generated)"

    ^ where
!

where:something
    "set the value of the instance variable 'where' (automatically generated)"

    where := something.
! !

!NewLauncher class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.282 2002-12-13 16:30:18 penk Exp $'
! !