NewLauncher.st
author Claus Gittinger <cg@exept.de>
Mon, 05 Oct 1998 13:38:52 +0200
changeset 1914 d94b77e0ef43
parent 1913 b5d55f160224
child 1915 ff2a757c819c
permissions -rw-r--r--
checkin from browser

"
 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.
"



ToolApplicationModel subclass:#NewLauncher
	instanceVariableNames:'transcript isMainLauncher helpIsOn'
	classVariableNames:'OpenLaunchers NotifyingEmergencyHandler UserAddedTools'
	poolDictionaries:''
	category:'Interface-Smalltalk'
!

!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 future launcher.

    [start with:]
	NewLauncher open

    [see also:]
	Launcher

    [author:]
	Thomas Zwick, eXept Software AG
"
! !

!NewLauncher class methodsFor:'accessing'!

current
    "return the launcher running on the current screen.
     (for access via addMenu/ removeMenu)"

    OpenLaunchers notNil ifTrue:[
	OpenLaunchers do:[:aLauncher |
	    aLauncher window graphicsDevice == Screen current ifTrue:[
		^ aLauncher
	    ]
	].
    ].
    ^ nil

    "Modified: / 29.1.1998 / 22:08:12 / cg"
!

label

    ^'Launcher'


!

openLaunchers

    ^OpenLaunchers ? (OpenLaunchers := OrderedCollection new)
! !

!NewLauncher class methodsFor:'defaults'!

notifyingEmergencyHandler
    "return a block (used as an emergency handler
     for exceptions), which does errorNotification before going
     into the debugger."

    "Remember the handlerBlock, to be able to determine if the current
     handler is the notifying one."

    ^ NotifyingEmergencyHandler ? (NotifyingEmergencyHandler := Exception notifyingEmergencyHandler)
!

windowIcon
    ^ Icon stxIcon

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

!NewLauncher class methodsFor:'help specs'!

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.'

#classes
'Class functions.'

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

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

#classesClassTreeBrowser
'Open a Class Tree on the classes of ST/X.'

#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
'Open a list showing all trace- and break-points on methods.'

#classesSpecial
'Special class functions.'

#classesSpecialReferencesToUndeclared
'Open a list of methods refering to undeclared variables.'

#classesSystemBrowser
'Open a System Browser for editing sources of the classes.'

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

#demos
'Demo functions.'

#demos3D
'3D 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 fractals 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.'

#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.'

#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 File Browser for loading, saving, and editing source files, etc.'

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

#fileModules
'Open a dialog for showing (and unloading) class libraries and other modules.'

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

#fileSaveImageAs
'Open a file dialog to save the current snapshot image of ST/X.'

#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
'Showing the latest news about ST/X.'

#settingsCompilation
'Open a dialog for changing compiler settings.'

#settingsFonts
'Open a dialog for changing of the font defaults.'

#settingsKeyboardMappings
'Open a dialog for inspecting the mappings of the keyboard.'

#settingsLanguage
'Open a dialog for changing the national language.'

#settingsLoadSettings
'Open a dialog to restore the settings from a file.'

#settingsMessages
'Open a dialog for changing the settings for reporting infos/errors.'

#settingsMisc
'Open a dialog for changing other settings.'

#settingsObjectMemory
'Open a dialog for changing the object memory settings.'

#settingsPrinter
'Open a dialog for changing the printer settings.'

#settingsSaveSettings
'Open a dialog for saving the current settings to a file.'

#settingsScreen
'Open a dialog for changing the display screen settings.'

#settingsSourceAndDebugger
'Open a dialog for changing the settings of the source code management.'

#settingsViewStyle
'Open a dialog for changing the current view style.'

#system
'System functions.'

#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
'Tool functions.'

#toolsChangesBrowser
'Open a Changes Browser on changes made to the current smalltalk environment.'

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

#toolsImageEditor
'Open a Bitmap Image Editor.'

#toolsMenuEditor
'Open a Menu Editor for building menu bars, popup menus, and tool bars.'

#toolsMisc
'Misc Tool functions.'

#toolsMiscNewLauncher
'(Re-)open a new launcher.'

#toolsMiscOldLauncher
'Open an old launcher.'

#toolsMiscProjects
'Project functions.'

#toolsMiscProjectsNewProject
'Create a new project.'

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

#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
'Open a dialog for selecting an ST/X window by label and destroy it.'

#windowsFindAndRaise
'Open dialog for selecting an ST/X window by label 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.'

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

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

#windowsSelectAndDestroy
'Select a window and destroys it.'

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

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

#windowsViewTreeAllViews
'Display the widget hierarchies of all ST/X windows.'

)
! !

!NewLauncher class methodsFor:'image specs'!

helpIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self helpIcon inspect
     ImageEditor openOnClass:self andSelector:#helpIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher helpIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@Q@@@@@@@@@@@@@"H"H @P@@@@@@@@@@H"H"H"H!!D@@@@@@@@@@@@@@"H"@Q@@@@@@@@@#H2H0@"H DP@@@@@@L#H2L2L H"@Q@@@@@@@#H2L"L#HBH DP@@@@@"L#H2H2L#@"@Q@@@@@#L#H@@2L#HBHAD@@@@CH#H@@BL#H0H DP@@@@H3H@@@@#H2@"@Q@@@@@2H0@@@CH2LB@Q@@@@@BL2@@@@H2LCHAD@@@@@@@@@@@H2L HADP@@@@@@@@@@H#H2LAD@@@@@@@@@@@H3H2LAD@@@@@@@@@@@@2H2L@D@@@@@@@@@@@@2L2LB@P@@@@@@@@@@@BL"L HA@@@@@@@@@@@@L#L H D@@@@@@@@@@@@#H#@ @@@@@@@@@@@@@@@@@B@A@@@@@@@@@@@@@"H"@ D@@@@@@@@@@@@@@@@"@P@@@@@@@@@@@CH3HBHA@@@@@@@@@@@@H2H0H @@@@@@@@@@@@@2L2@ @@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 63 79 96 255 255 0 255 255 255]; mask:((ImageMask new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@?8@@@??@@@_?8@@O??@@G??8@C??>@@???0@_??<@O???@C>O?0@?C?<@O0?>@C<O? @?C?8@@C?8@@A?<@@@_>@@@O? @@C?8@@@?>@@@O>@@@C?8@@@_>@@@O? @@C?8@@@?<@@@O>@@@C?@@@@a') ; yourself); yourself]

    "Modified: / 7.8.1998 / 12:34:56 / cg"
!

helpIcon2
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self helpIcon2 inspect
     ImageEditor openOnClass:self andSelector:#helpIcon2
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher helpIcon2'
	ifAbsentPut:[(Depth8Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@PDA@PDA@@@A@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@P@@0@@A@PDA@PDA@PDA@PDA@PDA@PDA@PDA@PD@@DA@0@DA@PDA@PDA@PDA@PDA@PDA@PDA@PDA@@A@PDC@@PDA@PDA@PDA@PDA@PDA@PDA@PDA@P@@PDA@PL@A@PDA@PDA@PDA@PDA@PDA@PDA@@@@@DA@PDA@@PDA@PDA@P@@@@DA@PDA@PDA@@C@P@A@PDA@PD@A@P@@@@@@PDA@@PDA@PD@@@A@PD@@PDA@PDA@@@@@0DA@PDA@P@@@@@D@@H@@PDA@@DA@PDA@P@C@0LA@PDA@PDC@@H@A@@B@@DA@P@A@PDA@PD@@0LC@PDA@PDA@P@B@@P@@ @A@PD@@PDA@PDA@@LC@ DA@PDE@PD@@ @D@@H@@PDA@@DA@PDA@P@C@0LE@PDE@PDA@@H@A@@B@@DA@P@A@PDA@PD@@0LC@0TE@PDA@P@B@@P@@ @A@PD@@PDA@PDA@@LC@0LAAPDA@PD@@ @D@@H@@PDA@@DA@PDA@P@C@0LCAPDE@PDA@@H@@@H@@0DA@P@A@PDA@PD@@0LC@ DA@PTA@P@B@@@B@@DA@PD@@@LA@PDA@@LC@ LA@PDAAPD@@ @@@ @A@PDA@PD@@@LA@P@C@0LC@PDA@PDA@@H@@@H@@PDA@PDA@0L@@0D@@0LC@0DA@PDA@P@B@@@B@@DA@PDA@PLC@0@C@@LC@0LA@PDA@PD@@ @@@ @@@@@@@PDC@0LC@@@C@0LC@PDA@@@@@@H@@@H@@0LC@0@@@@LC@0L@@0LC@0@@@@LC@0@B@@@B@@@@@0LC@0L@@@@C@@L@@@@C@0LC@0@@@ @@@@HB@ @@@0LC@0LC@@@@@0LC@0L@@@@B@ H@A@P@@@@B@ @@@@LC@0LC@0LC@0@@@ H@@@@@A@PDA@PD@@@@@ H@@@@C@0L@@@@B@ @@A@PDA@PDA@PDA@PDA@@@@@HB@@@@@ H@@@@DA@PDA@PDA@PDA@PDA@PDA@P@@@@@@@@@A@PDA@PDA@PDA@@a') ; colorMapFromArray:#[0 0 0 253 253 253 191 191 0 192 192 192 0 0 0 0 204 51]; mask:((ImageMask new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@X@@@@G @@@A<@@@@_ @@@G<@@@G?@\@C?9? C????A????0_???<G????A????0_???<G????A????0????<O????C????0????<O????C????0????<O????C????0O???8@_?? @@?? @@A?@@@@a') ; yourself); yourself]

    "Created: / 7.8.1998 / 19:40:08 / cg"
