smalltalk.rc
author claus
Sat, 11 Dec 1993 02:53:38 +0100
changeset 0 0cb137a77319
child 5 420e4af41733
permissions -rw-r--r--
Initial revision

"*
 * $Header$
 * startup configuration for smalltalk
 *
 * everything in here are plain smalltalk expressions
 * statements with in a group are separated by a period.
 * each group of statements has to be delimited by an exclamation
 * character.
 * avoid exclas in comments (or double them)
 * nested comments are not allowed - take care.
 * (this is fileOut-format)
 *"

"*
 * check for display beeing compiled into the system;
 * if not, enter a simple read-eval-print loop
 *"
Display isNil ifTrue:[
    'oops - no display' printNewline.
    Smalltalk readEvalPrint.
    Smalltalk exit
]
!

"*
 * this makes X-errors to be handled immediately (so you see,
 * where it occured) but slows down the system soooo muuuucccchhh ..
 * if commented out, errors will be reported asynchronously.
 * (I enable this, when things go bad during startup)
 *"
"Display unBuffered"!

"*
 * this starts incremental GC earlier
 * (default is 500000)
 *"
"
ObjectMemory incrementalGCLimit:100000 
"
!

"*
 * you can override the view style (which is otherwise defined
 * in the View.rs resource file)
 *"
"View defaultStyle:#iris "
"View defaultStyle:#motif "
"View defaultStyle:#next "
"View defaultStyle:#normal "
!

"*
 * define the language (you can also set the LANG-shell variable)
 * (currently only #english and #german are supported)
 *"
"Language := #german"
"Language := #english" 
!

"*
 * define how views look
 * (setting View3D to true is fancy)
 *"
View3D := (Display depth > 1)  
"View3D := false               "
!

"*
 * dont want the 3rd button 
 * (some x-servers dont produce button2 but button3 events)
 * this xlates the 3rd button into 2nd button
 *"
XWorkstation buttonTranslation:#(1 2 2) !

"*
 * this handles all variant display stuff
 * (i.e. things which might change, when DISPLAY is set different)
 *"
Smalltalk fileIn:'display.rc'
!

"*
 * this defines stuff relating to the machine we are running on
 *"
Smalltalk fileIn:'host.rc'
!

"*
 * start some views ...
 * you can add all stuff you'd like to come up by default
 * the first time
 *"

"*
 * start a Transcript
 *"
Stdout showCr:'starting Transcript ...'.
"Smalltalk debugOn."
TextCollector newTranscript!

"
 you can change colors too ..
"
(View defaultStyle == #iris) ifTrue:[
    (Display hasColors and:[Display depth > 4]) ifTrue:[
        Transcript foregroundColor:(Color lightGrey) backgroundColor:(Color red:0 green:0 blue:25);
                   cursorForegroundColor:(Color black) backgroundColor:(Color green);
                   selectionForegroundColor:(Color black) backgroundColor:(Color grey);
                   viewBackground:(Color red:0 green:0 blue:25)
    ] ifFalse:[
        Transcript foregroundColor:(Color white) backgroundColor:(Color black);
                   cursorForegroundColor:(Color black) backgroundColor:(Color white);
                   selectionForegroundColor:(Color black) backgroundColor:(Color veryLightGrey);
                   viewBackground:(Color black)
    ]
]
!     

"*
 * start the Launcher
 *"
Stdout showCr:'starting main-menu ...'.
Launcher start!

"*
 * start a SystemBrowser
 * - I dont want one (using Launcher)
 *"
"
 SystemBrowser start
"
!

"*
 * start a FileBrowser
 * - I dont want one (using Launcher)
 *"
"
 FileBrowser start
"
!

"*
 * start a Workspace 
 * - I dont want one (using Launcher)
 *"
"
Workspace start
"
!


"*
 * if things go very badly, turn on message tracing ...
 *"
"
Smalltalk debugOn.
"
"*
 * if error occurs, and debugger has problems coming up
 *"
"
" "
Debugger := MiniDebugger.
" "
!

"*
 * see smalltalk_r.rc for what this is for ...
 *"
Smalltalk at:#'_ImageDisplayDepth' put:Display depth.
Smalltalk at:#'_ImageDisplayHasColors' put:Display hasColors.
Smalltalk at:#'_ImageDisplayHasGreyscales' put:Display hasGreyscales.
!