NewLauncher.st
author Claus Gittinger <cg@exept.de>
Fri, 30 Jan 1998 12:24:57 +0100
changeset 1440 6a68adba9c33
parent 1437 f535d2d11128
child 1441 b39eb6200d20
permissions -rw-r--r--
allow configuration of diff command; preset correctly for UNIX & MSDOS

"
 COPYRIGHT (c) 1997 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 settingsSelection settingsAspects
		helpIsOn'
	classVariableNames:'OpenLaunchers NotifyingEmergencyHandler'
	poolDictionaries:''
	category:'Interface-Advanced-Tools'
!

!NewLauncher class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1997 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
"
! !

!NewLauncher class methodsFor:'accessing'!

aboutIcon

    ^Launcher aboutIcon
!

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

!NewLauncher class methodsFor:'interface specs'!

menu
    "this window spec was automatically generated by the ST/X MenuEditor"

    "do not manually edit this - the builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #'label:' 'about'
                #'translateLabel:' true
                #'labelImage:' #(#ResourceRetriever #ToolApplicationModel #stxIcon)
                #'submenuChannel:' #menuAbout
            )
             #(#MenuItem
                #'label:' 'File'
                #'translateLabel:' true
                #'value:' #file
                #'submenu:' 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #'label:' 'File Browser'
                          #'translateLabel:' true
                          #'value:' #'openApplication:'
                          #'argument:' 'FileBrowser'
                          #'labelImage:' #(#ResourceRetriever nil #startFileBrowserIcon 'File Browser')
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Modules...'
                          #'translateLabel:' true
                          #'value:' #objectModuleDialog
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
                      )
                       #(#MenuItem
                          #'label:' 'Build Library...'
                          #'translateLabel:' true
                          #'value:' #'openApplication:'
                          #'enabled:' #valueOfEnablingIfAvailable
                          #'argument:' 'LibraryBuilder'
                      )
                       #(#MenuItem
                          #'label:' 'Build Application...'
                          #'translateLabel:' true
                          #'value:' #openApplicationBuilder
                          #'enabled:' #valueOfEnablingIfAvailable
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Save Image'
                          #'translateLabel:' true
                          #'value:' #saveImage
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
                          #'labelImage:' #(#ResourceRetriever nil #saveIcon 'Save Image')
                      )
                       #(#MenuItem
                          #'label:' 'Save Image As...'
                          #'translateLabel:' true
                          #'value:' #saveImageAs
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
                          #'labelImage:' #(#ResourceRetriever nil #saveIcon 'Save Image As...')
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Exit...'
                          #'translateLabel:' true
                          #'value:' #exit
                          #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #'label:' 'Classes'
                #'translateLabel:' true
                #'value:' #classes
                #'submenu:' 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #'label:' 'System Browser'
                          #'translateLabel:' true
                          #'value:' #'openApplication:'
                          #'argument:' 'SystemBrowser'
                          #'labelImage:' #(#ResourceRetriever nil #startSystemBrowserIcon 'System Browser')
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Class Browser...'
                          #'translateLabel:' true
                          #'value:' #startClassBrowser
                      )
                       #(#MenuItem
                          #'label:' 'Full Class Browser...'
                          #'translateLabel:' true
                          #'value:' #startFullClassBrowser
                      )
                       #(#MenuItem
                          #'label:' 'Class Hierarchy Browser...'
                          #'translateLabel:' true
                          #'value:' #startClassHierarchyBrowser
                      )
                       #(#MenuItem
                          #'label:' 'Class Tree'
                          #'translateLabel:' true
                          #'value:' #'openApplication:'
                          #'argument:' 'ClassTreeGraphView'
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Implementors...'
                          #'translateLabel:' true
                          #'value:' #browseImplementors
                      )
                       #(#MenuItem
                          #'label:' 'Senders...'
                          #'translateLabel:' true
                          #'value:' #browseSenders
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Special'
                          #'value:' #special
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'References To Undeclared'
                                    #'translateLabel:' true
                                    #'value:' #browseUndeclared
                                )
                                 #(#MenuItem
                                    #'label:' 'Resource Methods...'
                                    #'translateLabel:' true
                                    #'value:' #browseResources
                                )
                                 #(#MenuItem
                                    #'label:' 'Show Break/Trace Points'
                                    #'translateLabel:' true
                                    #'value:' #browseAllBreakAndTracePoints
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Remove All Break/Trace Points'
                                    #'translateLabel:' true
                                    #'value:' #removeAllBreakAndTracePoints
                                )
                              ) nil
                              nil
                          )
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #'label:' 'Tools'
                #'translateLabel:' true
                #'value:' #tools
                #'submenu:' 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #'label:' 'Workspace'
                          #'value:' #'openApplication:'
                          #'argument:' 'Workspace'
                          #'labelImage:' #(#ResourceRetriever nil #startWorkspaceIcon 'Workspace')
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'GUI Builder'
                          #'value:' #'openApplication:'
                          #'argument:' 'UIPainter'
                          #'labelImage:' #(#ResourceRetriever nil #startUIPainterIcon 'GUI Builder')
                      )
                       #(#MenuItem
                          #'label:' 'Menu Editor'
                          #'value:' #'openApplication:'
                          #'argument:' 'MenuEditor'
                          #'labelImage:' #(#ResourceRetriever nil #startMenuEditorIcon 'Menu Editor')
                      )
                       #(#MenuItem
                          #'label:' 'Image Editor'
                          #'value:' #'openApplication:'
                          #'argument:' 'ImageEditor'
                          #'labelImage:' #(#ResourceRetriever nil #startImageEditorIcon 'Image Editor')
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Changes Browser'
                          #'translateLabel:' true
                          #'value:' #'openApplication:'
                          #'argument:' 'ChangesBrowser'
                          #'labelImage:' #(#ResourceRetriever nil #startChangesBrowserIcon 'Changes Browser')
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Old Launcher'
                          #'translateLabel:' true
                          #'value:' #'openApplication:'
                          #'argument:' 'Launcher'
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Monitors'
                          #'translateLabel:' true
                          #'value:' #monitors
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Processes'
                                    #'translateLabel:' true
                                    #'value:' #'openApplication:'
                                    #'argument:' 'ProcessMonitor'
                                )
                                 #(#MenuItem
                                    #'label:' 'Semaphores'
                                    #'translateLabel:' true
                                    #'value:' #'openApplication:'
                                    #'argument:' 'SemaphoreMonitor'
                                )
                                 #(#MenuItem
                                    #'label:' 'Memory'
                                    #'translateLabel:' true
                                    #'value:' #'openApplication:'
                                    #'argument:' 'MemoryMonitor'
                                )
                                 #(#MenuItem
                                    #'label:' 'Irq Latency'
                                    #'translateLabel:' true
                                    #'value:' #startLatencyMonitor
                                )
                                 #(#MenuItem
                                    #'label:' 'Event View'
                                    #'translateLabel:' true
                                    #'value:' #'openApplication:'
                                    #'argument:' 'EventMonitor'
                                )
                                 #(#MenuItem
                                    #'label:' 'Event Trace'
                                    #'translateLabel:' true
                                    #'value:' #startStopEventTrace
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Memory Usage'
                                    #'translateLabel:' true
                                    #'value:' #'openApplication:'
                                    #'argument:' 'MemoryUsageView'
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Views'
                          #'translateLabel:' true
                          #'value:' #views
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Iconify All'
                                    #'translateLabel:' true
                                    #'value:' #iconifyAllWindows
                                )
                                 #(#MenuItem
                                    #'label:' 'De-iconify All'
                                    #'translateLabel:' true
                                    #'value:' #deIconifyAllWindows
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Find And Raise...'
                                    #'translateLabel:' true
                                    #'value:' #findAndRaiseWindow
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'View Tree (all views)'
                                    #'translateLabel:' true
                                    #'value:' #'openApplication:'
                                    #'argument:' 'WindowTreeView'
                                )
                                 #(#MenuItem
                                    #'label:' 'View Tree'
                                    #'translateLabel:' true
                                    #'value:' #startWindowTreeView
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Select And Inspect View'
                                    #'translateLabel:' true
                                    #'value:' #viewInspect
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Select And Destroy View'
                                    #'translateLabel:' true
                                    #'value:' #viewDestroy
                                )
                                 #(#MenuItem
                                    #'label:' 'Find And Destroy...'
                                    #'translateLabel:' true
                                    #'value:' #findAndDestroyWindow
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Hardcopy'
                          #'translateLabel:' true
                          #'value:' #hardcopy
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Screen'
                                    #'translateLabel:' true
                                    #'value:' #fullScreenHardcopy
                                )
                                 #(#MenuItem
                                    #'label:' 'Area'
                                    #'translateLabel:' true
                                    #'value:' #screenHardcopy
                                )
                                 #(#MenuItem
                                    #'label:' 'View'
                                    #'translateLabel:' true
                                    #'value:' #viewHardcopy
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Misc'
                          #'translateLabel:' true
                          #'value:' #misc
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Garbage Collect'
                                    #'translateLabel:' true
                                    #'value:' #garbageCollect
                                )
                                 #(#MenuItem
                                    #'label:' 'Garbage Collect And Compress'
                                    #'translateLabel:' true
                                    #'value:' #compressingGarbageCollect
                                )
                              ) nil
                              nil
                          )
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #'label:' 'Projects'
                #'translateLabel:' true
                #'submenu:' 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #'label:' 'New Project'
                          #'translateLabel:' true
                          #'value:' #newProject
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Select Project...'
                          #'translateLabel:' true
                          #'value:' #selectProject
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #'label:' 'Settings'
                #'translateLabel:' true
                #'submenuChannel:' #menuSettings
            )
             #(#MenuItem
                #'label:' 'Demos'
                #'translateLabel:' true
                #'value:' #demos
                #'submenu:' 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #'label:' 'Goodies'
                          #'translateLabel:' true
                          #'value:' #goodies
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Clock'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'Clock'
                                )
                                 #(#MenuItem
                                    #'label:' 'Digital Clock'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'DigitalClockView'
                                )
                                 #(#MenuItem
                                    #'label:' 'Calendar'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'Calendar'
                                )
                                 #(#MenuItem
                                    #'label:' 'Calculator'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'CalculatorView'
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Mail Tool'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'MailView'
                                )
                                 #(#MenuItem
                                    #'label:' 'News Tool'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'NewsView'
                                )
                                 #(#MenuItem
                                    #'label:' 'FTP Tool'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'FTPTool'
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' 'Games'
                          #'translateLabel:' true
                          #'value:' #games
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Tetris'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'Games::Tetris'
                                )
                                 #(#MenuItem
                                    #'label:' 'Tic Tac Toe'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'TicTacToeGame'
                                )
                                 #(#MenuItem
                                    #'label:' 'Tic Tac Toe (2 players)'
                                    #'translateLabel:' true
                                    #'value:' #startTicTacToe2
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' 'Geometric Designs'
                          #'translateLabel:' true
                          #'value:' #geometricDesigns
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Pen Demo'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'PenDemo'
                                )
                                 #(#MenuItem
                                    #'label:' 'Commander Demo'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'CommanderDemo'
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Fractal Plants Demo'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'FractalPlantsDemo'
                                )
                                 #(#MenuItem
                                    #'label:' 'Fractal Patterns Demo'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'FractalPatternsDemo'
                                )
                                 #(#MenuItem
                                    #'label:' 'More Fractal Patterns Demo'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'ArmchairUniverseDemo'
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' 'Simple Animations'
                          #'translateLabel:' true
                          #'value:' #simpleAnimations
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Walking Man'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'Animation'
                                )
                                 #(#MenuItem
                                    #'label:' 'Globe Demo'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GlobeDemo'
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' '3D Graphics'
                          #'translateLabel:' true
                          #'value:' #'3Dgraphics'
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Plane'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLPlaneDemoView2'
                                )
                                 #(#MenuItem
                                    #'label:' 'Tetra'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLTetraDemoView'
                                )
                                 #(#MenuItem
                                    #'label:' 'Cube (wireframe)'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLWireCubeDemoView'
                                )
                                 #(#MenuItem
                                    #'label:' 'Cube (solid)'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLCubeDemoView'
                                )
                                 #(#MenuItem
                                    #'label:' 'Sphere (wireframe)'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLWireSphereDemoView'
                                )
                                 #(#MenuItem
                                    #'label:' 'Doughnut (wireframe)'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLDoughnutDemoView'
                                )
                                 #(#MenuItem
                                    #'label:' 'Planet'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLPlanetDemoView'
                                )
                                 #(#MenuItem
                                    #'label:' 'Teapot'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLTeapotDemo'
                                )
                                 #(#MenuItem
                                    #'label:' 'Logo'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'Logo3DView1'
                                )
                                 #(#MenuItem
                                    #'label:' 'Rubics Cube'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'RubicsCubeView'
                                )
                                 #(#MenuItem
                                    #'label:' 'X/Y Graph'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLXYGraph'
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Cube (light)'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLCubeDemoView2'
                                )
                                 #(#MenuItem
                                    #'label:' 'Cube (light && texture)'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'accessCharacterPosition:' 13
                                    #'argument:' 'GLBrickCubeDemoView'
                                )
                                 #(#MenuItem
                                    #'label:' 'Sphere (light)'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLSphereDemoView2'
                                )
                                 #(#MenuItem
                                    #'label:' 'Colored Octahedron'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'GLOctaHedronDemoView'
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'VRML Browser'
                                    #'value:' #'openDemo:'
                                    #'enabled:' #valueOfEnablingIfAvailable
                                    #'argument:' 'VRMLTestCenter'
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' 'Graphic Editors'
                          #'translateLabel:' true
                          #'value:' #graphicEditors
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Draw Tool'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'DrawTool'
                                )
                                 #(#MenuItem
                                    #'label:' 'Logic Tool'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'LogicTool'
                                )
                                 #(#MenuItem
                                    #'label:' 'Paint Demo'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'ColorDrawDemo3'
                                )
                              ) nil
                              nil
                          )
                      )
                       #(#MenuItem
                          #'label:' 'GUI'
                          #'translateLabel:' true
                          #'value:' #graphicEditors
                          #'submenu:' 
                           #(#Menu
                              
                               #(
                                 #(#MenuItem
                                    #'label:' 'Widget Gallery'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'CodingExamples_GUI::GUIDemo'
                                )
                                 #(#MenuItem
                                    #'label:' '-'
                                )
                                 #(#MenuItem
                                    #'label:' 'Calculator'
                                    #'translateLabel:' true
                                    #'value:' #'openDemo:'
                                    #'argument:' 'CodingExamples_GUI::GUIDemoCalculator'
                                )
                              ) nil
                              nil
                          )
                      )
                    ) nil
                    nil
                )
            )
             #(#MenuItem
                #'label:' 'Help'
                #'translateLabel:' true
                #'value:' #help
                #'submenu:' 
                 #(#Menu
                    
                     #(
                       #(#MenuItem
                          #'label:' 'What''s New'
                          #'translateLabel:' true
                          #'value:' #startWhatsNewDocumentation
                      )
                       #(#MenuItem
                          #'label:' 'Index'
                          #'translateLabel:' true
                          #'value:' #startDocumentationIndex
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'ST/X Online Documentation'
                          #'translateLabel:' true
                          #'value:' #startDocumentationTool
                      )
                       #(#MenuItem
                          #'label:' 'Class Documentation'
                          #'translateLabel:' true
                          #'value:' #startClassDocumentation
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Print Documentation...'
                          #'translateLabel:' true
                          #'value:' #showBookPrintDocument
                      )
                       #(#MenuItem
                          #'label:' '-'
                      )
                       #(#MenuItem
                          #'label:' 'Active Help'
                          #'translateLabel:' true
                          #'value:' #'toggleActiveHelp:'
                          #'indication:' #activeHelp
                      )
                    ) nil
                    nil
                )
            )
          ) nil
          nil
      )

    "Modified: / 29.1.1998 / 23:41:06 / cg"
!

menuNewSettings
    "this window spec was automatically generated by the ST/X MenuEditor"

    "do not manually edit this - the builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #'label:' 'Style...'
                #'translateLabel:' true
                #'value:' #'openSettingsFor:'
                #'argument:' 'StyleSettings'
            )
             #(#MenuItem
                #'label:' 'System...'
                #'translateLabel:' true
                #'value:' #'openSettingsFor:'
                #'argument:' 'SystemSettings'
            )
             #(#MenuItem
                #'label:' 'Compilation...'
                #'translateLabel:' true
                #'value:' #'openSettingsFor:'
                #'argument:' 'CompilationSettings'
                #'labelImage:' #(#ResourceRetriever nil #'```````````````')
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Save Settings...'
                #'translateLabel:' true
                #'value:' #saveSettings
            )
             #(#MenuItem
                #'label:' 'Restore Settings...'
                #'translateLabel:' true
                #'value:' #restoreSettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
          ) nil
          nil
      )

    "Modified: / 29.1.1998 / 23:39:06 / cg"
!

menuSettings
    "this window spec was automatically generated by the ST/X MenuEditor"

    "do not manually edit this - the builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #'label:' 'View Style...'
                #'translateLabel:' true
                #'value:' #viewStyleSetting
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' 'Fonts...'
                #'translateLabel:' true
                #'value:' #fontSettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' 'Language...'
                #'translateLabel:' true
                #'value:' #languageSetting
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' 'Keyboard Mappings...'
                #'translateLabel:' true
                #'value:' #keyboardSetting
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Messages...'
                #'translateLabel:' true
                #'value:' #messageSettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' 'Compilation...'
                #'translateLabel:' true
                #'value:' #compilerSettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' 'Object Memory...'
                #'translateLabel:' true
                #'value:' #memorySettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' 'Source And Debugger...'
                #'translateLabel:' true
                #'value:' #sourceAndDebuggerSettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Printer...'
                #'translateLabel:' true
                #'value:' #printerSettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' 'Screen...'
                #'translateLabel:' true
                #'value:' #displaySettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Misc...'
                #'translateLabel:' true
                #'value:' #miscSettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Save Settings...'
                #'translateLabel:' true
                #'value:' #saveSettings
            )
             #(#MenuItem
                #'label:' 'Restore Settings...'
                #'translateLabel:' true
                #'value:' #restoreSettings
                #'enabled:' #enableDangerousMenuItemsInRemoteLauncher
            )
          ) nil
          nil
      )

    "Modified: / 29.1.1998 / 23:41:51 / cg"
!