! !

!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
          #window: 
           #(#WindowSpec
              #name: 'Launcher'
              #layout: #(#LayoutFrame 407 0 353 0 697 0 554 0)
              #label: 'Launcher'
              #min: #(#Point 374 44)
              #max: #(#Point 1152 900)
              #bounds: #(#Rectangle 407 353 698 555)
              #menu: #menu
              #usePreferredExtent: false
              #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)
                )
                 #(#ArbitraryComponentSpec
                    #name: 'transcriptView'
                    #layout: #(#LayoutFrame 0 0.0 40 0.0 0 1.0 -26 1.0)
                    #hasHorizontalScrollBar: true
                    #hasVerticalScrollBar: true
                    #miniScrollerHorizontal: true
                    #component: #TextCollector
                    #hasBorder: false
                )
                 #(#UISubSpecification
                    #name: 'infoBarSubSpec'
                    #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
                    #majorKey: #ToolApplicationModel
                    #minorKey: #windowSpecForInfoBarWithClock
                )
              )
          )
      )

    "Modified: / 10.9.1998 / 22:00:11 / cg"
! !

!NewLauncher class methodsFor:'menu specs'!

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
                #label: 'About'
                #activeHelpKey: #about
                #labelImage: #(#ResourceRetriever nil #menuIcon)
                #submenu: 
                 #(#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
                )
            )
             #(#MenuItem
                #label: 'File'
                #translateLabel: true
                #activeHelpKey: #file
                #submenu: 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #label: 'File Browser'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #fileFileBrowser
                          #argument: 'FileBrowser'
                          #labelImage: #(#ResourceRetriever nil #startFileBrowserIcon 'File Browser')
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Modules...'
                          #translateLabel: true
                          #value: #objectModuleDialog
                          #activeHelpKey: #fileModules
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#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: 'Save Image'
                          #translateLabel: true
                          #value: #saveImage
                          #activeHelpKey: #fileSaveImage
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: 'Save Image As...'
                          #translateLabel: true
                          #value: #saveImageAs
                          #activeHelpKey: #fileSaveImageAs
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Exit...'
                          #translateLabel: true
                          #value: #exit
                          #activeHelpKey: #fileExit
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #label: 'Classes'
                #translateLabel: true
                #activeHelpKey: #classes
                #submenu: 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #label: 'System Browser'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #classesSystemBrowser
                          #argument: 'SystemBrowser'
                          #labelImage: #(#ResourceRetriever nil #startSystemBrowserIcon 'System Browser')
                      )
                       #(#MenuItem
                          #label: 'System Browser On Class'
                          #translateLabel: true
                          #activeHelpKey: #classesSystemBrowserOnClass
                          #labelImage: #(#ResourceRetriever nil #startSystemBrowserOnHistoryClassIcon 'System Browser On Class')
                          #submenuChannel: #menuClassHistory
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Class Browser...'
                          #translateLabel: true
                          #value: #startClassBrowser
                          #activeHelpKey: #classesClassBrowser
                      )
                       #(#MenuItem
                          #label: 'Full Class Browser...'
                          #translateLabel: true
                          #value: #startFullClassBrowser
                          #activeHelpKey: #classesFullClassBrowser
                      )
                       #(#MenuItem
                          #label: 'Class Hierarchy Browser...'
                          #translateLabel: true
                          #value: #startClassHierarchyBrowser
                          #activeHelpKey: #classesClassHierarchyBrowser
                      )
                       #(#MenuItem
                          #label: 'Class Tree'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #classesClassTreeBrowser
                          #argument: 'ClassTreeGraphView'
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Implementors...'
                          #translateLabel: true
                          #value: #browseImplementors
                          #activeHelpKey: #classesImplementors
                      )
                       #(#MenuItem
                          #label: 'Senders...'
                          #translateLabel: true
                          #value: #browseSenders
                          #activeHelpKey: #classesSenders
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Special'
                          #translateLabel: true
                          #value: #special
                          #activeHelpKey: #classesSpecial
                          #submenu: 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #label: 'References To Undeclared'
                                    #translateLabel: true
                                    #value: #browseUndeclared
                                    #activeHelpKey: #classesSpecialReferencesToUndeclared
                                )
                                 #(#MenuItem
                                    #label: 'Find Resource Methods...'
                                    #translateLabel: true
                                    #value: #browseResources
                                    #activeHelpKey: #classesResourceMethods
                                )
                                 #(#MenuItem
                                    #label: 'Show All Break && Trace Points'
                                    #translateLabel: true
                                    #value: #browseAllBreakAndTracePoints
                                    #activeHelpKey: #classesShowTracePoints
                                )
                                 #(#MenuItem
                                    #label: '-'
                                )
                                 #(#MenuItem
                                    #label: 'Remove All Break && Trace Points'
                                    #translateLabel: true
                                    #value: #removeAllBreakAndTracePoints
                                    #activeHelpKey: #classesRemoveAllTracePoints
                                )
                              ) nil
                              nil
                          )
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #label: 'Tools'
                #translateLabel: true
                #activeHelpKey: #tools
                #submenu: 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #label: 'Workspace'
                          #value: #openApplication:
                          #activeHelpKey: #toolsWorkspace
                          #argument: 'Workspace'
                          #labelImage: #(#ResourceRetriever nil #startWorkspaceIcon 'Workspace')
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'GUI Painter'
                          #value: #openApplication:
                          #activeHelpKey: #toolsGUIPainter
                          #argument: 'UIPainter'
                          #labelImage: #(#ResourceRetriever nil #startUIPainterIcon 'GUI Painter')
                      )
                       #(#MenuItem
                          #label: 'Menu Editor'
                          #value: #openApplication:
                          #activeHelpKey: #toolsMenuEditor
                          #argument: 'MenuEditor'
                          #labelImage: #(#ResourceRetriever nil #startMenuEditorIcon 'Menu Editor')
                      )
                       #(#MenuItem
                          #label: 'Image Editor'
                          #value: #openApplication:
                          #activeHelpKey: #toolsImageEditor
                          #argument: 'ImageEditor'
                          #labelImage: #(#ResourceRetriever nil #startImageEditorIcon 'Image Editor')
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Changes Browser'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #toolsChangesBrowser
                          #argument: 'NewChangesBrowser'
                          #labelImage: #(#ResourceRetriever nil #startChangesBrowserIcon 'Changes Browser')
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Misc'
                          #translateLabel: true
                          #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: 'New Launcher'
                                    #translateLabel: true
                                    #value: #startNewLauncher
                                    #activeHelpKey: #toolsMiscNewLauncher
                                )
                                 #(#MenuItem
                                    #label: 'Old Launcher'
                                    #translateLabel: true
                                    #value: #startOldLauncher
                                    #activeHelpKey: #toolsMiscOldLauncher
                                )
                                 #(#MenuItem
                                    #label: '-'
                                )
                                 #(#MenuItem
                                    #label: 'Old Changes Browser'
                                    #translateLabel: true
                                    #value: #startOldChangesBrowser
                                    #activeHelpKey: #toolsOldChangesBrowser
                                )
                                 #(#MenuItem
                                    #label: '-'
                                )
                                 #(#MenuItem
                                    #label: 'Terminal'
                                    #translateLabel: true
                                    #isVisible: #canDoTerminal
                                    #value: #openTerminal
                                    #activeHelpKey: #toolsTerminal
                                )
                              ) nil
                              nil
                          )
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #label: 'System'
                #translateLabel: true
                #activeHelpKey: #system
                #submenu: 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #label: 'Memory'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #systemMemory
                          #argument: 'MemoryMonitor'
                      )
                       #(#MenuItem
                          #label: 'Memory Usage'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #systemMemoryUsage
                          #argument: 'MemoryUsageView'
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Processes'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #systemProcesses
                          #argument: 'ProcessMonitor'
                      )
                       #(#MenuItem
                          #label: 'Semaphores'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #systemSemaphores
                          #argument: 'SemaphoreMonitor'
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Interrupt Latency'
                          #translateLabel: true
                          #value: #startLatencyMonitor
                          #activeHelpKey: #systemInterruptLatency
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Event View'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #systemEventView
                          #argument: 'EventMonitor'
                      )
                       #(#MenuItem
                          #label: 'Event Trace'
                          #translateLabel: true
                          #value: #startStopEventTrace
                          #activeHelpKey: #systemEventTrace
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Collect Garbage'
                          #translateLabel: true
                          #value: #garbageCollect
                          #activeHelpKey: #systemGarbageCollect
                          #labelImage: #(#ResourceRetriever nil #garbageCollectIcon 'Collect Garbage')
                      )
                       #(#MenuItem
                          #label: 'Collect Garbage And Compress'
                          #translateLabel: true
                          #value: #compressingGarbageCollect
                          #activeHelpKey: #systemGarbageCollectAndCompress
                          #labelImage: #(#ResourceRetriever nil #garbageCollectIcon 'Collect Garbage And Compress')
                      )
                       #(#MenuItem
                          #label: '-'
                          #isVisible: #javaSupportPresent
                      )
                       #(#MenuItem
                          #label: 'Reinit Java VM'
                          #isVisible: #javaSupportPresent
                          #value: #initJavaVM
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #label: 'Settings'
                #translateLabel: true
                #activeHelpKey: #settings
                #submenu: 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #label: 'Language...'
                          #translateLabel: true
                          #value: #languageSetting
                          #activeHelpKey: #settingsLanguage
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: 'Keyboard Mappings...'
                          #translateLabel: true
                          #value: #keyboardSetting
                          #activeHelpKey: #settingsKeyboardMappings
                      )
                       #(#MenuItem
                          #label: 'View Style...'
                          #translateLabel: true
                          #value: #viewStyleSetting
                          #activeHelpKey: #settingsViewStyle
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: 'Fonts...'
                          #translateLabel: true
                          #value: #fontSettings
                          #activeHelpKey: #settingsFonts
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Messages...'
                          #translateLabel: true
                          #value: #messageSettings
                          #activeHelpKey: #settingsMessages
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: 'Compilation...'
                          #translateLabel: true
                          #value: #compilerSettings
                          #activeHelpKey: #settingsCompilation
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: 'Object Memory...'
                          #translateLabel: true
                          #value: #memorySettings
                          #activeHelpKey: #settingsObjectMemory
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: 'Source And Debugger...'
                          #translateLabel: true
                          #value: #sourceAndDebuggerSettings
                          #activeHelpKey: #settingsSourceAndDebugger
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Printer...'
                          #translateLabel: true
                          #value: #printerSettings
                          #activeHelpKey: #settingsPrinter
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: 'Screen...'
                          #translateLabel: true
                          #value: #displaySettings
                          #activeHelpKey: #settingsScreen
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Misc...'
                          #translateLabel: true
                          #value: #miscSettings
                          #activeHelpKey: #settingsMisc
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Save Settings...'
                          #translateLabel: true
                          #value: #saveSettings
                          #activeHelpKey: #settingsSaveSettings
                      )
                       #(#MenuItem
                          #label: 'Load Settings...'
                          #translateLabel: true
                          #value: #loadSettings
                          #activeHelpKey: #settingsLoadSettings
                          #enabled: #enableDangerousMenuItemsInRemoteLauncher
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #label: 'Windows'
                #translateLabel: true
                #activeHelpKey: #windows
                #submenu: 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #label: 'Iconify All'
                          #translateLabel: true
                          #value: #iconifyAllWindows
                          #activeHelpKey: #windowsIconifyAll
                      )
                       #(#MenuItem
                          #label: 'De-iconify All'
                          #translateLabel: true
                          #value: #deIconifyAllWindows
                          #activeHelpKey: #windowsDeiconifyAll
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'View Tree'
                          #translateLabel: true
                          #value: #startWindowTreeView
                          #activeHelpKey: #windowsViewTree
                      )
                       #(#MenuItem
                          #label: 'View Tree (all windows)'
                          #translateLabel: true
                          #value: #openApplication:
                          #activeHelpKey: #windowsViewTreeAllViews
                          #argument: 'WindowTreeView'
                      )
                       #(#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: '-'
                      )
                       #(#MenuItem
                          #label: 'Find And Raise...'
                          #translateLabel: true
                          #value: #findAndRaiseWindow
                          #activeHelpKey: #windowsFindAndRaise
                      )
                       #(#MenuItem
                          #label: 'Find And Destroy...'
                          #translateLabel: true
                          #value: #findAndDestroyWindow
                          #activeHelpKey: #windowsFindAndDestroy
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Grab Window...'
                          #translateLabel: true
                          #value: #viewHardcopy
                          #activeHelpKey: #windowsGrapWindow
                      )
                       #(#MenuItem
                          #label: 'Grab Widget...'
                          #translateLabel: true
                          #value: #widgetHardcopy
                      )
                       #(#MenuItem
                          #label: 'Grab Screen...'
                          #translateLabel: true
                          #value: #fullScreenHardcopy
                          #activeHelpKey: #windowsGrapScreen
                      )
                       #(#MenuItem
                          #label: 'Grab Screen Area...'
                          #translateLabel: true
                          #value: #screenHardcopy
                          #activeHelpKey: #windowsGrapScreenArea
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #label: 'Demos'
                #translateLabel: true
                #activeHelpKey: #demos
                #submenu: 
                 #(#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
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #label: 'Games'
                          #translateLabel: true
                          #activeHelpKey: #demosGames
                          #submenu: 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #label: 'Tetris'
                                    #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
                                )
                              ) 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: '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: 'Globe Demo'
                                    #translateLabel: true
                                    #value: #openDemo:
                                    #activeHelpKey: #demosGlobe
                                    #argument: 'GlobeDemo'
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #label: '3D Graphics'
                          #translateLabel: true
                          #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
                )
            )
             #(#MenuItem
                #label: 'Help'
                #translateLabel: true
                #startGroup: #right
                #activeHelpKey: #help
                #submenu: 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #label: 'What''s New'
                          #translateLabel: true
                          #value: #startWhatsNewDocumentation
                          #activeHelpKey: #helpWhatsNew
                      )
                       #(#MenuItem
                          #label: '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: 'Active Help'
                          #translateLabel: true
                          #value: #toggleActiveHelp:
                          #activeHelpKey: #helpActiveHelp
                          #indication: #activeHelp
                      )
                       #(#MenuItem
                          #label: '-'
                      )
                       #(#MenuItem
                          #label: 'Show Help Texts'
                          #translateLabel: true
                          #activeHelpKey: #helpShowHelp
                          #indication: #showingHelp:
                      )
                    ) nil
                    nil
                )
            )
          ) nil
          nil
      )

    "Modified: / 29.9.1998 / 10:50:05 / cg"
