--- a/FlyByHelp.st Wed Jul 07 15:42:18 2010 +0200
+++ b/FlyByHelp.st Fri Jul 16 14:34:12 2010 +0200
@@ -299,7 +299,7 @@
showHelp:aHelpText for:view
"show the help text for aView"
- |wg org p v dev|
+ |wg org p v dev helpViewWidth helpViewHeight|
"/ thisContext fullPrintAllOn:Transcript.
(wg := view windowGroup) notNil ifTrue:[
@@ -328,19 +328,21 @@
org := view originRelativeTo:nil.
currentFrame := org extent:view extent.
- org :=org + (view extent // 2).
+ org := org + (view extent // 2).
dev := view graphicsDevice.
v := ActiveHelpView for:aHelpText onDevice:dev.
+ helpViewWidth := v width.
+ helpViewHeight := v height.
org := dev pointerPosition.
org := org + (0@18"24").
- (org x + v width) > dev width ifTrue:[
- org := (org x - v width) @ org y
+ (org x + helpViewWidth) > (dev usableExtent x) ifTrue:[
+ org := ((dev usableExtent x) - helpViewWidth - 2) @ org y
].
- (org y + v height) > dev height ifTrue:[
- org := org x @ (org y - v height).
+ (org y + helpViewHeight) > (dev usableHeightAt:org) ifTrue:[
+ org := org x @ ((dev usableHeightAt:org) - helpViewHeight).
].
v origin:org.
@@ -371,7 +373,7 @@
].
"Modified: / 31-08-1995 / 19:20:45 / claus"
- "Modified: / 16-03-2004 / 15:27:50 / cg"
+ "Modified: / 16-07-2010 / 14:33:13 / cg"
!
stopHelpDisplayProcess
@@ -388,11 +390,11 @@
!FlyByHelp class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.40 2010-06-09 15:33:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.41 2010-07-16 12:34:12 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.40 2010-06-09 15:33:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/FlyByHelp.st,v 1.41 2010-07-16 12:34:12 cg Exp $'
! !
FlyByHelp initialize!