menuToolbar
    "this window spec was automatically generated by the ST/X MenuEditor"

    "do not manually edit this - the builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #'label:' 'open workspace'
                #'isButton:' true
                #'value:' #'openApplication:'
                #'argument:' 'Workspace'
                #'labelImage:' #(#ResourceRetriever nil #startWorkspaceIcon)
            )
             #(#MenuItem
                #'label:' 'open file browser'
                #'isButton:' true
                #'value:' #'openApplication:'
                #'argument:' 'FileBrowser'
                #'labelImage:' #(#ResourceRetriever nil #startFileBrowserIcon)
            )
             #(#MenuItem
                #'label:' 'save image'
                #'isButton:' true
                #'value:' #saveImage
                #'labelImage:' #(#ResourceRetriever nil #saveImageIcon)
            )
             #(#MenuItem
                #'label:' ''
            )
             #(#MenuItem
                #'label:' 'open system browser'
                #'isButton:' true
                #'value:' #'openApplication:'
                #'activeHelpKey:' #'#startSystemBrowser'
                #'argument:' 'SystemBrowser'
                #'labelImage:' #(#ResourceRetriever nil #startSystemBrowserIcon)
            )
             #(#MenuItem
                #'label:' 'open changes browser'
                #'isButton:' true
                #'value:' #'openApplication:'
                #'argument:' 'ChangesBrowser'
                #'labelImage:' #(#ResourceRetriever nil #startChangesBrowserIcon)
            )
             #(#MenuItem
                #'label:' ''
            )
             #(#MenuItem
                #'label:' 'open GUI Builder'
                #'isButton:' true
                #'value:' #'openApplication:'
                #'argument:' 'UIPainter'
                #'labelImage:' #(#ResourceRetriever nil #startUIPainterIcon)
            )
             #(#MenuItem
                #'label:' 'open menu editor'
                #'isButton:' true
                #'value:' #'openApplication:'
                #'argument:' 'MenuEditor'
                #'labelImage:' #(#ResourceRetriever nil #startMenuEditorIcon)
            )
             #(#MenuItem
                #'label:' 'open image editor'
                #'isButton:' true
                #'value:' #'openApplication:'
                #'argument:' 'ImageEditor'
                #'labelImage:' #(#ResourceRetriever nil #startImageEditorIcon)
            )
             #(#MenuItem
                #'label:' ''
            )
             #(#MenuItem
                #'label:' 'garbage collect'
                #'isButton:' true
                #'value:' #compressingGarbageCollect
                #'labelImage:' #(#ResourceRetriever nil #garbageCollectIcon)
            )
          ) nil
          nil
      )
!

windowSpec
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 63 0 38 0 658 0 337 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 63 38 659 338)
              #'menu:' #menu
              #'usePreferredExtent:' false
          )
          #'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 -22 1.0)
                    #'hasHorizontalScrollBar:' true
                    #'hasVerticalScrollBar:' true
                    #'miniScrollerHorizontal:' true
                    #'component:' #TextCollector
                    #'hasBorder:' false
                )
                 #(#UISubSpecification
                    #'name:' 'infoBarSubSpec'
                    #'layout:' #(#LayoutFrame 0 0.0 -22 1 0 1.0 0 1.0)
                    #'majorKey:' #ToolApplicationModel
                    #'minorKey:' #windowSpecForInfoBar
                )
              )
          )
      )

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

windowSpecForApplicationSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Application Builder'
              #'layout:' #(#LayoutFrame 86 0 180 0 506 0 782 0)
              #'label:' 'Application Builder'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 86 180 507 783)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#LabelSpec
                    #'name:' 'applicationNameLabel'
                    #'layout:' #(#LayoutFrame 4 0 4 0 130 0 26 0)
                    #'label:' 'Application Name:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'applicationNameInputField'
                    #'layout:' #(#LayoutFrame 140 0 4 0 -4 1 26 0)
                    #'model:' #valueOfApplicationName
                )
                 #(#LabelSpec
                    #'name:' 'startupClassLabel'
                    #'layout:' #(#LayoutFrame 4 0 28 0 130 0 50 0)
                    #'label:' 'Startup Class:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'startupClassInputField'
                    #'layout:' #(#LayoutFrame 140 0 28 0 -4 1.0 50 0)
                    #'model:' #valueOfStartupClass
                )
                 #(#LabelSpec
                    #'name:' 'startupSelectorLabel'
                    #'layout:' #(#LayoutFrame 4 0 52 0 130 0 74 0)
                    #'label:' 'Startup Selector:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'startupSelectorInputField'
                    #'layout:' #(#LayoutFrame 140 0 52 0 -4 1.0 74 0)
                    #'model:' #valueOfStartupSelector
                )
                 #(#LabelSpec
                    #'name:' 'targetDirectoryLabel'
                    #'layout:' #(#LayoutFrame 4 0 130 0 130 0 152 0)
                    #'label:' 'Target Directory:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'targetDirectoryInputField'
                    #'layout:' #(#LayoutFrame 140 0 130 0 -4 1.0 152 0)
                    #'model:' #valueOfTargetDirectory
                )
                 #(#LabelSpec
                    #'name:' 'buildDateLabel'
                    #'layout:' #(#LayoutFrame 4 0 76 0 130 0 98 0)
                    #'label:' 'Build Date:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'buildDateInputField'
                    #'layout:' #(#LayoutFrame 140 0 76 0 -4 1.0 98 0)
                    #'model:' #valueOfBuildDate
                )
                 #(#LabelSpec
                    #'name:' 'configurationLabel'
                    #'layout:' #(#LayoutFrame 4 0 100 0 130 0 122 0)
                    #'label:' 'Configuration:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'configurationInputField'
                    #'layout:' #(#LayoutFrame 140 0 100 0 -4 1.0 122 0)
                    #'model:' #valueOfConfiguration
                )
                 #(#LabelSpec
                    #'name:' 'startupModulLabel'
                    #'layout:' #(#LayoutFrame 4 0 178 0 130 0 200 0)
                    #'label:' 'Startup Modul:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'startupModulInputField'
                    #'layout:' #(#LayoutFrame 140 0 178 0 -4 1.0 200 0)
                    #'model:' #valueOfStartupModule
                )
                 #(#InputFieldSpec
                    #'name:' 'topDirectoryInputField'
                    #'layout:' #(#LayoutFrame 140 0 154 0 -4 1.0 176 0)
                    #'model:' #valueOfTopDirectory
                )
                 #(#LabelSpec
                    #'name:' 'topDirectoryLabel'
                    #'layout:' #(#LayoutFrame 4 0 154 0 130 0 176 0)
                    #'label:' 'Top Directory:'
                    #'adjust:' #right
                )
                 #(#LabelSpec
                    #'name:' 'librariesLabel'
                    #'layout:' #(#LayoutFrame 3 0 208 0 129 0 230 0)
                    #'label:' 'System Libraries:'
                    #'adjust:' #right
                )
                 #(#ViewSpec
                    #'name:' 'view2'
                    #'layout:' #(#LayoutFrame 0 0.0 -44 1 0 1.0 0 1.0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#ActionButtonSpec
                              #'name:' 'buildButton'
                              #'layout:' #(#LayoutFrame 10 0.5 10 0 -10 1 -10 1)
                              #'label:' 'Build'
                              #'model:' #buildApplication
                          )
                           #(#ActionButtonSpec
                              #'name:' 'closeButton'
                              #'layout:' #(#LayoutFrame 10 0.0 10 0 -10 0.5 -10 1)
                              #'label:' 'Close'
                              #'model:' #accept
                          )
                        )
                    )
                )
                 #(#DividerSpec
                    #'name:' 'divider1'
                    #'layout:' #(#LayoutFrame 0 0 202 0 0 1 205 0)
                    #'orientation:' #horizontal
                )
                 #(#DividerSpec
                    #'name:' 'divider3'
                    #'layout:' #(#LayoutFrame 0 0 124 0 0 1 127 0)
                    #'orientation:' #horizontal
                )
                 #(#FramedBoxSpec
                    #'name:' 'framedBox1'
                    #'layout:' #(#LayoutFrame 0 0 281 0 0 0.5 -44 1)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#CheckBoxSpec
                              #'name:' 'librunCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 22 0 10 0.5 44 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'librun'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libbasicCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 48 0 10 0.5 70 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'libbasic'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libbasic2CheckBox'
                              #'layout:' #(#LayoutFrame 10 0 74 0 10 0.5 96 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'libbasic2'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libbasic3CheckBox'
                              #'layout:' #(#LayoutFrame 10 0 100 0 10 1 122 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'libbasic3'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libviewCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 126 0 10 1 148 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'libview'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libview2CheckBox'
                              #'layout:' #(#LayoutFrame 10 0 152 0 10 1 174 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'libview2'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'ObjectFileLoaderCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 178 0 10 1 202 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'ObjectFileLoader'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'GLXWorkstationCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 232 0 10 1 254 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'GLXWorkstation'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'XWorkstationCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 206 0 10 1 228 0)
                              #'initiallyDisabled:' true
                              #'model:' #valueOfDefaultLibs
                              #'label:' 'XWorkstation'
                          )
                        )
                    )
                    #'label:' 'Basics'
                    #'labelPosition:' #topLeft
                )
                 #(#FramedBoxSpec
                    #'name:' 'framedBox2'
                    #'layout:' #(#LayoutFrame 0 0.5 281 0 0 1 392 0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#CheckBoxSpec
                              #'name:' 'libwidgCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 22 0 10 1 44 0)
                              #'model:' #valueOfLibwidg
                              #'label:' 'libwidg'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libwidg2CheckBox'
                              #'layout:' #(#LayoutFrame 10 0 48 0 10 1 70 0)
                              #'model:' #valueOfLibwidg2
                              #'label:' 'libwidg2'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libuiCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 74 0 10 1 96 0)
                              #'model:' #valueOfLibui
                              #'label:' 'libui'
                          )
                        )
                    )
                    #'label:' 'UI'
                    #'labelPosition:' #topLeft
                )
                 #(#FramedBoxSpec
                    #'name:' 'framedBox3'
                    #'layout:' #(#LayoutFrame 0 0.5 392 0 0 1 -44 1)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#CheckBoxSpec
                              #'name:' 'libtoolCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 22 0 10 1 44 0)
                              #'model:' #valueOfLibtool
                              #'label:' 'libtool'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libtool2CheckBox'
                              #'layout:' #(#LayoutFrame 10 0 48 0 10 1 70 0)
                              #'model:' #valueOfLibtool2
                              #'label:' 'libtool2'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libcompCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 74 0 10 1 96 0)
                              #'model:' #valueOfLibcomp
                              #'label:' 'libcomp'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'libhtmlCheckBox'
                              #'layout:' #(#LayoutFrame 10 0 100 0 10 1 122 0)
                              #'model:' #valueOfLibhtml
                              #'label:' 'libhtml'
                          )
                        )
                    )
                    #'label:' 'Optional'
                    #'labelPosition:' #topLeft
                )
                 #(#LabelSpec
                    #'name:' 'userLibrariesLabel'
                    #'layout:' #(#LayoutFrame 3 0 232 0 129 0 254 0)
                    #'label:' 'User Libraries:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'userLibrariesInputField'
                    #'layout:' #(#LayoutFrame 139 0 233 0 -5 1.0 255 0)
                    #'model:' #valueOfUserLibraries
                )
                 #(#LabelSpec
                    #'name:' 'label1'
                    #'layout:' #(#LayoutFrame 3 0 256 0 129 0 278 0)
                    #'label:' 'ST/X Libraries:'
                    #'adjust:' #right
                )
                 #(#InputFieldSpec
                    #'name:' 'systemLibrariesInputField'
                    #'layout:' #(#LayoutFrame 139 0 208 0 -5 1.0 230 0)
                    #'model:' #valueOfSystemLibraries
                )
              )
          )
      )
!

windowSpecForStyleSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Style Settings'
              #'layout:' #(#LayoutFrame 238 0 252 0 675 0 678 0)
              #'label:' 'Style Settings'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 238 252 676 679)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#NoteBookViewSpec
                    #'name:' 'noteBookView_Temporal'
                    #'layout:' #(#LayoutFrame 2 0.0 0 0.0 -2 1.0 -47 1.0)
                    #'model:' #selectionOfSettings
                    #'menu:' 
                     #('Views'
                        'Fonts' 'Language'
                        'Keyboard' 'Misc'
                    )
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'level:' 1
                    #'canvas:' #settingsCanvas
                )
                 #(#HorizontalPanelViewSpec
                    #'name:' 'horizontalPanelView_Temporal'
                    #'layout:' #(#LayoutFrame 1 0.0 -47 1 1 1.0 0 1.0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#ActionButtonSpec
                              #'name:' 'helpButton_Temporal'
                              #'label:' 'Help'
                              #'style:' #(#FontDescription #helvetica #bold #roman 12)
                              #'model:' #'doForCurrentSettings:'
                              #'actionValue:' #help
                              #'extent:' #(#Point 213 24)
                          )
                           #(#ActionButtonSpec
                              #'name:' 'closeButton_Temporal'
                              #'label:' 'Close'
                              #'style:' #(#FontDescription #helvetica #bold #roman 12)
                              #'model:' #accept
                              #'extent:' #(#Point 214 24)
                          )
                        )
                    )
                    #'level:' 1
                    #'horizontalLayout:' #fitSpace
                    #'verticalLayout:' #center
                    #'horizontalSpace:' 3
                    #'verticalSpace:' 3
                )
              )
          )
      )
!

windowSpecForSystemSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Style Settings'
              #'layout:' #(#LayoutFrame 96 0 317 0 533 0 743 0)
              #'label:' 'Style Settings'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 96 317 534 744)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#NoteBookViewSpec
                    #'name:' 'noteBookView_Temporal'
                    #'layout:' #(#LayoutFrame 2 0.0 0 0.0 -2 1.0 -47 1.0)
                    #'model:' #selectionOfSettings
                    #'menu:' 
                     #('Sources'
                        'Messages' 'Memory'
                        'Screen' 'Printer'
                    )
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'level:' 1
                    #'canvas:' #settingsCanvas
                )
                 #(#HorizontalPanelViewSpec
                    #'name:' 'horizontalPanelView_Temporal'
                    #'layout:' #(#LayoutFrame 1 0.0 -47 1 1 1.0 0 1.0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#ActionButtonSpec
                              #'name:' 'helpButton_Temporal'
                              #'label:' 'Help'
                              #'style:' #(#FontDescription #helvetica #bold #roman 12)
                              #'model:' #'doForCurrentSettings:'
                              #'actionValue:' #help
                              #'extent:' #(#Point 213 24)
                          )
                           #(#ActionButtonSpec
                              #'name:' 'closeButton_Temporal'
                              #'label:' 'Close'
                              #'style:' #(#FontDescription #helvetica #bold #roman 12)
                              #'model:' #accept
                              #'extent:' #(#Point 214 24)
                          )
                        )
                    )
                    #'level:' 1
                    #'horizontalLayout:' #fitSpace
                    #'verticalLayout:' #center
                    #'horizontalSpace:' 3
                    #'verticalSpace:' 3
                )
              )
          )
      )
!

windowSpecOfFontsSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 234 0 432 0 671 0 811 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 234 432 672 812)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#FramedBoxSpec
                    #'name:' 'preViewFramedBox_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 -80 1 0 1.0 0 1.0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#LabelSpec
                              #'name:' 'previewFontLabel_Temporal'
                              #'layout:' #(#LayoutFrame 16 0.0 18 0.0 16 1.0 13 1.0)
                              #'adjust:' #left
                          )
                        )
                    )
                    #'label:' 'Font Preview'
                    #'labelPosition:' #topLeft
                )
                 #(#FramedBoxSpec
                    #'name:' 'fontDescriptionFramedBox_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.5 95 0.0 0 1 -80 1.0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#LabelSpec
                              #'name:' 'fontFamilyLabel_Temporal'
                              #'layout:' #(#LayoutFrame 15 0.0 22 0 15 1.0 44 0)
                              #'level:' -1
                              #'adjust:' #left
                          )
                           #(#LabelSpec
                              #'name:' 'fontFaceLabel_Temporal'
                              #'layout:' #(#LayoutFrame 15 0.0 49 0 15 1.0 71 0)
                              #'level:' -1
                              #'adjust:' #left
                          )
                           #(#LabelSpec
                              #'name:' 'fontStyleLabel_Temporal'
                              #'layout:' #(#LayoutFrame 15 0.0 77 0 15 1.0 99 0)
                              #'level:' -1
                              #'adjust:' #left
                          )
                           #(#LabelSpec
                              #'name:' 'fontSizeLabel_Temporal'
                              #'layout:' #(#LayoutFrame 15 0.0 105 0 15 1.0 127 0)
                              #'level:' -1
                              #'adjust:' #left
                          )
                           #(#LabelSpec
                              #'name:' 'fontEncodingLabel_Temporal'
                              #'layout:' #(#LayoutFrame 15 0.0 133 0 15 1.0 155 0)
                              #'level:' -1
                              #'adjust:' #left
                          )
                        )
                    )
                    #'label:' 'Font Description'
                    #'labelPosition:' #topLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'changeAllButton_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.5 36 0 -5 1 60 0)
                    #'label:' 'Change for all View Classes...'
                    #'translateLabel:' true
                    #'model:' #'changeFontFor:'
                    #'actionValue:' 'All'
                )
                 #(#ActionButtonSpec
                    #'name:' 'defaultButton_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.5 64 0 -5 1 88 0)
                    #'label:' 'Set Default Fonts'
                    #'translateLabel:' true
                    #'model:' #'changeFontFor:'
                    #'actionValue:' 'Default'
                )
                 #(#ActionButtonSpec
                    #'name:' 'changeFontButton_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.5 8 0 -5 1.0 32 0)
                    #'label:' 'Change Font...'
                    #'translateLabel:' true
                    #'model:' #changeFont
                    #'actionValue:' ''
                )
                 #(#FramedBoxSpec
                    #'name:' 'viewClassesFramedBox_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 3 0.0 0 0.5 -80 1.0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#SelectionInTreeViewSpec
                              #'name:' 'viewClassesListView_Temporal'
                              #'layout:' #(#LayoutFrame 15 0.0 17 0.0 15 1.0 17 1.0)
                              #'model:' #selectionOfViewClass
                              #'hasHorizontalScrollBar:' true
                              #'hasVerticalScrollBar:' true
                              #'miniScrollerHorizontal:' true
                              #'miniScrollerVertical:' true
                              #'valueChangeSelector:' #updatePreviewFontLabel
                              #'hierarchicalList:' #listOfViewClasses
                          )
                        )
                    )
                    #'label:' 'View Classes'
                    #'labelPosition:' #topLeft
                )
              )
          )
      )