!

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
		#label: 'open workspace'
		#isButton: true
		#value: #openApplication:
		#activeHelpKey: #toolsWorkspace
		#argument: 'Workspace'
		#labelImage: #(#ResourceRetriever nil #startWorkspaceIcon)
	    )
	     #(#MenuItem
		#label: 'open file browser'
		#isButton: true
		#value: #openApplication:
		#activeHelpKey: #fileFileBrowser
		#argument: 'FileBrowser'
		#labelImage: #(#ResourceRetriever nil #startFileBrowserIcon)
	    )
	     #(#MenuItem
		#label: 'save image'
		#isButton: true
		#value: #saveImageAs
		#activeHelpKey: #fileSaveImageAs
		#labelImage: #(#ResourceRetriever nil #saveImageIcon)
	    )
	     #(#MenuItem
		#label: ''
	    )
	     #(#MenuItem
		#label: 'open system browser'
		#isButton: true
		#value: #openApplication:
		#activeHelpKey: #classesSystemBrowser
		#argument: 'SystemBrowser'
		#labelImage: #(#ResourceRetriever nil #startSystemBrowserIcon)
	    )
	     #(#MenuItem
		#label: 'System Browser On Class'
		#isButton: true
		#activeHelpKey: #classesSystemBrowserOnClass
		#labelImage: #(#ResourceRetriever nil #startSystemBrowserOnHistoryClassIcon)
		#submenuChannel: #menuClassHistory
	    )
	     #(#MenuItem
		#label: 'open changes browser'
		#isButton: true
		#value: #openApplication:
		#activeHelpKey: #toolsChangesBrowser
		#argument: 'NewChangesBrowser'
		#labelImage: #(#ResourceRetriever nil #startChangesBrowserIcon)
	    )
	     #(#MenuItem
		#label: ''
	    )
	     #(#MenuItem
		#label: 'open GUI Builder'
		#isButton: true
		#value: #openApplication:
		#activeHelpKey: #toolsGUIPainter
		#argument: 'UIPainter'
		#labelImage: #(#ResourceRetriever nil #startUIPainterIcon)
	    )
	     #(#MenuItem
		#label: 'open menu editor'
		#isButton: true
		#value: #openApplication:
		#activeHelpKey: #toolsMenuEditor
		#argument: 'MenuEditor'
		#labelImage: #(#ResourceRetriever nil #startMenuEditorIcon)
	    )
	     #(#MenuItem
		#label: 'open image editor'
		#isButton: true
		#value: #openApplication:
		#activeHelpKey: #toolsImageEditor
		#argument: 'ImageEditor'
		#labelImage: #(#ResourceRetriever nil #startImageEditorIcon)
	    )
	     #(#MenuItem
		#label: ''
	    )
	     #(#MenuItem
		#label: 'garbage collect and compress'
		#isButton: true
		#value: #compressingGarbageCollect
		#activeHelpKey: #systemGarbageCollectAndCompress
		#labelImage: #(#ResourceRetriever nil #garbageCollectIcon)
	    )
	     #(#MenuItem
		#label: 'help'
		#translateLabel: true
		#isButton: true
		#startGroup: #right
		#value: #startDocumentationTool
		#activeHelpKey: #helpSTXOnlineDocumentation
		#labelImage: #(#ResourceRetriever nil #helpIcon2)
	    )
	  ) nil
	  nil
      )

    "Modified: / 7.8.1998 / 19:40:36 / cg"
! !

!NewLauncher class methodsFor:'resources'!

garbageCollectIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     ImageEditor openOnClass:self andSelector:#garbageCollectIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher garbageCollectIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'DQD@@@.;.1D[DQDQD@@QDP@@.;.;,[,@@ADP@ADQ@@.;@@.;.1@@@A@@DQD@B;@@@[.;DCH@D@@QDP@K,@@K.;,Q@2@P@ADQ@K.;@@DQDQDPL @@DQDKB;B0@QDQ@@@C@@@QD[B0B0,ADP@"H"@@@ADQ@@@@@@DQ@P@@@0@@DQ@@@@C 8@@ADQL3@@@Q@@@@;.;.@@DCL0H@@@@@@@@NC @@@PLC@ @@@@@@C.;.8@@A@0LB@@@@@@@@8N@@@@DC@0H@@@@@B (@@AD@@PLC@ @@@@****@LG@@A@0LB@@@@@JB CL3L0@DC@0H@@@B***(@0L@Q@SLCL @@@@(J@L3L3AD@L"H @@@@@QDQC@0QDQD@@@DP@@@ADQD@@@@QD@@@@@@@@ @B@ @B@@HB@ H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B@@H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@H@@@H@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@G1@@@C>0@@A1=0@@XO^@@FG30@C0@^@AZ@? @)P?8@@@O>@@B#? @C<?8@@TO>@@_#? @B ?8@E@O>@G9S? @)>?8@?JO>@EO3? @APO @@@@@@]7]7\DUUUDAEUUQ@U7]5\EUUUTAUUUU@]U]W\@@a') ; yourself); yourself]!

saveImageIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     ImageEditor openOnClass:self andSelector:#saveImageIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher saveImageIcon'
	ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UPSL3L0A@ET7L3L0?PAUML3L3OT@US\3L3C5@ET43L3L?PAUM3L3LO4@USSL3L3=@ET7L3L0?PAUML3L3O4@US\3L3C=@ET43L3L?PAUM@@@@O4@US?????=@ET?UUUU?PAUO7??6?4@US=T?=+=@ET?ZO?Z?PAUO4C?6/4@U]U**)WU@ET@@@@@@@AUUUUUUUUU%Y%UUUTE%%UUUUTU)UEUUUUEUUUUUUVYUUTEUTUUUUDUAUUUUUUQUPUUVUUUUUTU%P@a') ; colorMapFromArray:#[255 255 255 0 0 0 127 127 127 170 170 170]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C???@@???0@O??<@C???@@???0@O??<@C???@@???0@O??<@C???@@???0@O??<@C???@@???0@O??<@C???@@???0@O??<@C??>@@@@@@@@@@@@;*9R<H*(W)BJ*E:@S.9R,B)HT)@*REJP:$9R<@@a') ; yourself); yourself]!

startChangesBrowserIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     ImageEditor openOnClass:self andSelector:#startChangesBrowserIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher startChangesBrowserIcon'
	ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@B****@@@@@@@@@ @@@B****H@@@@@@@@"@@@C????H @@@@@@@2H@@C????L"@@@@@@@3H@@AUUUUL2@@@@@@@SL@@AUUUUD3@@@_=UUQL@@@EUUUTS@@@A]7UUD@@@@U7]5Q@@@@E7]5T@@@@AUUUU@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BH@@@@@@@@LB@L@@@@@@@@@@@@@@@@J@@@@@@@@@@@@@@@@@@H@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@??8@@O?>@@O?? @C??8@C??>@@??? @???8@O??>@O??? C??? C???8@???8@O??>@C??>@@??? @O?? @C??8@@??8@@O?>@@@@@@@@@@@@@Z.$7LH+-YDBJ+TQ@#.=WHH*+UABJ*5PPZ*$7X@@a') ; yourself); yourself]!

startFileBrowserIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     ImageEditor openOnClass:self andSelector:#startFileBrowserIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher startFileBrowserIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@CLA&Y&Y&Y&X@@@@@@@@L0F@@@@@@A @@@@@@@@3@XN;.;.8F@@@@@@@@CLA ;.@@@@@@@@@@@@@L0FC.8O[6=/[0@@@@@@3@X@; [6=/[6@@@@@@CLA DNC6<@@F<@@@@@@L0F@A@F= [0= @@@@@@3@X@@P=/[6=/@@@@@@CLA @@A/[6=/X@@@@@@L0FC0@O[6=/[0@@@@@@3@XF<@@@@@@@@@@@@@CLA = @@@@@@@@@@@@@L0FA/[6=/A @@@@@@@@3@XO[6=/XF@@@@@@@@CLA @@@@@@X@@@@@@@@L0FY&Y&Y&Y @@@@@@@@C@Y&Y&Y&Y&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C @b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A??<@@_??@@G??0@A??<@@_??8@G??>@A??? @_??8@G??>@A??? @_??8@G??>@A??? @_??@@G??0@A??<@@_??@@G??0@@??<@@G??@@@@@@@G.P=0AADHP@PQBD@GDP8 AADHD@PQBA@DN^=0@@a') ; yourself); yourself]!

startImageEditorIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     ImageEditor openOnClass:self andSelector:#startImageEditorIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher startImageEditorIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@M7]7]7]7]7]7]@@@@@@@@@@@@@@@@@@@@@@@@@"H"H"HDQEUVY @@@@@BH"H3L QDUUY&@@@@@@HA@#L2ADQUU&X@@@@@@"H"H"HH"I&W]0@@@@@BL3L3L "H&Y]7@@@@@@H"H"H"BH"Y%7\@@@@@@#L3L3HDQEUVY @@@@@BH"H"H QDUUY&@@@@@@H3L3L2ADQUU&X@@@@@@"H"H"HH"I&W]0@@@@@BL#L3L "H&Y]7@@@@@@H2L3L2BH"Y%7\@@@@@@"H"H"HBH"H"H @@@@@@@@@@@@@@@@@@@@@@@@H"H"H"H"H"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C@0@0@0L@L@@@@@@@@@@0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@L@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???8@O??>@C??? @???8@O??>PC???&@???90O??>^C???''0???90O??>TC???  ???8HO??>AC??? P???8@O??>@C??? @???8@@@@@@@@@@@@;[7/@D>%J@AJ)P @RK5.@D"%J@AH)R @:JW/@@@a') ; yourself); yourself]!

startMenuEditorIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self startMenuEditorIcon inspect
     ImageEditor openOnClass:self andSelector:#startMenuEditorIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher startMenuEditorIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@DQDQDQDQDQDQD@@@@@@@@@@@@@@@@@@@@@@@@@QH"H DQHQD"H @@@@@ATBH"@RHBH H"@@@@@@H@H"HAT%UUUUT@@@@@@%H"H D%IRT%IP@@@@@BUQIU@UIRT%IR@@@@@@IRHBHAIRT%IRT@@@@@@%H"H ERT%IRT @@@@@BUQIU@RT%IRT%@@@@@@IRHBHAT%IRT%H@@@@@@%H"H D%IRT%IP@@@@@BUQIU@UIRT%IR@@@@@@H"HBHAIRT%IRT@@@@@@"H"H IRT%IRT @@@@@@@@@@@@@@@@@@@@@@@@H"H"H"H"H"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@APT@@@@@@@@@@@@@@@@@T@@@@@@@@@@@@@@@@@@@@@@@@@T@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@T@T@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 255 0 0 127 127 127 127 127 255 0 0 0 255 0 0 0 255 0 255 255 255 0 255 127 0 0 0 127 0 0 0 127 127 127 0 127 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???8@O??>@C??? @???8@O??>PC???&@???90O??>^C???''0???90O??>TC???  ???8HO??>AC??? P???8@O??>@C??? @???8@@@@@@@@@@@@6=D$@O(YI@B*GRP@"9T$@H(WI@BJD2P@"=D<@@@a') ; yourself); yourself]!

startSystemBrowserIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self startSystemBrowserIcon inspect
     ImageEditor openOnClass:self andSelector:#startSystemBrowserIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher startSystemBrowserIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@ADQDQDQG0@@@@@@@@@@D"H"H"H.@@@@@@@@@@@RH"H"H"8@@@@@@@@@@O;.;.;.; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8@@@@@@@@@@@@@@@@@C @@@@@@@@@@@@@@@@@N@@@@@@@@@@@@@@@@@@@@@@@@DQDQDQG0@@@@@P;.;.@SL3L3L>@@@@@@@@@@@O;.;.;.8@@@@@8@@@@@@@@@@@@@@@@@C @@@@@@@@@@@@@@@@@N@@@@@@@@@@@@@@@@@@@@@@@@DQDQDQG0@@@@@P;.;.@VY&Y&Y.@@@@@@@@@@@O;.;.;.8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8@@@@N@NC @@8@@@C @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8@@@@@@@@@8@C @@@@8b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??0@@O?<@@C??@@@??0@@O?<@@C??@@@@ @@@@H@@@@B@?? A0O?8@_??>@G@?? @ O?8@H@@@@B@?? A0O?8@_??>@G@?? @@O?8@@@@@@@@@@@9O\7\IRTQDBD%DQ@!!OH''HHRQEABT$QPP99]7\@@a') ; yourself); yourself]
!

startSystemBrowserOnHistoryClassIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     self startSystemBrowserOnHistoryClassIcon inspect
     ImageEditor openOnClass:self andSelector:#startSystemBrowserOnHistoryClassIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher startSystemBrowserOnHistoryClassIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@ADQDQDQG0@@@@@@@@@@D"H"H"H.@@@@@@@@@@@RH"H"H"8@@@@@@@@@@O;.;.;.; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8@@@@@@@@@@@@@@@@@C @@@@@@@@@@@@@@@@@N@@@@@@@@@@@@@@@@@@@@@@@@DQ@@@QG0@@@@@P;.;.@SL@@CL>@@@@@@@@@@@O; @@;.8@@@@@8@@@@@@@@@@@@@@@@@C @@@@@@@@@@@@@@@@@N@@@@@@@@@@@@@@@@@@@@@@@@DQ@@@QG0@@@@@P;.;.@VX@@FY.@@@@@@@@@@@O8@@@C.8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C @@@@8@8@@N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8@@@8@8@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??0^@O?<O0C??FF@??1!! O?<XXC??CF@@ @C@@H@A @B@>7 A0O[8@_?6>@G@=/ @ O[8@H@@@@B@<O A0O[8@_??>@G@;7 @@NY8@@@@@@@@@@@%]7/TITIJUBUBR%P=H$/TIQIJRBTRR$ %\'')P@@a') ; yourself); yourself]!

startUIPainterIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     ImageEditor openOnClass:self andSelector:#startUIPainterIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher startUIPainterIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@DQDQDQDQDQDQD@@@@@@@@@@@@@@@@@@@@@@@@@3H"H DQHQD"H @@@@@CLBH"@RHBH H"@@@@@@H@H"HAT%UUUUT@@@@@@%H"H D%IRT%IP@@@@@BUSMU@UIRT%IR@@@@@@IRLBHAIRT%IRT@@@@@@%H"H ERT%IRT @@@@@BUSMU@RT%IRT%@@@@@@IRLBHAT%IRT%H@@@@@@%H"H D%IRT%IP@@@@@BUSMU@UIRT%IR@@@@@@H"LBHAIRT%IRT@@@@@@"H"H IRT%IRT @@@@@@@@@@@@@@@@@@@@@@@@H"H"H"H"H"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@T@AP@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@T@@@AP@E@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 255 0 0 127 127 127 127 127 255 0 0 0 255 0 0 0 255 0 255 255 255 0 255 127 0 0 0 127 0 0 0 127 127 127 0 127 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???8@O??>@C??? @???8@O??>PC???&@???90O??>^C???''8???90O??>TC???  ???8HO??>A#??? X???8@O??>@C??? @???8@@@@@@@@@@@@>QN@@H$Q@@BADP@@.QD@@H$Q@@BIDP@@>_N@@@@a') ; yourself); yourself]!

startWorkspaceIcon
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

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

    "
     ImageEditor openOnClass:self andSelector:#startWorkspaceIcon
    "

    <resource: #image>

    ^Icon
	constantNamed:#'NewLauncher startWorkspaceIcon'
	ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@M7]7]7]7]7]7]7]@@@@@@@@@@@@@@@@@@@@@@@QDQDQDQDQDQDQ@0@@@AUPUUUUAUAQDQDB@@@@EUAUUUTE@@DQDPH@@@@P@E@@UPUPTQDQ@ @@@AAPTEAUAUAQDQDB@@@@D@AP@ETET@DQDPH@@@@QDQDQDQDQEADQ@ @@@ADQDQDQDQDTPQDB@@@@DQDQDQDQDQQDDPH@@@@QDQDQDQDQEDDQ@ @@@ADQDQDQDQDQEADB@@@@DQDQDQDQDQDTDPH@@@@QDQDQDQDQDQDQ@0@@@@@@@@@@@@@@@@@@@@@@L"H"H"H"H"H"H0L@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C@@L@@C@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C@@L@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'????@O???0C???<@????@O???0C???<@????@O???0C???<@????@O???0C???<@????@O???0C???<@????@O???0C???<@????@@@@@@@@@@@@ //R@HJJT BB"%P@$(/X@IJJU@BR"%H@[O)R@@@a') ; yourself); yourself]! !

!NewLauncher methodsFor:'accessing'!

menuToolbar
    |menu item|

    menu := Menu new fromLiteralArrayEncoding:(self class menuToolbar).
    menu receiver:self.
    menu findGuiResourcesIn:self.

    ^ menu


! !

!NewLauncher methodsFor:'aspects'!

canDoTerminal
    ^ [OperatingSystem isUNIXlike]

    "Created: / 27.7.1998 / 12:47:54 / cg"
!

enableDangerousMenuItemsInRemoteLauncher

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

