home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
LANGUAGE
/
SMALTALK
/
TEXTBOOK
/
PAPVW20
(
.txt
)
< prev
next >
Wrap
Text File
|
1997-04-22
|
11KB
|
621 lines
'From VisualWorks(R) Release 2.0 of 4 August 1994 on 3 October 1994 at 10:56:59 am'!
EngiColorView comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiLauncherIcon comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiClockController comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiBrowser comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiPuzzleController comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiViewBuilderModel comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiGeometric comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiGaugeController comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiCalculatorModel comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiDisplayView comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiTopView comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
!EngiTopView methodsFor: 'scheduling'!
closeAndUnschedule
self topComponent isNil ifFalse: [self topComponent controller closeAndUnschedule]!
popUp: aBooleanOrNil label: labelString
| topWindow compositePart aModel trueButton aRectangle |
topWindow := ScheduledWindow new.
topWindow model: model.
topWindow minimumSize: extent.
topWindow controller: EngiTopPreemptor new.
compositePart := CompositePart new.
aModel := ValueHolder new.
trueButton := Button trigger.
aBooleanOrNil = true ifTrue: [trueButton beDefault].
trueButton label: labelString.
trueButton model: ((PluggableAdaptor on: aModel)
getBlock: [:m | false]
putBlock:
[:m :v |
aModel value: true.
self closeAndUnschedule]
updateBlock: [:m :a :v | false]).
compositePart add: self in: (self frameFraction: (0 @ 0 corner: 1 @ 1)
offset: (0 @ 0 corner: 0 @ -40)).
compositePart add: trueButton in: (self frameFraction: (0.5 @ 1 corner: 0.5 @ 1)
offset: (-40 @ -35 corner: 40 @ -5)).
topWindow component: compositePart.
aRectangle := Point zero extent: (topWindow minimumSize max: self defaultPopUpMinimumSize).
aRectangle := aRectangle align: aRectangle center with: InputState default mousePoint.
topWindow openTransientIn: aRectangle type: #dialog.
^aModel value!
popUp: aBooleanOrNil trueLabel: trueString falseLabel: falseString
| topWindow compositePart aModel trueButton falseButton aRectangle |
topWindow := ScheduledWindow new.
topWindow model: model.
topWindow minimumSize: extent.
topWindow controller: EngiTopPreemptor new.
compositePart := CompositePart new.
aModel := ValueHolder new.
trueButton := Button trigger.
aBooleanOrNil = true ifTrue: [trueButton beDefault].
trueButton label: trueString.
trueButton model: ((PluggableAdaptor on: aModel)
getBlock: [:m | false]
putBlock:
[:m :v |
aModel value: true.
self closeAndUnschedule]
updateBlock: [:m :a :v | false]).
falseButton := Button trigger.
aBooleanOrNil = false ifTrue: [falseButton beDefault].
falseButton label: falseString.
falseButton model: ((PluggableAdaptor on: aModel)
getBlock: [:m | false]
putBlock:
[:m :v |
aModel value: false.
self closeAndUnschedule]
updateBlock: [:m :a :v | false]).
compositePart add: self in: (self frameFraction: (0 @ 0 corner: 1 @ 1)
offset: (0 @ 0 corner: 0 @ -40)).
compositePart add: trueButton in: (self frameFraction: (0.3 @ 1 corner: 0.3 @ 1)
offset: (-40 @ -35 corner: 40 @ -5)).
compositePart add: falseButton in: (self frameFraction: (0.7 @ 1 corner: 0.7 @ 1)
offset: (-40 @ -35 corner: 40 @ -5)).
topWindow component: compositePart.
aRectangle := Point zero extent: (topWindow minimumSize max: self defaultPopUpMinimumSize).
aRectangle := aRectangle align: aRectangle center with: InputState default mousePoint.
topWindow openTransientIn: aRectangle type: #dialog.
^aModel value! !
EngiDisplayController comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiTopPreemptor comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiMenuMaker comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiGaugeView comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiLauncherView comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiCalendarModel comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiViewBuilderController comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiCalendarController comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiSystem comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
!EngiSystem class methodsFor: 'version'!
date
^'30 September 1994' copy!
version
^'0.09' copy! !
!EngiSystem class methodsFor: 'saving'!
save
"EngiSystem save."
| allClasses saveDirectory separatorString extensionString baseString fileNames fileNo fileName writeStream |
allClasses := self classes.
saveDirectory := self saveDirectory.
separatorString := String with: Filename separator.
extensionString := '.st'.
baseString := '0000'.
fileNames := OrderedCollection new.
fileNo := 1.
self classes
do:
[:each |
| stream filename file |
stream := WriteStream on: (String new: 12).
stream nextPutAll: self system.
baseString size - fileNo printString size timesRepeat: [stream nextPutAll: '0'].
stream nextPutAll: fileNo printString.
stream nextPutAll: extensionString.
fileNames add: stream contents.
filename := Filename defaultDirectoryName , saveDirectory asString.
filename := filename , separatorString , stream contents.
file := SourceCodeStream on: (Filename named: filename) writeStream.
[self privateSaveClass: each into: file]
valueNowOrOnUnwindDo: [file close].
fileNo := fileNo + 1].
fileName := Filename defaultDirectoryName , saveDirectory asString.
fileName := fileName , separatorString , self system , baseString , extensionString.
Transcript cr; show: self system , ' -> ' , fileName asString.
writeStream := (Filename named: fileName) writeStream.
[self
privateSaveInstallation: allClasses
into: writeStream
files: fileNames]
valueNowOrOnUnwindDo: [writeStream close]! !
EngiGraphicsState comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiEncapsulator comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiCalculatorDisplay comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiVariable comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiTextModel comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiFontModel comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiGaugeModel comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiClockModel comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiViewBuilderView comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiCalculatorController comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiVisualTransporter comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiBranch comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiClassBranch comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiBranchWithArrow comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiCalculatorView comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiMultipleChoiceModel comment:
'
Engi 0.09 (30 September 1994)
Copyright (C) 1994 by Atsushi Aoki
'!
EngiCalendarView comment:
'
Engi 0.09 (30 September 1994)