!

windowSpecOfKeyboardSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 71 0 497 0 508 0 894 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 71 497 509 895)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#SequenceViewSpec
                    #'name:' 'rawKeysListView_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 0.5 0 0.6)
                    #'model:' #listOfRawKeys
                    #'hasHorizontalScrollBar:' true
                    #'hasVerticalScrollBar:' true
                    #'miniScrollerHorizontal:' true
                    #'useIndex:' false
                )
                 #(#SequenceViewSpec
                    #'name:' 'functionsListView_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.5 0 0.0 0 1.0 0 0.6)
                    #'model:' #listOfFunctions
                    #'hasHorizontalScrollBar:' true
                    #'hasVerticalScrollBar:' true
                    #'miniScrollerHorizontal:' true
                    #'useIndex:' false
                )
                 #(#TextEditorSpec
                    #'name:' 'keyMacroTextEditor_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.6 0 1.0 0 1.0)
                    #'model:' #keyMacroText
                    #'hasHorizontalScrollBar:' true
                    #'hasVerticalScrollBar:' true
                    #'miniScrollerHorizontal:' true
                    #'isReadOnly:' true
                )
              )
          )
      )
!

windowSpecOfLanguageSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 255 0 459 0 692 0 838 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 255 459 693 839)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#SequenceViewSpec
                    #'name:' 'languagesListView_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
                    #'model:' #selectionOfLanguage
                    #'hasHorizontalScrollBar:' true
                    #'hasVerticalScrollBar:' true
                    #'miniScrollerHorizontal:' true
                    #'useIndex:' false
                    #'sequenceList:' #listOfLanguages
                )
              )
          )
      )
!

windowSpecOfMemorySettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 9 0 394 0 446 0 773 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 9 394 447 774)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#CheckBoxSpec
                    #'name:' 'checkBox1_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 15 0 -5 1.0 37 0)
                    #'model:' #shadowsUnderPopupViews
                    #'label:' 'Shadows under popup views'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox2_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 43 0 -5 1.0 65 0)
                    #'model:' #boxesReturnsFocus
                    #'label:' 'Boxes returns focus to previously active view'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox3_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 71 0 -5 1.0 93 0)
                    #'model:' #viewsCatchFocus
                    #'label:' 'Views catch focus when mapped'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox4_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 99 0 -5 1.0 121 0)
                    #'model:' #hostnameInWindowLabels
                    #'label:' 'Hostname in window labels.'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox5_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 127 0 -5 1.0 149 0)
                    #'model:' #showAccelerators
                    #'label:' 'Show accelerator keys in menus'
                )
              )
          )
      )
!

windowSpecOfMessagesSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 9 0 394 0 446 0 773 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 9 394 447 774)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#CheckBoxSpec
                    #'name:' 'checkBox1_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 15 0 -5 1.0 37 0)
                    #'model:' #shadowsUnderPopupViews
                    #'label:' 'Shadows under popup views'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox2_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 43 0 -5 1.0 65 0)
                    #'model:' #boxesReturnsFocus
                    #'label:' 'Boxes returns focus to previously active view'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox3_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 71 0 -5 1.0 93 0)
                    #'model:' #viewsCatchFocus
                    #'label:' 'Views catch focus when mapped'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox4_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 99 0 -5 1.0 121 0)
                    #'model:' #hostnameInWindowLabels
                    #'label:' 'Hostname in window labels.'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox5_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 127 0 -5 1.0 149 0)
                    #'model:' #showAccelerators
                    #'label:' 'Show accelerator keys in menus'
                )
              )
          )
      )
!

windowSpecOfMiscSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 9 0 394 0 446 0 773 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 9 394 447 774)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#CheckBoxSpec
                    #'name:' 'checkBox1_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 15 0 -5 1.0 37 0)
                    #'model:' #shadowsUnderPopupViews
                    #'label:' 'Shadows under popup views'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox2_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 43 0 -5 1.0 65 0)
                    #'model:' #boxesReturnsFocus
                    #'label:' 'Boxes returns focus to previously active view'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox3_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 71 0 -5 1.0 93 0)
                    #'model:' #viewsCatchFocus
                    #'label:' 'Views catch focus when mapped'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox4_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 99 0 -5 1.0 121 0)
                    #'model:' #hostnameInWindowLabels
                    #'label:' 'Hostname in window labels.'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox5_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 127 0 -5 1.0 149 0)
                    #'model:' #showAccelerators
                    #'label:' 'Show accelerator keys in menus'
                )
              )
          )
      )
!

windowSpecOfPrinterSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 9 0 394 0 446 0 773 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 9 394 447 774)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#CheckBoxSpec
                    #'name:' 'checkBox1_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 15 0 -5 1.0 37 0)
                    #'model:' #shadowsUnderPopupViews
                    #'label:' 'Shadows under popup views'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox2_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 43 0 -5 1.0 65 0)
                    #'model:' #boxesReturnsFocus
                    #'label:' 'Boxes returns focus to previously active view'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox3_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 71 0 -5 1.0 93 0)
                    #'model:' #viewsCatchFocus
                    #'label:' 'Views catch focus when mapped'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox4_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 99 0 -5 1.0 121 0)
                    #'model:' #hostnameInWindowLabels
                    #'label:' 'Hostname in window labels.'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox5_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 127 0 -5 1.0 149 0)
                    #'model:' #showAccelerators
                    #'label:' 'Show accelerator keys in menus'
                )
              )
          )
      )
!

windowSpecOfScreenSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 9 0 394 0 446 0 773 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 9 394 447 774)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#CheckBoxSpec
                    #'name:' 'checkBox1_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 15 0 -5 1.0 37 0)
                    #'model:' #shadowsUnderPopupViews
                    #'label:' 'Shadows under popup views'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox2_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 43 0 -5 1.0 65 0)
                    #'model:' #boxesReturnsFocus
                    #'label:' 'Boxes returns focus to previously active view'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox3_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 71 0 -5 1.0 93 0)
                    #'model:' #viewsCatchFocus
                    #'label:' 'Views catch focus when mapped'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox4_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 99 0 -5 1.0 121 0)
                    #'model:' #hostnameInWindowLabels
                    #'label:' 'Hostname in window labels.'
                )
                 #(#CheckBoxSpec
                    #'name:' 'checkBox5_Temporal'
                    #'layout:' #(#LayoutFrame 5 0.0 127 0 -5 1.0 149 0)
                    #'model:' #showAccelerators
                    #'label:' 'Show accelerator keys in menus'
                )
              )
          )
      )
!

windowSpecOfSourcesSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 42 0 472 0 479 0 851 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 42 472 480 852)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#FramedBoxSpec
                    #'name:' 'framedBox1_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 3 0.0 0 1.0 159 0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#CheckBoxSpec
                              #'name:' 'checkBox1_Temporal'
                              #'layout:' #(#LayoutFrame 17 0.0 21 0 7 1.0 43 0)
                              #'model:' #rememberChangedMethods
                              #'label:' 'Remember changed methods (for previous method in browser)'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'checkBox2_Temporal'
                              #'layout:' #(#LayoutFrame 17 0.0 49 0 7 1.0 71 0)
                              #'model:' #logCompilesInChangesFile
                              #'label:' 'Log compiles in changes file'
                          )
                           #(#CheckBoxSpec
                              #'name:' 'checkBox3_Temporal'
                              #'layout:' #(#LayoutFrame 17 0.0 77 0 7 1.0 99 0)
                              #'model:' #logDoItsInChangesFile
                              #'label:' 'Log doIts in changes file'
                          )
                           #(#LabelSpec
                              #'name:' 'label1_Temporal'
                              #'layout:' #(#AlignmentOrigin 230 0 123 0 1 0.5)
                              #'label:' 'Name of changes file:'
                              #'adjust:' #right
                          )
                           #(#InputFieldSpec
                              #'name:' 'inputField1_Temporal'
                              #'layout:' #(#LayoutFrame 233 0.0 109 0 13 1.0 131 0)
                              #'model:' #nameOfChangesFile
                          )
                        )
                    )
                    #'label:' 'Changes Log'
                    #'labelPosition:' #topLeft
                )
                 #(#FramedBoxSpec
                    #'name:' 'framedBox2_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 159 0 0 1.0 0 1.0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#CheckBoxSpec
                              #'name:' 'checkBox4_Temporal'
                              #'layout:' #(#LayoutFrame 17 0.0 26 0 7 1.0 48 0)
                              #'enableChannel:' #hasSourceCodeManager
                              #'model:' #sourceCodeFromSourceCodeManagement
                              #'label:' 'Source code from Source Code Management'
                          )
                           #(#LabelSpec
                              #'name:' 'label3_Temporal'
                              #'layout:' #(#AlignmentOrigin 230 0 95 0 1 0.5)
                              #'label:' 'Directory of source code cache:'
                              #'adjust:' #right
                          )
                           #(#LabelSpec
                              #'name:' 'label2_Temporal'
                              #'layout:' #(#AlignmentOrigin 230 0 69 0 1 0.5)
                              #'label:' 'Directory of repository:'
                              #'adjust:' #right
                          )
                           #(#InputFieldSpec
                              #'name:' 'inputField2_Temporal'
                              #'layout:' #(#LayoutFrame 233 0 55 0 13 1.0 77 0)
                              #'enableChannel:' #hasSourceCodeManager
                              #'model:' #directoryOfRepository
                          )
                           #(#InputFieldSpec
                              #'name:' 'inputField3_Temporal'
                              #'layout:' #(#LayoutFrame 233 0 81 0 13 1.0 103 0)
                              #'model:' #directoryOfSourceCodeCache
                          )
                           #(#CheckBoxSpec
                              #'name:' 'checkBox5_Temporal'
                              #'layout:' #(#LayoutFrame 17 0.0 120 0 7 1.0 142 0)
                              #'enableChannel:' #hasSourceCodeManager
                              #'model:' #useLocalSourceCode
                              #'label:' 'If present, use local source code (suppress checking out)'
                          )
                        )
                    )
                    #'label:' 'Source Code Management'
                    #'labelPosition:' #topLeft
                )
              )
          )
      )
!

windowSpecOfViewsSettings
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

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

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'Smalltalk/X'
              #'layout:' #(#LayoutFrame 68 0 262 0 505 0 641 0)
              #'label:' 'Smalltalk/X'
              #'min:' #(#Point 420 220)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 68 262 506 642)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#FramedBoxSpec
                    #'name:' 'styleFramedBox_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -130 1)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#SequenceViewSpec
                              #'name:' 'viewStylesListView_Temporal'
                              #'layout:' #(#LayoutFrame 17 0.0 19 0.0 17 1.0 19 1.0)
                              #'model:' #listOfViewStyles
                              #'hasHorizontalScrollBar:' true
                              #'hasVerticalScrollBar:' true
                              #'miniScrollerHorizontal:' true
                              #'useIndex:' true
                          )
                        )
                    )
                    #'label:' 'Style:'
                    #'labelPosition:' #topLeft
                )
                 #(#FramedBoxSpec
                    #'name:' 'descriptionFramedBox_Temporal'
                    #'layout:' #(#LayoutFrame 0 0.0 -130 1 -120 1.0 0 1)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#LabelSpec
                              #'name:' 'infoLabel_Temporal'
                              #'layout:' #(#LayoutFrame 16 0.0 17 0.0 16 1.0 17 1.0)
                              #'labelChannel:' #infoLabel
                              #'level:' -1
                              #'adjust:' #left
                          )
                        )
                    )
                    #'label:' 'Description'
                    #'labelPosition:' #topLeft
                )
                 #(#ViewSpec
                    #'name:' 'applyButtonView_Temporal'
                    #'layout:' #(#LayoutFrame -120 1 -130 1 0 1.0 0 1.0)
                    #'component:' 
                     #(#SpecCollection
                        #'collection:' 
                         #(
                           #(#ActionButtonSpec
                              #'name:' 'applyButton_Temporal'
                              #'layout:' #(#LayoutFrame -113 1.0 -125 1 -6 1.0 -97 1)
                              #'label:' 'Apply'
                              #'model:' #'doForCurrentSettings:'
                              #'actionValue:' 'apply'
                          )
                        )
                    )
                )
              )
          )
      )
! !

!NewLauncher class methodsFor:'resources'!

garbageCollectIcon
    "Generated by the Image Editor"
    "
    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@@@@@@@@b'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:49.9962); add:(Color grey:66.9978); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); yourself)); 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
    "Generated by the Image Editor"
    "
    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'); colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); 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
    "Generated by the Image Editor"
    "
    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'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); 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
    "Generated by the Image Editor"
    "
    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'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); add:(Color grey:66.9978); yourself)); 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
    "Generated by the Image Editor"
    "
    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'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color grey:49.9962); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); yourself)); 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
    "Generated by the Image Editor"
    "
    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'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color grey:49.9962); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:0.0); yourself)); 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
    "Generated by the Image Editor"
    "
    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'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); add:(Color grey:66.9978); yourself)); 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]!

startUIPainterIcon
    "Generated by the Image Editor"
    "
    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'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color grey:49.9962); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:0.0); yourself)); 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
    "Generated by the Image Editor"
    "
    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'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color grey:49.9962); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); yourself)); 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:'action - application building'!

buildApplication

    |dir compilerPath compilerFlags|

    Transcript showCR: (Text string: 'Starting building of application...' color: Color blue); cr.

    (dir := self getApplicationDirectory) isNil ifTrue: [^self warn: 'Could not create application directory!!'].
    (compilerPath := ByteCodeCompiler ccPath, ' ') isNil ifTrue: [^self warn:'Define first a system compiler!!'].
    compilerFlags := self getCompilerFlags.

    (self generateHFileWithSymbolsIn: dir) isNil ifTrue: [^self warn:'Could not generate h-file with symbols!!'].
    (self generateCFileWithModulesIn: dir) isNil ifTrue: [^self warn:'Select first some libraries!!'].

    (self compileModulListFileWith: compilerPath, compilerFlags inDirectory: dir)
        "isNil ifTrue: [^self warn:'Could not compile modules file!!']".
    (self compileStartupFileWith: compilerPath, compilerFlags inDirectory: dir) 
        "isNil ifTrue: [^self warn:'Could not compile startup file!!']".

    self defineSymbolicLinksToTheLibrariesIn: dir.
    self linkLibrariesToTheApplicationIn: dir. 

    Transcript showCR: (Text string: 'Application build.' color: Color blue); cr.
    Display beep.


!

compileModulListFileWith: ccPathAndFlags inDirectory: dir

    |command|
    command := ccPathAndFlags , ' -c -fPIC -O6 -fomit-frame-pointer -m486 -DDEBUG -Di386 ',
        'modulList.c'.

    Transcript cr; showCR: (Text string: 'Starting compilation of modules init file...' color: Color yellow).
    self executeCommand: command inDirectory: dir.
    Transcript showCR: (Text string: 'Modules init file compiled.' color: Color yellow); cr.




!

compileStartupFileWith: ccPathAndFlags inDirectory: appDir

    |startupFile command|

    (startupFile := self valueOfTopDirectory value asFilename construct: self valueOfStartupModule value) exists ifFalse: [^nil].
    startupFile copyTo: (startupFile := appDir asFilename construct: self valueOfStartupModule value asFilename baseName).
    command := ccPathAndFlags , ' -o main.o -c -O -O6 -fomit-frame-pointer -m486 -DDEBUG -Di386 ',
        '-DSTARTUP_CLASS="\"', self valueOfStartupClass value, '\"" ',
        '-DSTARTUP_SELECTOR="\"', self valueOfStartupSelector value, '\"" ',
        '-DCONFIGURATION_STRING="\"', self valueOfConfiguration value, '\"" ',
        '-DBUILD_DATE="\"', self valueOfBuildDate value, '\"" ',
        startupFile name.

    Transcript cr; showCR: (Text string: 'Starting compilation of startup file...' color: Color yellow).
    self executeCommand: command inDirectory: appDir.
    Transcript showCR: (Text string: 'Startup file compiled.' color: Color yellow); cr.





!

defineSymbolicLinksToTheLibrariesIn: dir

    Transcript cr; showCR: (Text string: 'Starting defining of symbolic links to the libraries...' color: Color green).
    self selectionOfLibraries value , (Array with: 'librun')do:
    [:lib|
        self executeCommand: 'ln -s ', ((self valueOfTopDirectory value asFilename construct: 'lib') construct: (lib, '.so ')) name , (lib, '.so') inDirectory: dir.
    ].
    Transcript showCR: (Text string: 'Symbolic links to the libraries defined.' color: Color green); cr.


!

executeCommand: aCommand inDirectory: dir

    |outStream|
    Transcript showCR: 
        (Text string: 'Execute: "' color: Color yellow), 
        (Text string: aCommand color: Color white), 
        (Text string: '" in directory: "' color: Color yellow), 
        (Text string: dir color: Color white),
        (Text string: '"' color: Color yellow).

    outStream:= PipeStream readingFrom: aCommand errorDisposition:#inline inDirectory: dir.
    [      
        outStream canReadWithoutBlocking
        ifTrue:
        [
            outStream readWait.
            Transcript showCR: (Text string: (outStream upTo: Character cr) color: Color red).
        ].
    ] doWhile:[outStream atEnd not].
    outStream close





!

generateCFileWithModulesIn: dir

    |selectionOfLibraries|
    selectionOfLibraries := self selectionOfLibraries remove: #librun; yourself.
    Transcript cr; showCR: (Text string: 'Starting generation of c-file with modules...' color: Color green).
    self executeCommand: 'echo "#include <stcIntern.h>" > modulList.c' inDirectory: dir.
    self executeCommand: 'echo "typedef void (*vf)();" >> modulList.c' inDirectory: dir.
    selectionOfLibraries do:
    [:lib|
        self executeCommand: 'echo "extern void _', lib, '_Init();" >> modulList.c' inDirectory: dir.
    ].
    self executeCommand: 'echo "static vf modules[] = {" >> modulList.c' inDirectory: dir.
    selectionOfLibraries do:
    [:lib|
        self executeCommand: 'echo "_', lib, '_Init," >> modulList.c' inDirectory: dir.
    ].
    self executeCommand: 'echo "(vf)0};" >> modulList.c' inDirectory: dir.
    self executeCommand: 'echo "vf *__modules__ = modules;" >> modulList.c' inDirectory: dir.
    Transcript showCR: (Text string: 'C-file of modules generated.' color: Color green); cr.


!

