--- a/ArrowButton.st Sat Apr 02 11:06:59 2016 +0100
+++ b/ArrowButton.st Sun Apr 03 17:13:01 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
@@ -824,7 +822,7 @@
|logo activeLogo enteredLogo disabledLogo graphicsDevice|
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
logo := self class
arrowButtonFormForStyle:arrowStyle
@@ -895,31 +893,28 @@
initStyle
"setup viewStyle specifics"
- |graphicsDevice|
-
super initStyle.
- graphicsDevice := self graphicsDevice.
DefaultBackgroundColor notNil ifTrue:[
- bgColor := DefaultBackgroundColor onDevice:graphicsDevice
+ bgColor := DefaultBackgroundColor onDevice:device
].
DefaultForegroundColor notNil ifTrue:[
- fgColor := DefaultForegroundColor onDevice:graphicsDevice
+ fgColor := DefaultForegroundColor onDevice:device
].
DefaultActiveForegroundColor notNil ifTrue:[
- activeFgColor := DefaultActiveForegroundColor onDevice:graphicsDevice
+ activeFgColor := DefaultActiveForegroundColor onDevice:device
].
DefaultActiveBackgroundColor notNil ifTrue:[
- activeBgColor := DefaultActiveBackgroundColor onDevice:graphicsDevice
+ activeBgColor := DefaultActiveBackgroundColor onDevice:device
].
DefaultEnteredForegroundColor notNil ifTrue:[
- enteredFgColor := DefaultEnteredForegroundColor onDevice:graphicsDevice
+ enteredFgColor := DefaultEnteredForegroundColor onDevice:device
].
DefaultEnteredBackgroundColor notNil ifTrue:[
- enteredBgColor := DefaultEnteredBackgroundColor onDevice:graphicsDevice
+ enteredBgColor := DefaultEnteredBackgroundColor onDevice:device
].
DefaultDisabledForegroundColor notNil ifTrue:[
- disabledFgColor := DefaultDisabledForegroundColor onDevice:graphicsDevice
+ disabledFgColor := DefaultDisabledForegroundColor onDevice:device
].
arrowStyle := DefaultArrowStyle.
@@ -962,8 +957,8 @@
self paint:bg.
self fillRectangleX:0 y:0 width:width height:height.
- shadowColor := shadowColor onDevice:self graphicsDevice.
- lightColor := lightColor onDevice:self graphicsDevice.
+ shadowColor := shadowColor onDevice:device.
+ lightColor := lightColor onDevice:device.
controller pressed ifTrue:[
topLeft := shadowColor.
@@ -994,17 +989,17 @@
logo colorMap:colors.
].
logo photometric:#palette.
- logo := logo onDevice:self graphicsDevice.
+ logo := logo onDevice:device.
self displayForm:logo x:labelOriginX y:labelOriginY.
^ self
].
- logo := logo onDevice:self graphicsDevice.
+ logo := logo onDevice:device.
orgX := labelOriginX.
orgY := labelOriginY.
] ifTrue:[
- orgY := height - gc font height // 2 + gc font ascent.
- orgX := width - labelOriginX // 4 - 1.
+ orgY := (height - gc font height) // 2 + gc font ascent.
+ orgX := (width - labelOriginX) // 4 - 1.
].
self paint:topLeft.
--- a/Button.st Sat Apr 02 11:06:59 2016 +0100
+++ b/Button.st Sun Apr 03 17:13:01 2016 +0100
@@ -1542,7 +1542,7 @@
viewBackground:something
super viewBackground:something.
something isColor ifTrue:[
- self graphicsDevice hasGrayscales ifTrue:[
+ device hasGrayscales ifTrue:[
halfLightColor notNil ifTrue:[
halfLightColor := (something averageColorIn:(0@0 corner:7@7)) lightened "on:device".
].
@@ -1755,7 +1755,7 @@
|graphicsDevice|
super fetchDeviceResources.
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
disabledFgColor notNil ifTrue:[disabledFgColor := disabledFgColor onDevice:graphicsDevice].
disabledEtchedFgColor notNil ifTrue:[disabledEtchedFgColor := disabledEtchedFgColor onDevice:graphicsDevice].
@@ -1796,7 +1796,7 @@
|hasGreyscales nm graphicsDevice buttonStyle borderStyle|
super initStyle.
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
DefaultBorderWidth notNil ifTrue:[ self borderWidth: DefaultBorderWidth].
DefaultForegroundColor notNil ifTrue:[fgColor := DefaultForegroundColor].
@@ -2267,8 +2267,8 @@
sColor := formShadowColor.
lColor := formLightColor.
] ifFalse:[
- sColor := self graphicsDevice blackColor.
- lColor := self graphicsDevice whiteColor.
+ sColor := device blackColor.
+ lColor := device whiteColor.
].
self foreground:sColor.
self displayForm:shadowForm x:x y:y.
--- a/ButtonController.st Sat Apr 02 11:06:59 2016 +0100
+++ b/ButtonController.st Sun Apr 03 17:13:01 2016 +0100
@@ -468,6 +468,9 @@
pressed ifFalse:[
pressed := true.
view showActive.
+ "/ make sure that a momentary press is visible
+ view repairDamage.
+ Delay waitForSeconds:0.1.
(pressActionBlock notNil or:[model notNil]) ifTrue:[
"
--- a/CheckToggle.st Sat Apr 02 11:06:59 2016 +0100
+++ b/CheckToggle.st Sun Apr 03 17:13:01 2016 +0100
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libwidg' }"
+"{ NameSpace: Smalltalk }"
+
Toggle subclass:#CheckToggle
instanceVariableNames:'isFlat'
classVariableNames:'DefaultCheckForm DefaultCheckColor DefaultActiveFGColor
@@ -625,7 +627,7 @@
|enabledBgColor graphicsDevice|
super initStyle.
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
onLevel := offLevel.
DefaultActiveLevel notNil ifTrue:[onLevel := DefaultActiveLevel].
@@ -784,7 +786,7 @@
logoToDisplay
|graphicsDevice|
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
controller enabled ifFalse:[
(controller pressed) ifTrue:[
DefaultDisabledActiveImage notNil ifTrue:[
@@ -834,10 +836,10 @@
!CheckToggle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/CheckToggle.st,v 1.73 2014-11-26 20:15:34 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/CheckToggle.st,v 1.73 2014-11-26 20:15:34 cg Exp $'
+ ^ '$Header$'
! !
--- a/DialogBox.st Sat Apr 02 11:06:59 2016 +0100
+++ b/DialogBox.st Sun Apr 03 17:13:01 2016 +0100
@@ -9749,7 +9749,7 @@
borderWidth:0;
horizontalLayout:#spread.
- buttonPanel rightInset:(self device extentOfResizeHandle x).
+ buttonPanel rightInset:(device extentOfResizeHandle x).
"/ some viewStyles want ok to be the leftMost button.
buttonPanel reverseOrderIfOKAtLeft:true.
@@ -10293,7 +10293,7 @@
^ ApplicationModel
specificationFor:aKey
application:self
- onDevice:(self graphicsDevice)
+ onDevice:(device)
! !
!DialogBox methodsFor:'user actions'!
--- a/EditField.st Sat Apr 02 11:06:59 2016 +0100
+++ b/EditField.st Sun Apr 03 17:13:01 2016 +0100
@@ -1946,7 +1946,7 @@
self computeTopMargin.
DefaultBackgroundColor notNil ifTrue:[
- bgColor := DefaultBackgroundColor onDevice:self graphicsDevice.
+ bgColor := DefaultBackgroundColor onDevice:device.
"/ bgColor ditherForm notNil ifTrue:[
"/ bgColor := (bgColor copy) exactOrNearestOn:self graphicsDevice
"/ ].
@@ -2258,11 +2258,11 @@
w := fontWidth * 20. "space for 20 characters"
] ifFalse:[
"length of current contents + 50% space to type more characters"
- f := gc font onDevice:self graphicsDevice.
+ f := gc font onDevice:device.
w := ((f widthOf:string) * 1.5) rounded.
w := w + margin + margin.
].
- w := w min:(self graphicsDevice width // 2).
+ w := w min:(device width // 2).
"/ h := f maxHeight + (f maxDescent * 2) + (margin * 2).
h := fontHeight + topMargin + (margin * 2).
--- a/EditTextView.st Sat Apr 02 11:06:59 2016 +0100
+++ b/EditTextView.st Sun Apr 03 17:13:01 2016 +0100
@@ -1550,8 +1550,8 @@
|wasOn|
wasOn := self hideCursor.
- cursorFgColor := color1 onDevice:self graphicsDevice.
- cursorBgColor := color2 onDevice:self graphicsDevice.
+ cursorFgColor := color1 onDevice:device.
+ cursorBgColor := color2 onDevice:device.
wasOn ifTrue:[self showCursor]
!
@@ -4734,7 +4734,7 @@
"On X11, be nice and paste PRIMARY when middle click.
Note, that middle button on X11 is translated to button
128 in Smalltalk/X - see XWorkstation class>>initializeConstants"
- (button == #paste and:[self graphicsDevice platformName == #X11]) ifTrue:[
+ (button == #paste and:[device platformName == #X11]) ifTrue:[
self undoableDo:[
self paste: (self getClipboardText:#selection).
].
@@ -5069,7 +5069,7 @@
].
key isSymbol ifTrue:[
- (self graphicsDevice modifierKeys includes:key) ifFalse:[
+ (device modifierKeys includes:key) ifFalse:[
lastReplacementInfo stillCollectingInput:false.
]
].
@@ -6030,9 +6030,9 @@
super fetchDeviceResources.
- cursorFgColor notNil ifTrue:[cursorFgColor := cursorFgColor onDevice:self graphicsDevice].
- cursorBgColor notNil ifTrue:[cursorBgColor := cursorBgColor onDevice:self graphicsDevice].
- cursorNoFocusFgColor notNil ifTrue:[cursorNoFocusFgColor := cursorNoFocusFgColor onDevice:self graphicsDevice].
+ cursorFgColor notNil ifTrue:[cursorFgColor := cursorFgColor onDevice:device].
+ cursorBgColor notNil ifTrue:[cursorBgColor := cursorBgColor onDevice:device].
+ cursorNoFocusFgColor notNil ifTrue:[cursorNoFocusFgColor := cursorNoFocusFgColor onDevice:device].
"Created: 14.1.1997 / 00:15:24 / cg"
"Modified: 18.2.1997 / 15:02:46 / cg"
@@ -6569,7 +6569,7 @@
getTextSelectionFromHistory
|sel list box history|
- history := self graphicsDevice getCopyBufferHistory copy.
+ history := device getCopyBufferHistory copy.
list := history collect:[:entry |
|text shown|
@@ -7656,7 +7656,7 @@
|w dev|
w := super widthOfContents.
- (dev := self graphicsDevice ) isNil ifTrue:[
+ (dev := device ) isNil ifTrue:[
"/ really don't know ...
dev := Screen current
].
@@ -7673,8 +7673,8 @@
super realize.
self makeCursorVisible.
- cursorFgColor := cursorFgColor onDevice:self graphicsDevice.
- cursorBgColor := cursorBgColor onDevice:self graphicsDevice.
+ cursorFgColor := cursorFgColor onDevice:device.
+ cursorBgColor := cursorBgColor onDevice:device.
"Modified: 20.12.1996 / 14:16:05 / cg"
"Created: 24.7.1997 / 18:24:12 / cg"
--- a/FontPanel.st Sat Apr 02 11:06:59 2016 +0100
+++ b/FontPanel.st Sun Apr 03 17:13:01 2016 +0100
@@ -540,7 +540,7 @@
super initialize.
- showFontNameLabel := self graphicsDevice isWindowsPlatform not.
+ showFontNameLabel := device isWindowsPlatform not.
sizeUnit := #pt.
mm := ViewSpacing.
@@ -609,7 +609,7 @@
encodingLabel beInvisible
].
- self graphicsDevice supportsXftFonts ifTrue:[
+ device supportsXftFonts ifTrue:[
self xftFontsOnlyHolder value: (UserPreferences current useXftFontsOnly).
xftCheckBox := CheckBox label:(resources string:'XFT Fonts Only') in:box1.
xftCheckBox model:xftFontsOnlyHolder.
@@ -721,7 +721,7 @@
|availableEncodings listPresentedToUser|
listOfEncodings := OrderedCollection new.
- self graphicsDevice isWindowsPlatform ifTrue:[
+ device isWindowsPlatform ifTrue:[
listOfEncodings
addAll:
#(
@@ -741,7 +741,7 @@
].
availableEncodings := Set new.
- self graphicsDevice listOfAvailableFonts do:[:f | availableEncodings add:(f encoding ? '?')].
+ device listOfAvailableFonts do:[:f | availableEncodings add:(f encoding ? '?')].
availableEncodings := availableEncodings asSortedCollection.
listOfEncodings addAll:availableEncodings.
@@ -871,7 +871,7 @@
fontShown := fontShown asSize:sz
].
].
- ^ fontShown onDevice:self graphicsDevice
+ ^ fontShown onDevice:device
"/ fontShown :=
"/ ((Screen current supportsXFTFonts and:[selectedFont isXftFont "self xftFontsOnlyHolder value" ])
@@ -946,7 +946,7 @@
[
UserPreferences current useXftFontsOnly:(xftFontsOnlyHolder value).
UserPreferences current useXFontsOnly:false.
- allFonts := self graphicsDevice listOfAvailableFonts.
+ allFonts := device listOfAvailableFonts.
] ensure:[
UserPreferences current useXftFontsOnly:sav_useXftFontsOnly.
UserPreferences current useXFontsOnly:sav_useXFontsOnly.
@@ -1065,7 +1065,7 @@
self withWaitCursorDo:[
font := self fontForPreview.
font notNil ifTrue:[
- deviceFont := font onDevice:self graphicsDevice.
+ deviceFont := font onDevice:device.
enc := deviceFont encoding.
enc isNil ifTrue:[enc := #'fontspecific'].
@@ -1564,7 +1564,7 @@
flushListOfAvailableFonts
self withWaitCursorDo:[
"this may take some time, especially with X11 XFT fonts"
- self graphicsDevice
+ device
flushListOfAvailableFonts;
listOfAvailableFonts.
@@ -1589,7 +1589,7 @@
okAction notNil ifTrue:[
currentFamily notNil ifTrue:[
okAction value:
- (((self graphicsDevice supportsXftFonts and:[self xftFontsOnlyHolder value])
+ (((device supportsXftFonts and:[self xftFontsOnlyHolder value])
ifTrue:[XftFontDescription]
ifFalse:[FontDescription])
family:currentFamily
--- a/FramedBox.st Sat Apr 02 11:06:59 2016 +0100
+++ b/FramedBox.st Sun Apr 03 17:13:01 2016 +0100
@@ -667,8 +667,8 @@
super fetchDeviceResources.
- fgColor := fgColor onDevice:self graphicsDevice.
- frameColor := frameColor onDevice:self graphicsDevice.
+ fgColor := fgColor onDevice:device.
+ frameColor := frameColor onDevice:device.
"Created: 15.2.1997 / 16:57:56 / cg"
!
@@ -733,7 +733,7 @@
^ preferredExtent
].
- sep := gc font heightOn:self graphicsDevice.
+ sep := gc font heightOn:device.
sep2 := sep + sep.
true "showFrame" ifFalse:[
@@ -750,7 +750,7 @@
|mH mV sepH sepV imH imV lw|
- sepH := sepV := gc font heightOn:self graphicsDevice.
+ sepH := sepV := gc font heightOn:device.
horizontalSpace notNil ifTrue:[
sepH := horizontalSpace
].
--- a/Label.st Sat Apr 02 11:06:59 2016 +0100
+++ b/Label.st Sun Apr 03 17:13:01 2016 +0100
@@ -958,7 +958,7 @@
aColor ~~ bgColor ifTrue:[
bgColor := aColor.
bgColor notNil ifTrue:[
- bgColor := bgColor onDevice:self graphicsDevice.
+ bgColor := bgColor onDevice:device.
self class == Label ifTrue:[
super viewBackground:bgColor
].
@@ -982,7 +982,7 @@
aColor ~~ etchedFgColor ifTrue:[
etchedFgColor := aColor.
etchedFgColor notNil ifTrue:[
- etchedFgColor := etchedFgColor onDevice:self graphicsDevice.
+ etchedFgColor := etchedFgColor onDevice:device.
].
self invalidateRepairNow:true
].
@@ -998,7 +998,7 @@
"set the foreground color"
aColor ~~ fgColor ifTrue:[
- fgColor := aColor onDevice:self graphicsDevice.
+ fgColor := aColor onDevice:device.
self invalidateRepairNow:true
].
@@ -1010,8 +1010,8 @@
"set the colors to be used for drawing"
(fgColor ~~ fg or:[bgColor ~~ bg]) ifTrue:[
- fgColor := fg onDevice:self graphicsDevice.
- bgColor := bg onDevice:self graphicsDevice.
+ fgColor := fg onDevice:device.
+ bgColor := bg onDevice:device.
self class == Label ifTrue:[
super viewBackground:bgColor
].
@@ -1392,8 +1392,8 @@
super fetchDeviceResources.
- fgColor := fgColor onDevice:self graphicsDevice.
- bgColor := bgColor onDevice:self graphicsDevice.
+ fgColor := fgColor onDevice:device.
+ bgColor := bgColor onDevice:device.
"Created: / 13.1.1997 / 23:34:30 / cg"
"Modified: / 15.1.1998 / 00:13:46 / stefan"
@@ -1820,7 +1820,7 @@
y := currentTransformation applyInverseScaleY:y.
].
- logo := logo onDevice:self graphicsDevice.
+ logo := logo onDevice:device.
"/ self background:bg.
self drawImageLogo:logo x:x y:y opaque:doClear.
] ifFalse:[
--- a/MenuView.st Sat Apr 02 11:06:59 2016 +0100
+++ b/MenuView.st Sun Apr 03 17:13:01 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -1520,7 +1518,7 @@
subMenus at:i put:aPopUpMenu.
(aPopUpMenu notNil and:[aPopUpMenu isBlock not]) ifTrue:[
- aPopUpMenu device:self graphicsDevice.
+ aPopUpMenu device:device.
(receiver notNil and:[aPopUpMenu receiver isNil]) ifTrue:[
aPopUpMenu receiver:receiver
]
@@ -1551,7 +1549,7 @@
"/ this is somewhat complicated: we have the symbolic key at hand,
"/ but want to show the untranslated (inverse keyBoardMapped) key & modifier
"/
- s := self graphicsDevice shortKeyStringFor:aSymbolicKey.
+ s := device shortKeyStringFor:aSymbolicKey.
s isNil ifTrue:[^ self].
l := self visibleLineToAbsoluteLine:visLineNr.
@@ -1984,8 +1982,8 @@
super fetchDeviceResources.
- checkColor notNil ifTrue:[checkColor := checkColor onDevice:self graphicsDevice].
- disabledFgColor notNil ifTrue:[disabledFgColor := disabledFgColor onDevice:self graphicsDevice].
+ checkColor notNil ifTrue:[checkColor := checkColor onDevice:device].
+ disabledFgColor notNil ifTrue:[disabledFgColor := disabledFgColor onDevice:device].
hilightFgColorNoFocus := hilightFgColor.
hilightBgColorNoFocus := hilightBgColor.
@@ -2012,7 +2010,7 @@
super initStyle.
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
DefaultCheckColor notNil ifTrue:[
checkColor := DefaultCheckColor
] ifFalse:[
@@ -2270,8 +2268,8 @@
"
item actions or selectors-array
"
- self graphicsDevice activePointerGrab == self ifTrue:[
- self graphicsDevice ungrabPointer.
+ device activePointerGrab == self ifTrue:[
+ device ungrabPointer.
].
actions notNil ifTrue:[
@@ -2552,7 +2550,7 @@
thisKey isNil ifTrue:[
maxSoFar
] ifFalse:[
- short := self graphicsDevice shortKeyStringFor:thisKey.
+ short := device shortKeyStringFor:thisKey.
short isNil ifTrue:[
maxSoFar
] ifFalse:[
@@ -2588,7 +2586,7 @@
"/ ].
"/ ^ aModifier.
- m := self graphicsDevice modifierKeyTopFor:aModifier.
+ m := device modifierKeyTopFor:aModifier.
m notNil ifTrue:[
^ m , '-'
].
@@ -2870,7 +2868,7 @@
"/ race condition kludge ...
m realized ifFalse:[
(id := m id) notNil ifTrue:[
- self graphicsDevice unmapWindow:id.
+ device unmapWindow:id.
]
] ifTrue:[
m hide.
@@ -2930,7 +2928,7 @@
need to know the physical screen coordinate,
to map the subview there
"
- org := self graphicsDevice translatePoint:(mx @ my) fromView:self toView:nil.
+ org := device translatePoint:(mx @ my) fromView:self toView:nil.
"
before showing, process all of my expose events
@@ -2940,7 +2938,7 @@
"/ windowGroup processExposeEvents
"/ ].
- menu topView device:self graphicsDevice. "/ req'd for multiDisplay operation
+ menu topView device:device. "/ req'd for multiDisplay operation
menu superMenu:self.
actionBlock notNil ifTrue:[
@@ -2977,7 +2975,7 @@
menu realized ifFalse:[
menu realize.
] ifTrue:[
- self graphicsDevice mapWindow:menu id.
+ device mapWindow:menu id.
].
"/ device flush.
menuOrBlock isBlock ifTrue:[
@@ -3009,10 +3007,10 @@
!MenuView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.187 2015-05-20 10:28:39 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.187 2015-05-20 10:28:39 cg Exp $'
+ ^ '$Header$'
! !
--- a/MiniScroller.st Sat Apr 02 11:06:59 2016 +0100
+++ b/MiniScroller.st Sun Apr 03 17:13:01 2016 +0100
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libwidg' }"
+"{ NameSpace: Smalltalk }"
+
Scroller subclass:#MiniScroller
instanceVariableNames:''
classVariableNames:'MiniScrollerSize'
@@ -129,11 +131,11 @@
h := defExt y.
orientation == #vertical ifTrue:[
- w := (self graphicsDevice horizontalPixelPerMillimeter asFloat * mm) rounded.
+ w := (device horizontalPixelPerMillimeter asFloat * mm) rounded.
"/ dont let it become too small for thumb ...
w := w max:((level abs + thumbLevel) * 2 + 1).
] ifFalse:[
- h := (self graphicsDevice verticalPixelPerMillimeter asFloat * mm) rounded.
+ h := (device verticalPixelPerMillimeter asFloat * mm) rounded.
"/ dont let it become too small for thumb ...
h := h max:((level abs + thumbLevel) * 2 + 1).
].
@@ -146,6 +148,6 @@
!MiniScroller class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/MiniScroller.st,v 1.25 2014-02-18 14:57:23 stefan Exp $'
+ ^ '$Header$'
! !
--- a/ObjectView.st Sat Apr 02 11:06:59 2016 +0100
+++ b/ObjectView.st Sun Apr 03 17:13:01 2016 +0100
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libwidg' }"
+"{ NameSpace: Smalltalk }"
+
View subclass:#ObjectView
instanceVariableNames:'contents sorted lastButt pressAction releaseAction
shiftPressAction ctrlPressAction doublePressAction motionAction
@@ -674,7 +676,7 @@
sel := self getClipboardObject.
((Screen current platformName ~= 'X11')
- or:[(self graphicsDevice getSelectionOwnerOf:#CLIPBOARD) == self drawableId])
+ or:[(device getSelectionOwnerOf:#CLIPBOARD) == self drawableId])
ifTrue:[
"
a local selection - paste with some offset
@@ -731,17 +733,17 @@
"
translate to screen
"
- offs := self graphicsDevice translatePoint:0@0 fromView:self toView:rootView.
+ offs := device translatePoint:0@0 fromView:self toView:rootView.
rootPoint := rootPoint + offs.
"search view the drop is in"
viewId := rootView id.
[viewId notNil] whileTrue:[
- destinationId := self graphicsDevice viewIdFromPoint:rootPoint in:viewId.
+ destinationId := device viewIdFromPoint:rootPoint in:viewId.
lastViewId := viewId.
viewId := destinationId
].
- destinationView := self graphicsDevice viewFromId:lastViewId.
+ destinationView := device viewFromId:lastViewId.
destinationId := lastViewId.
inMySelf := (destinationView == self).
rootMotion := false
@@ -758,7 +760,7 @@
] ifFalse:[
"into another one"
destinationView notNil ifTrue:[
- destinationPoint := self graphicsDevice translatePoint:rootPoint fromView:rootView toView:destinationView.
+ destinationPoint := device translatePoint:rootPoint fromView:rootView toView:destinationView.
(transformation2 := destinationView transformation) notNil ifTrue:[
destinationPoint := transformation2 applyInverseTo:destinationPoint
].
@@ -805,7 +807,7 @@
"
translate to screen
"
- offs := self graphicsDevice translatePoint:0@0 fromView:self toView:rootView.
+ offs := device translatePoint:0@0 fromView:self toView:rootView.
p1 := p1 + offs.
p2 := p2 + offs.
] ifFalse:[
@@ -948,16 +950,16 @@
"
translate to screen
"
- rootPoint := p + (self graphicsDevice translatePoint:0@0 fromView:self toView:rootView).
+ rootPoint := p + (device translatePoint:0@0 fromView:self toView:rootView).
"search view the drop is in"
viewId := rootView id.
[viewId notNil] whileTrue:[
- destinationId := self graphicsDevice viewIdFromPoint:rootPoint in:viewId.
+ destinationId := device viewIdFromPoint:rootPoint in:viewId.
lastViewId := viewId.
viewId := destinationId
].
- destinationView := self graphicsDevice viewFromId:lastViewId.
+ destinationView := device viewFromId:lastViewId.
destinationId := lastViewId.
inMySelf := (destinationView == self).
rootMotion := false
@@ -969,7 +971,7 @@
"simple move"
self move:movedObject by:moveDelta
] ifFalse:[
- destinationPoint := self graphicsDevice translatePoint:rootPoint "/ use id here - could be alian view
+ destinationPoint := device translatePoint:rootPoint "/ use id here - could be alian view
from:(rootView id)
to:destinationId.
destinationView notNil ifTrue:[
@@ -1014,7 +1016,7 @@
"
translate to screen
"
- offs := self graphicsDevice translatePoint:0@0 fromView:self toView:rootView.
+ offs := device translatePoint:0@0 fromView:self toView:rootView.
p := p + offs.
"
p is where we want it ...
@@ -1672,8 +1674,8 @@
"
up to next full unit
"
- gridW := ((gridW // bigStepH) + 1 * bigStepH) asInteger.
- gridH := ((gridH // bigStepV) + 1 * bigStepV) asInteger.
+ gridW := (((gridW // bigStepH) + 1) * bigStepH) asInteger.
+ gridH := (((gridH // bigStepV) + 1) * bigStepV) asInteger.
].
gridPixmap := Form width:gridW height:gridH depth:1.
@@ -1761,10 +1763,10 @@
gridPixmap displayLineFromX:0 y:gridH-1 toX:gridW-1 y:gridH-1.
].
- self graphicsDevice isWindowsPlatform ifTrue:[
+ device isWindowsPlatform ifTrue:[
"/ kludge - needs a deep form
colorMap := gridPixmap colorMap.
- devPixmap := Form width:gridW height:gridH depth:self graphicsDevice depth onDevice:self graphicsDevice.
+ devPixmap := Form width:gridW height:gridH depth:device depth onDevice:device.
devPixmap notNil ifTrue:[
devPixmap paint:(colorMap at:1).
devPixmap fillRectangleX:0 y:0 width:gridW height:gridH.
@@ -1930,7 +1932,7 @@
gridShown := false.
canDragOutOfView := false.
- rootView := self graphicsDevice rootView.
+ rootView := device rootView.
rootView clippedByChildren:false.
rootMotion := false.
self setInitialDocumentFormat.
@@ -2781,9 +2783,9 @@
Redefined to scroll by inches or centimeters."
scaleMetric == #inch ifTrue:[
- ^ (self graphicsDevice horizontalPixelPerInch * (1/2)) asInteger
+ ^ (device horizontalPixelPerInch * (1/2)) asInteger
].
- ^ (self graphicsDevice horizontalPixelPerMillimeter * 20) asInteger
+ ^ (device horizontalPixelPerMillimeter * 20) asInteger
!
verticalScrollStep
@@ -2791,9 +2793,9 @@
Redefined to scroll by inches or centimeters."
scaleMetric == #inch ifTrue:[
- ^ (self graphicsDevice verticalPixelPerInch * (1/2)) asInteger
+ ^ (device verticalPixelPerInch * (1/2)) asInteger
].
- ^ (self graphicsDevice verticalPixelPerMillimeter * 20) asInteger
+ ^ (device verticalPixelPerMillimeter * 20) asInteger
! !
!ObjectView methodsFor:'selection & handles'!
@@ -3532,10 +3534,10 @@
!ObjectView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.145 2014-12-21 23:32:07 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.145 2014-12-21 23:32:07 cg Exp $'
+ ^ '$Header$'
! !
--- a/PopUpList.st Sat Apr 02 11:06:59 2016 +0100
+++ b/PopUpList.st Sun Apr 03 17:13:01 2016 +0100
@@ -807,13 +807,13 @@
].
showHandle ifTrue:[
- mmH := self graphicsDevice horizontalPixelPerMillimeter.
- mmV := self graphicsDevice verticalPixelPerMillimeter.
+ mmH := device horizontalPixelPerMillimeter.
+ mmV := device verticalPixelPerMillimeter.
mW := (mmH * 2.5) rounded.
mH := (mmV * 1.5) rounded.
self
- drawEdgesForX:(width - mW - (hSpace*2)) y:(height - mmV rounded // 2)
+ drawEdgesForX:(width - mW - (hSpace*2)) y:((height - mmV rounded) // 2)
width:mW height:mH
level:2
].
@@ -875,7 +875,7 @@
"
the popupMenu wants Display coordinates in its showAt: method
"
- org := self graphicsDevice translatePoint:0@0 fromView:self toView:nil.
+ org := device translatePoint:0@0 fromView:self toView:nil.
theMenu showAt:org "resizing:false"
] ifFalse:[
@@ -1042,8 +1042,8 @@
].
showHandle ifTrue:[
- mmH := self device horizontalPixelPerMillimeter.
- mmV := self device verticalPixelPerMillimeter.
+ mmH := device horizontalPixelPerMillimeter.
+ mmV := device verticalPixelPerMillimeter.
^ (ext x + hSpace + (mmH * 2.5) rounded + hSpace)
@
(ext y max: (mmV * 2) rounded)
--- a/PopUpMenu.st Sat Apr 02 11:06:59 2016 +0100
+++ b/PopUpMenu.st Sun Apr 03 17:13:01 2016 +0100
@@ -957,7 +957,7 @@
].
aPoint isNil ifTrue:[
- self showAt:(self graphicsDevice pointerPosition) resizing:true
+ self showAt:(device pointerPosition) resizing:true
] ifFalse:[
self showAt:aPoint.
].
@@ -1387,7 +1387,7 @@
and:[y < (height-margin)]]]) ifTrue:[
"/ inside my menuView
hideOnRelease := true.
- p := self graphicsDevice
+ p := device
translatePoint:(x @ y)
fromView:self
toView:menuView.
@@ -1399,7 +1399,7 @@
"outside of myself"
(self isOpenedAsSubmenu) ifTrue:[
- p := self graphicsDevice
+ p := device
translatePoint:(x @ y)
fromView:self
toView:(menuView superMenu).
@@ -1593,7 +1593,7 @@
regainControl
|g|
- ((g := self graphicsDevice activePointerGrab) ~~ self) ifTrue:[
+ ((g := device activePointerGrab) ~~ self) ifTrue:[
self forceUngrabPointer.
self forceUngrabKeyboard.
shown ifTrue:[
@@ -1689,10 +1689,10 @@
!PopUpMenu class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.118 2015-02-13 11:06:05 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.118 2015-02-13 11:06:05 cg Exp $'
+ ^ '$Header$'
! !
--- a/PullDownMenu.st Sat Apr 02 11:06:59 2016 +0100
+++ b/PullDownMenu.st Sun Apr 03 17:13:01 2016 +0100
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libwidg' }"
+"{ NameSpace: Smalltalk }"
+
View subclass:#PullDownMenu
instanceVariableNames:'receiver menus titles selectors activeMenuNumber
showSeparatingLines topMargin fgColor bgColor activeFgColor
@@ -645,7 +647,7 @@
|e|
entry isImage ifTrue:[
- e := entry onDevice:self graphicsDevice
+ e := entry onDevice:device
] ifFalse:[
e := entry printString
].
@@ -820,7 +822,7 @@
You should not use this method; instead leave the value as
defined in the styleSheet."
- bgColor := aColor onDevice:self graphicsDevice
+ bgColor := aColor onDevice:device
!
font:aFont
@@ -853,7 +855,7 @@
You should not use this method; instead leave the value as
defined in the styleSheet."
- fgColor := aColor onDevice:self graphicsDevice
+ fgColor := aColor onDevice:device
!
showSeparatingLines:aBoolean
@@ -959,8 +961,8 @@
stringOrImage isImageOrForm ifTrue:[
stringOrImage depth == 1 ifTrue:[
(map := stringOrImage colorMap) notNil ifTrue:[
- map at:1 put:((map at:1) onDevice:self graphicsDevice).
- map at:2 put:((map at:2) onDevice:self graphicsDevice).
+ map at:1 put:((map at:1) onDevice:device).
+ map at:2 put:((map at:2) onDevice:device).
self paint:(map at:2) on:(map at:1).
self displayOpaqueForm:stringOrImage x:x y:y.
@@ -1437,11 +1439,11 @@
super fetchDeviceResources.
- bgColor notNil ifTrue:[bgColor := bgColor onDevice:self graphicsDevice].
- fgColor notNil ifTrue:[fgColor := fgColor onDevice:self graphicsDevice].
+ bgColor notNil ifTrue:[bgColor := bgColor onDevice:device].
+ fgColor notNil ifTrue:[fgColor := fgColor onDevice:device].
- activeBgColor notNil ifTrue:[activeBgColor := activeBgColor onDevice:self graphicsDevice].
- activeFgColor notNil ifTrue:[activeFgColor := activeFgColor onDevice:self graphicsDevice].
+ activeBgColor notNil ifTrue:[activeBgColor := activeBgColor onDevice:device].
+ activeFgColor notNil ifTrue:[activeFgColor := activeFgColor onDevice:device].
"Created: 13.1.1997 / 23:25:14 / cg"
!
@@ -1465,7 +1467,7 @@
showSeparatingLines := DefaultSeparatingLines. "/ false.
DefaultViewBackground notNil ifTrue:[
- viewBackground := DefaultViewBackground onDevice:self graphicsDevice
+ viewBackground := DefaultViewBackground onDevice:device
].
DefaultForegroundColor notNil ifTrue:[
@@ -1482,12 +1484,12 @@
offLevel := DefaultLevel.
self is3D ifTrue:[
- self graphicsDevice hasColors ifTrue:[
+ device hasColors ifTrue:[
activeFgColor := Color name:'yellow'
] ifFalse:[
activeFgColor := White
].
- self graphicsDevice hasGrayscales ifTrue:[
+ device hasGrayscales ifTrue:[
activeBgColor := bgColor.
] ifFalse:[
activeBgColor := fgColor.
@@ -1637,7 +1639,7 @@
setMenuOrigins
"adjust origins of menus when font changes"
- (gc font graphicsDevice == self graphicsDevice) ifTrue:[
+ (gc font graphicsDevice == device) ifTrue:[
menus notNil ifTrue:[
menus keysAndValuesDo:[:index :aMenu |
aMenu notNil ifTrue:[
@@ -1822,10 +1824,10 @@
!PullDownMenu class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.110 2014-03-19 13:33:28 stefan Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.110 2014-03-19 13:33:28 stefan Exp $'
+ ^ '$Header$'
! !
--- a/RadioButton.st Sat Apr 02 11:06:59 2016 +0100
+++ b/RadioButton.st Sun Apr 03 17:13:01 2016 +0100
@@ -852,7 +852,7 @@
id := gc drawableId.
id notNil ifTrue:[
self isNativeWidget ifTrue:[
- self graphicsDevice changeButtonState:false in:id.
+ device changeButtonState:false in:id.
].
].
!
@@ -864,7 +864,7 @@
id := gc drawableId.
id notNil ifTrue:[
self isNativeWidget ifTrue:[
- self graphicsDevice changeButtonState:true in:id.
+ device changeButtonState:true in:id.
].
].
! !
@@ -938,7 +938,7 @@
].
imgTopHeight := 0.
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
imgTop notNil ifTrue:[imgTop := imgTop onDevice:graphicsDevice. imgTopHeight := imgTop height].
imgBot notNil ifTrue:[imgBot := imgBot onDevice:graphicsDevice].
@@ -1057,7 +1057,7 @@
|graphicsDevice|
self isNativeWidget ifFalse:[
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
buttonOnImage := self class roundOnForm.
buttonOnImage notNil ifTrue:[ buttonOnImage := buttonOnImage onDevice:graphicsDevice].
buttonOffImage := self class roundOffForm.
--- a/ScrollBar.st Sat Apr 02 11:06:59 2016 +0100
+++ b/ScrollBar.st Sun Apr 03 17:13:01 2016 +0100
@@ -752,7 +752,7 @@
createElements
"private: create my elements"
- (self graphicsDevice supportsNativeWidgetType:#Scrollbar) ifTrue:[
+ (device supportsNativeWidgetType:#Scrollbar) ifTrue:[
"/ native widget contains all I need.
"/ but I need a thumb from the model
thumb := Scroller new.
@@ -837,7 +837,7 @@
style := styleSheet name.
((style = #iris) and:[Screen current hasGrayscales]) ifTrue:[
"have to change some of Buttons defaults"
- clr := (Color gray:25) onDevice:self graphicsDevice.
+ clr := (Color gray:25) onDevice:device.
button1 passiveLevel:2.
button2 passiveLevel:2.
button1 foregroundColor:clr.
@@ -862,7 +862,7 @@
button2 backgroundColor:clr.
button1 activeBackgroundColor:clr.
button2 activeBackgroundColor:clr.
- self graphicsDevice hasGrayscales ifFalse:[
+ device hasGrayscales ifFalse:[
button1 activeForegroundColor:self blackColor.
button2 activeForegroundColor:self blackColor.
]
@@ -928,7 +928,7 @@
^ self
].
(buttonLayout == #bottom) ifTrue:[
- self graphicsDevice supportsViewGravity ifTrue:[
+ device supportsViewGravity ifTrue:[
button1 viewGravity:#South.
button2 viewGravity:#South.
thumb viewGravity:#North.
@@ -988,17 +988,17 @@
self isNativeWidget ifTrue:[
(id := self drawableId) notNil ifTrue:[
- self graphicsDevice
+ device
setScrollRange:0 to:100
redraw:false
in:id.
- self graphicsDevice
+ device
setScrollPosition:thumb thumbOrigin rounded
redraw:false
in:id.
- self graphicsDevice
+ device
setScrollBarPageSize:thumb thumbHeight rounded
redraw:true
in:id.
@@ -1063,7 +1063,7 @@
ena := #DISABLE_BOTH.
]
].
- self graphicsDevice enableScrollBar:ena in:self drawableId.
+ device enableScrollBar:ena in:self drawableId.
].
].
@@ -1148,11 +1148,11 @@
style := styleSheet name.
orientation == #horizontal ifTrue:[
- form1 := ArrowButton leftArrowButtonForm:style on:self graphicsDevice.
- form2 := ArrowButton rightArrowButtonForm:style on:self graphicsDevice.
+ form1 := ArrowButton leftArrowButtonForm:style on:device.
+ form2 := ArrowButton rightArrowButtonForm:style on:device.
] ifFalse:[
- form1 := ArrowButton upArrowButtonForm:style on:self graphicsDevice.
- form2 := ArrowButton downArrowButtonForm:style on:self graphicsDevice.
+ form1 := ArrowButton upArrowButtonForm:style on:device.
+ form2 := ArrowButton downArrowButtonForm:style on:device.
].
form1 isNil ifTrue:[
height1 := width1 := 16.
--- a/ScrollableView.st Sat Apr 02 11:06:59 2016 +0100
+++ b/ScrollableView.st Sun Apr 03 17:13:01 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -1249,9 +1247,9 @@
windowGroup isNil ifTrue:[^ false].
(pv := windowGroup pointerView) isNil ifTrue:[
- dev := self device.
- dev isNil ifTrue:[^ false].
- pv := self device viewFromPoint:(dev pointerPosition).
+ dev := device.
+ dev isNil ifTrue:[^ false].
+ pv := dev viewFromPoint:(dev pointerPosition).
pv isNil ifTrue:[^ false].
].
(pv isSameOrComponentOf:self) ifTrue:[^ true].
--- a/Scroller.st Sat Apr 02 11:06:59 2016 +0100
+++ b/Scroller.st Sun Apr 03 17:13:01 2016 +0100
@@ -576,7 +576,7 @@
] ifFalse:[
nBg := DefaultViewBackground
].
- nBg := nBg onDevice:self graphicsDevice.
+ nBg := nBg onDevice:device.
nBg ~~ viewBackground ifTrue:[
self viewBackground:nBg.
self invalidate.
@@ -780,7 +780,7 @@
range := rangeEnd - rangeStart.
- newOrigin := originNumber - rangeStart / (range / 100).
+ newOrigin := (originNumber - rangeStart) / (range / 100).
newHeight := heightNumber / (range abs / 100).
(newHeight > 100) ifTrue:[
@@ -819,7 +819,7 @@
] ifFalse:[
nBg := DefaultViewBackground
].
- nBg := nBg onDevice:self graphicsDevice.
+ nBg := nBg onDevice:device.
nBg ~~ viewBackground ifTrue:[
self viewBackground:nBg.
]
@@ -998,8 +998,8 @@
|avgColor graphicsDevice|
- graphicsDevice := self graphicsDevice.
- thumbColor := aColor onDevice:self graphicsDevice.
+ graphicsDevice := device.
+ thumbColor := aColor onDevice:graphicsDevice.
(styleSheet name ~~ #normal) ifTrue:[
avgColor := aColor averageColorIn:(0@0 corner:7@7).
thumbShadowColor := avgColor darkened onDevice:graphicsDevice.
@@ -1111,12 +1111,12 @@
drawHandleFormAtX:x y:y
"styles with a handle in the middle (NeXT) use this"
- thumbShadowColor := thumbShadowColor onDevice:self graphicsDevice.
+ thumbShadowColor := thumbShadowColor onDevice:device.
self paint:thumbShadowColor.
self displayForm:shadowForm x:x y:y.
lightForm notNil ifTrue:[
- thumbLightColor := thumbLightColor onDevice:self graphicsDevice.
+ thumbLightColor := thumbLightColor onDevice:device.
self paint:thumbLightColor.
self displayForm:lightForm x:x y:y.
].
@@ -1173,7 +1173,7 @@
xL := l + lvl - 1 + DefaultTallyInset.
xR := l + w - lvl + 1 - DefaultTallyInset.
- dist := DefaultTallyDistance ? self graphicsDevice verticalPixelPerMillimeter rounded.
+ dist := DefaultTallyDistance ? device verticalPixelPerMillimeter rounded.
tallyMarks even ifTrue:[
yTop := y - (dist // 2).
@@ -1198,7 +1198,7 @@
yT := t + lvl - 1 + DefaultTallyInset.
yB := t + h - lvl + 1 - DefaultTallyInset.
- dist := DefaultTallyDistance ? self graphicsDevice horizontalPixelPerMillimeter rounded.
+ dist := DefaultTallyDistance ? device horizontalPixelPerMillimeter rounded.
tallyMarks even ifTrue:[
xLeft := x - (dist // 2).
@@ -1873,7 +1873,7 @@
redraw thumb if enteredColor ~~ thumbColor"
scrolling ifTrue:[
- (state bitAnd:(self graphicsDevice anyButtonMotionMask)) == 0 ifTrue: [
+ (state bitAnd:(device anyButtonMotionMask)) == 0 ifTrue: [
self buttonRelease:1 x:x y:y
].
].
@@ -1886,7 +1886,7 @@
"mouse-button left view
redraw thumb if enteredColor ~~ thumbColor"
- (entered and:[(state bitAnd:(self graphicsDevice anyButtonMotionMask)) == 0]) ifTrue: [
+ (entered and:[(state bitAnd:(device anyButtonMotionMask)) == 0]) ifTrue: [
entered := false.
thumbEnteredColor ~= thumbColor ifTrue:[
self invalidate.
@@ -2181,7 +2181,7 @@
|graphicsDevice|
super fetchDeviceResources.
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
thumbShadowColor notNil ifTrue:[thumbShadowColor := thumbShadowColor onDevice:graphicsDevice].
thumbLightColor notNil ifTrue:[thumbLightColor := thumbLightColor onDevice:graphicsDevice].
@@ -2212,7 +2212,7 @@
|nm graphicsDevice|
super initStyle.
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
DefaultViewBackground notNil ifTrue:[
viewBackground := DefaultViewBackground onDevice:graphicsDevice.
@@ -2768,12 +2768,12 @@
orientation == #vertical ifTrue:[
h := defExt y.
(w := DefaultVScrollerWidth) isNil ifTrue:[
- w := (self graphicsDevice horizontalPixelPerMillimeter asFloat * 5) rounded
+ w := (device horizontalPixelPerMillimeter asFloat * 5) rounded
]
] ifFalse:[
w := defExt x.
(h := DefaultHScrollerHeight) isNil ifTrue:[
- h := (self graphicsDevice verticalPixelPerMillimeter asFloat * 5) rounded
+ h := (device verticalPixelPerMillimeter asFloat * 5) rounded
]
].
--- a/SelectionInListView.st Sat Apr 02 11:06:59 2016 +0100
+++ b/SelectionInListView.st Sun Apr 03 17:13:01 2016 +0100
@@ -2012,8 +2012,8 @@
itemHeight := item heightOn:self.
].
- (self graphicsDevice depth == 1 or:[arrowLevel == 0]) ifTrue:[
- form := self class rightArrowFormOn:self graphicsDevice.
+ (device depth == 1 or:[arrowLevel == 0]) ifTrue:[
+ form := self class rightArrowFormOn:device.
form notNil ifTrue:[
y := y + ((itemHeight - form height) // 2).
self foreground:(
@@ -2024,11 +2024,11 @@
]
] ifFalse:[
smallArrow ifTrue:[
- form := self class smallRightArrowLightFormOn:self graphicsDevice.
- form2 := self class smallRightArrowShadowFormOn:self graphicsDevice.
+ form := self class smallRightArrowLightFormOn:device.
+ form2 := self class smallRightArrowShadowFormOn:device.
] ifFalse:[
- form := self class rightArrowLightFormOn:self graphicsDevice.
- form2 := self class rightArrowShadowFormOn:self graphicsDevice.
+ form := self class rightArrowLightFormOn:device.
+ form2 := self class rightArrowShadowFormOn:device.
].
(form isNil or:[form2 isNil]) ifTrue:[
"/ very bad conditions
@@ -2815,7 +2815,7 @@
|graphicsDevice|
super fetchDeviceResources.
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
hilightFgColor notNil ifTrue:[hilightFgColor := hilightFgColor onDevice:graphicsDevice].
hilightBgColor notNil ifTrue:[hilightBgColor := hilightBgColor onDevice:graphicsDevice].
@@ -2845,7 +2845,7 @@
arrowLevel := 1.
smallArrow := false.
- self graphicsDevice hasGrayscales ifTrue:[
+ device hasGrayscales ifTrue:[
"
must get rid of these hard codings
"
@@ -2917,7 +2917,7 @@
#hack.
"/ q&d temporary hack.
"/ X11 fonts are currently so ugly... add more spacing.
- self graphicsDevice platformName = #X11 ifTrue:[
+ device platformName = #X11 ifTrue:[
lineSpacing := lineSpacing + 3.
].
hilightFgColor isNil ifTrue:[
--- a/TextCollector.st Sat Apr 02 11:06:59 2016 +0100
+++ b/TextCollector.st Sun Apr 03 17:13:01 2016 +0100
@@ -1248,7 +1248,7 @@
endEntry
"flush collected output; displaying all that has been buffered so far"
- |nLines lines device|
+ |nLines lines|
((outstandingLines isEmptyOrNil) and:[outstandingLine isEmptyOrNil]) ifTrue:[
"/ self ~~ Transcript ifTrue:[ 'e- ' print. thisContext sender selector printCR ].
@@ -1268,7 +1268,6 @@
]
].
- device := self graphicsDevice.
(device isNil or:[device isOpen not or:[self drawableId isNil]]) ifTrue:[
"on snapshot load, Transcript may not yet be re-created.
Write to Stderr then."
--- a/Toggle.st Sat Apr 02 11:06:59 2016 +0100
+++ b/Toggle.st Sun Apr 03 17:13:01 2016 +0100
@@ -459,7 +459,7 @@
super fetchDeviceResources.
- lampColor notNil ifTrue:[lampColor := lampColor onDevice:self graphicsDevice].
+ lampColor notNil ifTrue:[lampColor := lampColor onDevice:device].
"Created: 13.1.1997 / 23:46:31 / cg"
!
@@ -493,9 +493,9 @@
lampColor := DefaultLampColor.
mm := styleSheet at:#'toggle.lampWidthMM' default:1.5.
- lampWidth := (self graphicsDevice horizontalPixelPerMillimeter * mm) rounded.
+ lampWidth := (device horizontalPixelPerMillimeter * mm) rounded.
mm := styleSheet at:#'toggle.lampHeightMM' default:3.0.
- lampHeight := (self graphicsDevice verticalPixelPerMillimeter * mm) rounded.
+ lampHeight := (device verticalPixelPerMillimeter * mm) rounded.
onLevel := styleSheet at:#'toggle.activeLevel' default:onLevel.
offLevel := styleSheet at:#'toggle.passiveLevel' default:offLevel.
@@ -517,8 +517,8 @@
bg := styleSheet colorAt:#'toggle.backgroundColor'.
bg notNil ifTrue:[
self backgroundColor:bg.
- shadowColor := (bg averageColorIn:(0@0 corner:7@7)) darkened onDevice:self graphicsDevice.
- lightColor := (bg averageColorIn:(0@0 corner:7@7)) lightened onDevice:self graphicsDevice.
+ shadowColor := (bg averageColorIn:(0@0 corner:7@7)) darkened onDevice:device.
+ lightColor := (bg averageColorIn:(0@0 corner:7@7)) lightened onDevice:device.
].
"Modified: / 3.11.1997 / 02:22:02 / cg"
@@ -636,10 +636,10 @@
!Toggle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.58 2015-01-26 14:47:46 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/Toggle.st,v 1.58 2015-01-26 14:47:46 cg Exp $'
+ ^ '$Header$'
! !
--- a/VariablePanel.st Sat Apr 02 11:06:59 2016 +0100
+++ b/VariablePanel.st Sun Apr 03 17:13:01 2016 +0100
@@ -1083,8 +1083,8 @@
(styleSymbol ~~ handleStyle) ifTrue:[
handleStyle := styleSymbol.
handleStyle == #next ifTrue:[
- shadowForm := self class shadowFormOn:self graphicsDevice.
- lightForm := self class lightFormOn:self graphicsDevice.
+ shadowForm := self class shadowFormOn:device.
+ lightForm := self class lightFormOn:device.
] ifFalse:[
shadowForm := lightForm := nil
].
@@ -1920,7 +1920,7 @@
bH := styleSheet at:#'variablePanel.barHeight'.
bH isNil ifTrue:[
h := styleSheet at:#'variablePanel.barHeightMM' default:2.
- bH := (h * self graphicsDevice verticalPixelPerMillimeter) rounded.
+ bH := (h * device verticalPixelPerMillimeter) rounded.
].
].
lvl := styleSheet at:#'variablePanel.barLevel' default:0.
@@ -1957,7 +1957,7 @@
cursor := self class
cursorForOrientation:orientation
- onDevice:self graphicsDevice
+ onDevice:device
"Modified: / 30.9.1998 / 18:20:35 / cg"
!
@@ -1969,7 +1969,7 @@
super initStyle.
- handleColor := DefaultHandleColor onDevice:self graphicsDevice.
+ handleColor := DefaultHandleColor onDevice:device.
DefaultHandleStyle isNil ifTrue:[
handleStyle := styleSheet name
@@ -1986,21 +1986,21 @@
separatingLine := DefaultSeparatingLine.
DefaultHandleImage notNil ifTrue:[
- shadowForm := DefaultHandleImage onDevice:self graphicsDevice.
+ shadowForm := DefaultHandleImage onDevice:device.
barWidth := shadowForm width.
] ifFalse:[
handleStyle == #next ifTrue:[
DefaultHandleImage notNil ifTrue:[
- shadowForm := DefaultHandleImage onDevice:self graphicsDevice.
+ shadowForm := DefaultHandleImage onDevice:device.
] ifFalse:[
- shadowForm := self class shadowFormOn:self graphicsDevice.
- lightForm := self class lightFormOn:self graphicsDevice.
+ shadowForm := self class shadowFormOn:device.
+ lightForm := self class lightFormOn:device.
].
barWidth := shadowForm width.
] ifFalse:[
shadowForm := lightForm := nil.
- mm := self graphicsDevice verticalPixelPerMillimeter.
+ mm := device verticalPixelPerMillimeter.
barWidth := (1.5 * mm) rounded. "motif style width"
].
].
@@ -2424,22 +2424,22 @@
colorAt:#'variablePanel.snapSelectedBgColor'
default:(StyleSheet colorAt:#'button.activeBackgroundColor').
color notNil ifTrue:[
- snapAdornment selectedBgColor:(color onDevice:self graphicsDevice)
+ snapAdornment selectedBgColor:(color onDevice:device)
].
color := StyleSheet
colorAt:#'variablePanel.snapEnterBgColor'
default:(StyleSheet colorAt:#'button.enteredBackgroundColor').
color notNil ifTrue:[
- snapAdornment enterBgColor:(color onDevice:self graphicsDevice)
+ snapAdornment enterBgColor:(color onDevice:device)
].
self class snapIcons keysAndValuesDo:[:aKey :anIcon|
- anIcon device == self graphicsDevice ifTrue:[
+ anIcon device == device ifTrue:[
icon := anIcon
] ifFalse:[
- icon := anIcon copy onDevice:self graphicsDevice.
- self graphicsDevice == Display ifTrue:[
+ icon := anIcon copy onDevice:device.
+ device == Display ifTrue:[
self class snapIcons at:aKey put:icon.
]
].
--- a/Workspace.st Sat Apr 02 11:06:59 2016 +0100
+++ b/Workspace.st Sun Apr 03 17:13:01 2016 +0100
@@ -614,7 +614,9 @@
"for the code completion"
editedMethodOrClass isNil ifTrue:[^ nil].
- ^ editedMethodOrClass isBehavior ifTrue:[editedMethodOrClass] ifFalse:[editedMethodOrClass mclass]
+ ^ editedMethodOrClass isBehavior
+ ifTrue:[editedMethodOrClass]
+ ifFalse:[editedMethodOrClass mclass]
!
editedLanguage
@@ -645,7 +647,9 @@
"for the code completion"
editedMethodOrClass isNil ifTrue:[^ nil].
- ^ editedMethodOrClass isBehavior ifTrue:[nil] ifFalse:[editedMethodOrClass]
+ ^ editedMethodOrClass isBehavior
+ ifTrue:[nil]
+ ifFalse:[editedMethodOrClass]
!
editedMethodOrClass
@@ -663,7 +667,7 @@
errorBackgroundColor
errorBgColor notNil ifTrue:[ ^ errorBgColor ].
DefaultErrorBackgroundColor notNil ifTrue:[ ^ DefaultErrorBackgroundColor ].
- self graphicsDevice hasColors ifTrue:[ ^ Color red ].
+ device hasColors ifTrue:[ ^ Color red ].
^ selectionBgColor
!
@@ -718,7 +722,7 @@
warningBackgroundColor
DefaultWarningBackgroundColor notNil ifTrue:[ ^ DefaultWarningBackgroundColor ].
- self graphicsDevice hasColors ifTrue:[ ^ Color orange ].
+ device hasColors ifTrue:[ ^ Color orange ].
^ selectionBgColor
!
@@ -1662,41 +1666,62 @@
"open a browser on the implementors of the selected text,
or - if I support syntax elements, on the syntax element at the cursor position"
- |selectedText selector browserClass na|
+ |selectedText selector browserClass na browser
+ cls node receiverNode dwim targetClass targetImplClass targetMethod|
selectedText := self selectedTextOrSyntaxElement.
selectedText notEmptyOrNil ifTrue:[
- self windowGroup withWaitCursorDo:[
- "/ hack, for now and expecco; must ask the Parser eventually...
- (compilerClass notNil and:[compilerClass includesBehavior:JavaScriptParser]) ifTrue:[
- "/ selector is in one piece anyway
- (selectedText includes:$_) ifFalse:[
- "/ zero or one args - sigh (need to parse more to figure this out)
- selector := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:1.
- selectedText := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:0.
- ] ifTrue:[
- "/ count _#s plus one arg - sigh
- na := (selectedText occurrencesOf:$_) + 1.
- selector := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:na
- ].
- ] ifFalse:[
- selector := SystemBrowser extractSelectorFrom:selectedText.
- ].
- browserClass := UserPreferences systemBrowserClass.
-
- (selector notNil and:[selector ~= selectedText]) ifTrue:[
- (SystemBrowser
- findImplementorsOfAny:(Array with:selectedText)
- in:(Smalltalk allClasses)
- ignoreCase:false) isEmpty ifTrue:[
- browserClass browseImplementorsOf:selector
- ] ifFalse:[
- browserClass browseImplementorsOfAny:(Set with:selector with:selectedText)
- ].
- ] ifFalse:[
- browserClass browseImplementorsOf:(selector ? selectedText)
- ]
- ]
+ self windowGroup withWaitCursorDo:[
+ "/ hack, for now and expecco; must ask the Parser eventually...
+ (compilerClass notNil and:[compilerClass includesBehavior:JavaScriptParser]) ifTrue:[
+ "/ selector is in one piece anyway
+ (selectedText includes:$_) ifFalse:[
+ "/ zero or one args - sigh (need to parse more to figure this out)
+ selector := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:1.
+ selectedText := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:0.
+ ] ifTrue:[
+ "/ count _#s plus one arg - sigh
+ na := (selectedText occurrencesOf:$_) + 1.
+ selector := JavaScriptParser basicNew translatedSmalltalkSelectorFor:selectedText numArgs:na
+ ].
+ ] ifFalse:[
+ selector := SystemBrowser extractSelectorFrom:selectedText.
+ ].
+ browserClass := UserPreferences systemBrowserClass.
+
+ (selector notNil and:[selector ~= selectedText]) ifTrue:[
+ (SystemBrowser
+ findImplementorsOfAny:(Array with:selectedText)
+ in:(Smalltalk allClasses)
+ ignoreCase:false) isEmpty ifTrue:[
+ browser := browserClass browseImplementorsOf:selector
+ ] ifFalse:[
+ browser := browserClass browseImplementorsOfAny:(Set with:selector with:selectedText)
+ ].
+ ] ifFalse:[
+ browser := browserClass browseImplementorsOf:(selector ? selectedText)
+ ].
+ browser notNil ifTrue:[
+ "/ if the type of the receiver is known,
+ "/ select the targeted method immediately
+ (cls := self editedClass) notNil ifTrue:[
+ dwim := DoWhatIMeanSupport new.
+ dwim setClass:cls andContext:nil.
+ node := dwim
+ findNodeForInterval:(self selectionStartIndex to:self selectionStopIndex)
+ in:self contents string.
+ (node notNil and:[node isMessage]) ifTrue:[
+ targetClass := dwim classOfNode:node receiver.
+ targetClass notNil ifTrue:[
+ targetImplClass := targetClass whichClassImplements:(node selector).
+ targetImplClass notNil ifTrue:[
+ browser selectMethod:(targetImplClass compiledMethodAt:(node selector))
+ ].
+ ].
+ ].
+ ]
+ ]
+ ]
].
"Created: / 5.11.2001 / 17:32:23 / cg"