#UI_ENHANCEMENT
class: MenuPanel
class definition
added: #flyByHelpSpecProvider:
changed:
#flyByHelpSpec
#flyByHelpTextForKey:
+ pluggable flybyhelp provider
--- a/MenuPanel.st Tue Dec 22 04:41:52 2015 +0000
+++ b/MenuPanel.st Fri Jan 15 04:14:17 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1997 by eXept Software AG
All Rights Reserved
@@ -29,7 +27,8 @@
lastItem hasPerformed focusComesByTab lastDrawnScrollerNextBounds
buttonActiveBackgroundColor buttonEnteredBackgroundColor
buttonPassiveBackgroundColor maxExtent sizeFixed extraMargin
- buttonActiveLevel buttonPassiveLevel buttonEnteredLevel'
+ buttonActiveLevel buttonPassiveLevel buttonEnteredLevel
+ pluggableHelpSpecProvider'
classVariableNames:'InitialSelectionQuerySignal Images LigthenedImages
DefaultForegroundColor DefaultBackgroundColor IconIndicationOn
IconIndicationOff IconRadioOn IconRadioOff
@@ -4481,7 +4480,16 @@
flyByHelpSpec
"allows subclasses to provide texts"
- ^ IdentityDictionary new
+ pluggableHelpSpecProvider notNil ifTrue:[
+ ^ pluggableHelpSpecProvider flyByHelpSpec.
+ ].
+ ^ nil
+!
+
+flyByHelpSpecProvider:aSpecProvider
+ "pluggable helpspec provider"
+
+ pluggableHelpSpecProvider := aSpecProvider
!
flyByHelpTextAt:aPoint
@@ -4508,14 +4516,16 @@
!
flyByHelpTextForKey:aKey
- |app text|
+ |app text spec|
app := self application.
app notNil ifTrue:[
- text := self application flyByHelpTextForKey:aKey.
- text notNil ifTrue:[^ text].
- ].
- ^ self flyByHelpSpec at:aKey ifAbsent:nil
+ text := app flyByHelpTextForKey:aKey.
+ text notNil ifTrue:[^ text].
+ ].
+ spec := self flyByHelpSpec.
+ spec isNil ifTrue:[^ nil].
+ ^ spec at:aKey ifAbsent:nil
!
helpText