generateHFileWithSymbolsIn: dir

    |symbolsFile realInc|
    ByteCodeCompiler stcCompilationIncludes asArrayOfSubstrings do:
    [:inc|
        realInc := inc readStream.
        realInc upTo: $/. 
        realInc := '/', realInc upToEnd.      
        (symbolsFile := realInc asFilename construct: 'symbols.stc') exists
        ifTrue:
        [   
            "A guck o mol, i honds gfunda"
            Transcript cr; showCR: (Text string: 'Starting generation of h-file with symbols...' color: Color green).
            self executeCommand: 'echo "char *__symbols[] = {" > symbols.h' inDirectory: dir.
            self executeCommand: 'sed ''s/^/"/'' < ', symbolsFile name,' | sed ''s/$/",/'' | sed ''s/\\/\\\\/g'' >> symbols.h' inDirectory: dir.
            self executeCommand: 'echo "0 };" >> symbols.h' inDirectory: dir.
            Transcript showCR: (Text string: 'H-file of symbols generated.' color: Color green); cr.
            ^self
        ]
    ].
    ^nil
                                       
!

getApplicationDirectory

    |appDir|
    (appDir := self valueOfTargetDirectory value asFilename) exists ifFalse:[appDir makeDirectory].   
    (appDir isReadable and:[appDir isWritable])
    ifFalse:
    [
        ^nil
    ].
    ^appDir name
!

getCompilerFlags

    |compilerFlags|
    compilerFlags := OperatingSystem getOSDefine ? ''.
    ByteCodeCompiler stcCompilationDefines notNil ifTrue:[
        compilerFlags := compilerFlags , ' ' , ByteCodeCompiler stcCompilationDefines
    ].
    ByteCodeCompiler stcCompilationIncludes notNil ifTrue:[
        compilerFlags := compilerFlags , ' ' , ByteCodeCompiler stcCompilationIncludes.
    ].
    ByteCodeCompiler ccCompilationOptions notNil ifTrue:[
        compilerFlags := compilerFlags , ' ' , ByteCodeCompiler ccCompilationOptions
    ].
    ^compilerFlags
!

linkLibrariesToTheApplicationIn: appDir

    |mainFile command libs|

    libs := self selectionOfLibraries value collect: [:lib| lib, '.so '].
    libs add: 'librun.so'.

    command := ByteCodeCompiler ccPath, 
        ' -L/usr/X11/lib -Llib -Lbinary -L. -L/usr/local/lib -L/usr/lib -L/lib ',
        '-lm -ldl -lXext -lX11 ',
        ' -o ' , self valueOfApplicationName value,
        ' modulList.o main.o ',
        ((libs, self valueOfSystemLibraries value asArrayOfSubstrings) asStringCollection asStringWith: $ ).

    Transcript cr; showCR: (Text string: 'Starting linking of libraries to the application...' color: Color yellow).
    self executeCommand: command inDirectory: appDir.
    Transcript showCR: (Text string: 'Libraries to the application linked.' color: Color yellow); cr.





!

selectionOfLibraries

    |selectionOfLibraries|

    selectionOfLibraries := OrderedCollection new.

    selectionOfLibraries addAll: #(librun libbasic libbasic2 libbasic3 libview libview2 ObjectFileLoader XWorkstation GLXWorkstation).

    self valueOfLibwidg value ifTrue: [selectionOfLibraries add: #libwidg].
    self valueOfLibwidg2 value ifTrue: [selectionOfLibraries add: #libwidg2].
    self valueOfLibui value ifTrue: [selectionOfLibraries add: #libui].

    self valueOfLibtool value ifTrue: [selectionOfLibraries add: #libtool].
    self valueOfLibtool2 value ifTrue: [selectionOfLibraries add: #libtool2].
    self valueOfLibcomp value ifTrue: [selectionOfLibraries add: #libcomp].
    self valueOfLibhtml value ifTrue: [selectionOfLibraries add: #libhtml].
     
    selectionOfLibraries addAll: self valueOfUserLibraries value asArrayOfSubstrings.

    ^selectionOfLibraries
! !

!NewLauncher methodsFor:'action - 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
    ]

!

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:'action - 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

!

startTicTacToe2
    "opens a 2-user ticTacToe game"

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

!NewLauncher methodsFor:'action - file'!

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

    |fileName saveAndExit box|

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

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



!

objectModuleDialog
    "opens a moduleInfo dialog"

    |allModules moduleNames
     allObjects methodObjects methodNames 
     cObjects cObjectNames
     otherObjects otherObjectNames
     box l handles unloadButton
     list1 list2 listView1 listView2
     y panel 
     showBuiltIn showModules showMethods showCObjects showOthers
     moduleListUpdater check canDoIt menu|

    showBuiltIn := true asValue. 
    canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].

    showModules := canDoIt asValue. 
    showMethods := canDoIt asValue.
    showCObjects := canDoIt asValue.
    showOthers := canDoIt asValue.

    list1 := SelectionInList new.
    list2 := SelectionInList new.

    moduleListUpdater := [
            |l|

            list2 list:nil.

            l := Array new.
            handles := Array new.

            (showModules value or:[showBuiltIn value]) ifTrue:[
                allModules := ObjectMemory binaryModuleInfo asOrderedCollection.
                (showBuiltIn value and:[showModules value]) ifFalse:[
                    allModules := allModules select:[:i |
                        |wantToSee|

                        wantToSee := i dynamic.
                        showBuiltIn value ifTrue:[
                            wantToSee := wantToSee not
                        ].
                        wantToSee
                    ]
                ].

                "/ sorting by reverse id brings newest ones to the top (a side effect)
                allModules sort:[:a :b | (a id) > (b id)].
                moduleNames := allModules collect:[:entry | entry name].
                l := l , moduleNames.
                handles := handles , allModules.
            ].

            showMethods value ifTrue:[
                allObjects := ObjectFileLoader loadedObjectHandles.
                methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray.
                methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[
                                                                'compiled method - removed' , ' (in ' , mH pathName , ')'
                                                            ] ifFalse:[
                                                                'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')'
                                                            ].
                                                     ].
                l := l , methodNames.
                handles := handles , methodObjects.
            ].

            showCObjects value ifTrue:[
                allObjects := ObjectFileLoader loadedObjectHandles.
                cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray.
                cObjectNames := cObjects collect:[:entry | entry pathName].
                l := l , cObjectNames.
                handles := handles , cObjects.
            ].

            showOthers value ifTrue:[
                allObjects := ObjectFileLoader loadedObjectHandles.
                otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle
                                                         or:[h isMethodHandle
                                                         or:[h isClassLibHandle]]) not]) asArray.
                otherObjectNames := otherObjects collect:[:entry | entry pathName].
                l := l , otherObjectNames.
                handles := handles , otherObjects.
            ].

            list1 list:l.
            unloadButton disable.
        ].

    showBuiltIn onChangeSend:#value to:moduleListUpdater.
    showModules onChangeSend:#value to:moduleListUpdater.
    showMethods onChangeSend:#value to:moduleListUpdater.
    showCObjects onChangeSend:#value to:moduleListUpdater.
    showOthers onChangeSend:#value to:moduleListUpdater.

    box := Dialog new.
    box label:(resources string:'Module dialog').

    listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true.
    listView1 model:list1.
    listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2.
    listView1 action:[:sel |
        |info classNames tabs module|

        listView1 middleButtonMenu:nil.

        box withWaitCursorDo:[
            |nm fileName addr entry1 entry2 entry3 method|

            tabs := TabulatorSpecification unit:#inch positions:#(0 2.6).

            (showModules value or:[showBuiltIn value]) ifTrue:[
                info := allModules at:sel ifAbsent:nil.
            ].
            info isNil ifTrue:[
                "/ selected a method, cObject or unknown

                module := handles at:sel.
                fileName := module pathName.

                module isMethodHandle ifTrue:[

                    (method := module method) isNil ifTrue:[
                        nm := '** removed **'.
                    ] ifFalse:[
                        menu := PopUpMenu
                                    labels:#('inspect' 'browse')
                                    selectors:#(inspect browse).
                        menu actionAt:#inspect put:[ method inspect ].
                        menu actionAt:#browse put:[ |who|
                                                    who := method who.
                                                    SystemBrowser 
                                                        openInClass:(who methodClass) 
                                                        selector:(who methodSelector) 
                                                  ].
                        listView1 middleButtonMenu:menu.

                        nm := (method whoString) asText emphasizeAllWith:(#color->Color blue).
                    ].
                    entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs.
                    entry1 colAt:1 put:'compiled method'; colAt:2 put:nm.

                    entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs.
                    entry2 colAt:1 put:'path'; colAt:2 put:fileName.

                    entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs.
                    entry3 colAt:1 put:'address'; colAt:2 put:('(16r) ' , (method code hexPrintString leftPaddedTo:8 with:$0)).

                    list2 list:(Array with:entry1 with:entry2 with:entry3).
                ] ifFalse:[
                    (module isFunctionObjectHandle 
                    and:[module functions notEmpty]) ifTrue:[

                        menu := PopUpMenu
                                    labels:#('inspect')
                                    selectors:#(inspect).
                        menu actionAt:#inspect put:[ module functions inspect  ].
                        listView1 middleButtonMenu:menu.

                        list2 list:((module functions select:[:f | f notNil])
                                        collect:[:f | |entry|
                                                        entry := MultiColListEntry new:2 tabulatorSpecification:tabs.
                                                        entry colAt:1 put:(f name asText emphasizeAllWith:(#color->Color blue)).
                                                        entry colAt:2 put:('address: (16r) ' , (f code hexPrintString leftPaddedTo:8 with:$0)).
                                                        entry
                                                ]).
                    ] ifFalse:[
                        list2 list:#('nothing known about contents (no functions have been extracted)').    
                    ]
                ].

                unloadButton enable.
            ] ifFalse:[
                "/ selected a package

                "/ fill bottom list with class-info

                classNames := info classNames asSortedCollection.
                classNames := classNames collect:[:cName |
                                |cls entry rev listEntry|

                                listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs.
                                listEntry colAt:1 put:cName.

                                cls := Smalltalk classNamed:cName.
                                cls isNil ifTrue:[
                                    listEntry colAt:2 put:'(class removed)'.
                                ] ifFalse:[
                                    rev := cls binaryRevision.
                                    rev notNil ifTrue:[
                                        cls isLoaded ifFalse:[
                                            entry := '(stub for: ' , rev.
                                        ] ifTrue:[
                                            entry :='(bin: ' , rev.
                                        ].    
                                        cls revision ~= rev ifTrue:[
                                            entry := entry , ' / src: ' , cls revision    
                                        ].
                                        listEntry colAt:2 put:entry , ')'
                                    ] ifFalse:[
                                       cls revision notNil ifTrue:[
                                            listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' 
                                       ]
                                    ]
                                ].
                                listEntry
                              ].
                list2 list:classNames.
                info dynamic ifTrue:[
                    unloadButton enable.
                ] ifFalse:[
                    unloadButton disable.
                ].
            ]
        ]
    ].


    panel := HorizontalPanelView new.

    panel add:(l := Label label:'show:').
    l adjust:#left; borderWidth:0.
    panel add:(check := CheckBox label:'builtin' model:showBuiltIn).
    box makeTabable:check.
    panel add:(check := CheckBox label:'classLibs' model:showModules).
    canDoIt ifFalse:[
        check disable
    ] ifTrue:[
        box makeTabable:check.
    ].
    panel add:(check := CheckBox label:'methods' model:showMethods).
    canDoIt ifFalse:[
        check disable
    ] ifTrue:[
        box makeTabable:check.
    ].
    panel add:(check := CheckBox label:'c-objects' model:showCObjects).
    canDoIt ifFalse:[
        check disable
    ] ifTrue:[
        box makeTabable:check.
    ].
    panel add:(check := CheckBox label:'others' model:showOthers).
    canDoIt ifFalse:[
        check disable
    ] ifTrue:[
        box makeTabable:check.
    ].

    panel horizontalLayout:#fitSpace.
    "/ panel horizontalLayout:#leftSpace.

    box addComponent:panel tabable:false.

    box addVerticalSpace.
    box addComponent:listView1 tabable:true.
    listView1 topInset:(View viewSpacing + panel preferredExtent y).
    listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2.

    l := box addTextLabel:(resources string:'contained classes/subsets:').
    l adjust:#left; borderWidth:0.
    l origin:0.0@0.4 corner:1.0@0.4.
    l topInset:(View viewSpacing).
    l bottomInset:((l preferredExtent y) negated - View viewSpacing).

    listView2 := HVScrollableView for:SelectionInListView  miniScrollerH:true.
    listView2 model:list2; printItems:false.
    box addComponent:listView2 tabable:true.
    listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2.
    listView2 disable.

    unloadButton := Button label:(resources string:'unload').
    unloadButton action:[
        self withWaitCursorDo:[
            box withWaitCursorDo:[
                |info idx pathName|

                idx := list1 selectionIndex.
                info := allModules at:idx ifAbsent:nil.

                list1 selectionIndex:nil.

                info isNil ifTrue:[
                    "/ selected a method
                    "/ idx := idx - allModules size.
                    pathName := (handles at:idx) pathName.

                ] ifFalse:[
                    "/ selected a package
                    pathName := info pathName.
                ].
                ObjectFileLoader unloadObjectFile:pathName.
                moduleListUpdater value.
                unloadButton disable.
            ]
        ]
    ].
    moduleListUpdater value.

    box addButton:unloadButton.
    box addAbortButtonLabelled:(resources string:'dismiss').

    y := box yPosition.
    listView2 topInset:(l preferredExtent y + 5).
    listView2 bottomInset:(box preferredExtent y - y).

"/    box width:(400 min:(box device width * 2 // 3)); 
"/        height:(450 min:(box device height - 50)); 
"/        sizeFixed:true.
    box open.

    box destroy.

    "Modified: 17.9.1995 / 16:47:50 / claus"
    "Modified: 18.10.1997 / 03:43:39 / cg"


!

openApplicationBuilder

    self valueOfBuildDate value: Date today printString, ' ', Time now printString.
    self openDialogInterface:#windowSpecForApplicationSettings.

    LibraryBuilder UserLibraries: self valueOfUserLibraries value

!

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: 'Save Image As' 
            fileName: ObjectMemory nameForSnapshot
            inDirectory: Filename currentDirectory name
            withFileFilters: #('*.img'))
 
!

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:'action - help'!

activeHelp

    ^helpIsOn ? (helpIsOn := false)
!

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

    self showDocumentation:'BOOK.html'
!

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

    "
     although that one is not yet finished,
     its better than nothing ...
    "
    HTMLDocumentView notNil ifTrue:[
        "
         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.'.
!

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:[
        helpIsOn := aBoolean.
        helpIsOn ifTrue:[
            ActiveHelp start
        ] ifFalse:[
            ActiveHelp stop
        ]
    ].

! !

!NewLauncher methodsFor:'action - old settings'!

compilerSettings
    "open a dialog on compiler related settings"

    |box warnings warnSTX warnUnderscore warnDollar warnOldStyle 
     allowDollar allowUnderscore immutableArrays
     warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox
     warnCompatibility warnCompatibilityBox warnDollarBox
     stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions
     stcLibraries stcLibraryPath cc ccOptions historyLines fullHistoryUpdate catchRedefs keepSourceOptions keepSource  
     constantFoldingOptions constantFolding justInTimeCompilation 
     warnEnabler check component oldIndent t supportsJustInTimeCompilation y
     y2 fullDebugSupport yMax
     compileLazy loadBinaries canLoadBinaries|

    canLoadBinaries := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].
    loadBinaries := Smalltalk loadBinaries asValue.
    compileLazy := Autoload compileLazy asValue.


    warnings := Compiler warnings asValue.

    warnSTX := Compiler warnSTXSpecials asValue.
    warnUnderscore := Compiler warnUnderscoreInIdentifier asValue.
    warnDollar := Compiler warnDollarInIdentifier asValue.
    warnOldStyle := Compiler warnOldStyleAssignment asValue.
    warnCommonMistakes := Compiler warnCommonMistakes asValue.
    warnCompatibility := Compiler warnPossibleIncompatibilities asValue.
    allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
    allowDollar := Compiler allowDollarInIdentifier asValue.
    immutableArrays := Compiler arraysAreImmutable asValue.

    constantFoldingOptions := #( nil #level1 #level2 #full ).
    constantFolding := SelectionInList new list:(resources array:#('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')).
    constantFolding selectionIndex:3.

    stcCompilationOptions := #( always default never).
    stcCompilation := SelectionInList new 
                        list:(resources array:#('always' 
                                                'primitive code only' 
                                                'never'
                                               )).
    stcCompilation selectionIndex:2.
    (supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation)
    ifTrue:[
        justInTimeCompilation := ObjectMemory justInTimeCompilation:nil.
        fullDebugSupport := ObjectMemory fullSingleStepSupport:nil.
    ] ifFalse:[
        justInTimeCompilation := false.
        fullDebugSupport := (Compiler lineNumberInfo == #full) asValue.
    ].
    justInTimeCompilation := justInTimeCompilation asValue.
    fullDebugSupport := fullDebugSupport asValue.

    stcIncludes := Compiler stcCompilationIncludes asValue.
    stcDefines := Compiler stcCompilationDefines asValue.
    stcOptions := Compiler stcCompilationOptions asValue.
    ccOptions := Compiler ccCompilationOptions asValue.
    cc := Compiler ccPath asValue.

    ObjectFileLoader notNil ifTrue:[
        (t := ObjectFileLoader searchedLibraries) notNil ifTrue:[
            stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue.
        ].
        (t := ObjectFileLoader libPath) notNil ifTrue:[
            stcLibraryPath := t asValue.
        ]
    ].

    catchRedefs := Class catchMethodRedefinitions asValue.
    historyLines := HistoryManager notNil and:[HistoryManager isLoaded and:[HistoryManager isActive]].
    historyLines ifFalse:[
        fullHistoryUpdate := false    
    ] ifTrue:[
        fullHistoryUpdate := HistoryManager fullHistoryUpdate asValue.
    ].
    historyLines := historyLines asValue.

    keepSourceOptions := #( keep reference absReference sourceReference discard ).
    keepSource := SelectionInList new list:(resources array:#('keep as string' 'reference to filename' 'reference to full path' 'append and ref in `st.src''' 'discard' )).
    keepSource selectionIndex:1.

    warnEnabler := [
              warnings value ifTrue:[
                warnSTXBox enable. 
                warnOldStyleBox enable.
                warnCommonMistakesBox enable.
                warnCompatibilityBox enable.
                allowUnderscore value ifTrue:[
                    warnUnderscoreBox enable.
                ] ifFalse:[
                    warnUnderscoreBox disable.
                ].
                allowDollar value ifTrue:[
                    warnDollarBox enable.
                ] ifFalse:[
                    warnDollarBox disable.
                ].
              ] ifFalse:[
                warnSTXBox disable. 
                warnUnderscoreBox disable.
                warnDollarBox disable.
                warnOldStyleBox disable.
                warnCommonMistakesBox disable.
                warnCompatibilityBox disable.
              ]].

    warnings onChangeSend:#value to:warnEnabler.
    allowUnderscore onChangeSend:#value to:warnEnabler.
    allowDollar onChangeSend:#value to:warnEnabler.

    box := DialogBox new.
    box label:(resources string:'Compiler settings').

    box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs.
    y := box yPosition.
    check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines.
    HistoryManager isNil ifTrue:[check disable].
    box yPosition:y.
    check := box addCheckBox:(resources string:'keep full class history') on:fullHistoryUpdate.
    check left:0.5.
    HistoryManager isNil ifTrue:[check disable] ifFalse:[check enableChannel:historyLines].

    box addPopUpList:(resources string:'fileIn source mode:') on:keepSource.
    keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1).

    box addHorizontalLine.

    box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy.
    check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries.
    canLoadBinaries ifFalse:[
        loadBinaries value:false.
        check disable
    ].
    supportsJustInTimeCompilation ifTrue:[
        component := box 
                        addCheckBox:(resources string:'just in time compilation to machine code') 
                        on:justInTimeCompilation.
    ].

    box addHorizontalLine.

    ObjectFileLoader notNil ifTrue:[
        compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation.
        stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).

        component := box 
                        addLabelledInputField:(resources string:'include directories:')
                        adjust:#right
                        on:stcIncludes 
                        tabable:true
                        separateAtX:0.3.
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
        component preferredExtent:(250 @ component preferredExtent y).
        canLoadBinaries ifFalse:[component disable].

"/        box addVerticalSpace.

        component := box 
                        addLabelledInputField:(resources string:'defines:')
                        adjust:#right
                        on:stcDefines 
                        tabable:true
                        separateAtX:0.3.
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
        component preferredExtent:(250 @ component preferredExtent y).
        canLoadBinaries ifFalse:[component disable].

"/        box addVerticalSpace.

        component := box 
                        addLabelledInputField:(resources string:'stc options:')
                        adjust:#right
                        on:stcOptions 
                        tabable:true
                        separateAtX:0.3.
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
        component preferredExtent:(250 @ component preferredExtent y).
        canLoadBinaries ifFalse:[component disable].

"/        box addVerticalSpace.

        component := box 
                        addLabelledInputField:(resources string:'cc command:')
                        adjust:#right
                        on:cc 
                        tabable:true
                        separateAtX:0.3.
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
        component preferredExtent:(250 @ component preferredExtent y).
        canLoadBinaries ifFalse:[component disable].

        component := box 
                        addLabelledInputField:(resources string:'cc options:')
                        adjust:#right
                        on:ccOptions 
                        tabable:true
                        separateAtX:0.3.
        component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
        component preferredExtent:(250 @ component preferredExtent y).
        canLoadBinaries ifFalse:[component disable].

        stcLibraries notNil ifTrue:[
"/            box addVerticalSpace.

            component := box 
                            addLabelledInputField:(resources string:'C-libraries:')
                            adjust:#right
                            on:stcLibraries 
                            tabable:true
                            separateAtX:0.3.
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
            component preferredExtent:(250 @ component preferredExtent y).
            canLoadBinaries ifFalse:[component disable].
        ].

        stcLibraryPath notNil ifTrue:[
"/            box addVerticalSpace.

            component := box 
                            addLabelledInputField:(resources string:'stc libPath:')
                            adjust:#right
                            on:stcLibraryPath 
                            tabable:true
                            separateAtX:0.3.
            component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
            component preferredExtent:(250 @ component preferredExtent y).
            canLoadBinaries ifFalse:[component disable].
        ].

"/        box addVerticalSpace.
        box addHorizontalLine.

        "/ if there is no compiler around,
        "/ change to compile nothing, and disable the checkBoxes
        Compiler canCreateMachineCode ifFalse:[
            stcCompilation selectionIndex:3.
            compilationList disable.
        ].
    ].

    y := box yPosition.

    component := box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore.
    component width:0.4.

    component := box addCheckBox:(resources string:'allow dollar in identifiers') on:allowDollar.
    component width:0.4.

    component := box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays.
    component width:0.4.
    y2 := box yPosition.

    box yPosition:y.
    box leftIndent:0.

    component :=box addPopUpList:(resources string:'constant folding:') on:constantFolding.
    component superView left:0.5; width:0.5.
    constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1).

    component := box addCheckBox:(resources string:'full debug info') on:fullDebugSupport.
    component left:0.5; width:0.4.
    box yPosition:(box yPosition max:y2).


    box addHorizontalLine.

    box addCheckBox:(resources string:'warnings') on:warnings.
"/    box addVerticalSpace.
    oldIndent := box leftIndent.
    box leftIndent:30.

    y := box yPosition.

    warnSTXBox := box addCheckBox:(resources string:'ST/X extensions') on:warnSTX.
    warnSTXBox width:0.4.

    warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore.
    warnUnderscoreBox width:0.4.

    warnDollarBox := box addCheckBox:(resources string:'dollars in identifiers') on:warnDollar.
    warnDollarBox width:0.4.

    yMax := box yPosition.

    box yPosition:y.
    box leftIndent:0.
    warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle.
    warnOldStyleBox left:0.5; width:0.4.

    warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes.
    warnCommonMistakesBox left:0.5; width:0.4.

    warnCompatibilityBox := box addCheckBox:(resources string:'possible incompatibilities') on:warnCompatibility.
    warnCompatibilityBox left:0.5; width:0.4.

    box leftIndent:oldIndent.
    box yPosition:(yMax max: box yPosition).

    box 
        addHelpButtonFor:'Launcher/compilerSettings.html';
        addAbortButton; 
        addOkButton.

    warnEnabler value.
    box open.

    box accepted ifTrue:[
        HistoryManager notNil ifTrue:[
            HistoryManager fullHistoryUpdate:fullHistoryUpdate value.
            historyLines value ifTrue:[
                HistoryManager activate
            ] ifFalse:[
                HistoryManager deactivate
            ].
        ].
        Class catchMethodRedefinitions:catchRedefs value.
        ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
        Compiler warnings:warnings value.
        Compiler warnSTXSpecials:warnSTX value.
        Compiler warnOldStyleAssignment:warnOldStyle value.
        Compiler warnUnderscoreInIdentifier:warnUnderscore value.
        Compiler warnDollarInIdentifier:warnDollar value.
        Compiler warnCommonMistakes:warnCommonMistakes value.
        Compiler warnPossibleIncompatibilities:warnCompatibility value.
        Compiler allowUnderscoreInIdentifier:allowUnderscore value.
        Compiler allowDollarInIdentifier:allowDollar value.
        Compiler arraysAreImmutable:immutableArrays value.
        fullDebugSupport value ifTrue:[
            Compiler lineNumberInfo:#full.
        ] ifFalse:[
            Compiler lineNumberInfo:true
        ].

        Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
        Compiler stcCompilationIncludes:stcIncludes value.
        Compiler stcCompilationDefines:stcDefines value.
        Compiler stcCompilationOptions:stcOptions value.
        Compiler ccCompilationOptions:ccOptions value.
        Compiler ccPath:cc value.
        Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex).

        supportsJustInTimeCompilation ifTrue:[
            justInTimeCompilation value ifTrue:[
                Method allInstancesDo:[:m | m checked:false].
            ].
            ObjectMemory justInTimeCompilation:justInTimeCompilation value.
            ObjectMemory fullSingleStepSupport:fullDebugSupport value.
        ].
        ObjectFileLoader notNil ifTrue:[
            stcLibraries notNil ifTrue:[
                ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords).
            ].
            stcLibraryPath notNil ifTrue:[
                ObjectFileLoader libPath:(stcLibraryPath value).
            ]
        ].
        Autoload compileLazy:compileLazy value.
        Smalltalk loadBinaries:loadBinaries value.
    ].
    box destroy

