From VisualWorks®, 7.4 of December 5, 2005 on December 5, 2005 at 2:06:38 pm (Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned. Choose terminate or close.'] <name>VWHelp</name> <environment>Smalltalk</environment> <private>false</private> <imports> private Smalltalk.XML.* private Smalltalk.* </imports> <category>Help-Namespace</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <class> <name>AHSUtils</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSUtils
Copyright Ó 1994 Arbor Intelligent Systems, Inc. Assorted utilities for the help system.
</comment> <class> <name>AHSBalloonTextComposition</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none ct box w h maxWidth lines pt sz wb shift widget style processor text <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSBalloonTextComposition
This class has not yet been commented. The comment should state the purpose of the class, what messages are subclassResponsibility, and the type and purpose of each instance and class variable. The comment should also explain any unobvious aspects of the implementation. Instance Variables: ct <ClassOfVariable> description of variable's function box <ClassOfVariable> description of variable's function w <ClassOfVariable> description of variable's function h <ClassOfVariable> description of variable's function maxWidth <ClassOfVariable> description of variable's function lines <ClassOfVariable> description of variable's function pt <ClassOfVariable> description of variable's function sz <ClassOfVariable> description of variable's function wb <ClassOfVariable> description of variable's function shift <ClassOfVariable> description of variable's function widget <ClassOfVariable> description of variable's function style <ClassOfVariable> description of variable's function processor <ClassOfVariable> description of variable's function text <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSWHCWindowSensor</name> <environment>VWHelp</environment> <super>UI.ApplicationWindowSensor</super> <private>false</private> none helpProcessor <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSWHCWindowSensor
Copyright Ó 1994 Arbor Intelligent Systems, Inc. This class is responsible for storing the help processor and notifying the help processor when it's time to process widget help. Instance Variables: helpProcessor <AHSWHCProcessor> The help processor associated to the window
</comment> <class> <name>AHSWHCWeakValueHolder</name> <environment>VWHelp</environment> <super>UI.ValueHolder</super> <private>false</private> none interests selectors accessLock <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSWHCWeakValueHolder
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This class is an implementation of a value holder with weak interests. Used for AHSLauncher allowEditingModel and helpEnabledModel so that AHSWHCProcessor instances don't hang around. Instance Variables: interests <WeakArray> selectors <Array> accessLock <RecursionLock>
</comment> <class> <name>AHSWHCBalloonSensor</name> <environment>VWHelp</environment> <super>UI.WindowSensor</super> <private>false</private> none <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSWHCBalloonSensor
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This class is the sensor for AHSBalloon window. It dispatches activity to the balloon windows parent while the balloon window is open.
</comment> <class> <name>AHSWHCGlobalHelp</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSWHCGlobalHelp
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This class provides a window which displays help for all open windows. Instance Variables: Class Variables: BroadcastModel <ClassOfVariable> description of variable''s function
</comment> <class> <name>AHSWHCTransientWindow</name> <environment>VWHelp</environment> <super>UI.TransientWindow</super> <private>false</private> none spawningView <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSWHCTransientWindow
This class has not yet been commented. The comment should state the purpose of the class, what messages are subclassResponsibility, and the type and purpose of each instance and class variable. The comment should also explain any unobvious aspects of the implementation. Instance Variables: spawningView <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSWHCEventDispatcher</name> <environment>VWHelp</environment> <super>UI.EventDispatcher</super> <private>false</private> none helpProcessor <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSWHCEventDispatcher
This class has not yet been commented. The comment should state the purpose of the class, what messages are subclassResponsibility, and the type and purpose of each instance and class variable. The comment should also explain any unobvious aspects of the implementation. Instance Variables: helpProcessor <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSWHCProcessor</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none window helpText focusChanged lastFocus lastState waitingOnBalloon extendedHelpRequest editHelpRequest toggleBubbleRequest <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSWHCProcessor
Copyright © 1994, 1995 Arbor Intelligent Systems, Inc. This class is responsible for keeping track of where the cursor is located and whether help for the widget that contains the cursor (if any) should be displayed. Instance Variables: window <ClassOfVariable> description of variable's function helpText <ClassOfVariable> description of variable's function focusChanged <ClassOfVariable> description of variable's function lastFocus <ClassOfVariable> description of variable's function lastState <ClassOfVariable> description of variable's function waitingOnBalloon <ClassOfVariable> description of variable's function extendedHelpRequest <ClassOfVariable> description of variable's function editHelpRequest <ClassOfVariable> description of variable's function toggleBubbleRequest <ClassOfVariable> description of variable's function Class Variables: AHSIcon <ClassOfVariable> description of variable''s function Balloon <ClassOfVariable> description of variable''s function BalloonDisplayDelay <ClassOfVariable> description of variable''s function BalloonHelpEnabledModel <ClassOfVariable> description of variable''s function BalloonKillDelay <ClassOfVariable> description of variable''s function CachedBalloonText <ClassOfVariable> description of variable''s function HelpEnabledModel <ClassOfVariable> description of variable''s function RegisteredMenuView <ClassOfVariable> description of variable''s function RestrictBalloonToCondensedText <ClassOfVariable> description of variable''s function TmpStorage <ClassOfVariable> description of variable''s function WidgetHelpEnabledModel <ClassOfVariable> description of variable''s function
</comment> <class> <name>AHSWHCBalloonWindow</name> <environment>VWHelp</environment> <super>Graphics.Window</super> <private>false</private> none parentWindow mapStatus <imports></imports> <category>Help-Widget Help-Core</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> </class> <comment> VWHelp.AHSWHCBalloonWindow
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This class is used to display balloon help. Instance Variables: parentWindow <ClassOfVariable> description of variable's function mapStatus <ClassOfVariable> description of variable's function
</comment> <name>BroadcastModel</name> <environment>VWHelp.AHSWHCGlobalHelp</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>HelpEnabledModel</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>WidgetHelpEnabledModel</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>BalloonKillDelay</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>CachedBalloonText</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>TmpStorage</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>Balloon</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>BalloonDisplayDelay</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>RegisteredMenuView</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>BalloonHelpEnabledModel</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>RestrictBalloonToCondensedText</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <name>AHSIcon</name> <environment>VWHelp.AHSWHCProcessor</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Widget Help Core</package> </attributes> <methods> VWHelp.AHSUtils class <category>text utilities</category>
deepCopyOfRunArray: aRunArray | copy copyBlock | aRunArray isNil ifTrue: [^aRunArray]. copy := aRunArray copy. "the runs and values of the RunArray are now shallow copied" "copy the values deeper" copyBlock := [:item | (item isSymbol not and: [item isSequenceable]) ifTrue: [item collect: [:val | copyBlock value: val]] ifFalse: [ item aisIsAssociation ifTrue: [item species key: item key copy value: item value copy] ifFalse: [item copy]]]. 1 to: copy values size do: [:i | copy values at: i put: (copyBlock value: (copy values at: i))]. ^copy
deepCopyOfText: aText |copy | aText isNil ifTrue: [^aText]. copy := aText asText copy. copy setString: copy string setRuns: (self deepCopyOfRunArray: copy runs). ^copy
runArray: runArray1 equals: runArray2 "Given 2 RunArrays, answer true if they are completely equal. This is equivalent to using #=, but can be much faster." ^runArray1 runs = runArray2 runs and: [runArray1 values = runArray2 values]
text: text1 equals: text2 "Given 2 Texts, answer true if the text is completely equal. Don't use Text>>= because subclasses may invoke this method which would result in recursion." ^text1 species = text2 species and: [text1 string = text2 string and: [self runArray: text1 runs equals: text2 runs]]
version "This is a tricky question. AHS is comprised of about 5 different modules, each with its own unique version history. So this method should only be invoked for things that want to know the generic release level for everything, not a specific version number for a particular module." ^'3.0'
</methods> <methods> VWHelp.AHSUtils class <category>utilities</category>
defaultHelpProcessorClass ^#{AHSProcessorWithEditing} valueOrDo: [#{AHSWHCProcessor} valueOrDo: [nil]]
</methods> <methods> VWHelp.AHSUtils class <category>parcel load/unload/save</category>
postLoadActionFor: aParcel "Add the VWHelp namespace to the Smalltalk namespace imports. This is needed so UI and Tools classes can access AHSPreference resources" | nameSpaces | nameSpaces := Array with:Smalltalk with:UI. nameSpaces do: [:aNamespace | | tokens token | tokens := aNamespace importString tokensBasedOn: (Character space). token := tokens detect: [:e | (e indexOfSubCollection: 'VWHelp.*' startingAt: 1) ~= 0] ifNone: [nil]. token isNil ifTrue: [ | strm | strm := WriteStream on: (String new: 50). tokens do: [:ea | strm nextPutAll: (ea, ' ')]. strm nextPutAll: 'private VWHelp.* '. aNamespace imports: strm contents ] ].
</methods> <methods> VWHelp.AHSBalloonTextComposition <category>accessing</category>
box ^ box
composedText ^ ct
widget ^ widget
</methods> <methods> VWHelp.AHSBalloonTextComposition <category>actions</category>
composeBalloon style := self balloonTextStyle. maxWidth := (ComposedText withText: text style: style) width. lines := 1. [w := maxWidth // lines + 20. ct := ComposedText withText: text style: style compositionWidth: w. h := ct height. w > 175 and: [w > (h + h)]] whileTrue: [lines := lines + 1]. h := ct height. box := 5 @ (h + 10) negated extent: (ct width + 10) @ (h + 10). box := box translatedBy: processor applicationWindow globalOrigin - (5 @ 1). pt := processor applicationWindow sensor cursorPoint + processor applicationWindow globalOrigin. sz := Screen default bounds extent // 2. wb := widget localPointToGlobal: widget bounds. (widget isKindOf: MenuView) ifTrue: [wb := widget displayBoxOfView: widget]. "If the widget is large, display the balloon over the cursor point so it's not too far away." (wb extent x > 200 or: [wb extent y > 200]) ifTrue: [shift := processor applicationWindow sensor cursorPoint + (20 @ 10)] ifFalse: ["In lower right corner of the screen, display balloon at upper left of widget." (pt x >= sz x and: [pt y >= sz y]) ifTrue: [shift := wb bottomLeft - (box extent x @ 0)]. "In upper right corner of the screen, display balloon at lower left of widget." (pt x >= sz x and: [pt y < sz y]) ifTrue: [shift := wb topLeft - (box extent x @ box extent y negated)]. "In lower left corner of the screen, display balloon at upper right of widget." (pt x < sz x and: [pt y >= sz y]) ifTrue: [shift := wb bottomRight]. "In upper left corner of the screen, display balloon at lower right of widget." (pt x < sz x and: [pt y < sz y]) ifTrue: [shift := wb topRight + (0 @ box extent y)]]. (widget isKindOf: MenuView) ifTrue: [shift := wb topLeft - (box extent x @ box extent y negated) - processor applicationWindow globalOrigin]. box := (box translatedBy: shift) rounded.
</methods> <methods> VWHelp.AHSBalloonTextComposition <category>instance creation</category>
setText: aText widget: aWidget processor: anAHSWHCProcessor text := aText. processor := anAHSWHCProcessor. widget := aWidget isNil ifTrue: [processor applicationWindow] ifFalse: [aWidget].
</methods> <methods> VWHelp.AHSBalloonTextComposition <category>balloon help</category>
balloonTextStyle ^(TextAttributes styleNamed: #'Arbor-10') fontAttributeForLeading: #normal; topLeading: 0; bottomLeading: 0; install
</methods> <methods> VWHelp.AHSBalloonTextComposition class <category>instance creation</category>
composeBalloonFor: aText on: aWidget processor: anAHSWHCProcessor ^ (self forText: aText widget: aWidget processor: anAHSWHCProcessor) composeBalloon
forText: aText widget: aWidget processor: anAHSWHCProcessor ^ self new setText: aText widget: aWidget processor: anAHSWHCProcessor
</methods> <methods> VWHelp.AHSWHCWindowSensor <category>event processing</category>
eventButtonRelease: event "A mouse button has been released while the cursor is in this window. Do whatever is appropriate. In the default system, we pause a moment so that the user process has time to register a fast mouse click." ButtonDelay wait. ButtonDelay wait. self pollForHelp
eventEnter: event "This window has become the current mouse focus." "We need to poll for help after an enter event in order to update the help after a Menu is closed, but AFTER the parent window is made active so the pollForHelp will pay attention" super eventEnter: event. self pollForHelp
eventExit: event "This window is no longer the current mouse focus." self helpProcessor balloonHelpEnabled ifTrue: [self helpProcessor hideBalloon]. super eventExit: event
eventMouseMoved: event "The mouse has changed position or a certain time has elapsed. Test whether another poll for help is needed." self pollForHelp. super eventMouseMoved: event
keyAt: keyNumber character: aCharacter alternative: alternativeCharacter down: isDownTransition "If the key pressed was #Help, #F1, or alt-? remember that" isDownTransition ifTrue: [| n | (aCharacter isInteger and: [aCharacter > 0]) ifTrue: [n := InputState keyNameFor: aCharacter] ifFalse: [n := aCharacter]. (n == #Help or: [n == #F1 or: [(n == $/ or: [n == $?]) and: [InputState default altDown]]]) ifTrue: [self extendedHelpRequest] ifFalse: [n == #F2 ifTrue: [self editHelpRequest] ifFalse: [n == #F3 ifTrue: [self toggleBubbleRequest] ifFalse: [super keyAt: keyNumber character: aCharacter alternative: alternativeCharacter down: isDownTransition]]]] ifFalse: [super keyAt: keyNumber character: aCharacter alternative: alternativeCharacter down: isDownTransition]
</methods> <methods> VWHelp.AHSWHCWindowSensor <category>accessing</category>
editHelpRequest self helpProcessor notNil ifTrue: [self helpProcessor editHelpRequest]
extendedHelpRequest self helpProcessor notNil ifTrue: [self helpProcessor extendedHelpRequest]
helpProcessor ^(helpProcessor isNil and: [self window model notNil "model is nil during close" and: [self window model class ahsProcessorClass notNil]]) ifTrue: [helpProcessor := self window model class ahsProcessorClass new setWindow: self window] ifFalse: [helpProcessor]
pollForHelp self helpProcessor notNil ifTrue: [self helpProcessor pollForHelp]
toggleBubbleRequest self helpProcessor notNil ifTrue: [self helpProcessor toggleBubbleRequest]
</methods> <methods> VWHelp.AHSWHCWindowSensor <category>private</category>
helpProcessor: aHelpProcessor helpProcessor := aHelpProcessor
</methods> <methods> VWHelp.AHSWHCWeakValueHolder <category>changing</category>
changed: anAspectSymbol anAspectSymbol == #value ifTrue: [accessLock critical: [ interests with: selectors do: [:obj :sel | obj == 0 ifFalse: [obj perform: sel]]]]. ^super changed: anAspectSymbol
</methods> <methods> VWHelp.AHSWHCWeakValueHolder <category>updating</category>
update: anAspectSymbol with: aParameter from: aSender "Finalize all finalizable entries of aSender." (aSender == interests and: [anAspectSymbol = #ElementExpired]) ifTrue: [self finalizeElements] ifFalse: [^self]
</methods> <methods> VWHelp.AHSWHCWeakValueHolder <category>private</category>
breakDependents super breakDependents. accessLock critical: [ interests := WeakArray new. selectors := Array new]
</methods> <methods> VWHelp.AHSWHCWeakValueHolder <category>finalization</category>
finalizeElements |deathMarker| accessLock critical: [ deathMarker := 1. [deathMarker ~= 0] whileTrue: [(deathMarker := interests indexOf: 0 replaceWith: nil startingAt: deathMarker stoppingAt: interests size) = 0 ifFalse: [selectors at: deathMarker put: nil]]. interests := WeakArray withAll: (interests copyWithout: nil). interests addDependent: self. selectors := selectors copyWithout: nil]
</methods> <methods> VWHelp.AHSWHCWeakValueHolder <category>interests</category>
onChangeSend: aSymbol to: anObject "Arrange to receive a message with aSymbol when the value aspect changes on anObject." |newInterests| accessLock critical: [ newInterests := WeakArray new: interests size + 1. newInterests replaceFrom: 1 to: interests size with: interests startingAt: 1. newInterests at: newInterests size put: anObject. interests := newInterests. interests addDependent: self. selectors := selectors copyWith: aSymbol]
retractInterestsFor: anObject "Undo a send of onChangeSend:to:." |index| accessLock critical: [ index := interests indexOf: anObject ifAbsent: [^nil]. interests := WeakArray withAll: (interests copyFrom: 1 to: index - 1) , (interests copyFrom: index + 1 to: interests size). selectors := (selectors copyFrom: 1 to: index - 1) , (selectors copyFrom: index + 1 to: selectors size)]
</methods> <methods> VWHelp.AHSWHCWeakValueHolder <category>initialize-release</category>
initialize super initialize. interests := WeakArray new. selectors := Array new. accessLock := RecursionLock new
</methods> <methods> VWHelp.AHSWHCBalloonSensor <category>event processing</category>
eventButtonPress: anEvent | cp | self window parentWindow sensor eventButtonPress: anEvent. OSHandle currentOS == #mac ifTrue: [self window parentWindow isOpen ifFalse: [^self window unmap]. cp := InputSensor cursorPoint. (self window parentWindow displayBox containsPoint: cp) not ifTrue: [self window unmap. "find the window the cursor is over" ScheduledControllers updateControllerOrder. ScheduledControllers scheduledControllers do: [:c | (c view displayBox containsPoint: cp) ifTrue: [^c view raise]]]]
eventButtonRelease: anEvent self window parentWindow sensor eventButtonRelease: anEvent.
eventEnter: event | parent menuWindow | parent := self window parentWindow. menuWindow := AHSWHCProcessor registeredMenuView. (menuWindow isNil or: [menuWindow isOpen not]) ifTrue: [parent becomeActive] ifFalse: [menuWindow becomeActive].
eventKeyPress: event self window parentWindow sensor eventKeyPress: event
eventKeyRelease: event self window parentWindow sensor eventKeyRelease: event
eventMouseMoved: event self window parentWindow sensor eventMouseMoved: event.
forceActive: aMenu aMenu becomeActive
</methods> <methods> VWHelp.AHSWHCGlobalHelp <category>interface opening</category>
postBuildWith: aBuilder super postBuildWith: aBuilder. aBuilder window icon: AHSWHCProcessor reducedHelpWindowIcon.
postOpenWith: aBuilder super postOpenWith: aBuilder. self ahsWindow ahsProcessor helpTextModel: self class broadcastModel. aBuilder window sendWindowEvents: #(enter exit); application: self.
preBuildWith: aBuilder super preBuildWith: aBuilder. aBuilder aspectAt: #ahsText put: self class broadcastModel. aBuilder aspectAt: #ahsFlag put: AHSWHCProcessor helpEnabledModel.
</methods> <methods> VWHelp.AHSWHCGlobalHelp <category>events</category>
windowEvent: anEvent from: anApplicationWindow "Clear the help text whenever the window is exited or entered." super windowEvent: anEvent from: anApplicationWindow. (anApplicationWindow == self builder window and: [anEvent key = #enter or: [anEvent key = #exit]]) ifTrue: [anApplicationWindow ahsProcessor helpText: '' focus: nil state: #default].
</methods> <methods> VWHelp.AHSWHCGlobalHelp class <category>broadcasting help</category>
broadcastHelp: aText "Post aText as a broadcasted help value." (AHSUtils text: self broadcastModel value equals: aText) not ifTrue: [self broadcastModel value: aText]
broadcastModel ^BroadcastModel
</methods> <methods> VWHelp.AHSWHCGlobalHelp class <category>interface specs</category>
windowSpec ^AHSWHCProcessor ahsSpec
</methods> <methods> VWHelp.AHSWHCGlobalHelp class <category>class initialization</category>
initialize BroadcastModel := ValueHolder new
</methods> <methods> VWHelp.AHSWHCGlobalHelp class <category>help info (AHS)</category>
arborHelpEnabled ^true
</methods> <methods> VWHelp.AHSWHCTransientWindow <category>private</category>
privateClose "VWHelp addition to enable clean unload of the containing Widget Help parcel" #{UI.InputManager} value default releaseWindow: self. self key isNil ifFalse:[self primClose]. self becomeInactive
</methods> <methods> VWHelp.AHSWHCTransientWindow <category>accessing</category>
spawningView ^spawningView
spawningView: aView spawningView := aView.
</methods> <methods> VWHelp.AHSWHCTransientWindow <category>initialize-release</category>
recycleTransient super recycleTransient. self spawningView: nil.
</methods> <methods> VWHelp.AHSWHCTransientWindow class <category>class initialization</category>
emptyCaches "Clear the caches." CachedPopUp := nil. CachedPostedMenu := nil.
initialize self emptyCaches.
obsolete "The class is going away..." self resetCaches. super obsolete.
resetCaches "Clear the caches and insert TransientWindow instances in them." self emptyCaches. (TransientWindow aPopUpIn: (0 @ 0 extent: 120 @ 120)) windowManager: NullWindowManager new; recycleTransient. (TransientWindow aPostedMenuIn: (0 @ 0 extent: 120 @ 120)) windowManager: NullWindowManager new; recycleTransient
</methods> <methods> VWHelp.AHSWHCEventDispatcher <category>accessing</category>
helpProcessor ^helpProcessor isNil ifTrue: [helpProcessor := AHSUtils defaultHelpProcessorClass new setWindow: self window] ifFalse: [helpProcessor]
pollForHelp self helpProcessor processPollForHelpEvent
</methods> <methods> VWHelp.AHSWHCEventDispatcher <category>event dispatching</category>
dispatchEvent: event "If the event indicates exiting the window logic dictates we will want to close the balloon. However, OS implementations for window opening cause problems. In MS Windows, when a balloon opens, it gets an enter event and the host window gets an exit event - in such a case we do NOT want to close the balloon or the balloon will just flash briefly on the screen before closing. UNIX systems generally don't exhibit this behavior, so in the case of UNIX we will close the balloon when an exit event occurs." (event isWindowExit and: [self helpProcessor balloonHelpEnabled and: [OSHandle currentOS == #unix]]) ifTrue: [self helpProcessor hideBalloon]. super dispatchEvent: event. (event isKindOf: KeyPressedEvent) ifTrue: [(#(#Help #F1) includes: event keyValue) ifTrue: [^self helpProcessor extendedHelpRequest]. event keyValue == #F2 ifTrue: [^self helpProcessor editHelpRequest]. event keyValue == #F3 ifTrue: [^self helpProcessor toggleBubbleRequest]]. (event isButtonReleasedEvent or: [(event isKindOf: WindowEnterEvent) or: [event isKindOf: MouseMovedEvent]]) ifTrue: [^self pollForHelp]
</methods> <methods> VWHelp.AHSWHCEventDispatcher <category>private</category>
helpProcessor: aHelpProcessor helpProcessor := aHelpProcessor
</methods> <methods> VWHelp.AHSWHCProcessor <category>accessing</category>
balloon ^self class balloon
balloonHelpEnabled ^self class balloonHelpEnabled
balloonHelpEnabled: aBoolean self class balloonHelpEnabled: aBoolean
balloonHelpEnabledModel "Answer the value model which indicates whether balloon help is currently active or inactive." ^self class balloonHelpEnabledModel
cachedBalloonText ^self class cachedBalloonText
cachedBalloonText: aText ^self class cachedBalloonText: aText
editHelpRequest editHelpRequest := true. self pollForHelp
extendedHelpRequest extendedHelpRequest := true. self pollForHelp
focusChanged focusChanged := true. self processPollForHelpEvent
helpEnabled "Answer true if the user wishes to have help lookup performed." ^self class helpEnabled
helpEnabled: aBoolean "Set whether or not to display help." self helpFlag value: aBoolean
helpEnabledModel "Answer the value model which indicates whether the entire help system is currently active or inactive." ^self class helpEnabledModel
helpFlag "Answer the help flag value model, which indicates whether widget help is currently active or inactive." ^self widgetHelpEnabledModel
helpText "Answer the help text value model, which contains the current help text" ^helpText
helpTextModel: aValueHolder "Set the help text value model, which will contain the current help text" helpText := aValueHolder
registeredMenuView ^self class registeredMenuView
registeredMenuView: aMenuView ^self class registeredMenuView: aMenuView
resetEditHelpRequest editHelpRequest := false
resetExtendedHelpRequest extendedHelpRequest := false
resetFocusChanged focusChanged := false
resetToggleBubbleRequest toggleBubbleRequest := false
restrictBalloonToCondensedText ^self class restrictBalloonToCondensedText
sourceModel "Answer the application source model" ^self applicationWindow ahsClient
toggleBubbleRequest toggleBubbleRequest := true. self pollForHelp
widgetHelpEnabled ^self class widgetHelpEnabled
widgetHelpEnabled: aBoolean self class widgetHelpEnabled: aBoolean.
widgetHelpEnabledModel "Answer the value model which indicates whether widget help is currently active or inactive." ^self class widgetHelpEnabledModel
</methods> <methods> VWHelp.AHSWHCProcessor <category>testing</category>
didFocusChange ^focusChanged == true
editHelpRequestIsActive ^editHelpRequest == true
extendedHelpRequestIsActive ^extendedHelpRequest == true
isInterestingText: aText ^aText ~= (self getHelpTextForID: #ahsBackground) and: [aText asString ~= '']
toggleBubbleRequestIsActive ^toggleBubbleRequest == true
</methods> <methods> VWHelp.AHSWHCProcessor <category>balloon help</category>
balloonDisplayProcessFor: aBalloonComposition | aRectangle aWidget | aRectangle := aBalloonComposition box. aWidget := aBalloonComposition widget. ^[ (self helpEnabled and: [self balloonHelpEnabled]) ifTrue: [ self waitToDisplay. (self balloon) displayBox: aRectangle; map. (aWidget isKindOf: MenuView) ifTrue: [aWidget submenuClosed]. self balloon graphicsContext display: aBalloonComposition composedText at: 5 @ 5. (0 @ 0 extent: aRectangle extent - 1) displayStrokedOn: self balloon graphicsContext. (0 @ 0 extent: aRectangle extent - 2) displayStrokedOn: self balloon graphicsContext. (Delay forMilliseconds: self class balloonKillDelay) wait. self hideBalloon]. waitingOnBalloon := nil] newProcess
clearBalloonWindow self balloon background: self class balloonColor. self balloon parentWindow: self applicationWindow. self balloon graphicsContext clear
displayBalloonComposition: aBalloonComposition self clearBalloonWindow. waitingOnBalloon notNil ifTrue: [waitingOnBalloon terminate. waitingOnBalloon := nil]. (waitingOnBalloon := self balloonDisplayProcessFor: aBalloonComposition) resume.
hideBalloon self class hideBalloon
hideBalloonText: aText self hideBalloon; cachedBalloonText: aText.
primShowBalloon: aText on: wrapper | balloonComposition | aText = self cachedBalloonText ifTrue: [^ self]. self cachedBalloonText: aText. balloonComposition := AHSBalloonTextComposition composeBalloonFor: aText on: wrapper processor: self. self displayBalloonComposition: balloonComposition.
showBalloon: aTextOrAHSTextBinder on: wrapper | txt | self balloonHelpEnabled ifFalse: [^self]. txt := (aTextOrAHSTextBinder hasCondensedText or: [self restrictBalloonToCondensedText not]) ifTrue: [aTextOrAHSTextBinder condensedText] ifFalse: ['']. (self isInterestingText: txt) ifTrue: [self primShowBalloon: txt on: wrapper] ifFalse: [self hideBalloonText: txt]
waitToDisplay self balloon isMapped ifTrue: [^ self]. (Delay forMilliseconds: self class balloonDisplayDelay) wait.
</methods> <methods> VWHelp.AHSWHCProcessor <category>private</category>
applicationWindow "Answer the application window" ^window
applyHelpOffText "Set the help text to display the default 'help off' string. We coerce the display because if #widgetHelpEnabled is false then the display wouldn't otherwise occur." | txt | txt := self helpText: (self getHelpTextForID: #HELPOFF ifNil: '') focus: nil id: #HELPOFF state: #default client: self sourceModel. txt notNil ifTrue: [helpText value: txt fullText].
canOpenOutliner "Private - Answer true if the system can open an outliner." ^self extendedHelpRequestIsActive and: [self outliner notNil]
changeOccurredInWidget: aWidget state: aState "Private - Answer true if the widget or state for which help is being displayed is different from aWidget or aState." ^aWidget ~= lastFocus or: [lastState ~= aState]
component: aVisPart containsMousePosition: aPoint "is the mouse positioned over aVisPart? aVisPart must be able to respond to isVisible" | pt | (aVisPart isNil or: [aVisPart isVisible not]) ifTrue: [^ false]. pt := self messageNotUnderstoodSignal handle: [:ex | ex parameter selector == #container ifTrue: [ex returnWith: aPoint] ifFalse: [ex reject]] do: [aVisPart container notNil ifTrue: [aVisPart container globalPointToLocal: aPoint] ifFalse: [aPoint]]. ^ aVisPart bounds containsPoint: pt
componentAt: aSymbol "Answer the component named aSymbol in the application source" ^Object errorSignal handle: [:ex | ex returnWith: nil] do: [self sourceModel widgetWithID: aSymbol]
currentConsumerPosition "Returns the origin of the current keyboard consumer in the current window's coordinate system." | consumer | consumer := self getConsumerFor: self applicationWindow model. ^consumer isNil ifTrue: [Point zero] ifFalse: [consumer view ahsActivityPoint]
currentHelpCache "Private - Answer the current help cache maintained by the storage manager. This message assumes that a storage manager exists." ^ self storageManager currentHelpCache
defaultWidgetHelpInfoFor: ahsID state: widgetState className: widgetClassName "Private - Answer the default widget help string if available, otherwise answer nil." | helpString | self haveStorageManager ifTrue: [ helpString := self currentHelpCache helpTextForID: ahsID state: widgetState className: widgetClassName ]. ^ helpString
findClientFor: menuButtonView "Private - Answer the client associated with the given menuButtonView. The result will be the closest client in the visual hierarchy." | comp client | comp := menuButtonView. client := nil. [comp notNil and: [client isNil]] whileTrue: [ client := comp ahsClient. comp := comp container ]. ^ client
findHelpTextForID: ahsID state: widgetState client: widgetClient "Private - Answer the help text associated with the given widgetState and widgetClient. If no help text is defined, get the default text, if any." | helpString | helpString := self sourceModel ahsHelpTextForID: ahsID state: widgetState client: widgetClient. helpString isNil ifTrue: [helpString := self defaultWidgetHelpInfoFor: ahsID state: widgetState className: widgetClient class fullName]. ^ helpString
findItemIDFor: menuButtonView "Private - Answer the ahsID associated with the currently selected item in menuButtonView.." | comp ahsID | comp := menuButtonView. ahsID := nil. [comp notNil and: [ahsID isNil]] whileTrue: [ ahsID := comp ahsID. comp := comp container ]. ^ ahsID
findMenuItemHelpDataFor: aMenuItemString client: menuClient id: ahsID "Private - Answer an association containing the widget key and its associated help text. Answers nil if nothing appropriate can be found." | possibleKeys helpString | possibleKeys := self menuItemKeysFrom: aMenuItemString string. possibleKeys do: [:thisKey | helpString := self findHelpTextForID: ahsID state: thisKey client: menuClient. helpString notNil ifTrue: [^ Association key: thisKey value: helpString asAHSTextBinder] ]. ^ nil
getConsumerFor: aModel "Private - Answer the consumer associated with aModel. The check for ApplicationCanvas is for Argos support." ^ aModel builder keyboardProcessor currentConsumer
haveStorageManager "Private - Answer true if a storage manager is defined." ^ self storageManager notNil
isEventPending ^(self applicationWindow sensor metaInput conform: [:each | (each key == #block and: [(each value isKindOf: MessageSend) and: [each value selector == #processPollForHelpEvent]]) not]) not
menuItemKeysFrom: menuLabelString "Private - Answer an ordered collection of menu items keys which will be used to find help for the currently active widget. The keys are derived from the menu item label string contained in menuLabelString." | possibleKeys | possibleKeys := OrderedCollection new. possibleKeys add: menuLabelString trimExteriorBlanks asSymbol; addAll: (self parseItemsFrom: menuLabelString); add: #default. ^ possibleKeys.
outliner "Private - Answer the class which edits outlines." ^ self class outlinerClass
parseItemsFrom: aString "Private - Answer a collection of menu item names found in aString. aString will be in the form 'Menu/item 1/item 2/ ..." | labelString items idx | labelString := aString string. items := OrderedCollection new. [(idx := labelString indexOf: $/) > 0] whileTrue: [ labelString := labelString copyFrom: (idx + 1) to: labelString size. items add: labelString asSymbol]. ^items
setWindow: aWindow window := aWindow
storageManager "Private - Answer the storage manager associated with the receiver, or nil if unavailable." ^ self class storageManagerClass
</methods> <methods> VWHelp.AHSWHCProcessor <category>help</category>
currentSource: temps "The current source is the top of the source stack" |sourceStack| sourceStack := temps at: #sourceStack. ^sourceStack isEmpty ifFalse: [sourceStack last]
getHelpTextForID: aSymbol "Answer a text / or nil if not found" | help | help := self sourceModel ahsHelpTextForID: aSymbol state: #default client: self sourceModel. help isNil ifTrue: [help := self defaultWidgetHelpInfoFor: aSymbol state: #default className: self sourceModel class fullName]. ^help
getHelpTextForID: aSymbol ifNil: aTextOrString "Answer the help text defined for aSymbol. If no text is defined, answer aTextOrString." | txt | ^(txt := self getHelpTextForID: aSymbol) isNil ifTrue: [aTextOrString] ifFalse: [txt]
getNoHelpForFocus: temps "selects the messages for the case when there is no help for a widget." |noHelpMsg index client focus| focus := temps at: #focus. client := temps at: #focusClient. noHelpMsg := self sourceModel ahsHelpTextForComponent: focus offset: (temps at: #mousePt) client: client. "This client helps to uniquely identify the component" noHelpMsg isNil ifTrue: [noHelpMsg := self defaultWidgetHelpInfoFor: #ahsNoHelpFor state: #default className: self sourceModel class fullName]. noHelpMsg isNil ifTrue: [^'']. "Replace the special sequence %s with the id" index := noHelpMsg findString: '%s' startingAt: 1. index ~= 0 ifTrue: [noHelpMsg := noHelpMsg copyReplaceFrom: index to: index + 1 with: (focus ahsID asText allBold)]. ^noHelpMsg
helpFor: aVisComp temps: temps "Answer the help, whether it's a block or MessageSend to execute, an Array, a Text, or nil" |help ahsID ahsState helpKey stateArray client openEditorBlock | client := self currentSource: temps. ahsID := aVisComp ahsID. ahsState := aVisComp ahsStateAt: (temps at: #mousePt). stateArray := self class stateToArrayWithDefault: ahsState. "Check to see if we should open a widget help editor" (openEditorBlock := self openEditorBlockForVisualComponent: aVisComp temps: temps) notNil ifTrue: [^openEditorBlock]. self extendedHelpRequestIsActive ifTrue: [ "stateArray is an array of states in order of preference" "First ask the source model" help := self sourceModel ahsOutlineLinkForComponent: aVisComp offset: (temps at: #mousePt) client: client. (help isNil and: [self haveStorageManager]) ifTrue: [stateArray detect: [:sym | help isNil ifTrue: [help := self currentHelpCache outlineLinkForID: ahsID state: sym className: client class fullName]. help notNil] ifNone: []]. help notNil ifTrue: [ "If help first starts with a $#, then it's a message selector for custom behavior" help first first == $# ifTrue: [^self messageSendForReceiver: client selector: (help first copyFrom: 2 to: help first size) asSymbol id: ahsID state: ahsState] ifFalse: [ self canOpenOutliner ifTrue: [ ^[self outliner openOutlineNamed: help first topicNumber: (help at: 2) modal: self applicationWindow isModalDialog]]]]]. "ahsState is an array of states in order of preference" helpKey := Array with: ahsID with: ahsState. help := self sourceModel ahsHelpTextForComponent: aVisComp offset: (temps at: #mousePt) client: client. (help isNil and: [self haveStorageManager]) ifTrue: [stateArray detect: [:sym | helpKey := Array with: ahsID with: sym. help := self currentHelpCache helpTextForID: ahsID state: sym className: client class fullName. help notNil] ifNone: []]. ^help notNil ifTrue: [Array with: client with: helpKey with: help]
helpText: aText focus: aWidget id: id state: state client: client "Update the help text, using aWidget (which can be nil) as the balloon focus, the id and state and are passed to the source model to give it a chance to override the text, and client is used " |locText| locText := self sourceModel ahsHelpRequest: aText widgetID: id state: state client: client. locText isNil ifTrue: [^nil]. "vetoed by the sourceModel" self helpText: locText focus: aWidget state: state. ^locText
helpText: aTextOrAHSTextBinder focus: aWidget state: ahsState "Change the help text without letting the source model override, and use aWidget as the focus for balloon help" | fullText | (self changeOccurredInWidget: aWidget state: ahsState) ifFalse: [^self]. fullText := AHSUtils deepCopyOfText: aTextOrAHSTextBinder fullText. lastFocus := aWidget. lastState := aWidget isNil ifFalse: [ahsState]. AHSWHCGlobalHelp broadcastHelp: fullText. self showBalloon: aTextOrAHSTextBinder on: aWidget. self widgetHelpEnabled ifTrue: [ (AHSUtils text: helpText value equals: fullText) not ifTrue: [helpText value: fullText]].
menuItemSelected: menuButtonView label: aString "A menu item has been selected in a menu of menuButtonView. menuButtonView is in a window whose application has the receiver as its AHSHelpProcessor. Check for and process help for this menu item" self menuItemSelected: menuButtonView label: aString focus: menuButtonView
menuItemSelected: menuButtonView label: aString focus: menuView "A menu item has been selected in a menu of menuButtonView. menuButtonView is in a window whose application has the receiver as its AHSHelpProcessor. Check for and process help for this menu item" | client id helpData | self helpEnabled ifFalse: [^self]. client := self findClientFor: menuButtonView. id := self findItemIDFor: menuButtonView. helpData := self findMenuItemHelpDataFor: aString client: client id: id. helpData notNil ifTrue: [self helpText: helpData value focus: menuView id: id state: helpData key client: client]
messageSendForReceiver: rcvr selector: sel id: id state: state ^[Object messageNotUnderstoodSignal handle: [:ex | Dialog warn: rcvr printString , ': ' , ex errorString] do: [ |numberOfParameters| numberOfParameters := sel occurrencesOf: $:. numberOfParameters = 0 ifTrue: [rcvr perform: sel]. numberOfParameters = 1 ifTrue: [rcvr perform: sel with: id]. numberOfParameters = 2 ifTrue: [rcvr perform: sel with: id with: state]]]
openEditorBlockForVisualComponent: aVisComp temps: temps "Answer a block to open a widget help editor or nil if not appropriate" ^nil
pollCompCollection: aSeqColl temps: temps "Check to see if we need to display help information by polling the collection of VisualComponents in aSeqColl. Answer the help or nil" |i help mousePt| mousePt := temps at: #mousePt. i := aSeqColl size. [i >= 1] whileTrue: [|component| component := aSeqColl at: i. (self component: component containsMousePosition: mousePt) ifTrue: [|client cmpHelp| (client := component ahsClient) notNil ifTrue: [self pushSource: client temps: temps]. component ahsID notNil ifTrue: [temps at: #focus put: component; at: #focusClient put: (self currentSource: temps). help := self helpFor: component temps: temps]. "Check for a single component before checking for multiple components. Assumption is component is 'distinguished', taking priority over a collection of components" component ahsHasComponent ifTrue: [cmpHelp := self pollCompCollection: (Array with: component component) temps: temps] ifFalse: [component ahsHasComponents ifTrue: [cmpHelp := self pollCompCollection: component components temps: temps]]. client notNil ifTrue: [self popSource: temps]. cmpHelp notNil ifTrue: [^cmpHelp]. help notNil ifTrue: [^help]]. i := i - 1]. ^nil
pollForHelp "Check to see if we need to display help information" ScheduledControllers inActiveControllerProcess ifTrue: [self processPollForHelpEvent] ifFalse: [ "can assume the window is _not_ event driven" Object errorSignal handle: [:ex | Transcript show: 'error handled in AHSWHCProcessor>pollForHelp'; cr; show: ex errorString; cr; cr. ex return] do: [self isEventPending ifTrue: [^self]. self applicationWindow sensor addMetaInput: #block-> (MessageSend receiver: self selector: #processPollForHelpEvent)]]
popSource: temps |sourceStack| sourceStack := temps at: #sourceStack. ^sourceStack isEmpty ifFalse: [sourceStack removeLast]
processPollForHelpEvent "Check to see if we need to display help information" | win help mousePt temps focus | win := self applicationWindow. temps := Dictionary new. mousePt := temps at: #mousePt put: (self didFocusChange ifTrue: [self currentConsumerPosition] ifFalse: [win sensor cursorPoint]). "window-relative coordinates" self resetFocusChanged. (win isOpen and: [win isActive and: [win bounds containsPoint: mousePt]]) ifFalse: [^self]. self toggleBubbleRequestIsActive ifTrue: [self resetToggleBubbleRequest. ^self balloonHelpEnabled: self balloonHelpEnabled not]. temps at: #sourceStack put: OrderedCollection new. help := self pollCompCollection: (Array with: win) temps: temps. self resetExtendedHelpRequest; resetEditHelpRequest. (#(#AHSPBlock #BlockClosure #MessageSend) includes: help class name) ifTrue: [^help value]. focus := temps at: #focus. focus isNil ifTrue: ["only happens if the mouse gets outside of the window" ^self]. self helpEnabled ifTrue: [help isNil ifTrue: [self helpText: (self getNoHelpForFocus: temps) focus: focus id: #ahsNoHelpFor state: #default client: self sourceModel] ifFalse: ["Assume help is #(client lookupKey text)" self helpText: (help at: 3) focus: focus id: (help at: 2) first state: ((help at: 2) at: 2) client: help first]]
pushSource: aModel temps: temps |sourceStack| sourceStack := temps at: #sourceStack. sourceStack addLast: aModel
</methods> <methods> VWHelp.AHSWHCProcessor <category>initialize-release</category>
initialize "Initialize the help processor to default values" helpText := String new asValue. self helpEnabledModel onChangeSend: #helpEnabledChanged to: self. self widgetHelpEnabledModel onChangeSend: #helpEnabledChanged to: self.
</methods> <methods> VWHelp.AHSWHCProcessor <category>finalization</category>
executor ^nil
</methods> <methods> VWHelp.AHSWHCProcessor <category>change messages</category>
helpEnabledChanged "The global 'help enabled' flag has changed state. Respond accordingly." self applicationWindow isNil ifTrue: [^self]. (self helpEnabled and: [self widgetHelpEnabled]) ifTrue: [self helpText value: ''] ifFalse: [self applyHelpOffText]
</methods> <methods> VWHelp.AHSWHCProcessor class <category>updating</category>
update: anAspectSymbol anAspectSymbol == #ElementExpired ifTrue: [TmpStorage removeAllSuchThat: [:elm | elm first includes: 0]]
</methods> <methods> VWHelp.AHSWHCProcessor class <category>resources</category>
reducedHelpIcon ^OpaqueImage figure: self reducedHelpImage shape: self reducedHelpMask
reducedHelpWindowIcon ^(Icon figure: self reducedHelpImage shape: self reducedHelpMask) cleanFigure
</methods> <methods> VWHelp.AHSWHCProcessor class <category>default classes</category>
eventDispatcherClass ^AHSWHCEventDispatcher
outlinerClass ^#{AHSOutlineViewer} valueOrDo: [nil]
storageManagerClass "Answer the default class to use for the help storage manager class" ^#{AHSStorageManager} valueOrDo: [nil]
windowSensorClass ^AHSWHCWindowSensor
</methods> <methods> VWHelp.AHSWHCProcessor class <category>class accessing</category>
ahsIcon "UIMaskEditor new openOnClass: self andSelector: #ahsIcon" ^AHSIcon
balloon self balloonHelpEnabled not ifTrue: [^nil]. (Balloon isNil or: [Balloon key isNil]) ifTrue: ["Regenerate the balloon on image start up." self createBalloon]. ^Balloon
balloonColor ^(ColorValue red: 1.0 green: 1.0 blue: 0.75)
balloonDisplayDelay "Answer the millisecond value to be used to determine how long the mouse must be over a widget before balloon help is displayed." BalloonDisplayDelay isNil ifTrue: [BalloonDisplayDelay := self defaultBalloonDisplayDelay]. ^ BalloonDisplayDelay
balloonDisplayDelay: anInteger "Set the millisecond value to be used to determine how long the mouse must be over a widget before balloon help is displayed." BalloonDisplayDelay := anInteger
balloonHelpEnabled ^BalloonHelpEnabledModel value
balloonHelpEnabled: aBoolean self balloonHelpEnabled ~= aBoolean ifTrue: [self balloonHelpEnabledModel value: aBoolean]
balloonHelpEnabledModel ^BalloonHelpEnabledModel
balloonKillDelay "Answer the millisecond value to be used to determine how long a balloon help window may remain visible in the absence of any help activity." BalloonKillDelay isNil ifTrue: [BalloonKillDelay := self defaultBalloonKillDelay]. ^ BalloonKillDelay
balloonKillDelay: anInteger "Set the millisecond value to be used to determine how long a balloon window may remain visible in the absence of any help activity." BalloonKillDelay := anInteger
cachedBalloonText ^CachedBalloonText
cachedBalloonText: aText ^CachedBalloonText := aText
helpEnabled ^self helpEnabledModel value
helpEnabled: aBoolean self helpEnabled ~= aBoolean ifTrue: [self helpEnabledModel value: aBoolean]
helpEnabledModel ^HelpEnabledModel
registeredMenuView ^RegisteredMenuView
registeredMenuView: aMenuView self balloon notNil ifTrue: [ aMenuView isNil ifTrue: [self hideBalloon] ifFalse: [ Balloon sensor forceActive: aMenuView. self cachedBalloonText: nil]]. ^RegisteredMenuView := aMenuView
restrictBalloonToCondensedText ^RestrictBalloonToCondensedText
restrictBalloonToCondensedText: aBoolean RestrictBalloonToCondensedText := aBoolean
widgetHelpEnabled ^WidgetHelpEnabledModel value
widgetHelpEnabled: aBoolean self widgetHelpEnabled ~= aBoolean ifTrue: [self widgetHelpEnabledModel value: aBoolean]
widgetHelpEnabledModel ^WidgetHelpEnabledModel
</methods> <methods> VWHelp.AHSWHCProcessor class <category>private</category>
createBalloon Balloon := AHSWHCBalloonWindow new. Balloon windowType: #popUp; displayBox: (100 @ 100 extent: 100 @ 100); createSurface
</methods> <methods> VWHelp.AHSWHCProcessor class <category>balloon help</category>
closeBalloon self hideBalloon. Balloon close. Balloon := nil. CachedBalloonText := nil
hideBalloon Object errorSignal handle: [:ex | ] do: [Balloon unmap].
</methods> <methods> VWHelp.AHSWHCProcessor class <category>change messages</category>
balloonHelpEnabledChanged self balloonHelpEnabled ifTrue: [self createBalloon] ifFalse: [self closeBalloon]
helpEnabledChanged (self helpEnabled not and: [self balloonHelpEnabled and: [Balloon notNil]]) ifTrue: [self closeBalloon]
widgetHelpEnabledChanged
</methods> <methods> VWHelp.AHSWHCProcessor class <category>utility</category>
bossInMacHelp "Answer the file-in string to install the Mac help code" "self bossInMacHelp" ^'|fn cxt file| "Try to find the filename in the context stack, which works since we''re in the middle of a file-in" file := ''machelp.bos''. cxt := thisContext. fn := nil. [cxt notNil and: [fn isNil]] whileTrue: [((cxt receiver isKindOf: PeekableStream) and: [cxt receiver respondsTo: #ioConnection]) ifTrue: [fn := cxt receiver ioConnection name] ifFalse: [cxt := cxt sender]]. fn notNil ifTrue: [fn := fn asFilename directory constructString: file. fn asFilename exists ifFalse: [fn := nil]]. fn isNil ifTrue: ["look in current directory" file asFilename exists ifTrue: [fn := file] ifFalse: [ fn := Dialog requestFileName: ''Where is the file machelp.bos?'' default: file version: #mustBeOld ifFail: [nil]]]. fn notNil ifTrue: [ExternalInterface bossIn: fn]!'
install: selector "Get the file-in string from LibraryObjects so it doesn't end up in the customer's image" ^((self respondsTo: #controller) and: [self controller respondsTo: #objectNamed:ifAbsent:]) ifTrue: [self controller objectNamed: selector ifAbsent: [String new]] ifFalse: [String new]
stateToArrayWithDefault: aState "Answer an array of sybols with #default as the last symbol" "aState is <Symbol | (Array of: Symbol)>, and may or may not include #default" ^aState isSymbol ifTrue: [aState = #default ifTrue: [Array with: #default] ifFalse: [Array with: aState with: #default]] ifFalse: [(aState includes: #default) ifTrue: [aState] ifFalse: [aState copyWith: #default]].
</methods> <methods> VWHelp.AHSWHCProcessor class <category>defaults</category>
defaultBalloonDisplayDelay "Answer the default millisecond value to be used to determine how long the mouse must be over a widget before balloon help is displayed." ^500
defaultBalloonKillDelay "Answer the default millisecond value to be used to determine how long a help balloon should remain visible in the absence of any activity.." ^4000
</methods> <methods> VWHelp.AHSWHCProcessor class <category>help enabling</category>
postOpenEnableHelpFor: aModel | helpProc entry | (aModel builder window model ~= aModel and: ["Probably a subcanvas" aModel builder window model builder source ~= aModel]) ifTrue: ["AppModel opened as dialog?" ^self]. entry := TmpStorage detect: [:each | each first first == aModel] ifNone: [nil]. entry isNil ifTrue: [^self]. "Could happen if the #preBuildEnableHelpFor: was not invoked" helpProc := entry at: 2. entry first removeDependent: self. TmpStorage remove: entry. helpProc setWindow: aModel ahsWindow. aModel ahsWindow isEventDriven ifTrue: [| dispatcher | dispatcher := self eventDispatcherClass on: aModel ahsWindow controller. dispatcher helpProcessor: helpProc; dispatchUnknownEvents: aModel ahsWindow controller dispatcher dispatchUnknownEvents. aModel ahsWindow controller dispatcher: dispatcher] ifFalse: ["Set up a replacement sensor, but copy inst vars over so we don't lose metaInput, etc." | newSensor oldSensor | newSensor := self windowSensorClass new helpProcessor: helpProc. oldSensor := aModel ahsWindow sensor. 1 to: newSensor class superclass instSize do: [:i | newSensor instVarAt: i put: (oldSensor instVarAt: i)]. oldSensor become: newSensor]. (helpProc helpEnabled not or: [helpProc widgetHelpEnabled not]) ifTrue: [helpProc applyHelpOffText]. "Work around a VW bug where in an event environment: if a dialog is opened from another dialog it doesn't get the enter event that makes the window the current window. AHS will only display help for Window class>>currentWindow." aModel ahsWindow becomeActive
preBuildEnableHelpFor: aModel "Locate a help processor. If one is not found, create one and add it to TmpStorage. Locating the correct help processor can be rather convoluted - note that this method may be called by both top-level models as well as subcanvases. In addition, this method could be called by nested window openings so that the #postOpen has not yet been performed. In general, do the following: - check to see if the window is defined - if not, create a help processor entry & install in temp storage - if so, try to locate a help processor in the temporary storage - verify by checking aModel builder window model against temp storage values. - if found, use it - if none, then maybe a spurious subcanvas prebuild without an owner, so install 'bogus' mappings into the builder" "This method operates under the premise that if the window is nil it's a top-level build, and if it's non-nil it's a subcanvas build." |helpProc window | (window := aModel ahsWindow) isNil ifTrue: [|array| helpProc := aModel class ahsProcessorClass new. "create an entry in temp storage. Put aModel in a WeakArray so we don't get old AHSWHCProcessor instances hanging around in TmpStorage if we never make it to postOpenEnalbleHelpFor: for some reason. See update: for the finalization procedure. We have to put helpProc in a strong Array so it doesn't expire between now and postBuildEnableHelpFor:" array := Array with: (WeakArray with: aModel) with: helpProc. array first addDependent: self. TmpStorage add: array] ifFalse: [ (helpProc := aModel ahsWindow ahsProcessor) isNil ifTrue: [| entry | entry := TmpStorage detect: [:eachArray | eachArray first first == window model] ifNone: [nil]. entry notNil ifTrue: [helpProc := entry at: 2]]]. aModel builder aspectAt: #ahsFlag put: (helpProc notNil ifTrue: [helpProc helpFlag] ifFalse: [false asValue]); aspectAt: #ahsText put: (helpProc notNil ifTrue: [helpProc helpText] ifFalse: ['No help processor!' asValue]); visualAt: #ahsIcon put: self ahsIcon; subCanvasAt: nil at: #ahsSpec put: self ahsSpec.
</methods> <methods> VWHelp.AHSWHCProcessor class <category>interface specs</category>
ahsSpec "Default to using the text and icon spec." ^self ahsTextAndIconSpec
</methods> <methods> VWHelp.AHSWHCProcessor class <category>instance creation</category>
new ^super new initialize
</methods> <methods> VWHelp.AHSWHCProcessor class <category>class initialization</category>
initialize "self initialize" TmpStorage := OrderedCollection new. AHSIcon := self helpIcon0. "modify this to switch the icon" HelpEnabledModel := AHSWHCWeakValueHolder with: false. HelpEnabledModel onChangeSend: #helpEnabledChanged to: self. BalloonHelpEnabledModel := AHSWHCWeakValueHolder with: false. BalloonHelpEnabledModel onChangeSend: #balloonHelpEnabledChanged to: self. WidgetHelpEnabledModel := AHSWHCWeakValueHolder with: false. WidgetHelpEnabledModel onChangeSend: #widgetHelpEnabledChanged to: self. RestrictBalloonToCondensedText := false. CachedBalloonText := #{Smalltalk.Text} value new. BalloonDisplayDelay := nil. BalloonKillDelay := nil. Balloon := nil
</methods> <methods> VWHelp.AHSWHCBalloonWindow <category>accessing</category>
map "Don't use my parent's implementation since that causes the parent window to become deactivated." self setHostBackgroundColor. self primMap.
parentWindow ^parentWindow
parentWindow: aWindow parentWindow := aWindow
primMap | result | mapStatus := true. result := super primMap. "Work around a VW bug in an event environment: if this window is opened from a dialog it doesn't get the enter event which triggers the parentWindow to become active. So we coerce the parentWindow being made active here. Note that there are extra caveats for when this window is opened from a menu - see AHSWHCBalloonSensor>>enterEvent: for details." self parentWindow becomeActive. ^result
unmap mapStatus := false. ^ super unmap
</methods> <methods> VWHelp.AHSWHCBalloonWindow <category>testing</category>
isMapped ^ mapStatus = true
</methods> <methods> VWHelp.AHSWHCBalloonWindow <category>private</category>
sensorClass "Answer what kind of sensor is preferred for this window" ^AHSWHCBalloonSensor
</methods> <methods> Core.LookupKey <category>Arbor Core adds</category>
aisIsAssociation ^true
</methods> <methods> UI.ScheduledWindow class <category>AHSWHC adds</category>
ahsPredefinedStates "Answer an array of predefined states" ^#()
</methods> <methods> UI.ScheduledWindow <category>AHSWHC adds</category>
ahsActivityPoint "Answer a window-relative point which indicates the location considered active. Windows by themselves don't have such a point." ^0@0
ahsClient ^self model
ahsCursorState "Answer the ahsState value as it applies to the current cursor position." ^self ahsStateAt: self sensor cursorPoint
ahsHasComponent ^true
ahsID ^#ahsBackground
ahsPredefinedStates ^self class ahsPredefinedStates
ahsProcessor "Answer the AHSProcessor or nil if there isn't one" ^Object messageNotUnderstoodSignal handle: [:ex | ex returnWith: nil] do: [self isEventDriven ifTrue: [self controller dispatcher helpProcessor] ifFalse: [self sensor helpProcessor]]
ahsState ^#default
ahsStateAt: aWindowRelativePoint ^self ahsState
container ^nil
</methods> <methods> UI.ScheduledWindow <category>AHSWHC mods</category>
processEvent: anEvent "Dispatch the event to the appropriate method." | type | type := anEvent key. type == #resize ifTrue: [self extentEvent: anEvent value. ^self updateEvent: type]. type == #close ifTrue: [^self controller close]. type == #destroy ifTrue: [^self processDestroyEvent: anEvent value]. type == #doubleClick ifTrue: [^self downcastLocalEvent: type with: nil at: anEvent value from: self]. (type == #collapse or: [type == #exit or: [type == #move]]) ifTrue: [^self updateEvent: type]. type == #eventUnknown ifTrue: [^self unknownEvent: anEvent value]. "AHS: The following code was added to implement #block events" "----- start here -----" anEvent key == #block ifTrue: [anEvent value value]. "----- end here -----"
</methods> <methods> UI.MenuView <category>AHSWHC mods</category>
ahsProcessor "Answer my help processor, if I have one." | tc | ^(((tc := self topComponent) respondsTo: #spawningView) and: [tc spawningView notNil and: [(tc := tc spawningView topComponent) respondsTo: #ahsProcessor]]) ifTrue: [tc ahsProcessor] ifFalse: [nil]
ahsUpdateMenuHelpFor: aMenuItemView "Update the help (if present) to reflect aMenuItemView." | helpProcessor view | (helpProcessor := self ahsProcessor) isNil ifTrue: [^self]. view := self topComponent spawningView. aMenuItemView isNil ifTrue: [helpProcessor menuItemSelected: view label: #default] ifFalse: [| menuView key | menuView := aMenuItemView menuView. key := aMenuItemView menuItem label. [menuView parentMenuItemView isNil] whileFalse: [menuView := menuView parentMenuItemView menuView. key := menuView highlightedMenuItemView model label , '/' , key]. menuView parentMenuBarButtonView notNil ifTrue: [key := menuView parentMenuBarButtonView label text asString, '/', key]. helpProcessor menuItemSelected: view label: key focus: self].
highlightedMenuItemView: aMenuItemView "Set the MenuItemView that is currently highlighted by the user. A parameter of nil indicates no MenuItemView is currently hilighted. MenuItemViews do NOT redisplay on their own initiative, we send them redisplay messages." | helpProc | highlightedMenuItemView == nil ifFalse: [ | theLastHighlightedView | theLastHighlightedView := highlightedMenuItemView. highlightedMenuItemView := nil. theLastHighlightedView resignSelection. theLastHighlightedView redisplay]. highlightedMenuItemView := aMenuItemView. aMenuItemView == nil ifFalse: [ aMenuItemView redisplay. selectedValue := self menu valueForMenuItem: aMenuItemView menuItem]. "-- AHS added: start here --" (helpProc := self ahsProcessor) notNil ifTrue: [ helpProc registeredMenuView: self topComponent. self submenuClosed]. (aMenuItemView notNil or: [(self bounds containsPoint: self controller sensor cursorPoint) not]) ifTrue: [ self ahsUpdateMenuHelpFor: (aMenuItemView isNil ifTrue: [self parentMenuItemView] ifFalse: [aMenuItemView])]. "-- end here --"
mapAndStartup: aWindow "Map the menu window onto the screen and startup the controller." "-- AHS added: start here --" | helpProcessor | helpProcessor := self ahsProcessor. helpProcessor notNil ifTrue: [helpProcessor registeredMenuView: aWindow]. "-- end here --" [aWindow scheduleWindow. aWindow map. self controller startUp] ensure: [self menuWindowRecycle: aWindow. "-- AHS added: start here --" helpProcessor notNil ifTrue: [helpProcessor registeredMenuView: nil]. "-- end here --" parentMenuItemView ifNotNil: [parentMenuItemView menuView submenuClosed. "-- AHS added: start here --" (helpProcessor notNil and: [parentMenuItemView menuView topComponent isOpen]) ifTrue: [helpProcessor registeredMenuView: parentMenuItemView menuView topComponent]. "-- end here --"]. Screen default receiveAndProcessAllEvents]
menuWindowOn: screen in: aRectangle "Answer a window for use in placing the receiver on screen with aRectangle for a displayBox." "There is no protocol to specify what screen you want the window on so the screen parameter must be ignored for now." "Posted menus are required to support keyboard, but popups might not." "-- AHS modified --" ^self supportsKeyboard ifTrue: [(#{AHSWHCTransientWindow} valueOrDo: [TransientWindow]) aPostedMenuIn: aRectangle] ifFalse: [(#{AHSWHCTransientWindow} valueOrDo: [TransientWindow]) aPopUpIn: aRectangle]
noSelectedMenuItem "No MenuItem was fully selected by the user so no selection was made from the menu. This message is sent by the MenuItemView." selectedValue := nil. selectionFinal := true. "-- AHS added: start here --" self ahsUpdateMenuHelpFor: self parentMenuItemView. "-- end here --"
setColorsInMenuWindow: aWindow from: spawningViewOrNil "Set the color preferences for the menu window. If non-nil, spawningViewOrNil is the view that spawned the menu." | thePaintPreferences theBackgroundColor | thePaintPreferences := (parentMenuItemView == nil ifTrue: [| widgetPolicyView | "The nil check is here to support the backward compatibility of the openAt: message." widgetPolicyView := spawningViewOrNil == nil ifTrue: [aWindow] ifFalse: [spawningViewOrNil]. widgetPolicyView paintPreferences] ifFalse: [parentMenuItemView paintPreferences]). aWindow paintPreferences: thePaintPreferences. theBackgroundColor := model backgroundColor. theBackgroundColor == nil ifTrue: [ theBackgroundColor := thePaintPreferences matchAt: self primarySymbolicBackground]. aWindow background: theBackgroundColor. "-- AHS added: start here" (aWindow respondsTo: #spawningView:) ifTrue: [ spawningViewOrNil = self parentMenuItemView ifTrue: [| tc | ((tc := self parentMenuItemView menuView topComponent) respondsTo: #spawningView) ifTrue: [aWindow spawningView: tc spawningView] ifFalse: [aWindow spawningView: nil]] ifFalse: [aWindow spawningView: spawningViewOrNil]]. "-- end here --"
</methods> <methods> UI.BooleanWidgetView class <category>AHSWHC adds</category>
ahsPredefinedStates ^#(on)
</methods> <methods> UI.BooleanWidgetView <category>AHSWHC adds</category>
ahsState ^self isSelected ifTrue: [#on] ifFalse: [#default]
</methods> <methods> UI.ApplicationModel class <category>AHSWHC adds</category>
ahsProcessorClass "To enable the Arbor Help System for the receiver, either override this method and answer a specific class to use (typically AHSWHCProcessor or a subclass), or override the arborHelpEnabled method to answer true." ^self arborHelpEnabled ifTrue: [(#{AHSUtils} valueOrDo: [^nil]) defaultHelpProcessorClass] ifFalse: [nil]
arborHelpEnabled "Answer true if the Arbor Help System is to be enabled for this application. The default is false." ^false
</methods> <methods> UI.ApplicationModel <category>AHSWHC adds</category>
ahsHelpRequest: aText widgetID: id state: state client: client "Hook to give the window's application model a chance to override help AFTER the help system has done its normal lookup. Arbor Help System is about to display the help aText in either a text widget or balloon. id and state were used to lookup aText in the help associated with client, which is this application model or a subcanvas' application model. This is the application model's chance to veto or modify the help. Answer nil to prevent the help from being displayed (in which case the help text widget will not be touched), or answer a Text object, either aText or a different one to be displayed instead. The default is to answer aText" ^aText
ahsHelpTextForComponent: aVisualComponent offset: aPoint client: client "Hook to give the top application model a chance to override the lookup of help. If answers a Text, then will use that text instead of the normal help system lookup. client is the applicationModel that defines aVisualComponent, and aPoint is the 'interesting' location offset from the component's origin. aVisualComponent is guaranteed to answer a non-nil ahsID. The application model has the option of overriding this method or ahsHelpTextForID:state:client:." "The default implementation is to iterate over the states calling ahsHelpTextForID:state:client:, defaulting to #default" |ahsState stateArray helpText | ahsState := aVisualComponent ahsStateAt: aPoint. stateArray := #{VWHelp.AHSWHCProcessor} value stateToArrayWithDefault: ahsState. stateArray do: [:state | helpText := self ahsHelpTextForID: aVisualComponent ahsID state: state client: client. helpText notNil ifTrue: [^helpText]]. ^nil
ahsHelpTextForID: id state: state client: client "Hook to give the top application model a chance to override the lookup of help. If answers a Text, then will use that text instead of the normal help system lookup" "The application model has the option of overriding this method or ahsHelpTextForComponent:client:" ^nil
ahsOutlineLinkForComponent: aVisualComponent offset: aPoint client: client "Hook to give the top application model a chance to override the lookup of help. If answers an outline link, then will use that instead of the normal help system lookup. The application model has the option of overriding this method or ahsOutlineLinkForID:state:client:. An outline link is of the form <Array with: String with: (nil | Integer)>. The first String is either an outline name or, if it's a Symbol, will be interpreted as a message selector for custom F1 behavior." "The default implementation is to iterate over the states calling ahsOutlineLinkForID:state:client:, defaulting to #default" |ahsState stateArray link | ahsState := aVisualComponent ahsStateAt: aPoint. stateArray := #{VWHelp.AHSWHCProcessor} value stateToArrayWithDefault: ahsState. stateArray do: [:state | link := self ahsOutlineLinkForID: aVisualComponent ahsID state: state client: client. link notNil ifTrue: [^link]]. ^nil
ahsOutlineLinkForID: id state: state client: client "Hook to give the top application model a chance to override the lookup of help. If answers an outline link, then will use that instead of the normal help system lookup" "The application model has the option of overriding this method or ahsOutlineLinkForComponent:client:" "An outline link is of the form <Array with: String with: (nil | Integer)>. The first String is either an outline name or, if it's a Symbol, will be interpreted as a message selector for custom F1 behavior" ^nil
ahsWindow ^self builder isNil ifTrue: [nil] ifFalse: [self builder window]
</methods> <methods> UI.ApplicationModel <category>AHSWHC mods</category>
postOpenWith: aBuilder "This message is sent by the builder after it has opened a completed window." ^self messageNotUnderstoodSignal handle: [:ex | ex parameter selector == #ahsProcessorClass ifTrue: [ex return] ifFalse: [ex reject]] do: [ |hlpClass| (hlpClass := self class ahsProcessorClass) notNil ifTrue: [hlpClass postOpenEnableHelpFor: self]]
preBuildWith: aBuilder "This message is sent by the builder prior to beginning construction of either a SubCanvas or a complete window." ^self messageNotUnderstoodSignal handle: [:ex | ex parameter selector == #ahsProcessorClass ifTrue: [ex return] ifFalse: [ex reject]] do: [ |hlpClass| (hlpClass := self class ahsProcessorClass) notNil ifTrue: [hlpClass preBuildEnableHelpFor: self]]
</methods> <methods> UI.ApplicationModel <category>AHSWHC adds</category>
widgetWithID: aSymbol ^self builder componentAt: aSymbol
</methods> <methods> UI.ToggleButtonController <category>AHSWHC mods</category>
pressAction "Do the action associated with pressing the button." view isEnabled ifFalse: [^self]. self requestValueChange ifTrue: [| rv | ((rv := view getReferenceValue) == nil or: [rv isKindOf: Boolean]) ifTrue: [model value == nil ifTrue: [model value: true] ifFalse: [model value: model value not]] ifFalse: [model value: rv]. self valueChange. "-- AHS added: start here --" "Must check for nil in case this button closes the window" (self view notNil and: [self view topComponent respondsTo: #ahsProcessor]) ifTrue: [ |helpProc| helpProc := self view topComponent ahsProcessor. helpProc notNil ifTrue: [helpProc focusChanged]]. "-- end here --" self view invalidate]
</methods> <methods> Core.Object <category>Arbor Core adds</category>
aisIsAssociation ^false
</methods> <methods> UI.MenuBarWrapper class <category>AHSWHC adds</category>
ahsPredefinedStates "Answer an array of predefined states" ^#()
</methods> <methods> UI.MenuBarWrapper <category>AHSWHC adds</category>
ahsID ^#menuBar
ahsStateAt: aWindowRelativePoint | borderedWrapper | borderedWrapper := self component hitDetect: (self component globalPointToLocal: aWindowRelativePoint). ^borderedWrapper isNil ifTrue: [#default] ifFalse: [ |menuBarButtonView| menuBarButtonView := borderedWrapper component. menuBarButtonView label text asSymbol]
</methods> <methods> UI.View <category>AHSWHC adds</category>
ahsCursorState "Answer the ahsState value as it applies to the current cursor position." ^self ahsStateAt: (self localPointToGlobal: self controller sensor cursorPoint)
</methods> <methods> UI.ComboBoxSpec <category>AHSWHC adds</category>
ahsStateAt: aWidgetRelativePoint for: aComboBoxView |val| val := aComboBoxView editor model value. ^(val isNil or: [val displayString isEmpty]) ifTrue: [#default] ifFalse: [val displayString asSymbol]
</methods> <methods> UI.SequenceController <category>AHSWHC mods</category>
processKeyboardEvent: anEvent [| event keyValue | event := anEvent. keyboardHook isNil ifFalse: [event := keyboardHook value: event value: self]. event isNil ifTrue: [^self]. (keyboardProcessor isBackTab: anEvent) ifTrue: [view triggerEvent: #backTabbed. ^keyboardProcessor prevFieldFrom: self]. keyValue := event keyValue. (keyValue isKindOf: Character) ifFalse: [keyValue == #Down ifTrue: [^self selectTheNext]. keyValue == #Up ifTrue: [^self selectThePrev]. keyValue == #Left ifTrue: [^self selectTheHPrev]. keyValue == #Right ifTrue: [^self selectTheHNext]. keyValue == #PageDown ifTrue: [^self selectNextPage]. keyValue == #PageUp ifTrue: [^self selectPrevPage]. keyValue == #Home ifTrue: [^self selectTheFirst]. keyValue == #End ifTrue: [^self selectTheLast]. ^self]. keyValue == Character tab ifTrue: [view triggerEvent: #tabbed. ^keyboardProcessor nextFieldFrom: self]. keyValue == Character cr ifTrue: [keyboardProcessor focusIsShifting: true. self selectTarget. keyboardProcessor focusIsShifting ifTrue: [keyboardProcessor doDefaultAction]. keyboardProcessor focusIsShifting: false. ^self]. keyValue == Character space ifTrue: [^self pressActionWithEvent: event]. self searchChar: keyValue] ensure: [ "AHS: Added" "-- start here --" (self view notNil and: [self view topComponent respondsTo: #ahsProcessor]) ifTrue: [|helpProc| helpProc := self view topComponent ahsProcessor. helpProc notNil ifTrue: [helpProc focusChanged]] "-- end here --"]
toggleTarget | index | searchString := nil. index := view targetIndex. index = view zeroIndex ifTrue: [^self]. self requestValueChange ifTrue: [ self toggleAt: index. self valueChange. "AHS added: start here" (self view notNil and: [self view topComponent respondsTo: #ahsProcessor]) ifTrue: [|helpProc| helpProc := self view topComponent ahsProcessor. helpProc notNil ifTrue: [helpProc focusChanged]]. "end here"]
</methods> <methods> UI.RadioButtonSpec class <category>AHSWHC adds</category>
ahsPredefinedStates ^#(disabled on)
</methods> <methods> UI.RadioButtonSpec <category>AHSWHC adds</category>
ahsStateAt: aWidgetRelativePoint for: aRadioButtonView ^aRadioButtonView isSelected ifTrue: [#on] ifFalse: [#default]
</methods> <methods> Graphics.VisualComponent class <category>AHSWHC adds</category>
ahsPredefinedStates "Answer the state symbols, other than #default, that are predefined for this type of widget" ^#()
</methods> <methods> Graphics.VisualComponent <category>AHSWHC adds</category>
ahsActivityPoint "Answer a window-relative point which indicates the location in the widget that is considered active. This value may be used when performing help lookup due to keyboard activity rather than mouse activity." ^self localPointToGlobal: self bounds origin
ahsClient "Answer the object used as a source for getting help information. The client's class is used as a key for real-time help storage" ^nil
ahsCursorState "Answer the ahsState value as it applies to the current cursor position." ^self ahsStateAt: (self localPointToGlobal: 0@0)
ahsHasComponent "Answer whether I have a distinguished component that I can answer with the message #component" ^false
ahsHasComponents "Answer whether I have components that I can answer with the message #components" ^false
ahsID "Answer a Symbol used to identify the receiver for purposes of looking up help info. Answer nil if no help can be associated with the receiver" ^nil
ahsPredefinedStates "Answer the state symbols, other than #default, that are predefined for this type of widget" ^self class ahsPredefinedStates
ahsState "See #ahsStateAt:" ^#default
ahsStateAt: aWindowRelativePoint "Answer a Symbol that denotes the state of the receiver with respect to aWindowRelativePoint, a point that is window-relative. Alternatively, answer an array of symbols that denote multiple states, given in the order of preference, as in the case of tables" ^self ahsState
</methods> <methods> UI.TextEditorView <category>AHSWHC adds</category>
ahsID "Override ComposedTextView, since my SpecWrapper handles the id" ^nil
preferredBounds "The preferred bounds really should include the inset area (which is always subtracted from the clipping box before displaying)." | box | box := displayContents preferredBounds expandedBy: self paragraphInset. ^box translatedBy: box origin negated
</methods> <methods> UI.SequenceViewSpec class <category>AHSWHC adds</category>
ahsPredefinedStates ^#(disabled empty)
</methods> <methods> UI.SequenceViewSpec <category>AHSWHC adds</category>
ahsStateAt: aWidgetRelativePoint for: aSequenceView | index | aSequenceView sequence isEmpty ifTrue: [^#empty]. (aSequenceView bounds containsPoint: aWidgetRelativePoint) ifFalse: [^#default]. index := aSequenceView elementIndexFor: aWidgetRelativePoint. ^(aSequenceView sequence size >= index) ifTrue: [(aSequenceView displayStringAt: index) asSymbol] ifFalse: [#default]
</methods> <methods> UI.DataSetSpec <category>AHSWHC adds</category>
ahsStateAt: aWidgetRelativePoint for: aDataSetView |index | "To change so that the state is directed by the cursor and not the selection, substitute the following to determine the index:" "(aDataSetView containsPoint: aWidgetRelativePoint) ifFalse: [^#default]. index := aDataSetView cellIndexFor: aWidgetRelativePoint. ^Array with: index printString asSymbol with: (0 @ index y) printString asSymbol with: (index x @ 0) printString asSymbol" index := aDataSetView editCell. ^index isNil ifTrue: [#default] ifFalse: [Array with: index printString asSymbol with: (0 @ index y) printString asSymbol with: (index x @ 0) printString asSymbol]
</methods> <methods> UI.SelectionView <category>AHSWHC adds</category>
ahsActivityPoint "Answer a window-relative point which indicates the location in the widget that is considered active. This value may be used when performing help lookup due to keyboard activity rather than mouse activity." ^self targetIndex = self zeroIndex ifTrue: [super ahsActivityPoint] ifFalse: [self localPointToGlobal: (self boundsOfElementIndex: self targetIndex inBounds: self bounds) origin]
</methods> <methods> UI.NoteBookSpec class <category>AHSWHC adds</category>
ahsPredefinedStates ^#(disabled defaultRight defaultBottom)
</methods> <methods> UI.NoteBookSpec <category>AHSWHC adds</category>
ahsStateAt: aWidgetRelativePoint for: aNoteBookComposite | index local | local := aNoteBookComposite rightTabBar globalPointToLocal: (aNoteBookComposite localPointToGlobal: aWidgetRelativePoint). (aNoteBookComposite rightTabBar containsPoint: local) ifTrue: [ index := aNoteBookComposite rightTabBar elementIndexFor: local. ^(index between: 1 and: aNoteBookComposite rightTabBar numberOfElements) ifTrue: [(aNoteBookComposite rightTabBar displayStringAt: index) asSymbol] ifFalse: [#defaultRight]]. local := aNoteBookComposite bottomTabBar globalPointToLocal: (aNoteBookComposite localPointToGlobal: aWidgetRelativePoint). (aNoteBookComposite bottomTabBar containsPoint: local) ifTrue: [ index := aNoteBookComposite bottomTabBar elementIndexFor: local. ^(index between: 1 and: aNoteBookComposite bottomTabBar numberOfElements) ifTrue: [(aNoteBookComposite bottomTabBar displayStringAt: index) asSymbol] ifFalse: [#defaultBottom]]. self majorTabsOnRight ifTrue: [((index := aNoteBookComposite rightTabBar selectionIndex) isZero not "index can be 1 but the sequence can still be empty" and: [aNoteBookComposite rightTabBar sequence isEmpty not]) ifTrue: [^(aNoteBookComposite rightTabBar displayStringAt: index) asSymbol]] ifFalse: [((index := aNoteBookComposite bottomTabBar selectionIndex) isZero not "index can be 1 but the sequence can still be empty" and: [aNoteBookComposite bottomTabBar sequence isEmpty not]) ifTrue: [^(aNoteBookComposite bottomTabBar displayStringAt: index) asSymbol]]. ^#default
</methods> <methods> UI.ComposedTextView <category>AHSWHC adds</category>
ahsID ^#value
</methods> <methods> Core.String <category>AHSWHC adds</category>
condensedText "Make myself protocol-compatible with AHSTextBinder." ^self asText condensedText
fullText "Make myself protocol-compatible with AHSTextBinder." ^self asText fullText
hasCondensedText "Make myself protocol-compatible with AHSTextBinder." ^false
trimExteriorBlanks | size index space | (size := self size) == 0 ifTrue: [^self]. index := 1. space := Character space. [(self at: index) = space] whileTrue: [ index = size ifTrue: [^'']. index := index + 1]. [(self at: size) = space] whileTrue: [ index = size ifTrue: [^'']. size := size - 1]. ^self copyFrom: index to: size
</methods> <methods> UI.NamedSpec class <category>AHSWHC adds</category>
ahsPredefinedStates ^#(disabled)
</methods> <methods> UI.NamedSpec <category>AHSWHC adds</category>
ahsID ^self name
ahsPredefinedStates "Answer an array of predefined states" ^ self class ahsPredefinedStates
ahsStateAt: aWidgetRelativePoint for: aVisualPart "Answer a Symbol identifying the state of the receiver for the purposes of looking up context-sensitive help" ^#default
</methods> <methods> UI.MenuButtonSpec <category>AHSWHC adds</category>
ahsStateAt: aWidgetRelativePoint for: aMenuButtonView ^aMenuButtonView label isNil ifTrue: [#default] ifFalse: [self hasCharacterOrientedLabel ifTrue: [aMenuButtonView label text isEmpty ifTrue: [#default] ifFalse: [aMenuButtonView label text asSymbol]] ifFalse: [#default]]
</methods> <methods> UI.SpecWrapper <category>AHSWHC adds</category>
ahsID ^self spec ahsID
ahsPredefinedStates "Answer an array of predefined states" ^self spec class ahsPredefinedStates
ahsStateAt: aWindowRelativePoint ^self isEnabled ifTrue: [self spec ahsStateAt: (self component globalPointToLocal: aWindowRelativePoint) for: self widget] ifFalse: [#disabled]
</methods> <methods> UI.SubCanvas <category>AHSWHC adds</category>
ahsClient ^client
aisClient ^client
aisClient: anAppModel client := anAppModel.
</methods> <methods> Core.Text <category>AHSWHC adds</category>
condensedText "Make myself protocol-compatible with AHSTextBinder." ^self
fullText "Make myself protocol-compatible with AHSTextBinder." ^self
hasCondensedText "Make myself protocol-compatible with AHSTextBinder." ^false
</methods> <methods> UI.RadioButtonController <category>AHSWHC mods</category>
pressAction "Do the action associated with pressing the button." view isEnabled ifFalse: [^self]. self requestValueChange ifTrue: [| referenceValue | referenceValue := view getReferenceValue. referenceValue = model value ifFalse: [model value: referenceValue]. self valueChange. "-- AHS added: start here --" "Must check for nil in case this button closes the window" (self view notNil and: [self view topComponent respondsTo: #ahsProcessor]) ifTrue: [|helpProc| helpProc := self view topComponent ahsProcessor. helpProc notNil ifTrue: [helpProc focusChanged]]. "-- end here --"]
</methods> <methods> UI.BorderDecorator <category>AHSWHC adds</category>
ahsHasComponent ^true
</methods> <methods> Graphics.CompositePart <category>AHSWHC adds</category>
ahsHasComponents ^true
</methods> <methods> UI.MenuItem class <category>AHSWHC adds</category>
ahsPredefinedStates "Support for ToolBars (who, for some oddball reason, have a MenuItem in the SpecWrapper spec inst var)" ^#()
</methods> <methods> UI.MenuItem <category>AHSWHC adds</category>
ahsID "Support for ToolBars (who, for some oddball reason, have a MenuItem in the SpecWrapper spec inst var)" ^self nameKey isNil ifTrue: [self label asSymbol] ifFalse: [self nameKey asSymbol]
ahsStateAt: aWidgetRelativePoint for: aVisualPart "Support for ToolBars (who, for some oddball reason, have a MenuItem in the SpecWrapper spec inst var)" ^#default
</methods> <methods> UI.TableView <category>AHSWHC adds</category>
ahsActivityPoint "Answer a window-relative point which indicates the location in the widget that is considered active. This value may be used when performing help lookup due to keyboard activity rather than mouse activity." ^self targetIndex = self zeroIndex ifTrue: [super ahsActivityPoint] ifFalse: [self localPointToGlobal: (self boundsOfElementIndex: self targetIndex inBounds: self bounds) origin]
</methods> <methods> UI.CheckBoxSpec class <category>AHSWHC adds</category>
ahsPredefinedStates ^#(disabled on)
</methods> <methods> UI.CheckBoxSpec <category>AHSWHC adds</category>
ahsStateAt: aWidgetRelativePoint for: aCheckBoxView ^aCheckBoxView isSelected ifTrue: [#on] ifFalse: [#default]
</methods> <methods> UI.TriggerButtonController <category>AHSWHC mods</category>
pressAction view isEnabled ifFalse: [^self]. self requestValueChange ifTrue: [model value: model value not. self valueChange. "-- AHS added: start here --" "Must check for nil in case this button closes the window" (self view notNil and: [self view topComponent respondsTo: #ahsProcessor]) ifTrue: [ |helpProc| helpProc := self view topComponent ahsProcessor. helpProc notNil ifTrue: [helpProc focusChanged]]. "-- end here --"]
</methods> <methods> Core.SharedQueue <category>AHSWHC adds</category>
conform: aBlock "Answer true if aBlock evaluates to true for each element. Answer false as soon as aBlock evaluates to false for any element" ^[accessProtect critical: [contents do: [:each | (aBlock value: each) ifFalse: [^false]]. true]] valueUninterruptably
</methods> <methods> UI.KeyboardProcessor <category>AHSWHC mods</category>
setActive: aController currentConsumer == aController ifTrue: [^self]. (currentConsumer == nil or: [currentConsumer = 0]) ifFalse: [currentConsumer deactivate]. self setCurrentConsumer: aController. currentConsumer == nil ifFalse: [currentConsumer activate]. "-- AHS added: start here --" (aController notNil and: [aController view isOpen and: [aController view topComponent respondsTo: #ahsProcessor]]) ifTrue: [| helpProc | helpProc := aController view topComponent ahsProcessor. helpProc notNil ifTrue: [helpProc focusChanged]] "-- end here --"
</methods> <methods> UI.ApplicationWindow <category>AHSWHC adds</category>
ahsClient ^self model builder source
</methods> <methods> UI.ApplicationWindow <category>AHSWHC mods</category>
processEvent: anEvent "The following has proved to be helpful when debugging this code: | w1 a1 | (w1 := ApplicationWindow new) sendWindowEvents: #(#bounds #resize #enter #exit #close #collapse #expand #reopen #hibernate #release); application: (a1 := ApplicationModel new). ApplicationWindow new receiveWindowEvents: #(#bounds #resize #enter #exit #close #collapse #expand #reopen #hibernate #release); windowEventBlock: [:x :y :z | Transcript cr; show: y printString]; application: a1. w1 open" | type | (anEvent isKindOf: Event) ifTrue: [^self]. type := anEvent key. type == #resize ifTrue: [self extentEvent: anEvent value. self updateEvent: type]. (type == #collapse or: [type == #exit or: [type == #move]]) ifTrue: [self updateEvent: type]. type == #close ifTrue: [self controller closeNoTerminate. "The closeNoTerminate will report the event if closing really happens." ^self]. type == #destroy ifTrue: [self processDestroyEvent: anEvent value]. type == #enter ifTrue: [(activationNotification == true and: [component notNil]) ifTrue: [component downcastEvent: #activate with: nil from: self]]. type == #exit ifTrue: [(activationNotification == true and: [component notNil]) ifTrue: [component downcastEvent: #deactivate with: nil from: self]]. type == #doubleClick ifTrue: [self downcastLocalEvent: type with: nil at: anEvent value from: self]. type == #eventUnknown ifTrue: [self unknownEvent: anEvent value]. "AHS: The following code was added to implement #block events" "----- start here -----" anEvent key == #block ifTrue: [anEvent value value]. "----- end here -----" self reportWindowEvent: type with: anEvent value
</methods> <methods> UI.TableViewSpec <category>AHSWHC adds</category>
ahsStateAt: aWidgetRelativePoint for: aTableView | index | (aTableView containsPoint: aWidgetRelativePoint) ifFalse: [^#default]. index := aTableView elementIndexFor: aWidgetRelativePoint. ^index = Point zero ifTrue: [#default] ifFalse: [self selectionStyle == #row ifTrue: [Array with: index printString asSymbol with: (0 @ index y) printString asSymbol with: (index x @ 0) printString asSymbol] ifFalse: [Array with: index printString asSymbol with: (index x @ 0) printString asSymbol with: (0 @ index y) printString asSymbol]]
</methods> <methods> Graphics.Wrapper <category>AHSWHC adds</category>
ahsHasComponent ^true
</methods> <methods> VWHelp.AHSWHCProcessor class <category>resources</category>
helpIcon0 "UIMaskEditor new openOnClass: self andSelector: #helpIcon0" <resource: #image> ^CachedImage on: (Image extent: 32@32 depth: 4 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 11) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 3 put: (ColorValue scaledRed: 7645 scaledGreen: 7645 scaledBlue: 7645); at: 4 put: (ColorValue scaledRed: 3276 scaledGreen: 3276 scaledBlue: 8191); at: 5 put: (ColorValue scaledRed: 3276 scaledGreen: 3276 scaledBlue: 6135); at: 6 put: (ColorValue scaledRed: 6553 scaledGreen: 6553 scaledBlue: 6553); at: 7 put: ColorValue white; at: 8 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 8191); at: 9 put: ColorValue lightGray; at: 10 put: ColorValue blue; at: 11 put: (ColorValue scaledRed: 3276 scaledGreen: 1638 scaledBlue: 8191); yourself)) usingBits: (ByteArray fromPackedString: '&Y&Y&Y$@@@@@@@@I&Y&Y&Y&Y&Y$@A&Y&Y&X@@@"H"I&Y&Y$@A&Y&Y&Y&Y @@BH"Y&Y&PA&Y&Y&Y&Y&Y&@@BI&Y&Y$FY&Y @@A&Y&Y&@@"Y&Y&PA&Y&@@@@A&Y&Y @I^Y&Y$FY&X@BH @A&Y&Y @I&Y&XA&Y&X@Y"@@Y&Y&X@BY&Y]PY&Y&@FZH@FY&Y&@@&Y&Q FY&Y BH"@A&Y&Y @I&Y^H@FY&X@"H FY&Y&X@BY&S"@A&Y BH!PA&Y&Y&@@&Y$X @@@@@"H@FY&Y&X@@I&Y"H @@@BH@@Y&Y&Y @@&Y&X"FZH"H @Y&Y&Y&@@@I&Y&HY%"H"H@FY&Y&X@@@&Y&Y"H"H"H!PY&Y&X@@@BY&Y&X"H"H"H FY&X@@@BY&Y&Y&H"H"H"HA&Y @@@I&Y&Y&Y!9&Y&Y&PY&X@@I&Y&Y&Y&X&Y&Y&Y$@@@@@&Y&Y&Y&Y^I&Y&Y&Y@@@@@I&Y&Y&Y&Z"Y&Y&Y&PA&X@BY&Y&Y&Y%H&Y&Y&Y@FY&X@BY&Y&Y&Y^I&Y&Y&PY&Y&X@&Y&Y&Y&Y!9&Y&Y$FY&Y&@I&Y&Y&Y%8NY&Y&YA&Y&Y BY&Y&Y&Y&D&Y&Y&PA&Y&@@&Y&Y&Y&YEY&Y&Y$@A&X@@I&Y&Y&Y&X"Y&Y&Y@@@@@@&Y&Y&Y&Y&S&Y&Y&Y@@@@BY&Y&Y&Y&Y&T&Y&Y&Y&Y&Y&Y&Y&Y&Y$b'))
reducedHelpImage "UIMaskEditor new openOnClass: self andSelector: #reducedHelpImage" <resource: #image> ^CachedImage on: (Image extent: 24@24 depth: 3 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 7) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 3 put: (ColorValue scaledRed: 7645 scaledGreen: 7645 scaledBlue: 7645); at: 4 put: ColorValue white; at: 5 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 8191); at: 6 put: ColorValue lightGray; at: 7 put: ColorValue blue; yourself)) usingBits: (ByteArray fromPackedString: 'L3L3L3L3L3L3L3L3M&Y&Y @@@@@FY&Y#M&Y&@CL3L3L@UUY#M&Y L3L3L3L0@EY#M&XCL3@@@3L3@EY#M&XCL3AUTCL3L@Y#M&TCL3@2TCL3L@Y#M&TCL3AUTCL3L@Y#M$TCL3AUTCL3L@Y#M!T@@@AU@3L3@@Y#M%UP@@UPL3L0@FY#M%L5UUTCL3L@A&Y#M%UUUU@3L3@@A&Y#M%UUUU@3L0@FY&Y#M%Y&Y&@3L@Y&Y&Y#MEY&Y&X@@@Y&Y&Y#M%Y&Y&@CL@Y&Y&Y#MEY&Y&@3L0A&Y&Y#M%Y&Y&@3L0A&Y&Y#M%Y&Y&@3L0A&Y&Y#M&U&Y&@CL@Y&Y&Y#M&U&Y&X@@@Y&Y&Y#M&Y&Y&Y A&Y&Y&Y#L3L3L3L3L3L3L3L3'))
reducedHelpMask "UIMaskEditor new openOnClass: self andSelector: #reducedHelpMask" <resource: #image> ^CachedImage on: (Image extent: 24@24 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 0 0 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 127 255 254 0 0 0 0 0])
</methods> <methods> VWHelp.AHSWHCProcessor class <category>interface specs</category>
ahsTextAndIconSpec "UIPainter new openOnClass: self andSelector: #ahsTextAndIconSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Arbor Help System' #min: #(#Point 50 42 ) #bounds: #(#Rectangle 751 175 1154 238 ) ) #component: #(#SpecCollection #collection: #( #(#CheckBoxSpec #layout: #(#AlignmentOrigin 0 0 0 0.5 0 0.5 ) #name: #ahsFlag #model: #ahsFlag #tabable: false #label: #ahsIcon #hasCharacterOrientedLabel: false #style: #default ) #(#TextEditorSpec #layout: #(#LayoutFrame 58 0 0 0 0 1 0 1 ) #name: #ahsText #flags: 4 #isOpaque: true #model: #ahsText #style: #'Arbor-12-Squeeze' #isReadOnly: true ) ) ) )
ahsTextOnlySpec "UIPainter new openOnClass: self andSelector: #ahsTextOnlySpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Arbor Help System' #min: #(#Point 50 42 ) #bounds: #(#Rectangle 786 525 1189 580 ) ) #component: #(#SpecCollection #collection: #( #(#TextEditorSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 0 1 ) #name: #ahsText #flags: 4 #isOpaque: true #model: #ahsText #style: #'Arbor-12-Squeeze' #isReadOnly: true ) ) ) )
</methods> <initialize> VWHelp.AHSWHCGlobalHelp </initialize> <initialize> VWHelp.AHSWHCTransientWindow </initialize> <initialize> VWHelp.AHSWHCProcessor </initialize> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>Object</name> <environment>Core</environment> <super></super> <private>false</private> none <imports></imports> <category>Kernel-Objects</category> <attributes> <package>Kernel-Objects</package> </attributes> </class> <class> <name>SequenceController</name> <environment>UI</environment> <super>UI.ControllerWithMenu</super> <private>false</private> none keyboardProcessor outside searchString keyboardHook doStringSearching dispatcher dragDropCallbacks selectOnDownWithDrag autoSelect <imports> private Graphics.TextConstants.* </imports> <category>UIBasics-Controllers</category> <attributes> <package>UIBasics-Controllers</package> </attributes> </class> <class> <name>ToggleButtonController</name> <environment>UI</environment> <super>UI.BasicButtonController</super> <private>false</private> none <imports></imports> <category>UIBasics-Controllers</category> <attributes> <package>UIBasics-Controllers</package> </attributes> </class> <class> <name>VisualComponent</name> <environment>Graphics</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Graphics-Visual Objects</category> <attributes> <package>Graphics-Visual Objects</package> </attributes> </class> <class> <name>RadioButtonController</name> <environment>UI</environment> <super>UI.ToggleButtonController</super> <private>false</private> none <imports></imports> <category>UIBasics-Controllers</category> <attributes> <package>UIBasics-Controllers</package> </attributes> </class> <class> <name>ApplicationModel</name> <environment>UI</environment> <super>UI.Model</super> <private>false</private> none builder uiSession eventHandlers savedWindowInformation <imports></imports> <category>UIBuilder-Framework</category> <attributes> <package>UIBuilder-Framework</package> </attributes> </class> <class> <name>WindowSensor</name> <environment>UI</environment> <super>UI.InputSensor</super> <private>false</private> none keyboard metaInput damage damageLock invalidationSuppressed skipNextDamage <imports></imports> <category>OS-Window System</category> <attributes> <package>OS-Window System</package> </attributes> </class> <class> <name>TriggerButtonController</name> <environment>UI</environment> <super>UI.BasicButtonController</super> <private>false</private> none <imports></imports> <category>UIBasics-Controllers</category> <attributes> <package>UIBasics-Controllers</package> </attributes> </class> <class> <name>CompositePart</name> <environment>Graphics</environment> <super>Graphics.VisualPart</super> <private>false</private> none components preferredBounds <imports></imports> <category>Graphics-Visual Objects</category> <attributes> <package>Graphics-Visual Objects</package> </attributes> </class> <class> <name>Text</name> <environment>Core</environment> <super>Core.CharacterArray</super> <private>false</private> none string runs <imports> private Graphics.TextConstants.* </imports> <category>Collections-Text</category> <attributes> <package>Collections-Text</package> </attributes> </class> <class> <name>EventDispatcher</name> <environment>UI</environment> <super>Core.Object</super> <private>false</private> none windowController currentMouseConsumer grabbingMouse keyboardProcessor lastControlObject trapList state repairDamageWhenDebugging flushQueueAfterError distributeEventsWhenDebugging dragDropInProgress dragDropTracker dispatchUnknownEvents <imports></imports> <category>Interface-Events-Support</category> <attributes> <package>Interface-Events-Support</package> </attributes> </class> <class> <name>LookupKey</name> <environment>Core</environment> <super>Core.Magnitude</super> <private>false</private> none key <imports></imports> <category>Collections-Support</category> <attributes> <package>Collections-Support</package> </attributes> </class> <class> <name>String</name> <environment>Core</environment> <super>Core.CharacterArray</super> <private>false</private> none <imports></imports> <category>Collections-Text</category> <attributes> <package>Collections-Text</package> </attributes> </class> <class> <name>SubCanvas</name> <environment>UI</environment> <super>Graphics.CompositePart</super> <private>false</private> none client <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>MenuView</name> <environment>UI</environment> <super>UI.CompositeView</super> <private>false</private> none menuItemViews parentMenuItemView selectedValue selectionFinal highlightedMenuItemView usedSelectionMemory parentMenuBarButtonView commonTextIndent <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>NamedSpec</name> <environment>UI</environment> <super>UI.ComponentSpec</super> <private>false</private> none name flags isOpaque colors paletteIcon <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>RadioButtonSpec</name> <environment>UI</environment> <super>UI.ButtonSpec</super> <private>false</private> none select <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>TableViewSpec</name> <environment>UI</environment> <super>UI.MenuComponentSpec</super> <private>false</private> none style showHGrid showVGrid selectionStyle <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>DataSetSpec</name> <environment>UI</environment> <super>UI.MenuComponentSpec</super> <private>false</private> none columns verticalPolicy horizontalPolicy multipleSelections labelsAsButtons <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>SequenceViewSpec</name> <environment>UI</environment> <super>UI.MenuComponentSpec</super> <private>false</private> none multipleSelections style useModifierKeys selectionType autoSelect <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>CheckBoxSpec</name> <environment>UI</environment> <super>UI.ButtonSpec</super> <private>false</private> none <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>ComboBoxSpec</name> <environment>UI</environment> <super>UI.InputFieldSpec</super> <private>false</private> none comboList readSelector printSelector <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>Window</name> <environment>Graphics</environment> <super>Graphics.DisplaySurface</super> <private>false</private> none inputOrigin creationOrigin sensor iconic windowType effectiveWindowType statusLineHeight allowsStatusLine mapped eventHandlers windowManager <imports></imports> <category>OS-Window System</category> <attributes> <package>OS-Window System</package> </attributes> </class> <class> <name>MenuButtonSpec</name> <environment>UI</environment> <super>UI.ButtonSpec</super> <private>false</private> none menu isList isPopUp <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>Wrapper</name> <environment>Graphics</environment> <super>Graphics.VisualPart</super> <private>false</private> none component <imports></imports> <category>Graphics-Visual Objects</category> <attributes> <package>Graphics-Visual Objects</package> </attributes> </class> <class> <name>SpecWrapper</name> <environment>UI</environment> <super>UI.WidgetWrapper</super> <private>false</private> none spec <imports></imports> <category>UIBuilder-Support</category> <attributes> <package>UIBuilder-Support</package> </attributes> </class> <class> <name>SharedQueue</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none contents accessProtect readSynch <imports></imports> <category>Kernel-Processes</category> <attributes> <package>Kernel-Processes</package> </attributes> </class> <class> <name>View</name> <environment>UI</environment> <super>Graphics.DependentPart</super> <private>false</private> none controller properties <imports></imports> <category>Interface-Framework</category> <attributes> <package>Interface-Framework</package> </attributes> </class> <class> <name>BooleanWidgetView</name> <environment>UI</environment> <super>UI.View</super> <private>false</private> none transitionHolder latestValue <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>TableView</name> <environment>UI</environment> <super>UI.AutoScrollingView</super> <private>false</private> none state table columnInfo rowInfo selectionChannel selectionIndex targetIndex grid columnWidths rowHeights visualBlock textStyle displayStringSelector showCGrid showRGrid strokedSelection isSlave lpDictionary <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>TransientWindow</name> <environment>UI</environment> <super>Graphics.Window</super> <private>false</private> none component paintPreferences isEventDriven controller <imports></imports> <category>Interface-Framework</category> <attributes> <package>Interface-Framework</package> </attributes> </class> <class> <name>SelectionView</name> <environment>UI</environment> <super>UI.ScrollingView</super> <private>false</private> none sequence selectionChannel selectionIndex targetIndex grid textStyle displayStringSelector <imports></imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class> <class> <name>MenuBarWrapper</name> <environment>UI</environment> <super>Graphics.BorderedWrapper</super> <private>false</private> none <imports></imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class> <class> <name>MenuItem</name> <environment>UI</environment> <super>Core.Object</super> <private>false</private> none enabled label adornment nameKey value position helpText <imports></imports> <category>Interface-Menus</category> <attributes> <package>Interface-Menus</package> </attributes> </class> <class> <name>ComposedTextView</name> <environment>UI</environment> <super>UI.AutoScrollingView</super> <private>false</private> none displayContents startBlock stopBlock selectionShowing displaySelection <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>TextEditorView</name> <environment>UI</environment> <super>UI.ComposedTextView</super> <private>false</private> none state helpText <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>BorderDecorator</name> <environment>UI</environment> <super>Graphics.CompositePart</super> <private>false</private> none component widgetFlags policy <imports></imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class> <class> <name>NoteBookSpec</name> <environment>UI</environment> <super>UI.WidgetSpec</super> <private>false</private> none secondModel style labels binderSide binderWidth majorTabsOnRight rightInset bottomInset tabsOnTop verticalTabOrientation binderMode <imports></imports> <category>UIBuilder-Specifications</category> <attributes> <package>UIBuilder-Specifications</package> </attributes> </class> <class> <name>KeyboardProcessor</name> <environment>UI</environment> <super>Core.Object</super> <private>false</private> none keyboardConsumers currentConsumer default cancel keyboardHook focusIsShifting currentConsumerChannel acceptOnControlChange menuBar <imports></imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class> <class> <name>ScheduledWindow</name> <environment>UI</environment> <super>Graphics.Window</super> <private>false</private> none label icon minimumSize maximumSize component lookPreferences paintPreferences edgeDecorationPolicy widgetPolicy controller model damageRepairPolicy masterWindow <imports></imports> <category>Interface-Framework</category> <attributes> <package>Interface-Framework</package> </attributes> </class> <class> <name>ApplicationWindow</name> <environment>UI</environment> <super>UI.ScheduledWindow</super> <private>false</private> none keyboardProcessor application sendWindowEvents receiveWindowEvents windowEventBlock damageRepairIsLazy activationNotification isEventDriven toolbarVisible dropTarget dragDropInProgress dragDropTracker <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>ValueHolder</name> <environment>UI</environment> <super>UI.ValueModel</super> <private>false</private> none value <imports></imports> <category>Interface-Support</category> <attributes> <package>Interface-Support</package> </attributes> </class> <class> <name>ApplicationWindowSensor</name> <environment>UI</environment> <super>UI.WindowSensor</super> <private>false</private> none <imports></imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class>