--- a/OldLauncher.st Sat Aug 13 20:40:49 1994 +0200
+++ b/OldLauncher.st Mon Aug 22 20:07:28 1994 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.12 1994-08-07 19:31:48 claus Exp $
+$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.13 1994-08-22 18:07:21 claus Exp $
'!
!Launcher class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.12 1994-08-07 19:31:48 claus Exp $
+$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.13 1994-08-22 18:07:21 claus Exp $
"
!
@@ -234,14 +234,7 @@
'Animation'
'Globe'
'-'
- 'GL-rotating plane'
- 'GL-rotating cube (wireframe)'
- 'GL-rotating cube (solid)'
- 'GL-rotating tetra'
- 'GL-light & rotating cube'
- 'GL-light around sphere'
- 'GL-teapot'
- 'GL-logo'
+ 'GL 3D demos'
'-'
'LogicTool'
))
@@ -252,16 +245,37 @@
startAnimation
startGlobeDemo
nil
+ glDemos
+ nil
+ startLogicTool
+ )
+ receiver:self
+ for:self
+ ).
+ (myMenu subMenuAt:#gamesMenu) subMenuAt:#glDemos put:(
+ PopUpMenu labels:(resources array:#(
+ 'plane'
+ 'tetra'
+ 'cube (wireframe)'
+ 'cube (solid)'
+ 'cube (light)'
+ 'sphere (wireframe)'
+ 'sphere (light)'
+ 'planet'
+ 'teapot'
+ 'logo'
+ ))
+ selectors:#(
startGLPlaneDemo
+ startGLTetraDemo
startGLWireCubeDemo
startGLCubeDemo
- startGLTetraDemo
startGLCubeDemo2
+ startGLWireSphereDemo
startGLSphereDemo
+ startGLPlanetDemo
startGLTeapotDemo
startGLLogoDemo1
- nil
- startLogicTool
)
receiver:self
for:self
@@ -426,6 +440,8 @@
'breakpoints & tracing'
'processes'
'timers & delays'
+ 'exceptions & signals'
+ 'GL 3D graphics'
))
selectors:#(
showUsefulSelectors
@@ -433,6 +449,8 @@
showDebuggingInfo
showProcessInfo
showTimerInfo
+ showExceptionInfo
+ showGLDocumentation
)
receiver:self
for:self
@@ -542,35 +560,7 @@
ObjectMemory snapShotOn:name
! !
-!Launcher methodsFor:'user interaction'!
-
-viewHardcopy
- Processor addTimedBlock:[
- |v|
-
- v := Display viewFromUser.
- v notNil ifTrue:[
- self saveScreenImage:(Image fromView:(v topView))
- ]
- ] afterSeconds:1
-!
-
-fullScreenHardcopy
- Processor addTimedBlock:[
- self saveScreenImage:(Image fromScreen)
- ] afterSeconds:1
-!
-
-screenHardcopy
- |area|
-
- Processor addTimedBlock:[
- area := Rectangle fromUser.
- (area width > 0 and:[area height > 0]) ifTrue:[
- self saveScreenImage:(Image fromScreen:area)
- ]
- ] afterSeconds:1
-!
+!Launcher methodsFor:'menu actions'!
startSystemBrowser
SystemBrowser open
@@ -633,8 +623,86 @@
Workspace open
!
-startWindowTreeView
- WindowTreeView open
+saveImage
+ saveBox isNil ifTrue:[
+ saveBox := EnterBox new.
+ saveBox title:(resources at:'filename for image:') withCRs.
+ " saveBox abortText:(resources at:'abort')." "this is the default anyway ..."
+ saveBox okText:(resources at:'save')
+ ].
+
+ "this is a kludge - put into above if-block once
+ stack contexts survive a snapout/snapin
+ (I think, it could be done now ...)
+ "
+ saveBox action:[:fileName |
+ ObjectMemory snapShotOn:fileName.
+ ].
+
+ saveBox initialText:(ObjectMemory nameForSnapshot).
+ saveBox showAtPointer
+!
+
+exitSmalltalk
+ exitBox isNil ifTrue:[
+ exitBox := EnterBox2 new.
+ exitBox title:(resources at:'save state before exiting ?\\filename for image:') withCRs.
+ " exitBox abortText:(resources at:'abort')." "this is the default anyway ..."
+ exitBox okText:(resources at:'exit').
+ exitBox okText2:(resources at:'save & exit').
+ ].
+
+ exitBox action:[:dummyName |
+ self closeDownViews.
+ Smalltalk exit
+ ].
+
+ exitBox action2:[:fileName |
+ ObjectMemory snapShotOn:fileName.
+
+ "this is NOT required - all data should be in the snapshot ...
+ ... however, if remote disks/mounatble filesystems are involved,
+ which may not be present the next time, it may make sense to
+ uncomment it and query for saving - time will show which is better.
+ "
+"
+ self closeDownViews.
+"
+ Smalltalk exit
+ ].
+
+ exitBox initialText:(ObjectMemory nameForSnapshot).
+ exitBox showAtPointer
+! !
+
+!Launcher methodsFor:'utility menu actions'!
+
+viewHardcopy
+ Processor addTimedBlock:[
+ |v|
+
+ v := Display viewFromUser.
+ v notNil ifTrue:[
+ self saveScreenImage:(Image fromView:(v topView))
+ ]
+ ] afterSeconds:1
+!
+
+fullScreenHardcopy
+ Processor addTimedBlock:[
+ self saveScreenImage:(Image fromScreen)
+ ] afterSeconds:1
+!
+
+screenHardcopy
+ |area|
+
+ Processor addTimedBlock:[
+ area := Rectangle fromUser.
+ (area width > 0 and:[area height > 0]) ifTrue:[
+ self saveScreenImage:(Image fromScreen:area)
+ ]
+ ] afterSeconds:1
!
viewKiller
@@ -661,6 +729,10 @@
]
!
+startWindowTreeView
+ WindowTreeView open
+!
+
startClassTreeView
ClassTreeGraphView open
!
@@ -707,6 +779,35 @@
LightInTheDark2 open
!
+garbageCollect
+ ObjectMemory markAndSweep
+!
+
+compressingGarbageCollect
+ |nBytesBefore nReclaimed|
+
+ nBytesBefore := ObjectMemory oldSpaceUsed.
+ ObjectMemory garbageCollect.
+ nReclaimed := nBytesBefore - ObjectMemory oldSpaceUsed.
+ nReclaimed > 0 ifTrue:[
+ Transcript show:'reclaimed '.
+ nReclaimed > 1024 ifTrue:[
+ nReclaimed > (1024 * 1024) ifTrue:[
+ Transcript show:(nReclaimed // (1024 * 1024)) printString.
+ Transcript showCr:' Mb.'
+ ] ifFalse:[
+ Transcript show:(nReclaimed // 1024) printString.
+ Transcript showCr:' Kb.'
+ ]
+ ] ifFalse:[
+ Transcript show:nReclaimed printString.
+ Transcript showCr:' bytes.'
+ ]
+ ]
+! !
+
+!Launcher methodsFor:'project menu actions'!
+
newProject
(ProjectView for:(Project new)) open
!
@@ -730,7 +831,9 @@
]
].
box showAtPointer
-!
+! !
+
+!Launcher methodsFor:'goody menu actions'!
startXterm
OperatingSystem executeCommand:'xterm &'
@@ -754,7 +857,9 @@
startRoundClock
RoundClock2 open
-!
+! !
+
+!Launcher methodsFor:'demo menu actions'!
startAnimation
Animation open
@@ -784,6 +889,14 @@
GLWireCubeDemoView open
!
+startGLWireSphereDemo
+ GLWireSphereDemoView open
+!
+
+startGLPlanetDemo
+ GLPlanetDemoView open
+!
+
startGLCubeDemo
GLCubeDemoView open
!
@@ -814,34 +927,9 @@
startLogicTool
LogicTool open
-!
-
-garbageCollect
- ObjectMemory markAndSweep
-!
-
-compressingGarbageCollect
- |nBytesBefore nReclaimed|
+! !
- nBytesBefore := ObjectMemory oldSpaceUsed.
- ObjectMemory garbageCollect.
- nReclaimed := nBytesBefore - ObjectMemory oldSpaceUsed.
- nReclaimed > 0 ifTrue:[
- Transcript show:'reclaimed '.
- nReclaimed > 1024 ifTrue:[
- nReclaimed > (1024 * 1024) ifTrue:[
- Transcript show:(nReclaimed // (1024 * 1024)) printString.
- Transcript showCr:' Mb.'
- ] ifFalse:[
- Transcript show:(nReclaimed // 1024) printString.
- Transcript showCr:' Kb.'
- ]
- ] ifFalse:[
- Transcript show:nReclaimed printString.
- Transcript showCr:' bytes.'
- ]
- ]
-!
+!Launcher methodsFor:'doc menu actions'!
warnIfAbsent:aPath
|s|
@@ -931,6 +1019,10 @@
self showDocumentFile:'doc/misc/GC'
!
+showGLDocumentation
+ self showDocumentFile:'doc/misc/GL'
+!
+
showLanguageDocumentation
self showDocumentFile:'doc/misc/language'
!
@@ -963,6 +1055,10 @@
self showDocumentFile:'doc/misc/processes'
!
+showExceptionInfo
+ self showDocumentFile:'doc/misc/exceptions'
+!
+
showTimerInfo
self showDocumentFile:'doc/misc/timing'
!
@@ -989,56 +1085,4 @@
You will see a pre release.'.
ManualBrowser new
-!
-
-saveImage
- saveBox isNil ifTrue:[
- saveBox := EnterBox new.
- saveBox title:(resources at:'filename for image:') withCRs.
- " saveBox abortText:(resources at:'abort')." "this is the default anyway ..."
- saveBox okText:(resources at:'save')
- ].
-
- "this is a kludge - put into above if-block once
- stack contexts survive a snapout/snapin
- (I think, it could be done now ...)
- "
- saveBox action:[:fileName |
- ObjectMemory snapShotOn:fileName.
- ].
-
- saveBox initialText:(ObjectMemory nameForSnapshot).
- saveBox showAtPointer
-!
-
-exitSmalltalk
- exitBox isNil ifTrue:[
- exitBox := EnterBox2 new.
- exitBox title:(resources at:'save state before exiting ?\\filename for image:') withCRs.
- " exitBox abortText:(resources at:'abort')." "this is the default anyway ..."
- exitBox okText:(resources at:'exit').
- exitBox okText2:(resources at:'save & exit').
- ].
-
- exitBox action:[:dummyName |
- self closeDownViews.
- Smalltalk exit
- ].
-
- exitBox action2:[:fileName |
- ObjectMemory snapShotOn:fileName.
-
- "this is NOT required - all data should be in the snapshot ...
- ... however, if remote disks/mounatble filesystems are involved,
- which may not be present the next time, it may make sense to
- uncomment it and query for saving - time will show which is better.
- "
-"
- self closeDownViews.
-"
- Smalltalk exit
- ].
-
- exitBox initialText:(ObjectMemory nameForSnapshot).
- exitBox showAtPointer
! !