!

displaySettings
    "open a dialog on display related settings"

    |box listOfSizes sizeInfos
     sizes sizeNames sizeList sizeX sizeY deepIcons
     isColorMonitor useFixPalette useFixGrayPalette idx ditherStyles ditherSyms ditherList
     y component screen visual clipEncodings clipEncodingSyms clipEncodingList|

    listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
    listOfSizes == #default ifTrue:[
        "/ nothing in resource file; offer at least some.
        sizeInfos := #(
                           ( '11.3'' (235mm x 175mm) LCD'   (235 175)    )
                           ( '17''   (325mm x 245mm)'       (325 245)    )
                           ( '19''   (340mm x 270mm)'       (340 270)    )
                           ( '20''   (350mm x 280mm)'       (350 280)    )
                           ( '21''   (365mm x 285mm)'       (365 285)    )
                       ).
    ] ifFalse:[
        sizeInfos := resources array:listOfSizes.
    ].
    sizeNames := sizeInfos collect:[:entry | entry at:1].
    sizes := sizeInfos collect:[:entry | entry at:2].

    screen := Screen current.
    visual := screen visualType.

    isColorMonitor := screen hasColors asValue.
    deepIcons := screen supportsDeepIcons asValue.
    useFixPalette := screen fixColors notNil asValue.
    useFixGrayPalette := screen fixGrayColors notNil asValue.

    sizeList := SelectionInList with:sizeNames.
    sizeX := screen widthInMillimeter asValue.
    sizeY := screen heightInMillimeter asValue.

    clipEncodingSyms := #(nil #iso8859 #jis #jis7 #sjis #euc #big5).
    clipEncodings := resources array:#('untranslated' 'iso8859' 'jis' 'jis7' 'shift-JIS' 'EUC' 'big5').
    clipEncodingList := SelectionInList new.
    clipEncodingList list:clipEncodings.
    clipEncodingList selectionIndex:(clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1).

    ditherList := SelectionInList new.

    (visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
        ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
        ditherSyms := #(threshold ordered floydSteinberg).
    ] ifFalse:[
        visual ~~ #TrueColor ifTrue:[
            ditherStyles := #('nearest color' 'error diffusion').
            ditherSyms := #(ordered floydSteinberg).
        ]
    ].
    ditherSyms notNil ifTrue:[    
        ditherList list:ditherStyles.
        ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
    ].

    box := DialogBox new.
    box label:(resources string:'Display screen settings').

    (box addTextLabel:(resources string:'Actual visible screen area:'))
        adjust:#left.

    (box addPopUpList:(resources string:'common sizes:') on:sizeList)
        label:'monitor size'.

    idx := sizes findFirst:[:entry |
                                ((entry at:1) = sizeX value)
                                and:[((entry at:2) = sizeY value)]
                           ].
    idx ~~ 0 ifTrue:[
        sizeList selectionIndex:idx
    ].

    sizeList onChangeSend:#value to:[
                                        |idx|

                                        idx := sizeList selectionIndex.
                                        sizeX value:((sizes at:idx) at:1).
                                        sizeY value:((sizes at:idx) at:2).
                                    ].

    y := box yPosition.
    component := box addTextLabel:(resources string:'screen size:').
    component width:0.3; adjust:#right; borderWidth:0.

    box yPosition:y.
    component := box addInputFieldOn:nil tabable:true.
    component width:0.25; left:0.3; 
              immediateAccept:false; acceptOnLeave:false; 
              cursorMovementWhenUpdating:#beginOfLine;
              converter:(PrintConverter new initForInteger);
              model:sizeX.

    box yPosition:y.
    component := box addTextLabel:(' x ').
    component width:0.1; left:0.55; adjust:#center; borderWidth:0.

    box yPosition:y.
    component := box addInputFieldOn:nil tabable:true.
    component width:0.25; left:0.65; 
              immediateAccept:false; acceptOnLeave:false; 
              cursorMovementWhenUpdating:#beginOfLine;
              converter:(PrintConverter new initForInteger);
              model:sizeY.

    box yPosition:y.
    component := box addTextLabel:('(mm)').
    component width:0.1; left:0.9; adjust:#center; borderWidth:0.

    box addVerticalSpace.
    box addHorizontalLine.
    box addVerticalSpace.

    (box addTextLabel:(resources string:'Screen: depth: %1 visual: %2  (%3)'
                                 with:Screen current depth printString
                                 with:Screen current visualType
                                 with:Screen current serverVendor))
        adjust:#left.

    box addVerticalSpace.
    box addHorizontalLine.
    box addVerticalSpace.

    box addCheckBox:(resources string:'color monitor') on:isColorMonitor.

    visual == #PseudoColor ifTrue:[
        box addVerticalSpace.
        component := box addCheckBox:(resources string:'use fix color palette %1' with:'(4x8x4)') on:useFixPalette.

        box addVerticalSpace.
        component := box addCheckBox:(resources string:'use fix gray color palette %1' with:'(32)') on:useFixGrayPalette.
    ].

    ditherSyms notNil ifTrue:[
        box addVerticalSpace.
        component := box addPopUpList:(resources string:'image display:') on:ditherList.
        component defaultLabel:'image display'.
        component superView horizontalLayout:#leftSpace.
    ].

    box addVerticalSpace.
    box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons.

    box addVerticalSpace.
    box addHorizontalLine.
    box addVerticalSpace.

    component := box addPopUpList:(resources string:'clipBoard encoding:') on:clipEncodingList.
    component superView horizontalLayout:#leftSpace.

    box 
        addHelpButtonFor:'Launcher/screenSettings.html';
        addAbortButton; addOkButton.
    box open.

    box accepted ifTrue:[
        Image flushDeviceImages.

        screen visualType == #PseudoColor ifTrue:[
            useFixPalette value ifTrue:[
                Color colorAllocationFailSignal handle:[:ex |
                    self warn:(resources string:'Could not allocate colors.').
                ] do:[
                    Color getColorsRed:4 green:8 blue:4 on:screen
                ]
            ] ifFalse:[
                screen releaseFixColors
            ].

            useFixGrayPalette value ifTrue:[
                Color colorAllocationFailSignal handle:[:ex |
                    self warn:(resources string:'Could not allocate colors.').
                ] do:[
                    Color getGrayColors:32 on:screen
                ]
            ] ifFalse:[
                screen releaseFixGrayColors
            ]
        ].
        screen hasColors:isColorMonitor value.
        screen widthInMillimeter:sizeX value.
        screen heightInMillimeter:sizeY value.

        screen supportsDeepIcons:deepIcons value.
        ditherSyms notNil ifTrue:[
            Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
        ].

        self withWaitCursorDo:[
            View defaultStyle:(View defaultStyle).
        ].

        screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex).
    ].
    box destroy

!

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


!

fontSettings
    "open a dialog on font related settings"

    (self fontBoxForEncoding:nil) ifTrue:[self reOpen]

!

keyboardSetting 
    "open a dialog on keyboard related settings"

    |mappings listOfRawKeys listOfFunctions
     box l
     list1 list2 listView1 listView2 
     frame selectionForwarder macroForwarder macroTextView y|

    mappings := Screen current keyboardMap.

    listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort.
    listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort.

    selectionForwarder := Plug new.
    selectionForwarder respondTo:#showFunction
                  with:[
                        |raw|
                        raw := list1 selection.
                        list2 retractInterestsFor:selectionForwarder.
                        list2 selection:(mappings at:raw asSymbol) asString.
                        list2 onChangeSend:#showRawKey to:selectionForwarder.
                       ].
    selectionForwarder respondTo:#showRawKey
                  with:[
                        |f raw|

                        f := list2 selection.
                        list1 retractInterestsFor:selectionForwarder.
                        raw := mappings keyAtValue:f asString.
                        raw isNil ifTrue:[
                            raw := mappings keyAtValue:f first.
                            raw isNil ifTrue:[
                                raw := mappings keyAtValue:f asSymbol.
                            ]
                        ].
                        list1 selection:raw.
                        list1 onChangeSend:#showFunction to:selectionForwarder.
                       ].

    macroForwarder := [
                        |f macro indent|
                        f := list2 selection.
                        (f startsWith:'Cmd') ifTrue:[
                            f := f copyFrom:4
                        ].
                        macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil.
                        macro notNil ifTrue:[
                            macro := macro asStringCollection.
                            indent := macro
                                         inject:99999 into:[:min :element |
                                             |stripped|

                                             stripped := element withoutLeadingSeparators.
                                             stripped size == 0 ifTrue:[
                                                 min
                                             ] ifFalse:[
                                                 min min:(element size - stripped size)
                                             ]
                                         ].
                            indent ~~ 0 ifTrue:[
                                macro := macro collect:[:line | 
                                             line size > indent ifTrue:[
                                                line copyFrom:indent+1
                                             ] ifFalse:[
                                                line
                                             ].
                                        ]
                            ].                        
                        ].
                        macroTextView contents:macro.
                       ].

    list1 := SelectionInList with:listOfRawKeys.
    list1 onChangeSend:#showFunction to:selectionForwarder.

    list2 := SelectionInList with:listOfFunctions.
    list2 onChangeSend:#showRawKey to:selectionForwarder.
    list2 onChangeSend:#value to:macroForwarder.

    box := Dialog new.
    box label:(resources string:'Keyboard mappings').

    l := box addTextLabel:(resources string:'KEY_MSG') withCRs.
    l adjust:#left; borderWidth:0.

    frame := View new.
    frame extent:300 @ 300.
    frame borderWidth:0.

    listView1 := ScrollableView for:SelectionInListView in:frame.
    listView1 model:list1.
    listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2.

    listView2 := ScrollableView for:SelectionInListView in:frame.
    listView2 model:list2.
    listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2.

    frame topInset:box yPosition.
    box addComponent:frame withExtent:350@200.
    box makeTabable:listView1. 
    box makeTabable:listView2. 
    frame origin:0.0@0.0 corner:1.0@0.6.

    box addVerticalSpace.

    l := box addTextLabel:(resources string:'Macro text (if any):') withCRs.
    l adjust:#left; borderWidth:0.
    l origin:0.0@0.6 corner:1.0@0.6.
    l topInset:(View viewSpacing).
    l bottomInset:(l preferredExtent y negated - View viewSpacing).

    macroTextView := HVScrollableView for:TextView miniScroller:true.
    box addComponent:macroTextView tabable:true.
    macroTextView origin:0.0@0.6 corner:1.0@1.0.
    y := box yPosition.

    box
        addHelpButtonFor:'Launcher/keyboardSetting.html';
        "addAbortButton;" 
        addOkButtonLabelled:(resources string:'dismiss').

    macroTextView topInset:(l preferredExtent y + 5).
    macroTextView bottomInset:(box preferredExtent y - y).

    box open.

    box accepted ifTrue:[
        "no action yet ..."
    ].
    box destroy