javaSupportPresent
    ^ [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"
! !

!NewLauncher methodsFor:'change & update'!

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

    ((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 packageName.
	defNameSpace := project defaultNameSpace.
    ].
    defNameSpace isNil ifTrue:[
	defNameSpace := Smalltalk.
    ].

    defNameSpace == Smalltalk ifTrue:[
	msg := 'Project: ''%1'' fileOut to: ''%3'' package: ''%2'''.
	args := Array 
		    with:projectName
		    with:packageName 
		    with:(projectDir contractTo:30).
    ] ifFalse:[
	msg := 'Project: ''%1'' fileOut to: ''%3'' package: ''%2''  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:'private'!

findWindow:title
    "a helper for find & destroy and find & raise operations;
     let user choose a view and return it; return nil on cancel"

    |knownTopViews nameList box|

    knownTopViews := IdentitySet new.
    Screen allScreens do:[:aScreen |
	aScreen knownViews do:[:aView |
	    |top showIt wg|

	    aView notNil ifTrue:[
		top := aView topView.
		(top isKindOf:DebugView) ifTrue:[
		    "/ although modal, show it.
		    showIt := top realized
		] ifFalse:[
		    wg := top windowGroup.
		    showIt := (wg notNil and:[wg isModal not]).
		].
		showIt ifTrue:[
		    knownTopViews add:top
		]
	    ]
	]
    ].

    knownTopViews := knownTopViews asOrderedCollection.
    knownTopViews sort:[:v1 :v2 | |l1 l2|
				l1 := v1 label ? 'aView'.
				l2 := v2 label ? 'aView'.
				l1 < l2
		       ].
    nameList := knownTopViews collect:[:v | 
					|isDead wg p l|

					l := v label ? 'aView'.
					((wg := v windowGroup) notNil
					and:[(p := wg process) notNil
					and:[p state ~~ #dead]]) ifTrue:[
					    l  
					] ifFalse:[
					    l , ' (dead ?)'
					]
				      ].

    box := ListSelectionBox new.
    box noEnterField.
    box list:nameList.
    box label:(resources string:'view selection').
    box title:(resources string:title) withCRs.
    box action:[:selection |
	|v|

	v := knownTopViews at:box selectionIndex.
	box destroy.
	^ v
    ].
    box extent:400@300.
    box showAtPointer.
    ^ nil

!

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

    |menu history|

    BrowserView checkClassHistory.

    history := BrowserView classHistory.

    menu := Menu new receiver: self.
    menu addItemGroup: (history collect:
	[:histEntry|

	    MenuItem new 
		label: (histEntry upTo: $ ); 
		value: [SystemBrowser open loadFromMessage: histEntry]; 
		activeHelpKey: #classesSystemBrowserOnClass
	]
    ).
    menu addItem: (MenuItem new 
			label: 'Empty History'; 
			value: [BrowserView classHistory removeAll]; 
			translateLabel: true;
			enabled:(history notEmpty);
			activeHelpKey: #historyEmptyMenu).

    menu findGuiResourcesIn:self.
    ^menu

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

openApplication: className
     "open an application, given by the classe name."

    self openApplication:className nameSpace:nil
!

openApplication:className nameSpace:aNameSpace
    "open some application, given the classes name.
     Look for it in Smalltalk and the given nameSpace"

    self openApplication:className nameSpace:aNameSpace with:#open
!

openApplication:className nameSpace:aNameSpace with:aSelector
    "open some application, given the classes name.
     Look for it in Smalltalk and the given nameSpace"

    |cls|

    cls := Smalltalk at:className asSymbol.
    cls isNil ifTrue:[
	"/ look if its in the nameSpace
	aNameSpace notNil ifTrue:[
	    cls := aNameSpace at:className asSymbol
	]
    ].

    cls isNil ifTrue:[
	self warn:(resources string:'Sorry, the %1 class is not available.' with:className).
    ] ifFalse:[
	Autoload autoloadFailedSignal handle:[:ex |
	    self warn:(resources string:'Sorry, the %1 class seems to be not available.' with:className)
	] do:[
	    self withWaitCursorDo:[cls perform:aSelector]
	]
    ]

!

saveAllViews
    "tell each topview that we are going to terminate and give it chance
     to save its contents."

    ObjectMemory changed:#aboutToExit
!

saveScreenImage:anImage defaultName:defaultName
    "save an image into a file 
     - ask user for filename using a fileSelectionBox."

    |fileName|

    fileName := Dialog
		    requestFileName:(resources string:'save image in:')
		    default:(defaultName , '.tiff')
		    ok:(resources string:'save')
		    abort:(resources string:'cancel')
		    pattern:'*.tiff'.

    fileName notNil ifTrue:[
	anImage saveOn:fileName
    ].

    "Modified: / 21.2.1996 / 13:09:28 / cg"
    "Created: / 29.1.1998 / 23:20:36 / cg"
!

showDocumentation:aRelativeDocFilePath
    "open an HTML browser on some document"

    "
     although that one is not yet finished,
     its better than nothing ...
    "
    HTMLDocumentView notNil ifTrue:[
	self withWaitCursorDo:[
	    "
	     temporary kludge;
	     not all machines can autoload binaries;
	     however, on my SGI (which can) we want it
	     to load automatically.
	    "
	    HTMLDocumentView isLoaded ifFalse:[
		ErrorSignal catch:[HTMLDocumentView autoload]
	    ].
	    HTMLDocumentView isLoaded ifTrue:[
		HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. 
		^ self
	    ].
	]
    ].

    self warn:'Sorry, the ST/X HTML reader is not
included in this release.

Please use Mosaic, netscape, chimera or any
other HTML viewer to see the documentation.

The documentation is found in the ''doc/online'' directory.'.

    "Modified: / 25.2.1998 / 21:24:20 / cg"
! !

!NewLauncher methodsFor:'private - settings callBacks'!

changeViewStyleTo:newStyle

    newStyle notNil ifTrue:[
	self withWaitCursorDo:[
	    transcript showCR:'change style to ' , newStyle , ' ...'.
	    View defaultStyle:newStyle asSymbol.
	].
	self reOpen
    ]

!

fontBoxForEncoding:encodingMatch
    "open a fontBox, showing fonts which match some encoding
     (used when changing to japanese ...)"

    |box y b
     labelDef buttonDef listDef menuDef textDef
     models labels allOfThem filter|

    encodingMatch notNil ifTrue:[
        filter := [:f | f encoding notNil 
                        and:[encodingMatch match:f encoding]].
    ].

    models := OrderedCollection new.
    labels := OrderedCollection new.

    models add:(allOfThem := nil asValue).
    models add:(labelDef := Label defaultFont asValue).
    models add:(buttonDef := Button defaultFont asValue).
    models add:(listDef := SelectionInListView defaultFont asValue).
    models add:(menuDef := MenuView defaultFont asValue).
    models add:(textDef := TextView defaultFont asValue).

    box := Dialog new.
    box label:(resources string:'Font settings').

    models
    with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text'))
    do:[:model :title |
        |y2 lbl f i|

        f := model value.

        (box addTextLabel:title) adjust:#left.

        y := box yPosition.
        b := box addComponent:(Button label:(resources string:'change ...')) tabable:true.
        b relativeExtent:nil; extent:(b preferredExtent).
        y2 := box yPosition.
        box yPosition:y.
        i := box leftIndent.
        box leftIndent:(b widthIncludingBorder + View viewSpacing).
        (lbl := box addTextLabel:'')
            adjust:#left;
            font:(model value);
            labelChannel:(BlockValue 
                            with:[:v | |f|
                                f := v value.
                                f isNil ifTrue:[
                                    ''
                                ] ifFalse:[
                                    f userFriendlyName
                                ]
                            ]
                            argument:model).
        labels add:lbl.

        box leftIndent:i.
        box yPosition:(box yPosition max:y2).
        box addVerticalSpace.
        box addHorizontalLine.
        box addVerticalSpace.

        b action:[
            |f|

            f := FontPanel 
                fontFromUserInitial:(model value) 
                              title:(resources string:'font for %1' with:title)
                             filter:filter.
            f notNil ifTrue:[
                model == allOfThem ifTrue:[
                    models do:[:m | m value:f].
                    labels do:[:l | l font:f]
                ] ifFalse:[
                    model value:f.  
                    lbl font:f.
                ].
            ]
        ].
        model == allOfThem ifTrue:[
            box addVerticalSpace
        ]
    ].

    box addAbortButton; addOkButton.
    (box addButton:(Button label:(resources string:'defaults')) before:nil)
        action:[
            "/ fetch defaults
            View readStyleSheetAndUpdateAllStyleCaches.
            labelDef value: Label defaultFont.
            buttonDef value: Button defaultFont.
            listDef value: SelectionInListView defaultFont.
            menuDef value: MenuView defaultFont.
            textDef value: TextView defaultFont.
        ].

    box open.
    box accepted ifTrue:[
        Label defaultFont:labelDef value.
        Button defaultFont:buttonDef value.
        Toggle defaultFont:buttonDef value.
        SelectionInListView defaultFont:listDef value.
        MenuView defaultFont:menuDef value.
        PullDownMenu defaultFont:menuDef value.
        TextView defaultFont:textDef value.
        EditTextView defaultFont:textDef value.
        CodeView defaultFont:textDef value.
    ].
    box destroy.
    ^ box accepted

    "Modified: / 15.9.1998 / 22:04:56 / cg"
!

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

    |contents builder newLauncher wasShowingHelp|

    wasShowingHelp := self showingHelp.

    contents := transcript endEntry; list.
    builder := self class openAt:(self window origin).
    builder window waitUntilVisible.
    newLauncher := builder application.
    newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor.
    newLauncher showingHelp:wasShowingHelp.
    DebugView newDebugger.

    "Modified: / 4.8.1998 / 17:08:33 / cg"
! !

!NewLauncher methodsFor:'queries'!

preferredExtent

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


!

processName
    "for monitors only - my name"

    ^ 'ST/X Launcher'

!

transcript
    "my transcript"

    ^ transcript
! !

!NewLauncher methodsFor:'startup / release'!

addTopViewsToCurrentProject
    "ignored here - the launcher is always global (i.e. not project private)."

    ^ self

!

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"
!

closeRequest
    "close request from windowing system (window close);
     confirm and ask if closing of launcher only or
     a smalltalk-exit is wanted"

    |answer|

    answer := Dialog 
		confirmWithCancel:(resources string:'Close %1 only or exit Smalltalk (close all)?' with:self class name)
		labels:(resources array:#('Cancel' 'Exit' 'Close'))
		default:3.
    answer isNil ifTrue:[
	"/ cancel
	^self
    ].

    answer == true ifTrue:[
	super closeRequest
    ].

    self exit

    "Modified: / 5.9.1998 / 16:40:11 / cg"
!

postOpenWith:aBuilder
    "increase my priority"

    self builder window windowGroup process priority:(Processor userSchedulingPriority + 1).
    UserAddedTools notNil ifTrue:[
	UserAddedTools associationsDo: 
	[:userTool| 
	    self addUserTool: userTool key 
		action: (userTool value at: 1)  
		in:     (userTool value at: 2) 
		icon:   (userTool value at: 3)
		space:  (userTool value at: 4)
	].
    ].
    super postOpenWith:aBuilder.
    self startClockOnTimedBlock: 
    [
	|now hours minutes suffix|

	now := Time now.

	hours := now hours.
	minutes := now minutes printString.
	suffix := ''.

	(resources at:'TIME_FORMAT' ifAbsent:12) == 12 ifTrue:[
	    suffix := ' am '.  
	    hours > 12 ifTrue: [hours := hours - 12. suffix := ' pm '].
	].

	minutes size = 1 ifTrue: [minutes := '0', minutes].

	self valueOfTimeLabel value: hours printString, ':', minutes, suffix.

	Processor removeTimedBlock: timeBlock.
	Processor addTimedBlock: timeBlock afterSeconds: 1
    ].

    "Modified: / 30.7.1998 / 21:46:43 / cg"
!

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"
!

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

!

saveAndTerminateRequest
    "some windowManagers can send this, to shutDown an application
     but let it save its state before, for later restart. 
     Although I have not yet encountered such a windowManager,
     we are already prepared for this ;-)"

    self snapshot.
    super saveAndTerminateRequest

!

setupTranscript 
    "create the transcript view"

    |launcher oldLauncher|

    "/ 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 ifTrue:[
	    launcher window graphicsDevice == device ifTrue:[
		OpenLaunchers notNil ifTrue:[
		    OpenLaunchers removeIdentical:launcher ifAbsent:nil.
		].
		(oldLauncher := Smalltalk at: #Launcher) notNil
		    ifTrue: [oldLauncher openLaunchers removeIdentical:launcher ifAbsent:nil].
		launcher close
	    ]
	]
    ].

    transcript := (builder 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: / 29.1.1998 / 22:06:03 / cg"
!

uninitialize

    super uninitialize.

    Screen current beep.
    OpenLaunchers notNil ifTrue:[OpenLaunchers removeIdentical:self ifAbsent:nil].
    Project notNil ifTrue:[Project removeDependent:self]
! !

!NewLauncher methodsFor:'user actions - about'!

openLicenseConditions
    "open an HTML browser on the 'LICENCE' document"

    self withWaitCursorDo:[
	|lang doc|

	Smalltalk releaseIdentification = 'ST/X_free_demo_vsn' ifTrue:[
	    doc := 'english/LICENCE_DEMO_STX.html'
	] ifFalse:[
	    ((lang := Smalltalk language) = 'de'
	    or:[lang = 'german']) ifTrue:[
		doc := 'german/LICENCE_STX.html'
	    ] ifFalse:[
		doc := 'english/LICENCE_STX.html'
	    ].
	].
	doc := resources at:'LICENCEFILE' default:doc.
	self showDocumentation:('../' , doc)
    ]

    "Created: / 5.2.1998 / 21:43:19 / cg"
    "Modified: / 23.4.1998 / 11:45:53 / cg"
! !

!NewLauncher methodsFor:'user actions - classes'!

browseAllBreakAndTracePoints
    "open a browser showing all breakPointed/traced methods
     (but, to get rid of them, there is also a menu itme to remove them all)"

    SystemBrowser browseMethods: WrappedMethod allInstances title:'all breakPointed/traced methods'

!

browseImplementors
    "open an implementors- browser after asking for a selector"

    |enterBox selector|

    enterBox := EnterBox 
		    title:(resources at:'Browse implementors of:') withCRs
		    okText:(resources at:'browse')
		    action:[:acceptedString | selector := acceptedString].
    enterBox showAtPointer.

    selector notNil ifTrue:[
	self withWaitCursorDo:[
	    SystemBrowser browseImplementorsOf:selector
	]  
    ].

!

browseResources
    "open a resource- browser after asking for a resource string"

    |box resourceHolder valueHolder component rsrc value t anyString|

    anyString := resources string:'* any *'.

    resourceHolder := ValueHolder newString.
    valueHolder := '*' asValue.

    box := DialogBox new.
    box label:(resources at:'Resource search:').
    component := box addTextLabel:(resources at:'Search for methods which contain a\particular resource specification') withCRs.
    component adjust:#left.
    box addVerticalSpace:10.

    component := box addTextLabel:(resources at:'Resource symbol (empty for any; no matchPattern allowed):') withCRs.
    component adjust:#left.
    component :=  box addComboBoxOn:resourceHolder tabable:true.
    component list:((Array with:anyString) , #('canvas' 'menu' 'keyboard' 'style' 'image' 'programMenu' nil 'needsFix')).

    component := box addTextLabel:(resources at:'Resource value (* for any; matchPattern is allowed):') withCRs.
    component adjust:#left.
    box addInputFieldOn:valueHolder tabable:true.

    box addVerticalSpace:10.
    box addHelpButtonFor:'programming/language.html#RESOURCEDEFS'.
    box addAbortButton; addOkButton.

    box showAtPointer.
    box destroy.

    box accepted ifTrue:[
	rsrc := resourceHolder value.
	value := valueHolder value.

	(rsrc isNil or:[rsrc isEmpty or:[rsrc = '*' or:[rsrc = anyString]]]) ifTrue:[
	    t := 'methods with any resource'.
	    rsrc := nil
	] ifFalse:[
	    t := 'methods with #' , rsrc , '-resource'.
	    rsrc := rsrc withoutSeparators asSymbol
	].
	(value isNil or:[value isEmpty or:[value = '*']]) ifTrue:[
	    t := t , ' and any value'.
	    value := nil
	] ifFalse:[
	    t := t , ' and value ' , value.
	].
	self withWaitCursorDo:[
	    SystemBrowser browseForResource:rsrc
			  containing:value
			  in:(Smalltalk allClasses)
			  title:t
	]  
    ].

!

browseSenders
    "open a senders- browser after asking for a selector"

    |enterBox selector|

    enterBox := EnterBox 
		    title:(resources at:'Browse senders of:') withCRs
		    okText:(resources at:'browse')
		    action:[:acceptedString | selector := acceptedString].
    enterBox showAtPointer.

    selector notNil ifTrue:[
	self withWaitCursorDo:[
	    SystemBrowser browseAllCallsOn:selector
	]  
    ].

!

browseUndeclared
    "open a browser on methods refering to undeclared variables"

    self withWaitCursorDo:[
	SystemBrowser 
	    browseReferendsOf:(Smalltalk underclaredPrefix , '*')
	    title:(resources string:'references to undeclared variables')
	    warnIfNone:true
    ]

!

removeAllBreakAndTracePoints
    "remove all break- and trace points"

    self withCursor:Cursor execute do:[ MessageTracer cleanup]

!

startClassBrowser
    "open a classBrowser; asks for class"

    SystemBrowser askThenBrowseClass

!

startClassHierarchyBrowser
    "open a classHierarchyBrowser; asks for class"

    SystemBrowser askThenBrowseClassHierarchy

!

startFullClassBrowser
    "open a fullClass systemBrowser; asks for class"

    SystemBrowser askThenBrowseFullClassProtocol

! !

!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
    Demos::ComplexIterationView new open

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

startRemoteLauncher
    |host remoteDisplay|

    host := Dialog request:'Remote Launcher on which display:'.
    host size > 0 ifTrue:[
        remoteDisplay := XWorkstation new.
        remoteDisplay := remoteDisplay initializeFor:(host , ':0').
        remoteDisplay isNil ifTrue:[
            self warn:'Could not connet to display.'.
            ^ self
        ].
        remoteDisplay startDispatch.
        remoteDisplay keyboardMap:(Screen current keyboardMap).
        Launcher openOnDevice:remoteDisplay.
    ].

    "Created: / 10.9.1998 / 11:48:42 / cg"
!

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:'Save & Exit') 
	abortText:(resources string:'Cancel')
	action:[:str|fileName := str. saveAndExit := true].
    box label: (resources string:'Exiting ST/X').
    box initialText: ObjectMemory nameForSnapshot.
    box okText2:(resources string:'Exit') action2:[:str|saveAndExit := false]; showAtPointer.

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

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

objectModuleDialog
    "opens a moduleInfo dialog"

    ^ Launcher::LauncherDialogs objectModuleDialogFor:self

    "Modified: / 31.7.1998 / 17:33:24 / cg"
!

saveImage
    "save image"

    self showCursor:Cursor write.
    [
	(ObjectMemory snapShotOn:ObjectMemory nameForSnapshot) ifFalse:[
	    self warn:(resources string:'Failed to save snapshot image (disk full or not writable)').
	]
    ] valueNowOrOnUnwindDo:[
	self restoreCursors.
    ].

!

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

    self saveImageAs: (
	FileSelectionBrowser 
	    request: (resources string:'Save Image As') 
	    fileName: ObjectMemory nameForSnapshot
	    inDirectory: Filename currentDirectory name
	    withFileFilters: #('*.img'))

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

saveImageAs: aFileName

    aFileName notNil ifTrue:[
	self showCursor:Cursor write.
	[       
	    (ObjectMemory snapShotOn:aFileName) ifFalse:[
		self warn:(resources string:'Failed to save snapshot image (disk full or not writable)').
	    ]
	] valueNowOrOnUnwindDo:[
	    self restoreCursors.
	].
    ].
! !

!NewLauncher methodsFor:'user actions - help'!

activeHelp

    ^ helpIsOn ? (helpIsOn := false asValue)

    "Modified: / 18.8.1998 / 16:05:40 / cg"
!

showBookPrintDocument
    "open an HTML browser on the 'book'-printing document"

    self showDocumentation:'BOOK.html'
!

startClassDocumentation
    "open an HTML browser on the 'classDoc/TOP' document"

    self showDocumentation:'classDoc/TOP.html'

!

startDocumentationIndex
    "open an HTML browser on the 'index' document"

    self showDocumentation:'index.html'
!

startDocumentationTool
    "open an HTML browser on the 'TOP' document"

    self showDocumentation:'TOP.html'

!

startWhatsNewDocumentation
    "open an HTML browser on the 'whatsNew.html' document"

    self showDocumentation:'whatsNew.html'

!

toggleActiveHelp:aBoolean
    "turn on/off active help"

    ActiveHelp notNil ifTrue:[
	self activeHelp value:aBoolean.
	aBoolean ifTrue:[
	    ActiveHelp start
	] ifFalse:[
	    ActiveHelp stop
	]
    ].

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

!NewLauncher methodsFor:'user actions - settings'!

compilerSettings
    "open a dialog on compiler related settings"

    Launcher::LauncherDialogs compilerSettingsFor:self.

    "Modified: / 31.7.1998 / 22:45:16 / cg"
!

displaySettings
    "open a dialog on display related settings"

    Launcher::LauncherDialogs displaySettingsFor:self.

    "Modified: / 31.7.1998 / 22:45:38 / cg"
!

fontSettings
    "open a dialog on font related settings"

    Launcher::LauncherDialogs fontSettingsFor:self

    "Modified: / 31.7.1998 / 22:45:44 / cg"
!

keyboardSetting 
    "open a dialog on keyboard related settings"

    Launcher::LauncherDialogs keyboardSettingsFor:self.

    "Modified: / 31.7.1998 / 22:45:56 / cg"
!

languageSetting 
    "open a dialog on language related settings"

    Launcher::LauncherDialogs languageSettingsFor:self.

    "Modified: / 31.7.1998 / 22:46:13 / cg"
!

loadSettings
    "restore settings from a settings-file."

    "a temporary kludge - we need a central systemSettings object for this,
     which can be saved/restored with a single store/read."

    |fileName|

    fileName := Dialog 
	requestFileName:(resources string:'load settings from:') 
	default:'settings.stx'
	ok:(resources string:'load') 
	abort:(resources string:'cancel') 
	pattern:'*.stx'
	fromDirectory:nil.

    (fileName isNil or:[fileName isEmpty]) ifTrue:[
	"/ canceled
	^ self
    ].

    self withWaitCursorDo:[
	Smalltalk fileIn:fileName.
	self reOpen
    ].


!

memorySettings
    "open a dialog on objectMemory related settings"

    Launcher::LauncherDialogs memorySettingsFor:self.

    "Modified: / 31.7.1998 / 22:46:33 / cg"
!

messageSettings
    "open a dialog on infoMessage related settings"

    Launcher::LauncherDialogs messageSettingsFor:self.

    "Modified: / 31.7.1998 / 22:46:45 / cg"
!

miscSettings
    "open a dialog on misc other settings"

    Launcher::LauncherDialogs miscSettingsFor:self.

    "Modified: / 31.7.1998 / 22:46:56 / cg"
!

printerSettings
    "open a dialog on printer related settings"

    Launcher::LauncherDialogs printerSettingsFor:self.

    "Modified: / 31.7.1998 / 22:47:05 / cg"
!

saveSettings
    "save settings to a settings-file."

    Launcher::LauncherDialogs saveSettingsFor:self.

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

sourceAndDebuggerSettings
    "open a dialog on misc other settings"

    Launcher::LauncherDialogs sourceAndDebuggerSettingsFor:self.

    "Modified: / 31.7.1998 / 22:47:21 / cg"
!

viewStyleSetting 
    "open a dialog on viewStyle related settings"

    Launcher::LauncherDialogs viewStyleSettingsFor:self.

    "Modified: / 31.7.1998 / 22:47:33 / cg"
! !

!NewLauncher methodsFor:'user actions - system'!

compressingGarbageCollect
    "perform a compressing garbageCollect"

    self withWaitCursorDo:[ObjectMemory verboseGarbageCollect]

!

garbageCollect
    "perform a non-compressing garbageCollect"

    self withWaitCursorDo:[ObjectMemory reclaimSymbols]

!

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 only available
in the full commercial release'.

!

startStopEventTrace
    "start/stop event tracing for a particular view"

    |v wg|

    v := Screen current viewFromUser.
    v notNil ifTrue:[
	v := v topView.
	wg := v windowGroup.
	wg notNil ifTrue:[
	    "/
	    "/ toggle eventTrace in its windowGroup
	    "/
	    wg traceEvents:(wg preEventHook isNil)
	]
    ]

! !

!NewLauncher methodsFor:'user actions - tools'!

addUserTool: toolName action: action icon: icon
    "adds a menu item labeled toolName, and action and icon both to the
     sub menu 'Tools' and the tool bar.
    "

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

!

addUserTool: toolName action: action in: what icon: icon space: space
    "adds a menu item labeled toolName, and action 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,
    "

    |menuPanel freeMenuIndex|

    (what isNil or: [what == #toolbar])
    ifTrue:
    [
	menuPanel := builder namedComponents at: #menuToolbarView.

	(menuPanel findFirst: [:i| i activeHelpKey = toolName]) == 0
	ifTrue:
	[
	    freeMenuIndex := menuPanel numberOfItems + 1.
	    space 
	    ifTrue: 
	    [
		(menuPanel createAtIndex: freeMenuIndex) menuItem: (MenuItem labeled: '').
		freeMenuIndex := freeMenuIndex + 1.
	    ].

	    (menuPanel createAtIndex: freeMenuIndex) menuItem:
		(MenuItem new 
		    label: toolName;
		    value: action;
		    isButton: true;
		    labelImage: icon;
		    activeHelpKey: toolName)
	].
    ].
    (what isNil or: [what== #menu])
    ifTrue:
    [
	menuPanel := ((self builder window subViews at: 1 ifAbsent: [^self]) itemAt: 4) submenu.

	(menuPanel findFirst: [:i| i activeHelpKey = toolName]) == 0
	ifTrue:
	[       
	    freeMenuIndex := menuPanel numberOfItems + 1.
	    space 
	    ifTrue: 
	    [
		(menuPanel createAtIndex: freeMenuIndex) menuItem: (MenuItem labeled: '-').
		freeMenuIndex := freeMenuIndex + 1.
	    ].

	    (menuPanel createAtIndex: freeMenuIndex) menuItem:
		(MenuItem new 
		    label: toolName;
		    value: action;
		    labelImage: (LabelAndIcon icon: icon string: toolName);
		    activeHelpKey: toolName) 
	].
    ].

    UserAddedTools isNil ifTrue: [UserAddedTools := Dictionary new].
    UserAddedTools at: toolName put: (Array with: action with: what with: icon with: space)
!

newProject 
    "creates a new project & opens a projectView for it"

    Project notNil ifTrue: [(ProjectView for: Project new) open]
!

openTerminal
    VT100TerminalView open

    "Created: / 27.7.1998 / 12:48:30 / cg"
!

removeUserTool: toolName
    "removes a menu item labeled toolName
    "

    |userTool space menuIndex removeInMenuBlock|

    UserAddedTools isNil ifTrue: [^nil].
    userTool  := UserAddedTools at: toolName ifAbsent: [^nil].
    space     := userTool at: 4.

    removeInMenuBlock := 
    [:menuPanel|
	(menuIndex := menuPanel findFirst: [:i| i activeHelpKey = toolName]) ~~ 0
	ifTrue:
	[              
	    menuPanel remove: menuIndex.
	    space ifTrue: [menuPanel remove: menuIndex - 1].
	].
    ].

    removeInMenuBlock value: (builder namedComponents at: #menuToolbarView).
    removeInMenuBlock value: ((self builder window subViews at: 1 ifAbsent: [^self]) itemAt: 4) submenu.


    UserAddedTools removeKey: toolName 

!

selectProject
    "asks for and switch to another project"

    |list box|

    Project notNil ifTrue:[
	list := Project allInstances.
	box := ListSelectionBox new.
	box list:(list collect:[:p | p name]).
	box title:(resources string:'select a project').
	box action:[:selection |
	    |project|

	    project := list detect:[:p | p name = selection] ifNone:[nil].
	    project isNil ifTrue:[
		transcript showCR:'no such project.'
	    ] ifFalse:[
		project showViews.
		Project current:project
	    ]
	].
	box showAtPointer.
	box destroy
    ]
!

startNewLauncher
    "opens the new launcher"

    NewLauncher openAt:(self window origin)

!

startOldChangesBrowser
    "opens the old changeBrowser"

    ChangesBrowser open

    "Created: / 6.6.1998 / 19:47:26 / cg"
!

startOldLauncher
    "opens the old launcher"

    Launcher openAt:(self window origin)

! !

!NewLauncher methodsFor:'user actions - windows'!

deIconifyAllWindows
    |setOfViews|

    setOfViews := Project current views asIdentitySet.
    setOfViews addAll:(Project defaultProject views).

    setOfViews do:[:aTopView |
	aTopView device == Screen current ifTrue:[
	    aTopView expand
	].
    ].

!

findAndDestroyWindow
    "find a window (by name) and destroy it"

    |v|
    v := self findWindow:'select view to close:'.
    v notNil ifTrue:[v destroy]

!

findAndRaiseWindow
    "find a window (by name) and raise it"

    |v|

    v := self findWindow:'select view to raise deiconified:'.
    v notNil ifTrue:[v raiseDeiconified]

!

fullScreenHardcopy
    "after a second (to allow redraw of views under menu ...),
     save the contents of the whole screen."

    Processor 
	addTimedBlock:[
			self 
			    saveScreenImage:(Image fromScreen) 
			    defaultName:'screen'
		      ] 
	afterSeconds:1

!

iconifyAllWindows
    |setOfViews|

    setOfViews := Project current views asIdentitySet.
    setOfViews addAll:(Project defaultProject views).

    setOfViews do:[:aTopView |
	aTopView device == Screen current ifTrue:[
	    aTopView collapse
	]
    ]

!

pickAView
    "let user pick a view and return it"

    |v|

    (Delay forSeconds:1) wait.
    v := Screen current viewFromUser.
    v isNil ifTrue:[
	self warn:'Sorry, this is not a smalltalk view'.
	^ nil
    ].
    ^ v

!

screenHardcopy
    "after a second (to allow redraw of views under menu ...),
     let user specify a rectangular area on the screen
     and save its contents."

    |area|

    Processor 
	addTimedBlock:[
			[Screen current leftButtonPressed] whileTrue:[Delay waitForSeconds:0.05].

			area := Rectangle fromUser.
			(area width > 0 and:[area height > 0]) ifTrue:[
			    self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy'
			]
		      ] 
	afterSeconds:1

    "Modified: / 18.8.1998 / 15:00:42 / cg"
!

startWindowTreeView
    "open a windowTree view (on a topView)"

    |v|

    v := self pickAView.
    v notNil ifTrue:[
	WindowTreeView openOn:v topView
    ]

!

viewDestroy
    "let user pick a view and destroy it.
     Even allow destroying non-smalltalk views
     (also for views which I forgot due to some error)"

    |device v id i c|

    (Delay forSeconds:1) wait.

    device := Screen current.
    i := Image fromFile:'bitmaps/xpmBitmaps/cursors/cross2.xpm'.
    i isNil ifTrue:[
	c := Cursor crossHair
    ] ifFalse:[
	c := Cursor fromImage:i
    ].
    id := device viewIdFromPoint:(device pointFromUserShowing:c).
    (v := device viewFromId:id) notNil ifTrue:[
	v topView destroy.
	^ self
    ].
    id = device rootView id ifTrue:[
	^ self
    ].
    (Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs)
    ifTrue:[
	device destroyView:nil withId:id
    ].


!

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

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

!

viewInspect
    "let user pick a view and inspect it. Only smalltalk views are allowed"

    |v|

    (v := self pickAView) notNil 
    ifTrue:
    [
	v inspect
    ]

!

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 class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.110 1998-10-05 11:38:52 cg Exp $'
! !