!

languageSetting 
    "open a dialog on language related settings"

    |listOfLanguages translatedLanguages switch box languageList flags|

    "
     get list of supported languages from the launchers resources ...
    "
    listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default').
    listOfLanguages := listOfLanguages asOrderedCollection.
    translatedLanguages := listOfLanguages collect:[:lang | |item|
                                        item := resources at:lang.
                                        item isString ifTrue:[
                                            item
                                        ] ifFalse:[
                                            item at:1
                                        ]
                                ].
    flags := listOfLanguages collect:[:lang | |item|
                                        item := resources at:lang.
                                        item isArray ifTrue:[
                                            item at:2
                                        ] ifFalse:[
                                            nil
                                        ]
                                ].
    flags := flags collect:[:nm | nm notNil ifTrue:[Image fromFile:nm] ifFalse:[nil]].

    languageList := translatedLanguages with:flags collect:[:lang :flag |
                                LabelAndIcon icon:flag string:lang.
                        ].

    box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs.
    box label:(resources string:'Language selection').
    box list:languageList.
    box initialText:(Language).
    box action:[:newLanguage |
        self withWaitCursorDo:[
            |fontPref idx language oldLanguage enc answer matchingFonts|

            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
            idx ~~ 0 ifTrue:[
                language := listOfLanguages at:idx
            ] ifFalse:[
                language := newLanguage
            ].

            "/ check if the new language needs a differently encoded font;
            "/ ask user to switch font and allow cancellation.
            "/ Otherwise, you are left with unreadable menu & button items ...

            oldLanguage := Smalltalk language.
            Smalltalk language:language asSymbol.
            ResourcePack flushCachedResourcePacks.
            fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'.
            Smalltalk language:oldLanguage.

            switch := true.
            enc := MenuView defaultFont encoding.
            (fontPref match:enc) ifFalse:[
                "/ look if there is one at all.
                matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding].
                matchingFonts size == 0 ifTrue:[
                    (Dialog 
                        confirm:(resources 
                                    string:'your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)'
                                      with:fontPref) withCRs)
                    ifFalse:[
                        switch := false
                    ]
                ] ifFalse:[
                    answer := Dialog 
                                confirmWithCancel:(resources 
                                                        string:'menu font is not %1-encoded.\\Change it ?'
                                                        with:fontPref) withCRs
                                           labels:(resources
                                                        array:#('cancel' 'no' 'yes'))
                                           default:3.
                    answer isNil ifTrue:[
                        switch := false
                    ] ifFalse:[
                        answer ifTrue:[
                            switch := (self fontBoxForEncoding:fontPref)
                        ]
                    ].
                ].
            ].

            switch ifTrue:[
                transcript showCR:'change language to ' , newLanguage , ' ...'.
                Smalltalk language:language asSymbol.
                ResourcePack flushCachedResourcePacks
            ].
        ].
        switch ifTrue:[
            self reopenLauncher.
            DebugView newDebugger.
        ]
    ].    
    box
        addHelpButtonFor:'Launcher/languageSetting.html'.
    box open.
    box destroy

!

memorySettings
    "open a dialog on objectMemory related settings"

    |box igcLimit igcFreeLimit igcFreeAmount newSpaceSize
     compressLimit
     oldIncr component fields codeLimit codeTrigger stackLimit|

    "/
    "/ extract relevant system settings ...
    "/
    igcLimit := ObjectMemory incrementalGCLimit asValue.
    igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue.
    igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue.
    newSpaceSize := ObjectMemory newSpaceSize asValue.
    oldIncr := ObjectMemory oldSpaceIncrement asValue.
    compressLimit := ObjectMemory oldSpaceCompressLimit asValue.
    codeLimit := ObjectMemory dynamicCodeLimit asValue.
    codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue.
    stackLimit := Process defaultMaximumStackSize asValue.

    "/
    "/ create a box on those values ...
    "/
    fields := OrderedCollection new.

    box := DialogBox new.
    box label:(resources string:'Memory manager settings').

    (box addTextLabel:'Warning - invalid settings may result in failures or poor performance

You have been warned.') adjust:#left.
    box addHorizontalLine.

    component := box 
                    addLabelledInputField:(resources string:'size of newSpace:')
                    adjust:#right
                    on:nil "/ newSpaceSize 
                    tabable:true
                    separateAtX:0.7.
    component acceptOnLeave:false.
    component converter:(PrintConverter new initForNumber).
    component model:newSpaceSize.
    fields add:component.

    box addHorizontalLine.


    component := box 
                    addLabelledInputField:(resources string:'incremental GC allocation trigger:')
                    adjust:#right
                    on:nil "/ igcLimit 
                    tabable:true
                    separateAtX:0.7.
    component acceptOnLeave:false.
    component converter:(PrintConverter new initForNumber).
    component model:igcLimit.
    fields add:component.

    box addTextLabel:'(start IGC whenever this amount has been allocated)'.
    box addHorizontalLine.

    component := box 
                    addLabelledInputField:(resources string:'incremental GC freespace trigger:')
                    adjust:#right
                    on:nil "/ igcFreeLimit 
                    tabable:true
                    separateAtX:0.7.
    component acceptOnLeave:false.
    component converter:(PrintConverter new initForNumber).
    component model:igcFreeLimit.
    fields add:component.

    box addTextLabel:'(start IGC whenever freespace drops below this)'.
    box addHorizontalLine.

    component := box 
                    addLabelledInputField:(resources string:'incremental GC amount:')
                    adjust:#right
                    on:nil "/ igcFreeAmount 
                    tabable:true
                    separateAtX:0.7.
    component acceptOnLeave:false.
    component converter:(PrintConverter new initForNumber).
    component model:igcFreeAmount.
    fields add:component.

    box addTextLabel:'(try to keep this amount for peak requests)'.
    box addHorizontalLine.

    component := box 
                    addLabelledInputField:(resources string:'oldspace increment:')
                    adjust:#right
                    on:nil "/ oldIncr 
                    tabable:true
                    separateAtX:0.7.
    component acceptOnLeave:false.
    component converter:(PrintConverter new initForNumber).
    component model:oldIncr.
    fields add:component.

    box addTextLabel:'(increase oldSpace in chunks of this size)'.
    box addHorizontalLine.

    component := box 
                    addLabelledInputField:(resources string:'oldspace compress limit:')
                    adjust:#right
                    on:nil "/ compressLimit 
                    tabable:true
                    separateAtX:0.7.
    component acceptOnLeave:false.
    component converter:(PrintConverter new initForNumber).
    component model:compressLimit.
    fields add:component.

    box addTextLabel:'(suppress compressing GC if more memory is in use)'.
    box addHorizontalLine.

    component := box 
                    addLabelledInputField:(resources string:'stack limit:')
                    adjust:#right
                    on:nil 
                    tabable:true
                    separateAtX:0.7.
    component acceptOnLeave:false.
    component converter:(PrintConverter new initForNumber).
    component model:stackLimit.
    fields add:component.

    box addTextLabel:'(trigger recursionInterrupt if more stack is used by a process)'.
    box addHorizontalLine.

    ObjectMemory supportsJustInTimeCompilation ifTrue:[
        component := box 
                        addLabelledInputField:(resources string:'dynamic code limit:')
                        adjust:#right
                        on:nil
                        tabable:true
                        separateAtX:0.7.
        component acceptOnLeave:false.
        component converter:(PrintConverter new initForNumberOrNil).
        component model:codeLimit.
        fields add:component.

        box addTextLabel:'(flush dynamic compiled code to stay within this limit)'.
        box addHorizontalLine.

        component := box 
                        addLabelledInputField:(resources string:'dynamic code GC trigger:')
                        adjust:#right
                        on:nil
                        tabable:true
                        separateAtX:0.7.
        component acceptOnLeave:false.
        component converter:(PrintConverter new initForNumberOrNil).
        component model:codeTrigger.
        fields add:component.

        box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'.
        box addHorizontalLine.
    ].

    box addAbortButton; addOkButton.
    box
        addHelpButtonFor:'Launcher/memorySettings.html'.

    "/
    "/ show the box ...
    "/
    box open.

    "/
    "/ update system settings
    "/
    box accepted ifTrue:[
        fields do:[:comp | comp accept].

        igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
            ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
        ].
        igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
            ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
        ].
        igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
            ObjectMemory incrementalGCLimit:igcLimit value.
        ].
        newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
            ObjectMemory newSpaceSize:newSpaceSize value.
        ].
        oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
            ObjectMemory oldSpaceIncrement:oldIncr value.
        ].
        stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[
            Process defaultMaximumStackSize:stackLimit value.
        ].
        ObjectMemory oldSpaceCompressLimit:compressLimit value.
        ObjectMemory dynamicCodeLimit:codeLimit value.
        ObjectMemory dynamicCodeGCTrigger:codeTrigger value.
    ].
    box destroy
!

messageSettings
    "open a dialog on infoMessage related settings"

    |box vmInfo vmErrors displayErrors classInfos|

    vmInfo := ObjectMemory infoPrinting asValue.
    vmErrors := ObjectMemory debugPrinting asValue.
    classInfos := Object infoPrinting asValue.
    displayErrors := DeviceWorkstation errorPrinting asValue.

    box := DialogBox new.
    box label:(resources string:'Messages').

    box addCheckBox:(resources string:'VM info messages') on:vmInfo.
    box addCheckBox:(resources string:'VM error messages') on:vmErrors.
    box addHorizontalLine.

    box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors.
    box addCheckBox:(resources string:'Other info messages') on:classInfos.

    box addHelpButtonFor:'Launcher/messageSettings.html'.
    box addAbortButton; addOkButton.
    box open.

    box accepted ifTrue:[
        ObjectMemory infoPrinting:vmInfo value.
        ObjectMemory debugPrinting:vmErrors value.
        Object infoPrinting:classInfos value.
        DeviceWorkstation errorPrinting:displayErrors value.
    ].
    box destroy


!

miscSettings
    "open a dialog on misc other settings"

    |box shadows takeFocus returnFocus
     hostNameInLabel showAccelerators 
     preemptive hostNameInLabelHolder|

    "/ 
    "/ extract relevant system settings ...
    "/
    shadows := PopUpView shadows asValue.
    hostNameInLabel := StandardSystemView includeHostNameInLabel.
    hostNameInLabelHolder := hostNameInLabel asValue.
    returnFocus := StandardSystemView returnFocusWhenClosingModalBoxes asValue.
    takeFocus := StandardSystemView takeFocusWhenMapped asValue.

    showAccelerators := MenuView showAcceleratorKeys asValue.
    preemptive := Processor isTimeSlicing asValue.

    "/
    "/ create a box on those values ...
    "/
    box := DialogBox new.
    box label:(resources string:'Other settings').

    box addCheckBox:(resources string:'shadows under popup views') on:shadows.
    box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus.
    box addCheckBox:(resources string:'views catch focus when mapped') on:takeFocus.
    box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabelHolder.
    box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators.

    box addHorizontalLine.

    box addCheckBox:(resources string:'preemptive scheduling') on:preemptive.

    box 
        addHelpButtonFor:'Launcher/miscSettings.html';
        addAbortButton; 
        addOkButton.

    "/
    "/ show the box ...
    "/
    box open.

    "/
    "/ update system settings
    "/
    box accepted ifTrue:[
        PopUpView shadows:shadows value.
        hostNameInLabelHolder value ~~ hostNameInLabel ifTrue:[ 
            StandardSystemView includeHostNameInLabel:hostNameInLabelHolder value.

            Screen allScreens do:[:aDisplay |
                aDisplay allViewsDo:[:aView |
                    |l|

                    aView isTopView ifTrue:[
                        l := aView label.
                        aView label:(l , ' '); label:l.  "/ force a change
                    ]
                ]
            ]
        ].
        StandardSystemView returnFocusWhenClosingModalBoxes:returnFocus value.
        StandardSystemView takeFocusWhenMapped:takeFocus value.
        MenuView showAcceleratorKeys:showAccelerators value.
        Processor isTimeSlicing ~~ preemptive value ifTrue:[
            preemptive value ifTrue:[
                Processor startTimeSlicing
            ] ifFalse:[
                Processor stopTimeSlicing
            ]
        ]
    ].
    box destroy


!

printerSettings
    "open a dialog on printer related settings"

    |box 
     possiblePrinters possibleTypes printerType printCommand 
     pageFormat landscape updater
     formatLabel formatComponent landscapeLabel landscapeComponent
     topMargin leftMargin rightMargin bottomMargin unitList unit
     topMarginComponent leftMarginComponent
     rightMarginComponent
     bottomMarginComponent supportsColor supportsColorComponent
     y y1 commandListPop component commandList row|

    possiblePrinters := PrinterStream withAllSubclasses asArray.
    possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName].

    printerType := SelectionInList new list:(resources array:possibleTypes).
    printerType selectionIndex:(possiblePrinters identityIndexOf:Printer).
    printCommand := Printer printCommand asValue.

    pageFormat := SelectionInList new list:(Printer defaultPageFormats).
    pageFormat selection:(Printer pageFormat).
    landscape := Printer landscape asValue.

    topMargin := Printer topMargin asValue.
    leftMargin := Printer leftMargin asValue.
    rightMargin := Printer rightMargin asValue.
    bottomMargin := Printer bottomMargin asValue.
    supportsColor := Printer supportsColor asValue.

    box := DialogBox new.
    box label:(resources string:'Printer settings').

"/ either use a popUpList ...
"/    box addPopUpList:(resources string:'printer type:') on:printerType.

"/ or a comboList;
"/ which one looks better ?
    y := box yPosition.
    component := box addTextLabel:(resources string:'printer type:').
    component width:0.25; adjust:#right; borderWidth:0.
    box yPosition:y.
    component := box addComboListOn:printerType tabable:true.
    component aspect:#selectionIndex; changeMessage:#selectionIndex:; useIndex:true.
    component width:0.75; left:0.25.
"/ end of question

    y := box yPosition.
    component := box addTextLabel:(resources string:'print command:').
    component width:0.25; adjust:#right; borderWidth:0.
    box yPosition:y.
    commandListPop := box addComboBoxOn:printCommand tabable:true.
"/    commandListPop := box addInputFieldOn:printCommand tabable:true.
    commandListPop width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
    "/ some common print commands ...

    commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
    commandList isNil ifTrue:[
        commandList := PrinterStream defaultCommands.
        commandList isNil ifTrue:[
            commandList := #('lpr' 
                             'lp' 
                            ).
        ]
    ].

    commandListPop list:commandList.
    box addVerticalSpace.
    box addHorizontalLine.
    box addVerticalSpace.

    row := OrderedCollection new.
    row add:(formatLabel := Label label:(resources string:'page format:')).
    formatLabel borderWidth:0.
    row add:(formatComponent := PopUpList on:pageFormat).
    formatComponent label:'unknown'.

    row add:(landscapeLabel := Label label:(resources string:'landscape:')).
    landscapeLabel borderWidth:0.
    row add:(landscapeComponent := CheckToggle on:landscape).

    y := box yPosition.
    box
        addRow:(1 to:2)
        fromX:0
        toX:0.5
        collect:[:idx | row at:idx]
        tabable:false
        horizontalLayout:#leftSpace
        verticalLayout:#center.
    y1 := box yPosition.
    box yPosition:y.

    box
        addRow:(3 to:4)
        fromX:0.5
        toX:1.0
        collect:[:idx | row at:idx]
        tabable:false
        horizontalLayout:#leftSpace
        verticalLayout:#center.

    box yPosition:(box yPosition max:y1).

    box makeTabable:(formatComponent).
    box makeTabable:(landscapeComponent).

    box addVerticalSpace.
    box addHorizontalLine.
    box addVerticalSpace.

    y := box yPosition.

    topMarginComponent := box 
        addLabelledInputField:(resources string:'top margin:')
        adjust:#right
        on:nil "/ topMargin 
        tabable:true
        from:0.0 to:0.5
        separateAtX:0.6.
    topMarginComponent converter:(PrintConverter new initForNumber).
    topMarginComponent model:topMargin.
    y1 := box yPosition.

    box yPosition:y.
    unitList := SelectionInList with:#('inch' 'mm').
    unitList selectionIndex:1.

    component := box addComponent:(PopUpList on:unitList).
    component
        left:0.6;
        width:0.3.

    box yPosition:y1.

    leftMarginComponent := box 
        addLabelledInputField:(resources string:'left margin:')
        adjust:#right
        on:nil "/ leftMargin 
        tabable:true
        from:0.0 to:0.5
        separateAtX:0.6.
    leftMarginComponent converter:(PrintConverter new initForNumber).
    leftMarginComponent model:leftMargin.

    rightMarginComponent := box 
        addLabelledInputField:(resources string:'right margin:')
        adjust:#right
        on:nil "/ rightMargin 
        tabable:true
        from:0.0 to:0.5
        separateAtX:0.6.
    rightMarginComponent converter:(PrintConverter new initForNumber).
    rightMarginComponent model:rightMargin.

    bottomMarginComponent := box 
        addLabelledInputField:(resources string:'bottom margin:')
        adjust:#right
        on:nil "/ bottomMargin 
        tabable:true
        from:0.0 to:0.5
        separateAtX:0.6.
    bottomMarginComponent converter:(PrintConverter new initForNumber).
    bottomMarginComponent model:bottomMargin.

    box addHorizontalLine.
    supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor.
    box addVerticalSpace.

    updater := [ |p fg hasPageSize hasMargins|

                       printerType selectionIndex ~~ 0 ifTrue:[
                           p := possiblePrinters at:(printerType selectionIndex).
                           hasPageSize := p supportsPageSizes. 
                           hasMargins := p supportsMargins. 
                       ] ifFalse:[
                           hasPageSize := false.
                           hasMargins := false.
                       ].
                       hasPageSize ifTrue:[
                          fg := Button new foregroundColor.
                          formatComponent enable.
                          landscapeComponent enable.

                          formatComponent label:p pageFormat.
                          pageFormat value:(p pageFormat).
                          landscape value:(p landscape).
                       ] ifFalse:[ 
                          fg := Button new disabledForegroundColor.
                          formatComponent disable.
                          landscapeComponent disable.

                          formatComponent label:'unknown'.
                          landscape value:nil.
                       ].
                       hasMargins ifTrue:[
                          unitList selectionIndex == 2 ifTrue:[
                              unit := #mm
                          ] ifFalse:[
                              unit := #inch
                          ].

                          topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
                          leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
                          rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
                          bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).

                          topMarginComponent enable.
                          leftMarginComponent enable.
                          rightMarginComponent enable.
                          bottomMarginComponent enable.
                       ] ifFalse:[ 
                          topMarginComponent disable.
                          leftMarginComponent disable.
                          rightMarginComponent disable.
                          bottomMarginComponent disable.
                       ].
                       formatLabel foregroundColor:fg.
                       landscapeLabel foregroundColor:fg.

                       p notNil ifTrue:[ 
                           commandList := p defaultCommands.
                           commandList notNil ifTrue:[
                                commandListPop list:commandList 
                           ].

                           printCommand value:(p printCommand).
                       ].
                       p supportsPostscript ifFalse:[
                           supportsColorComponent disable.
                           supportsColor value:false
                       ] ifTrue:[
                           supportsColorComponent enable.
                           supportsColor value:(Printer supportsColor).
                       ]
                     ].
    unitList onChangeSend:#value to:updater.
    printerType onChangeSend:#value to:updater.
    updater value.

    box addVerticalSpace;
        addHelpButtonFor:'Launcher/printerSettings.html';
        addAbortButton; addOkButton.
    box open.

    box accepted ifTrue:[
        Printer := possiblePrinters at:(printerType selectionIndex).
        Printer printCommand:printCommand value.

        Printer supportsPageSizes ifTrue:[
            Printer pageFormat:(pageFormat selection).
            Printer landscape:(landscape value).
        ].
        Printer supportsMargins ifTrue:[
            unitList selectionIndex == 2 ifTrue:[
                unit := #mm
            ] ifFalse:[
                unit := #inch
            ].
            Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch).
            Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
            Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
            Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
        ].
        Printer supportsPostscript ifTrue:[
            Printer supportsColor:supportsColor value.
        ].
    ].
    box destroy

!

restoreSettings
    "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:'restore settings from:') 
        default:'settings.stx'
        ok:(resources string:'restore') 
        abort:(resources string:'cancel') 
        pattern:'*.stx'
        fromDirectory:nil.

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

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


!

saveSettings
    "save settings to a settings-file."

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

    |s screen fileName|

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

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

    s := fileName asFilename writeStream.
    s isNil ifTrue:[
        self warn:'cannot write the ''' , fileName , ''' file'.
        ^ self
    ].

    s nextPutLine:'"/ ST/X saved settings';
      nextPutLine:'"/ DO NOT MODIFY MANUALLY';
      nextPutLine:'"/ (modifications would be lost with next save-settings)';
      nextPutLine:'"/';
      nextPutLine:'"/ this file was automatically generated by the';
      nextPutLine:'"/ ''save settings'' function of the Launcher';
      nextPutLine:'"/'.
    s cr.

    s nextPutLine:'"/'.
    s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString.
    s nextPutLine:'"/'.
    s cr.

    s nextPutLine:'"/'.
    s nextPutLine:'"/ Display settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ only restore the display settings, if on the same Display ...'.
    s nextPutLine:'Display displayName = ' , (Display displayName storeString) , ' ifTrue:['.
      screen := Screen current.
      screen fixColors notNil ifTrue:[
        s nextPutLine:'  Image flushDeviceImages.'.
        s nextPutLine:'  Color colorAllocationFailSignal catch:['.
        s nextPutLine:'    Color getColorsRed:6 green:6 blue:4 on:Display'.
        s nextPutLine:'  ].'.
      ] ifFalse:[
        s nextPutLine:'  Display releaseFixColors.'.
      ].
      s nextPutLine:'  Display hasColors: ' , (screen hasColors storeString) , '.'.
      s nextPutLine:'  Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'.
      s nextPutLine:'  Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'.
      s nextPutLine:'  Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'.
      s nextPutLine:'  Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'.
      s nextPutLine:'  View defaultStyle:(View defaultStyle). "/ to flush any device images'.
    s nextPutLine:'].'.
    s cr.

    s nextPutLine:'"/'.
    s nextPutLine:'"/ Compiler settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.';
      nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.';
      nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.';
      nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.';
      nextPutLine:'Compiler warnPossibleIncompatibilities: ' , (Compiler warnPossibleIncompatibilities storeString) , '.';
      nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.';
      nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.';
      nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.';

      nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.';

      nextPutLine:'Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.';
      nextPutLine:'Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.';
      nextPutLine:'Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.';
      nextPutLine:'Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.';
      nextPutLine:'Compiler ccPath: ' , (Compiler ccPath storeString) , '.';

      nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.';
      nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'.

    HistoryManager notNil ifTrue:[
        HistoryManager isActive ifTrue:[
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'.
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'.
        ] ifFalse:[
            s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'.
        ].
    ].

    ObjectFileLoader notNil ifTrue:[
        s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'.
        s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'.
    ].

    s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'.
    s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'.

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Info & Debug Messages:'.
    s nextPutLine:'"/'.
    s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.';
      nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.';
      nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.';
      nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'.


    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Misc settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.';
      nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.';
      nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.';
      nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.';
      nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.';

      "/ claus - I dont think its a good idea to save those ...
      nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.';
      nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.';

      nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.';
      nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.';
      nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.';
      nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'.
    (Exception emergencyHandler == Launcher notifyingEmergencyHandler) ifTrue:[
        s nextPutLine:'Exception emergencyHandler:(Launcher notifyingEmergencyHandler).'.
    ].

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Printer settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'Printer := ' , (Printer name) , '.';
      nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'.

    Printer supportsPageSizes ifTrue:[
        s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'.
        s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'.
    ].
    Printer supportsMargins ifTrue:[
        s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'.
        s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'.
        s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'.
        s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'.
    ].
    Printer supportsPostscript ifTrue:[
        s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'.
    ].

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Font settings:'.
    s nextPutLine:'"/'.
    s nextPutLine:'View defaultFont: ' , (View defaultFont storeString) , '.'.
    s nextPutLine:'Label defaultFont: ' , (Label defaultFont storeString) , '.'.
    s nextPutLine:'Button defaultFont: ' , (Button defaultFont storeString) , '.'.
    s nextPutLine:'Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'.
    s nextPutLine:'SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'.
    s nextPutLine:'MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'.
    s nextPutLine:'PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'.
    s nextPutLine:'TextView defaultFont: ' , (TextView defaultFont storeString) , '.'.
    s nextPutLine:'EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'.
    s nextPutLine:'CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'.

    s cr.
    s nextPutLine:'"/'.
    s nextPutLine:'"/ Language setting:'.
    s nextPutLine:'"/'.
    s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'.
    s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'.
    s close.

    "
     Transcript topView application saveSettings
    " 


!

sourceAndDebuggerSettings
    "open a dialog on misc other settings"

    |box check logDoits updChanges changeFileName
     useManager hasManager 
     repository repositoryHolder localSourceFirst 
     sourceCacheDir cacheEntry
     component localCheck oldIndent nm fn manager
     keepMethodHistory showErrorNotifier showVerboseStack|

    "/ 
    "/ extract relevant system settings ...
    "/
    keepMethodHistory := Class methodHistory notNil asValue.
    logDoits := Smalltalk logDoits asValue.
    updChanges := Class updatingChanges asValue.
    changeFileName := ObjectMemory nameForChanges asValue.

    hasManager := AbstractSourceCodeManager notNil
                  and:[AbstractSourceCodeManager isLoaded].

    hasManager ifTrue:[
        useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue.
        localSourceFirst := Class tryLocalSourceFirst asValue.
        manager notNil ifTrue:[
            repository := manager repositoryName.
            repository notNil ifTrue:[
                repositoryHolder := repository asValue
            ] ifFalse:[
                repositoryHolder := '' asValue
            ].
        ].
    ] ifFalse:[
        useManager := false.
        localSourceFirst := false
    ].
    showErrorNotifier := (Exception emergencyHandler == Launcher notifyingEmergencyHandler) asValue.
    showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue.

    sourceCacheDir := nil asValue.

    "/
    "/ create a box on those values ...
    "/
    box := DialogBox new.
    box label:(resources string:'Source & Debugger settings').

    box addCheckBox:(resources string:'remember changed methods (for previous method in browser)') on:keepMethodHistory.
    box addCheckBox:(resources string:'log compiles in changes file') on:updChanges.
    box addCheckBox:(resources string:'log doIts in changes file') on:logDoits.

    component := box 
                    addLabelledInputField:(resources string:'change file name:')
                    adjust:#right
                    on:changeFileName 
                    tabable:true
                    separateAtX:0.4.
    component immediateAccept:true; acceptOnLeave:false.

"/    y := box yPosition.
"/    component := box addTextLabel:(resources string:'change file name:').
"/    component width:0.5; adjust:#right; borderWidth:0.
"/    box yPosition:y.
"/    component := box addInputFieldOn:changeFileName tabable:true.
"/    component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false.

    box addHorizontalLine.

    hasManager ifTrue:[
        check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager.
        oldIndent := box leftIndent.
        box leftIndent:30.

        repositoryHolder notNil ifTrue:[
            component := box 
                            addLabelledInputField:(resources string:'repository:')
                            adjust:#right
                            on:repositoryHolder 
                            tabable:true
                            separateAtX:0.4.
            component immediateAccept:true; acceptOnLeave:false.
            component enableChannel:useManager.
        ].

        cacheEntry := box 
                        addLabelledInputField:(resources string:'source cache dir:')
                        adjust:#right
                        on:sourceCacheDir 
                        tabable:true
                        separateAtX:0.4.
        cacheEntry immediateAccept:true; acceptOnLeave:false.
        cacheEntry enableChannel:useManager.

        localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
        localCheck enableChannel:useManager.

        box leftIndent:oldIndent.

        (AbstractSourceCodeManager isNil 
        or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
            useManager value:false.
            cacheEntry disable.
            check disable.
            localCheck enable.
        ] ifFalse:[
            sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
        ].
        box addHorizontalLine.
    ].

    box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier.
    box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack.

    box 
        addHelpButtonFor:'Launcher/sourceSettings.html';
        addAbortButton; 
        addOkButton.

    "/
    "/ show the box ...
    "/
    box open.

    "/
    "/ update system settings
    "/
    box accepted ifTrue:[
        Class keepMethodHistory:keepMethodHistory value.
        Smalltalk logDoits:logDoits value.
        Class updateChanges:updChanges value.
        ObjectMemory nameForChanges:changeFileName value.

        (hasManager and:[useManager value]) ifTrue:[
            manager isNil ifTrue:[
                Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager).
                manager := Smalltalk at:#SourceCodeManager.
            ].
            Class tryLocalSourceFirst:(localSourceFirst value).
            localSourceFirst value ifFalse:[
                nm := sourceCacheDir value.

                (fn := nm asFilename) exists ifFalse:[
                    (self confirm:('cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[
                        fn makeDirectory; 
                           makeReadableForAll;
                           makeWritableForAll;
                           makeExecutableForAll.
                    ]
                ].
                (fn exists 
                and:[fn isDirectory
                and:[fn isReadable
                and:[fn isWritable]]]) ifTrue:[
                    AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
                ]
            ].

            repositoryHolder notNil ifTrue:[
                repositoryHolder value size > 0 ifTrue:[
                    manager initializeForRepository:repositoryHolder value.
                ].
            ].

            showErrorNotifier value ifFalse:[
                Exception emergencyHandler:nil
            ] ifTrue:[
                Exception emergencyHandler:(Launcher notifyingEmergencyHandler)
            ].
            DebugView defaultVerboseBacktrace:(showVerboseStack value).

        ] ifFalse:[
            Smalltalk at:#SourceCodeManager put:nil
        ]
    ].
    box destroy


!

viewStyleSetting 
    "open a dialog on viewStyle related settings"

    |listOfStyles resourceDir dir box 
     list listView scrView infoLabel infoForwarder newStyle
     someRsrcFile b didApply|

    "
     search resources directory for a list of .style files ...
    "
    someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
    someRsrcFile notNil ifTrue:[
        resourceDir := someRsrcFile asFilename directoryName
    ] ifFalse:[
        resourceDir := Smalltalk getSystemFileName:'resources'.
    ].

    resourceDir isNil ifTrue:[
        self warn:'no styles found (missing ''resources'' directory)'.
        ^ self
    ].
    dir := resourceDir asFilename directoryContents.

    listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
    listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
    Filename isCaseSensitive ifFalse:[
        listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
    ].
    listOfStyles sort.

"/ old code: used a standard ListSelectionBox
"/ changed to intercept selection and add info-output.

"/    box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs.
"/    box label:(resources string:'Style selection').
"/    box list:listOfStyles.
"/    box initialText:View defaultStyle.
"/    box selectAction:[:newStyle |
"/    ].    
"/    box action:[:newStyle |
"/        transcript topView withCursor:Cursor wait do:[
"/            transcript showCR:'change style to ' , newStyle , ' ...'.
"/            View defaultStyle:newStyle asSymbol.
"/        ]
"/    ].    
"/    box showAtPointer

"/ new code: build box 'by 'hand'
"/
    infoForwarder := [
                        |nm sheet comment|
                        nm := list selection.
                        sheet := ViewStyle fromFile:(nm , '.style').
                        comment := sheet at:#comment ifAbsent:''.
                        infoLabel label:comment withCRs asStringCollection
                       ].

    list := SelectionInList with:listOfStyles.
    list onChangeSend:#value to:infoForwarder.

    box := Dialog new.
    box label:(resources string:'Style selection').

    (box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left.
    listView := SelectionInListView on:list.
    listView doubleClickAction:[:sel | box accept value:true. box hide].
    scrView := box addComponent:(ScrollableView forView:listView) tabable:true.

    box addVerticalSpace.

    (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.

    box addAbortButton.
    b := box addButton:(Button label:(resources string:'apply')).
    b action:[didApply := true. self changeViewStyleTo:(list selection)].
    box addOkButton.
    list selection:(View defaultStyle).

    box stickAtBottomWithVariableHeight:scrView.
    box stickAtBottomWithFixHeight:infoLabel.
    box open.

    box accepted ifTrue:[
        ((newStyle := list selection) ~= View defaultStyle
        or:[didApply ~~ true]) ifTrue:[
            self changeViewStyleTo:newStyle.
        ].
    ].
    box destroy


! !

!NewLauncher methodsFor:'action - projects'!

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

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

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
    ]

    "Modified: 8.1.1997 / 14:52:20 / cg"

! !

!NewLauncher methodsFor:'action - settings'!

changeFont

    |viewClassName updateFontLabelBlock viewClass|

    viewClassName := (self settingsAspects at: #selectionOfViewClass) value name.

    viewClass := Smalltalk at: viewClassName asSymbol.
    viewClass defaultFont: (self chooseFontFromViewClass: viewClass).
    self updatePreviewFontLabel

!

changeFontFor: viewClassName

    viewClassName = 'All'     
    ifTrue: 
    [
        |choosedFontForAll|
        choosedFontForAll := self chooseFontFromViewClass: View.
        SimpleView withAllSubclasses do: 
        [:viewCls|
            viewCls defaultFont: choosedFontForAll.
        ]
    ].
    viewClassName = 'Default' 
    ifTrue:
    [
        SimpleView updateAllStyleCaches.
    ].

    self updatePreviewFontLabel
!

chooseFontFromViewClass: aViewClass

    ^FontPanel 
        fontFromUserInitial: aViewClass defaultFont 
        title:(resources string:'font for %1' with:aViewClass name)
        filter:nil

!

createAspectsForFontsSettings
    "create aspects for font settings"

    |listOfViewClasses selectionOfViewClass updatePreviewFontLabelBlock|

    listOfViewClasses := (TreeItem newAsTreeFromSmalltalkClass: (Smalltalk at:#SimpleView)).
    selectionOfViewClass := listOfViewClasses asValue.
    selectionOfViewClass onChangeSend:#updatePreviewFontLabel to: self.

    self settingsAspects
        at: #listOfViewClasses           put: listOfViewClasses;
        at: #selectionOfViewClass        put: selectionOfViewClass






!

createAspectsForKeyboardSettings
    "create aspects for keyboard settings"

    |mappings listOfRawKeys listOfFunctions list1 list2 selectionForwarder macroForwarder keyMacroText|

    mappings := Screen current keyboardMap.

    listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort.
    listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort.
    keyMacroText := ValueHolder new.
    selectionForwarder := Plug new.
    selectionForwarder respondTo:#showFunction
    with:
    [
        |raw|
        raw := list1 selection.
        list2 retractInterestsFor:selectionForwarder.
        list2 selection:(mappings at:raw asSymbol) asString.
        list2 onChangeSend:#showRawKey to:selectionForwarder.
    ].
    selectionForwarder respondTo:#showRawKey
    with:
    [
        |f raw|
        f := list2 selection.
        list1 retractInterestsFor:selectionForwarder.
        raw := mappings keyAtValue:f asString.
        raw isNil 
        ifTrue:
        [
            raw := mappings keyAtValue:f first.
            raw isNil ifTrue: [raw := mappings keyAtValue:f asSymbol]
        ].
        list1 selection:raw.
        list1 onChangeSend:#showFunction to:selectionForwarder.
    ].

    macroForwarder := 
    [
        |f macro indent|
        f := list2 selection.
        (f startsWith:'Cmd') ifTrue:[f := f copyFrom:4].
        macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil.
        macro notNil 
        ifTrue:
        [
            macro := macro asStringCollection.
            indent := macro
                inject:99999 into:
                [:min :element|
                     |stripped|
                     stripped := element withoutLeadingSeparators.
                     stripped size == 0 
                        ifTrue:[min] 
                        ifFalse:[min min:(element size - stripped size)]
                ].
            indent ~~ 0 
            ifTrue:
            [
                macro := macro collect:
                [:line | 
                     line size > indent 
                        ifTrue:[line copyFrom:indent+1] 
                        ifFalse:[line]
                ]
            ]                        
        ].
        keyMacroText value:macro
    ].

    list1 := SelectionInList with:listOfRawKeys.
    list1 onChangeSend:#showFunction to:selectionForwarder.

    list2 := SelectionInList with:listOfFunctions.
    list2 onChangeSend:#showRawKey to:selectionForwarder.
    list2 onChangeSend:#value to:macroForwarder.

    self settingsAspects 
        at: #listOfRawKeys   put: list1;
        at: #listOfFunctions put: list2;
        at: #keyMacroText    put: keyMacroText;
        at: #help            put: [self showDocumentation:'Launcher/keyboardSetting.html'];
        at: #dismiss         put: []


!

createAspectsForLanguageSettings 
    "create aspects for language settings"

    |listOfLanguages translatedLanguages switch box languageList flags|

    listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default').
    listOfLanguages := listOfLanguages asOrderedCollection.
    translatedLanguages := listOfLanguages collect:[:lang | |item|
                                        item := resources at:lang.
                                        item isString ifTrue:[
                                            item
                                        ] ifFalse:[
                                            item at:1
                                        ]
                                ].
    flags := listOfLanguages collect:[:lang | |item|
                                        item := resources at:lang.
                                        item isArray ifTrue:[
                                            item at:2
                                        ] ifFalse:[
                                            nil
                                        ]
                                ].
    flags := flags collect:[:nm | nm notNil ifTrue:[Image fromFile:nm] ifFalse:[nil]].

    languageList := translatedLanguages with:flags collect:[:lang :flag |
                                LabelAndIcon icon:flag string:lang.
                        ].

    self settingsAspects
        at: #listOfLanguages put: languageList asValue;
        at: #selectionOflanguage put: Language asValue;
        at: #apply put: [:newLanguage |
        self withWaitCursorDo:[
            |fontPref idx language oldLanguage enc answer matchingFonts|

            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
            idx ~~ 0 ifTrue:[
                language := listOfLanguages at:idx
            ] ifFalse:[
                language := newLanguage
            ].

            "/ check if the new language needs a differently encoded font;
            "/ ask user to switch font and allow cancellation.
            "/ Otherwise, you are left with unreadable menu & button items ...

            oldLanguage := Smalltalk language.
            Smalltalk language:language asSymbol.
            ResourcePack flushCachedResourcePacks.
            fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'.
            Smalltalk language:oldLanguage.

            switch := true.
            enc := MenuView defaultFont encoding.
            (fontPref match:enc) ifFalse:[
                "/ look if there is one at all.
                matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding].
                matchingFonts size == 0 ifTrue:[
                    (Dialog 
                        confirm:(resources 
                                    string:'your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)'
                                      with:fontPref) withCRs)
                    ifFalse:[
                        switch := false
                    ]
                ] ifFalse:[
                    answer := Dialog 
                                confirmWithCancel:(resources 
                                                        string:'menu font is not %1-encoded.\\Change it ?'
                                                        with:fontPref) withCRs
                                           labels:(resources
                                                        array:#('cancel' 'no' 'yes'))
                                           default:3.
                    answer isNil ifTrue:[
                        switch := false
                    ] ifFalse:[
                        answer ifTrue:[
                            switch := (self fontBoxForEncoding:fontPref)
                        ]
                    ].
                ].
            ].

            switch ifTrue:[
                transcript showCR:'change language to ' , newLanguage , ' ...'.
                Smalltalk language:language asSymbol.
                ResourcePack flushCachedResourcePacks
            ].
        ].
        switch ifTrue:[
            self reOpen.
            DebugView newDebugger.
        ]
    ].
!

createAspectsForMemorySettings
    "create aspects for memory settings"



!

createAspectsForMessagesSettings
    "create aspects for messages settings"



!

createAspectsForMiscSettings
    "create aspects for misc settings"

    |shadowsUnderPopupViews boxesReturnsFocus viewsCatchFocus hostnameInWindowLabels showAccelerators|

    shadowsUnderPopupViews := PopUpView shadows asValue.
    shadowsUnderPopupViews onChangeSend: #value  to: [PopUpView shadows: shadowsUnderPopupViews value].
    boxesReturnsFocus := StandardSystemView returnFocusWhenClosingModalBoxes asValue.
    boxesReturnsFocus onChangeSend: #value  to: [StandardSystemView returnFocusWhenClosingModalBoxes: boxesReturnsFocus value].
    viewsCatchFocus := StandardSystemView takeFocusWhenMapped asValue.
    viewsCatchFocus onChangeSend: #value  to: [StandardSystemView takeFocusWhenMapped: viewsCatchFocus value].
    hostnameInWindowLabels := StandardSystemView includeHostNameInLabel asValue.
    hostnameInWindowLabels onChangeSend: #value  to: 
    [
        hostnameInWindowLabels value ~~ StandardSystemView includeHostNameInLabel 
        ifTrue:
        [ 
            StandardSystemView includeHostNameInLabel:hostnameInWindowLabels value.
            Screen allScreens do:
            [:aDisplay|
                aDisplay allViewsDo:
                [:aView|
                    |l|
                    aView isTopView ifTrue: [l := aView label.aView label:(l , ' '); label:l]
                ]
            ]
        ] 
    ].
    showAccelerators := MenuView showAcceleratorKeys asValue.
    showAccelerators onChangeSend: #value  to: [MenuView showAcceleratorKeys: showAccelerators value].

    self settingsAspects
        at: #shadowsUnderPopupViews put: shadowsUnderPopupViews;
        at: #boxesReturnsFocus      put: boxesReturnsFocus;
        at: #viewsCatchFocus        put: viewsCatchFocus;
        at: #hostnameInWindowLabels put: hostnameInWindowLabels;
        at: #showAccelerators       put: showAccelerators
    
!

createAspectsForPrinterSettings
    "create aspects for printer settings"



!

createAspectsForScreenSettings
    "create aspects for screen settings"



!

createAspectsForSourcesSettings
    "create aspects for sources settings"

    |rememberChangedMethods logCompilesInChangesFile logDoItsInChangesFile 
    sourceCodeFromSourceCodeManagement hasSourceCodeManager manager directoryOfSourceCodeCache
    nameOfChangesFile directoryOfRepository useLocalSourceCode|

    rememberChangedMethods := Class methodHistory notNil asValue.
    rememberChangedMethods onChangeSend: #value to: [Class keepMethodHistory: rememberChangedMethods value].
    logCompilesInChangesFile := Class updatingChanges asValue.
    logCompilesInChangesFile onChangeSend: #value to: [Class updateChanges: logCompilesInChangesFile value].
    logDoItsInChangesFile := Smalltalk logDoits asValue.
    logDoItsInChangesFile onChangeSend: #value to: [Smalltalk logDoits: logDoItsInChangesFile value].

    nameOfChangesFile := ObjectMemory nameForChanges asValue.
    nameOfChangesFile onChangeSend: #value to: [ObjectMemory nameForChanges:nameOfChangesFile value].

    hasSourceCodeManager := AbstractSourceCodeManager notNil and:[AbstractSourceCodeManager isLoaded].
    sourceCodeFromSourceCodeManagement := (hasSourceCodeManager and: [(manager := Smalltalk at:#SourceCodeManager) notNil]) asValue.
    sourceCodeFromSourceCodeManagement onChangeSend: #value to: 
    [sourceCodeFromSourceCodeManagement value 
        ifTrue:  [Smalltalk at:#SourceCodeManager put: AbstractSourceCodeManager defaultManager]
        ifFalse: [Smalltalk at:#SourceCodeManager put: nil]].

    manager notNil 
    ifTrue:
    [   
        |repository|
        repository := manager repositoryName.
        repository notNil ifTrue:[
            directoryOfRepository := repository asValue
        ] ifFalse:[
            directoryOfRepository := '' asValue
        ].
    ].
    directoryOfRepository onChangeSend: #value to: [manager initializeForRepository: directoryOfRepository value].

    directoryOfSourceCodeCache := AbstractSourceCodeManager cacheDirectoryName.
    directoryOfSourceCodeCache onChangeSend: #value to: [].

    useLocalSourceCode := Class tryLocalSourceFirst asValue.
    useLocalSourceCode onChangeSend: #value to: [Class tryLocalSourceFirst: useLocalSourceCode value].
    
    self settingsAspects
        at: #rememberChangedMethods put: rememberChangedMethods;
        at: #logCompilesInChangesFile put: logCompilesInChangesFile;
        at: #logDoItsInChangesFile put: logDoItsInChangesFile;
        at: #hasSourceCodeManager  put: hasSourceCodeManager asValue;
        at: #nameOfChangesFile put: nameOfChangesFile;
        at: #sourceCodeFromSourceCodeManagement put: sourceCodeFromSourceCodeManagement;
        at: #directoryOfRepository put: directoryOfRepository;
        at: #directoryOfSourceCodeCache put: directoryOfSourceCodeCache;
        at: #useLocalSourceCode put: useLocalSourceCode

!

createAspectsForViewsSettings
    "open a dialog on viewStyle related settings"

    |listOfStyles resourceDir dir listOfViewStyles selection infoLabel infoForwarder someRsrcFile|

    "search resources directory for a list of .style files ..."

    someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
    someRsrcFile notNil 
        ifTrue:[resourceDir := someRsrcFile asFilename directoryName] 
        ifFalse:[resourceDir := Smalltalk getSystemFileName:'resources'].

    resourceDir isNil ifTrue:[self warn:'no styles found (missing ''resources'' directory)'. ^ self].
    dir := resourceDir asFilename directoryContents.

    listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
    listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
    Filename isCaseSensitive 
    ifFalse:
    [
        listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
    ].
    listOfStyles sort.

    infoLabel := ValueHolder with: View defaultStyle.
    selection := ValueHolder with: (listOfStyles indexOf: View defaultStyle).

    infoForwarder := 
    [
        |nm sheet comment|
        nm := listOfViewStyles selection.
        sheet := ViewStyle fromFile:(nm , '.style').
        comment := sheet at:#comment ifAbsent:''.
        infoLabel value:comment withCRs asStringCollection asString trimBlanks
    ].

    listOfViewStyles := SelectionInList with:listOfStyles.
    listOfViewStyles onChangeSend:#value to:infoForwarder.
    listOfViewStyles selectionIndexHolder: selection.

    self settingsAspects
        at: #listOfViewStyles put: listOfViewStyles;
        at: #infoLabel        put: infoLabel;
        at: #apply            put: [self changeViewStyleTo: (listOfStyles at: selection value)]

!

doForCurrentSettings: aDoKey

    (self settingsAspects at: aDoKey asSymbol ifAbsent: [^self warn: 'No action found for ', aDoKey, '!!']) value
!

openSettingsFor: aSetting

    self settingsAspects at: #settingsCanvas put: SubCanvas new.
    aSetting = 'StyleSettings' ifTrue: [self selectionOfSettings value: 'Views'].
    aSetting = 'SystemSettings' ifTrue: [self selectionOfSettings value: 'Sources'].
    super openDialogInterface: (#windowSpecFor, aSetting) asSymbol.
    settingsAspects := nil.
    self removeAllTemporalViews.
    self builder bindings removeKey: #selectionOfSettings
!

settingsAspects

    ^settingsAspects ? (settingsAspects := IdentityDictionary new)
!

settingsSelection

    ^settingsSelection
!

settingsSelection: aSettingsSelection

    settingsSelection := aSettingsSelection.

    self perform: ('createAspectsFor', settingsSelection, 'Settings') asSymbol.
    (self settingsAspects at: #settingsCanvas) client: self spec: ('windowSpecOf', settingsSelection, 'Settings') asSymbol.
!

updatePreviewFontLabel

    |viewClassFont viewClass viewClassName|
    viewClassFont := (viewClass := Smalltalk at: (self settingsAspects at: #selectionOfViewClass) value name ifAbsent: [SimpleView]) defaultFont.
    (self builder componentAt: #fontFamilyLabel_Temporal)   label: 'Family:  '  , viewClassFont family asBoldText.
    (self builder componentAt: #fontFaceLabel_Temporal)     label: 'Face:  '    , viewClassFont face asBoldText.
    (self builder componentAt: #fontStyleLabel_Temporal)    label: 'Style:  '   , viewClassFont style asBoldText.
    (self builder componentAt: #fontSizeLabel_Temporal)     label: 'Size:  '    , viewClassFont size printString asBoldText.
    (self builder componentAt: #fontEncodingLabel_Temporal) label: 'Encoding:  ', viewClassFont encoding asBoldText.

     (viewClassName := viewClass name) size > 10
        ifTrue:  [viewClassName := (viewClassName copyFrom: 1 to: 10) asBoldText, '...']
        ifFalse: [viewClassName := viewClassName asBoldText].

    (self builder componentAt: #changeFontButton_Temporal)  
        sizeFixed: true;
        label: 'Change Font of ', viewClassName.
    
    (self builder componentAt: #previewFontLabel_Temporal)
         font: viewClassFont;
         label: 'The quick brown fox jumps over the lazy dog
1234567890!!@#$%^&*(){}[]:"~;,./<>?äöüÄÖÜßéèêÅ©'
! !

!NewLauncher methodsFor:'action - tools'!

compressingGarbageCollect
    "perform a compressing garbageCollect"

    ObjectMemory verboseGarbageCollect

!

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

!

garbageCollect
    "perform a non-compressing garbageCollect"

    ObjectMemory reclaimSymbols

!

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:[Processor yield].

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

!

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)
        ]
    ]

!

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
    ]

! !

!NewLauncher methodsFor:'active help'!

defaultInfoLabel

    ^self updateInfo

! !

!NewLauncher methodsFor:'aspects'!

enableDangerousMenuItemsInRemoteLauncher

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

selectionOfSettings

    |holder|
    (holder := builder bindingAt:#selectionOfSettings) isNil ifTrue:[
        builder aspectAt:#selectionOfSettings put:(holder :=  
        AspectAdaptor new subject: self; forAspect: #settingsSelection)
    ].
    ^ holder
!

valueOfApplicationName

    |holder|
    (holder := builder bindingAt:#valueOfApplicationName) isNil ifTrue:[
        builder aspectAt:#valueOfApplicationName put:(holder :=  'application' asValue).
    ].
    ^ holder
!

valueOfBuildDate

    |holder|
    (holder := builder bindingAt:#valueOfBuildDate) isNil ifTrue:[
        builder aspectAt:#valueOfBuildDate put:(holder :=  ValueHolder new).
    ].
    ^ holder
!

valueOfConfiguration

    |holder|
    (holder := builder bindingAt:#valueOfConfiguration) isNil ifTrue:[
        builder aspectAt:#valueOfConfiguration put:(holder :=  Smalltalk configuration asValue).
    ].
    ^ holder
!

valueOfDefaultLibs

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

valueOfEnablingIfAvailable

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

valueOfLibcomp

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

valueOfLibhtml

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

valueOfLibtool

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

valueOfLibtool2

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

valueOfLibui

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

valueOfLibwidg

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

valueOfLibwidg2

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

valueOfStartupClass

    |holder|
    (holder := builder bindingAt:#valueOfStartupClass) isNil ifTrue:[
        builder aspectAt:#valueOfStartupClass put:(holder :=  'Smalltalk' asValue).
    ].
    ^ holder
!

valueOfStartupModule

    |holder|
    (holder := builder bindingAt:#valueOfStartupModule) isNil ifTrue:[
        builder aspectAt:#valueOfStartupModule put:(holder :=  'librun/main.c' asValue).
    ].
    ^ holder
!

valueOfStartupSelector

    |holder|
    (holder := builder bindingAt:#valueOfStartupSelector) isNil ifTrue:[
        builder aspectAt:#valueOfStartupSelector put:(holder :=  'start' asValue).
    ].
    ^ holder
!

valueOfSystemLibraries

    |holder|
    (holder := builder bindingAt:#valueOfSystemLibraries) isNil ifTrue:[
        builder aspectAt:#valueOfSystemLibraries put:(holder :=  '/usr/lib/libc.a /home/tz/stx/support/VGL/vogl/src/libvogl.a' asValue).
    ].
    ^ holder
!

valueOfTargetDirectory

    |holder|
    (holder := builder bindingAt:#valueOfTargetDirectory) isNil ifTrue:[
        builder aspectAt:#valueOfTargetDirectory put:(holder :=  (Filename homeDirectory asFilename construct: 'application') name asValue).
    ].
    ^ holder
!

valueOfTopDirectory

    |holder|
    (holder := builder bindingAt:#valueOfTopDirectory) isNil ifTrue:[
        builder aspectAt:#valueOfTopDirectory put:(holder :=  ((PipeStream readingFrom: 'echo $STX_LIBDIR') nextLine, '/..') asValue).
    ].
    ^ holder
!

valueOfUserLibraries

    |holder|
    (holder := builder bindingAt:#valueOfUserLibraries) isNil ifTrue:[
        builder aspectAt:#valueOfUserLibraries put:(holder :=  LibraryBuilder UserLibraries asValue).
    ].
    ^ holder
! !

!NewLauncher methodsFor:'binding access'!

aspectFor:aKey

    ^self settingsAspects at: aKey ifAbsent: [super aspectFor:aKey]
! !

!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:'private'!

changeViewStyleTo:newStyle

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

!

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

!

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]
        ]
    ]

!

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

    |contents newLauncher|
    contents := transcript endEntry; list.
    newLauncher := self class open.
    newLauncher window waitUntilVisible.
    newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor.
    DebugView newDebugger.
!

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

    |contents newLauncher|
    contents := transcript endEntry; list.
    newLauncher := self class open.
    newLauncher window waitUntilVisible.
    newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor


!

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

!NewLauncher methodsFor:'queries'!

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

!

closeRequest

    (self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[
        super closeRequest
    ]

!

destroy

self halt.
!

openInterface
    "sent by my superclass to open up my interface"

    |icn w sz|

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

    "
     open with higher prio to allow interaction even while things
     are running ...
    "
    super openInterface.

    icn := self class aboutIcon.
    icn notNil ifTrue:[
        icn := icn magnifiedTo:(sz := device preferredIconSize).
    ].

    icn notNil ifTrue:[
        (device supportsDeepIcons not
        and:[device supportsIconViews
        and:[device depth > 1]]) ifTrue:[    
            w := View extent:sz. 
            w viewBackground:icn.
            self window iconView:w
        ] ifFalse:[
            self window icon:icn.
        ]
    ].

    self setupTranscript; updateInfo.
    Project notNil ifTrue: [Project addDependent:self].
    self builder window windowGroup process priority:(Processor userSchedulingPriority + 1).
    self class openLaunchers add: self.

    "Modified: / 29.1.1998 / 23:10:40 / 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).

    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.

    Display beep.
    OpenLaunchers notNil ifTrue:[OpenLaunchers removeIdentical:self ifAbsent:nil].
    Project notNil ifTrue:[Project removeDependent:self].

    "Modified: / 29.1.1998 / 22:06:36 / cg"
! !

!NewLauncher class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libtool/NewLauncher.st,v 1.20 1998-01-29 22:44:34 cg Exp $'
! !