From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:50:00 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.'] <class> <name>AHSPreferences</name> <environment>VWHelp</environment> <super>UI.SimpleDialog</super> <private>false</private> none triggerChannel saveHelpAsMethod expandOutlines bookmarkDirectory specifiedDirectory <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSPreferences
Copyright Ó 1994 Arbor Intelligent Systems, Inc. This class holds some preferences for the help system, which can be (de)activated from the help launcher, preferences button. Instance Variables: triggerChannel <ClassOfVariable> description of variable's function saveHelpAsMethod <ClassOfVariable> description of variable's function expandOutlines <ClassOfVariable> description of variable's function bookmarkDirectory <ClassOfVariable> description of variable's function specifiedDirectory <ClassOfVariable> description of variable's function Class Variables: Preferences <ClassOfVariable> description of variable''s function
</comment> <class> <name>AHSPreferencesModel</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none triggerChannel <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSPreferencesModel
The abstract superclass of the models used to construct the AHSPreferences dialog. Instance Variables: triggerChannel <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSCorePreferencesModel</name> <environment>VWHelp</environment> <super>VWHelp.AHSPreferencesModel</super> <private>false</private> none <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSCorePreferencesModel
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:
</comment> <class> <name>AHSStorageManager</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none segStack <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSStorageManager
Copyright © 1994, 1995 Arbor Intelligent Systems, Inc. Controls all access to help, from sources Instance Variables: Class Variables: AllowEditingModel <ClassOfVariable> description of variable''s function CurrentLanguage <ClassOfVariable> description of variable''s function GemStoneHelpOutlines <ClassOfVariable> description of variable''s function HelpDictionaries <ClassOfVariable> description of variable''s function OutlineSource <ClassOfVariable> description of variable''s function WidgetSource <ClassOfVariable> description of variable''s function
</comment> <class> <name>AHSTextBinder</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none fullText condensedText <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSTextBinder
AHSTextBinder Stores text in up to two forms - a long ("full") form and a short ("condensed") form, suitable for displaying in the real-time help area and in a help bubble, respectively. Instance Variables fullText <Text> condensedText <Text>
</comment> <class> <name>AHSTranslationTextBinder</name> <environment>VWHelp</environment> <super>VWHelp.AHSTextBinder</super> <private>false</private> none <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSTranslationTextBinder
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:
</comment> <class> <name>AHSHelpInfo</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none languages data <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSHelpInfo
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: languages <ClassOfVariable> description of variable's function data <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSCacheHelpInfo</name> <environment>VWHelp</environment> <super>VWHelp.AHSHelpInfo</super> <private>false</private> none <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSCacheHelpInfo
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:
</comment> <class> <name>AHSPersistentDictionary</name> <environment>VWHelp</environment> <super>Core.Dictionary</super> <private>false</private> objects <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSPersistentDictionary
Copyright Ó 1994 Arbor Intelligent Systems, Inc. This class allows a dictionary to have persistence properties when used in conjunction with a database. Instance Variables: *Indexed*
</comment> <class> <name>AHSPreferencesSetup</name> <environment>VWHelp</environment> <super>VWHelp.AHSPreferencesModel</super> <private>false</private> none <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSPreferencesSetup
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:
</comment> <class> <name>AHSTranslationText</name> <environment>VWHelp</environment> <super>Core.Text</super> <private>false</private> none translated <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSTranslationText
Copyright Ó 1995 Arbor Intelligent Systems, Inc. Used to keep track of whether a text has been translated or not Instance Variables: translated <Boolean>
</comment> <class> <name>ArborTextAttributes</name> <environment>VWHelp</environment> <super>Graphics.VariableSizeTextAttributes</super> <private>false</private> none truePixelSize platform <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.ArborTextAttributes
Copyright 1996 Arbor Intelligent Systems, Inc. ArborTextAttributes instances do their best to guarantee the presented pixel height of a string of characters. Normally, if a given TextAttributes is used on different platforms (even if the same FontDescription is used), the actual fonts returned may differ significantly in size. Traditionally, this has been the biggest problem when moving from Window or UNIX to a Macintosh, but even between Win and UNIX there can be problems. This has to do with how each platform OS implements font calculations - for example, when a font of size 12 is requested on one platform the platform includes extra leading above/below the font glyphs as part of the 12, while another platform will only use the highest ascent to the lowest descent in the font for the 12, omitting the leading. This will result in the presented fonts having different sizes. When a font of some size is requested using an ArborTextAttributes, the OS is queried for a font of that size. Then a calculation is performed to see if the font returned is actually the correct size. If not, ArborTextAttributes will continue requesting fonts of greater or lesser size (as appropriate) to come as close as possible to returning a font of the requested size. ArborTextAttributes does this work by printing a set of characters onto an off-screen pixmap and then checks the pixmap to see the actual printed height, from the highest ascent to the lowest descent. When initialized, this class automatically creates a number of new TextAttributes instances and places them in the TextStyles dictionary, making them available for general use, including when using the Properties Tool when painting a canvas. Instance Variables: truePixelSize <SmallInteger> platform <String>
</comment> <class> <name>AHSHelpClassData</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none languages widgetData <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSHelpClassData
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: languages <ClassOfVariable> description of variable's function widgetData <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSHelpData</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none texts outlineLinks <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSHelpData
AHSHelpData Instance Variables: texts <nil | (Array of: Text)> outlineLinks <nil | (Array with: String with: (nil | Integer))> TO DO: Store a message selector as an outline link instead of the current use of a separate state. The format could be (Array with: String with: nil), using the String with a # in front to specify the selector, and it would maintain the same type as described above
</comment> <class> <name>AHSBalloonHelpPreferencesModel</name> <environment>VWHelp</environment> <super>VWHelp.AHSPreferencesModel</super> <private>false</private> none balloonDelayValue <imports></imports> <category>Help-Core</category> <attributes> <package>Arbor Help System Core</package> </attributes> </class> <comment> VWHelp.AHSBalloonHelpPreferencesModel
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: balloonDelayValue <ClassOfVariable> description of variable's function
</comment> <name>WidgetSource</name> <environment>VWHelp.AHSStorageManager</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Core</package> </attributes> <name>AllowEditingModel</name> <environment>VWHelp.AHSStorageManager</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Core</package> </attributes> <name>GemStoneHelpOutlines</name> <environment>VWHelp.AHSStorageManager</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Core</package> </attributes> <name>CurrentLanguage</name> <environment>VWHelp.AHSStorageManager</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Core</package> </attributes> <name>OutlineSource</name> <environment>VWHelp.AHSStorageManager</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Core</package> </attributes> <name>HelpDictionaries</name> <environment>VWHelp.AHSStorageManager</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Core</package> </attributes> <name>Preferences</name> <environment>VWHelp.AHSPreferences</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Core</package> </attributes> <methods> VWHelp.AHSPreferences <category>private</category>
closeAccept self triggerChannel value: true. ^super closeAccept
</methods> <methods> VWHelp.AHSPreferences <category>initialize-release</category>
initialize super initialize. self triggerChannel: nil asValue.
</methods> <methods> VWHelp.AHSPreferences <category>interface opening</category>
postBuildWith: aBuilder | canvas diff | aBuilder window model ~= self ifTrue: [^self]. "Make the components do a layout, then adjust the window size so it's juuuuust right." aBuilder composite bounds: (0@0 extent: aBuilder windowSpec bounds extent). canvas := aBuilder componentAt: #dynamicallyGeneratedSubcanvas. diff := canvas preferredBounds height - canvas bounds height. aBuilder window changeExtent: (aBuilder windowSpec bounds extent + (0@diff)).
</methods> <methods> VWHelp.AHSPreferences <category>binding</category>
specificationFor: aSymbol ^aSymbol = #dynamicallyGeneratedSpec ifTrue: [self class dynamicallyGeneratedSpecForTrigger: self triggerChannel] ifFalse: [super specificationFor: aSymbol]
</methods> <methods> VWHelp.AHSPreferences <category>accessing</category>
triggerChannel ^triggerChannel
triggerChannel: aValueModel triggerChannel := aValueModel.
</methods> <methods> VWHelp.AHSPreferences class <category>help info (AHS)</category>
arborHelpEnabled ^true
</methods> <methods> VWHelp.AHSPreferences class <category>interface specs</category>
dynamicallyGeneratedSpecForTrigger: aTrigger "Dynamically build a subCanvas spec from the list of available configuration specs." | fullSpec windowSpec top subs | fullSpec := FullSpec new. windowSpec := WindowSpec label: 'Dynamic spec'. fullSpec window: windowSpec; component: SpecCollection new. top := 0. subs := OrderedCollection new. (self preferenceAt: #preferenceSpecs) do: [:assoc || spec subCanvasSpec layout | spec := assoc key asQualifiedReference value interfaceSpecFor: assoc value. spec notNil ifTrue: [ layout := spec window bounds asLayout. layout leftFraction: 0 offset: 0; rightFraction: 1 offset: 0; topFraction: 0 offset: top; bottomFraction: 0 offset: (top := top + spec window bounds height). subCanvasSpec := SubCanvasSpec new. subCanvasSpec hasBorder: false; clientKey: (assoc key asQualifiedReference value newWithTrigger: aTrigger); majorKey: assoc key; minorKey: assoc value; layout: layout. subs add: subCanvasSpec]]. fullSpec component collection: subs asArray. ^fullSpec
</methods> <methods> VWHelp.AHSPreferences class <category>class initialization</category>
initialize "self initialize" Preferences isNil ifTrue: [self initializePreferences]. "Set up UISettings" UISettings addPreferenceSection: #addAHSSectionTo:development:runtime:.
initializePreferences Preferences := Dictionary new. self preferenceAt: #preferenceSpecs put: (SortedCollection sortBlock: [:a1 :a2 | a1 value < a2 value or: [a1 value = a2 value and: [a1 key < a2 key]]]).
obsolete UISettings removePreferenceSection: #addAHSSectionTo:development:runtime:. super obsolete.
</methods> <methods> VWHelp.AHSPreferences class <category>accessing</category>
preferenceAt: aSymbol ^self preferences at: aSymbol
preferenceAt: aSymbol ifAbsent: aBlock ^self preferences at: aSymbol ifAbsent: aBlock
preferenceAt: aSymbol put: aValue ^self preferences at: aSymbol put: aValue
</methods> <methods> VWHelp.AHSPreferences class <category>protected</category>
preferences "In general, the #preferenceAt: and #preferenceAt:put: methods should be used by 'outsiders'." Preferences isNil ifTrue: [self initializePreferences]. ^Preferences
</methods> <methods> VWHelp.AHSPreferencesModel <category>private</category>
adapt: anAspect for: aSubject ^self bufferForSubject: ((AspectAdaptor forAspect: anAspect) subject: aSubject)
adaptPreference: aPrefKey "Ensure the key exists by getting and setting the value." AHSPreferences perform: (aPrefKey, ':') asSymbol with: (AHSPreferences perform: aPrefKey). ^self bufferForSubject: ((IndexedAdaptor subject: AHSPreferences preferences) forIndex: aPrefKey)
bufferForSubject: aSubject ^BufferedValueHolder subject: aSubject triggerChannel: self triggerChannel
</methods> <methods> VWHelp.AHSPreferencesModel <category>accessing</category>
triggerChannel triggerChannel isNil ifTrue: [^self error: 'Trigger is undefined!']. ^triggerChannel
triggerChannel: aValueHolder triggerChannel := aValueHolder.
</methods> <methods> VWHelp.AHSPreferencesModel class <category>utility</category>
addPreferenceSpec: aSpecName self removePreferenceSpec: aSpecName. (AHSPreferences preferenceAt: #preferenceSpecs) add: self name -> aSpecName.
preferenceSpecs "Get the specs if possible. Fetching the specs will fail when the class is being removed and AHSPreferences has already been removed, so the roundabout & safe approach is used here." ^#{AHSPreferences} isDefined ifTrue: [AHSPreferences preferenceAt: #preferenceSpecs] ifFalse: [#()]
removeAllPreferenceSpecs "Clean out all specs defined in AHSPreferences for myself." | prefs | prefs := self preferenceSpecs. (prefs select: [:assoc | assoc key = self name]) do: [:assoc | prefs remove: assoc].
removePreferenceSpec: aSpecName self preferenceSpecs asOrderedCollection remove: self name -> aSpecName ifAbsent: [].
</methods> <methods> VWHelp.AHSPreferencesModel class <category>binding</category>
interfaceSpecFor: aSymbol "Return an actual specification object based on the named resource method." | spec | ^(spec := self application specificationFor: aSymbol) isNil ifTrue: [nil] ifFalse: [UISpecification from: spec]
</methods> <methods> VWHelp.AHSPreferencesModel class <category>instance creation</category>
newWithTrigger: aTrigger ^self new triggerChannel: aTrigger
</methods> <methods> VWHelp.AHSPreferencesModel class <category>class initialization</category>
obsolete self removeAllPreferenceSpecs. super obsolete.
</methods> <methods> VWHelp.AHSCorePreferencesModel <category>interface opening</category>
preBuildWith: aBuilder super preBuildWith: aBuilder. aBuilder aspectAt: #showHelp put: (self adapt: #helpEnabled for: AHSWHCProcessor); aspectAt: #useWidgetHelp put: (self adapt: #widgetHelpEnabled for: AHSWHCProcessor); aspectAt: #useBalloonHelp put: (self adapt: #balloonHelpEnabled for: AHSWHCProcessor).
</methods> <methods> VWHelp.AHSCorePreferencesModel class <category>help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#useWidgetHelp -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Widget help display is active. Uncheck this box to globally disable widget help display.' runs: (RunArray runs: #(89) values: #(nil))); yourself) outlineLinks: nil)); add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Widget help display is inactive. Check this box to globally enable widget help display.' runs: (RunArray runs: #(88) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#widgetHelpConfigGroupBox -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Adjust the settings for widget help in this section.' runs: (RunArray runs: #(52) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#showHelp -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Help lookup and dispatching is currently active. Uncheck this box to globally disable all widget help lookup and processing.' runs: (RunArray runs: #(125) values: #(nil))); yourself) outlineLinks: nil)); add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Help lookup and dispatching is now inactive. Check this box to globally enable all widget help lookup and processing.' runs: (RunArray runs: #(118) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#useBalloonHelp -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Balloon help display is active. Uncheck this box to globally disable balloon help display.' runs: (RunArray runs: #(91) values: #(nil))); yourself) outlineLinks: nil)); add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Balloon help display is inactive. Check this box to globally enable balloon help display.' runs: (RunArray runs: #(90) values: #(nil))); yourself) outlineLinks: nil)); yourself)); yourself))
</methods> <methods> VWHelp.AHSCorePreferencesModel class <category>class initialization</category>
initialize "self initialize" self addPreferenceSpec: #coreConfigSpec.
</methods> <methods> VWHelp.AHSStorageManager class <category>help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#accept -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Accept all changes and close the window' runs: (RunArray runs: #(39) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#cancel -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Discard all changes and close this window' runs: (RunArray runs: #(41) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#ahsFlag -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Use this check box to toggle help info on and off.' runs: (RunArray runs: #(50) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#ahsNoHelpFor -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'No Help For %s' runs: (RunArray runs: #(14) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#ahsBackground -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Move cursor over an item for help information' runs: (RunArray runs: #(45) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#HELPOFF -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Help is currently disabled.' runs: (RunArray runs: #(27) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#ahsText -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Move the cursor over another item to see help info about that item appear in this area.' runs: (RunArray runs: #(87) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); yourself))
</methods> <methods> VWHelp.AHSStorageManager class <category>class accessing</category>
allowEditing ^self allowEditingModel value
allowEditingModel ^AllowEditingModel
envyRepositoryApp ^#{ArborHelpRepositoryApp} valueOrDo: [nil]
widgetSource ^WidgetSource value
widgetSource: aBoolean WidgetSource value: aBoolean
widgetSourceModel ^WidgetSource
</methods> <methods> VWHelp.AHSStorageManager class <category>class initialization</category>
cleanUp "Private - Reset the class to a 'clean' state. A clean state means that the class is not holding onto any residual objects. This method would typically be called from ENVY just before the class is unloaded." self currentHelpCache: nil. AllowEditingModel := ValueHolder with: false. CurrentLanguage := ValueHolder with: self currentLanguage. WidgetSource := ValueHolder with: #Memory. OutlineSource := ValueHolder with: #File.
initialize "self initialize" | cls | CurrentLanguage := (AHSWHCWeakValueHolder with: #English). self currentHelpCache: AHSCacheHelpInfo new. OutlineSource := AHSWHCWeakValueHolder with: #File. WidgetSource := AHSWHCWeakValueHolder with: #Image. segStack := OrderedCollection new. cls := AHSWHCProcessor outlinerClass. AllowEditingModel := AHSWHCWeakValueHolder with: (cls notNil and: [cls classForEditing notNil])
</methods> <methods> VWHelp.AHSStorageManager class <category>widget help</category>
currentHelpCache ^ HelpDictionaries
currentHelpCache: anAHSHelpInfo anAHSHelpInfo class == AHSHelpInfo ifTrue: [HelpDictionaries := AHSCacheHelpInfo languages: anAHSHelpInfo languages data: anAHSHelpInfo data] ifFalse: [HelpDictionaries := anAHSHelpInfo]
flushAllHelp "flush the help dictionaries class variable" "self flushAllHelp" self currentHelpCache flush
flushHelpForLanguage: aLanguage "flush the help dictionary for aLanguage on the HelpDictionaries class variable." "self flushHelpForLanguage: #English" self currentHelpCache flushLanguage: aLanguage
flushHelpForLanguage: aLanguage onClass: aClass "flush the help dictionary for aLanguage for aClass" self currentHelpCache flushClassName: aClass fullName language: aLanguage
</methods> <methods> VWHelp.AHSStorageManager class <category>languages</category>
currentLanguage ^CurrentLanguage value
currentLanguage: lang CurrentLanguage value: lang
currentLanguageModel ^CurrentLanguage
installedLanguages ^self currentHelpCache languages
otherAvailableLanguages | current | current := self currentLanguage. ^ self installedLanguages reject: [:each | each = current].
</methods> <methods> VWHelp.AHSStorageManager class <category>testing</category>
envyAvailable ^self hasEnvy and: [(#{SubApplication} value respondsTo: #objectNamed:) and: [self envyRepositoryApp notNil]]
gemStoneAvailable "Answer whether GemStone is installed and in a session" ^(#{GSI} valueOrDo: [^false]) isLoggedIn
hasEnvy "Make a best guess as to whether or not we are using Envy" ^AHSUtils hasEnvy
isSourceAvailable: aSource "Checks whether aSource is available for use in this system. Image and files are assumed to be always available." aSource == #Image ifTrue: [^true]. aSource == #File ifTrue: [^true]. aSource == #GemStone ifTrue: [^self gemStoneAvailable]. aSource == #Versant ifTrue: [^self versantAvailable]. aSource == #Envy ifTrue: [^self envyAvailable]. ^false
versantAvailable "Answer whether Versant is installed and in a session" ^(#{ODBInterface} valueOrDo: [^false]) inSession
</methods> <methods> VWHelp.AHSStorageManager class <category>private</category>
segStack ^segStack
</methods> <methods> VWHelp.AHSTextBinder <category>comparing</category>
= anAHSTextBinder | testBinder | testBinder := anAHSTextBinder asAHSTextBinder. ^ self fullText = testBinder fullText and: [self condensedText = testBinder condensedText].
</methods> <methods> VWHelp.AHSTextBinder <category>copying</category>
ahsDeepCopyOfText ^ self class fullText: (fullText isNil ifTrue: [nil] ifFalse: [fullText ahsDeepCopyOfText]) condensedText: (condensedText isNil ifTrue: [nil] ifFalse: [condensedText ahsDeepCopyOfText])
</methods> <methods> VWHelp.AHSTextBinder <category>converting</category>
asAHSTextBinder ^ self
asTranslationText ^ AHSTranslationTextBinder fullText: fullText condensedText: condensedText
</methods> <methods> VWHelp.AHSTextBinder <category>accessing</category>
condensedText "Answer the condensed help text (generally displayed in the balloon/bubble pane)." ^ self hasCondensedText ifTrue: [condensedText] ifFalse: [self fullText].
fullText "Answer the full help text (generally displayed in the status pane)." ^fullText isNil ifTrue: [#{Smalltalk.Text} value new] ifFalse: [fullText]
translated ^ true
</methods> <methods> VWHelp.AHSTextBinder <category>testing</category>
hasCondensedText ^ condensedText notNil
isEmpty ^ self fullText isEmpty and: [self condensedText isEmpty]
</methods> <methods> VWHelp.AHSTextBinder <category>private-accessing</category>
setCondensedText: condensedHelpText condensedText := condensedHelpText isNil ifTrue: [nil] ifFalse: [condensedHelpText asText]
setFullText: fullHelpText fullText := fullHelpText isNil ifTrue: [nil] ifFalse: [fullHelpText asText]
</methods> <methods> VWHelp.AHSTextBinder <category>printing</category>
storeOn: aStream "Store the receiver in the most economical way possible" condensedText isNil ifTrue: [^ fullText storeOn: aStream]. aStream nextPut: $(; nextPutAll: self class name; nextPutAll: ' fullText: '; store: fullText; nextPutAll: ' condensedText: '; store: condensedText; nextPut: $)
</methods> <methods> VWHelp.AHSTextBinder class <category>instance-creation</category>
fullText: statusText condensedText: balloonText ^self new setFullText: statusText; setCondensedText: balloonText
helpText: aText "Answer a new instance of the receiver. Set the status pane text and the balloon text to the same value." ^self fullText: aText condensedText: nil
</methods> <methods> VWHelp.AHSTranslationTextBinder <category>comparing</category>
= textOrTextBinder "Compare the receiver to textOrTextBinder. A textOrTextBinder can be a regular text binder, a translation text binder, a regular text or a translation text." | testBinder | textOrTextBinder isNil ifTrue: [^ false]. testBinder := textOrTextBinder asAHSTextBinder asTranslationText. ^ self fullText = testBinder fullText and: [self condensedText = testBinder condensedText].
</methods> <methods> VWHelp.AHSTranslationTextBinder <category>converting</category>
asTranslationText ^ self
</methods> <methods> VWHelp.AHSTranslationTextBinder <category>private-accessing</category>
setCondensedText: condensedHelpText condensedText := condensedHelpText isNil ifTrue: [nil] ifFalse: [condensedHelpText asTranslationText]
setFullText: fullHelpText fullText := fullHelpText isNil ifTrue: [nil] ifFalse: [fullHelpText asTranslationText]
</methods> <methods> VWHelp.AHSTranslationTextBinder <category>accessing</category>
translated | result | result := fullText isNil ifTrue: [true] ifFalse: [fullText translated]. ^ result and: [condensedText isNil ifTrue: [true] ifFalse: [condensedText translated]].
translated: aBoolean fullText isNil ifFalse: [fullText translated: aBoolean]. condensedText isNil ifFalse: [condensedText translated: aBoolean]
</methods> <methods> VWHelp.AHSHelpInfo <category>enumerating</category>
allHelpDataDo: aBlock "Visit each AHSHelpData" self data do: [:widgetDict | widgetDict do: [:stateDict | stateDict do: [:helpData | aBlock value: helpData]]]
</methods> <methods> VWHelp.AHSHelpInfo <category>accessing-reading</category>
classNames "Answer the class names for all languages" ^self data keys
helpTextForID: id state: state className: className ^self helpTextForID: id state: state className: className language: AHSStorageManager currentLanguage
helpTextForID: id state: state className: className language: lang ^self helpTextForID: id state: state className: className language: lang mayDefault: true
helpTextForID: id state: state className: className language: lang mayDefault: aBoolean "If aBoolean is true, then may look for help in default if any" ^(self helpDataForClassName: className widgetID: id state: state ifAbsent: [^nil]) textAt: (self indexForLanguage: lang)
outlineLinkForID: id state: state className: className ^self outlineLinkForID: id state: state className: className language: AHSStorageManager currentLanguage
outlineLinkForID: idSymbol state: stateSymbol className: className language: languageSymbol ^self outlineLinkForID: idSymbol state: stateSymbol className: className language: languageSymbol mayDefault: true
outlineLinkForID: id state: state className: className language: lang mayDefault: aBoolean ^(self helpDataForClassName: className widgetID: id state: state ifAbsent: [^nil]) outlineLinkAt: (self indexForLanguage: lang)
</methods> <methods> VWHelp.AHSHelpInfo <category>protected</category>
data ^data
</methods> <methods> VWHelp.AHSHelpInfo <category>private</category>
data: dict data := dict
helpDataForClassName: className widgetID: id state: state ifAbsent: aBlock ^((self data at: className ifAbsent: [^aBlock value]) at: id ifAbsent: [^aBlock value]) at: state ifAbsent: [^aBlock value]
helpDataForClassName: className widgetID: id state: state lang: aSymbol ifAbsent: aBlock | hd langIndex | hd := ((self data at: className ifAbsent: [^aBlock value]) at: id ifAbsent: [^aBlock value]) at: state ifAbsent: [^aBlock value]. langIndex := self indexForLanguage: aSymbol. ^ AHSHelpData texts: (hd textAt: langIndex) outlineLinks: (hd outlineLinkAt: langIndex)
includesClass: aClassName "Private - Answer true if we have information pertaining to aClassName in our database." ^ self data includesKey: aClassName
languages: langs languages := langs
</methods> <methods> VWHelp.AHSHelpInfo <category>testing</category>
haveClass: className widgetID: id state: state ^ (self helpDataForClassName: className widgetID: id state: state ifAbsent: [nil]) notNil
</methods> <methods> VWHelp.AHSHelpInfo <category>languages</category>
indexForLanguage: lang ^self languages indexOf: lang
languages ^languages
</methods> <methods> VWHelp.AHSHelpInfo <category>initialize-release</category>
initialize languages := Array with: AHSStorageManager currentLanguage. data := AHSPersistentDictionary new
</methods> <methods> VWHelp.AHSHelpInfo class <category>instance creation</category>
languages: langs data: dict ^self basicNew languages: langs; data: dict
new ^super new initialize
</methods> <methods> VWHelp.AHSCacheHelpInfo <category>enumerating</category>
allHelpDataDo: aBlock "Visit each AHSHelpData" self fillCache. super allHelpDataDo: aBlock
</methods> <methods> VWHelp.AHSCacheHelpInfo <category>accessing-reading</category>
classNames "Answer all known class names with help data" | classNames envyKeys | classNames := super classNames. AHSStorageManager widgetSource == #Envy ifTrue: [ envyKeys := (AHSStorageManager envyRepositoryApp editionRecord inheritedUserFields asDictionary keys reject: [:ky | (ky asString findString: self class envyWidgetPrefix startingAt: 1) = 0]) collect: [:ky | ky copyFrom: self class envyWidgetPrefix size + 1 to: ky size]. classNames addAll: envyKeys]. classNames addAll: ((ApplicationModel allSubclasses select: [:cls| (cls class includesSelector: self class helpDataSelector) or: [cls ahsProcessorClass notNil]]) collect: [:cls | cls fullName]). classNames add: #AHSStorageManager. ^classNames
helpTextForID: idSymbol state: stateSymbol className: className language: languageSymbol mayDefault: aBoolean | text | text := super helpTextForID: idSymbol state: stateSymbol className: className language: languageSymbol mayDefault: aBoolean. (aBoolean and: [text isNil and: [className ~~ #AHSStorageManager]]) ifTrue: ["use AHSStorageManager as a default" text := self helpTextForID: idSymbol state: stateSymbol className: #AHSStorageManager language: languageSymbol mayDefault: false]. ^text
outlineLinkForID: idSymbol state: stateSymbol className: className language: languageSymbol mayDefault: aBoolean | outlineLink | outlineLink := super outlineLinkForID: idSymbol state: stateSymbol className: className language: languageSymbol mayDefault: aBoolean. (aBoolean and: [outlineLink isNil and: [className ~~ #AHSStorageManager]]) ifTrue: ["use AHSStorageManager as a default" outlineLink := self outlineLinkForID: idSymbol state: stateSymbol className: #AHSStorageManager language: languageSymbol mayDefault: false]. ^outlineLink
</methods> <methods> VWHelp.AHSCacheHelpInfo <category>private</category>
collectInstalledLanguages ^(AHSStorageManager perform: self class helpDataSelector) languages
fillCache "If there is any data not in the cache, fill it now" self classNames do: [:className | self fillCacheFor: className]
fillCacheFor: className (self data keys includes: className) ifTrue: [^ self]. AHSStorageManager widgetSource == #Envy ifTrue: [self installFromEnvy: className. (self data keys includes: className) ifTrue: [^ self]]. self installFromClassMethod: className.
helpDataForClassName: className widgetID: id state: state ifAbsent: aBlock self fillCacheFor: className. ^ super helpDataForClassName: className widgetID: id state: state ifAbsent: aBlock
</methods> <methods> VWHelp.AHSCacheHelpInfo <category>flushing</category>
flush data := AHSPersistentDictionary new
flushClassName: aClassName self data removeKey: aClassName ifAbsent: []
</methods> <methods> VWHelp.AHSCacheHelpInfo <category>initialize-release</category>
initialize super initialize. languages := self collectInstalledLanguages asSet asSortedCollection asArray
</methods> <methods> VWHelp.AHSCacheHelpInfo <category>database</category>
installFromClassMethod: className "Answer the help data loaded from the method or nil if not available" |classData | classData := self loadFromClassMethod: className. classData notNil ifTrue: [classData installInto: self className: className]. ^classData
loadFromClassMethod: className "Answer the help data loaded from the method or nil if not available" |cls classData | cls := className asQualifiedReference valueOrDo: [^nil]. classData := (cls respondsTo: self class helpDataSelector) ifTrue: [cls perform: self class helpDataSelector]. ^classData notNil ifTrue: [classData convertToLanguages: self languages]
</methods> <methods> VWHelp.AHSCacheHelpInfo class <category>class constants</category>
envyWidgetKey: className ^self envyWidgetPrefix , className
envyWidgetPrefix ^'ahs30.'
helpDataSelector ^#ahsHelpData
</methods> <methods> VWHelp.AHSPersistentDictionary <category>adding</category>
add: anAssociation "Include anAssociation as one of the receiver's elements. Answer anAssociation." | index element key | (key := anAssociation key) == nil ifTrue: [^self subscriptBoundsError: key]. index := self findKeyOrNil: key. element := self basicAt: index. element == nil ifTrue: [self atNewIndex: index put: anAssociation] ifFalse: [element odbDirty. element value: anAssociation value]. ^anAssociation
</methods> <methods> VWHelp.AHSPersistentDictionary <category>accessing</category>
at: key put: anObject "Set the value at key to be anObject. If key is not found, create a new entry for key and set is value to anObject. Answer anObject." | index element | key == nil ifTrue: [^self subscriptBoundsError: key]. index := self findKeyOrNil: key. element := self basicAt: index. element == nil ifTrue: [self atNewIndex: index put: (Association key: key value: anObject)] ifFalse: [element odbDirty. element value: anObject]. ^anObject
</methods> <methods> VWHelp.AHSPersistentDictionary <category>private</category>
atNewIndex: index put: anObject self odbDirty. ^super atNewIndex: index put: anObject
changeCapacityTo: newCapacity "Change the size of the receiver to newCapacity. The receiver will be regrown if necessary to fit its contents." "Note that #rehash uses this -- don't optimize the case where the receiver doesn't change in size." | newSelf | newSelf := self copyEmpty: newCapacity. self associationsDo: [:each | newSelf noCheckAdd: each]. self odbDirty. self become: newSelf.
fixCollisionsFrom: index self odbDirty. ^super fixCollisionsFrom: index
rehash "Do the same thing as changeCapacityTo: except don't do the become. Instead, copy all of the elements from the new set to the old" | newSelf | newSelf := self copyEmpty: self capacity. self associationsDo: [:each | newSelf noCheckAdd: each]. 1 to: self basicSize do: [:index | self basicAt: index put: (newSelf basicAt: index)].
swap: oneElement with: otherElement self odbDirty. ^super swap: oneElement with: otherElement
</methods> <methods> VWHelp.AHSPersistentDictionary <category>odb support</category>
odbDeepRefresh self odbRefreshIfNotDirty. self associationsDo: [:assoc| assoc odbRefreshIfNotDirty].
</methods> <methods> VWHelp.AHSPersistentDictionary <category>dictionary removing</category>
removeKey: anObject ifAbsent: aBlock "Unwind protection isn't needed since if it unwinds then that means the dictionary wasn't modified." | removed reply | removed := true. reply := super removeKey: anObject ifAbsent: [ removed := false. aBlock value]. removed ifTrue: [self odbDirty]. ^reply
</methods> <methods> VWHelp.AHSPersistentDictionary <category>printing</category>
storeOn: aStream "Append to the argument aStream a sequence of characters that is an expression whose evaluation creates an collection similar to the receiver. The general format for a Dictionary is ((class-name new) add: association; add: association; ... ; yourself)" | noneYet | aStream nextPutAll: '(('. aStream store: self class. aStream nextPutAll: ' new)'; crtab. noneYet := true. self associationsDo: [:each | noneYet ifTrue: [noneYet := false] ifFalse: [aStream nextPut: $;; crtab]. aStream nextPutAll: ' add: '. aStream store: each]. noneYet ifFalse: [aStream nextPutAll: '; yourself']. aStream nextPut: $)
</methods> <methods> VWHelp.AHSPreferencesSetup <category>private</category>
checkDisturbed "Only sent when my window's model is a UISettings." self triggerChannel dependents do: [:dep | ((dep isKindOf: BufferedValueHolder) and: [dep isBuffering]) ifTrue: [^self builder window model disturb]]. self builder window model undisturb.
</methods> <methods> VWHelp.AHSPreferencesSetup <category>interface opening</category>
postBuildWith: aBuilder "If the window that contains me doesn't have help enabled, enable it! This pretty much only applies when using the UISettings tool." | model | ((model := aBuilder window model) isKindOf: UISettings) not ifTrue: [^self]. model class ahsProcessorClass postOpenEnableHelpFor: model. model ahsSubBuilder aspectAt: #ahsTrigger put: self triggerChannel. "Here we must assume that we are the last one built (build is alphabetical order by spec name." self triggerChannel dependents do: [:dep | (dep isKindOf: BufferedValueHolder) ifTrue: [dep onChangeSend: #checkDisturbed to: self]].
preBuildWith: aBuilder "When using the UISettings tool, set up that window to have help." | model bld win | model := aBuilder window model. (model isKindOf: UISettings) ifTrue: [ bld := model builder. model builder: model ahsSubBuilder. win := model builder window. model builder setWindow: nil. model class ahsProcessorClass preBuildEnableHelpFor: model. model builder setWindow: win. model builder: bld].
</methods> <methods> VWHelp.AHSPreferencesSetup class <category>class initialization</category>
initialize self addPreferenceSpec: #zzzPreferencesSetupSpec.
</methods> <methods> VWHelp.AHSPreferencesSetup class <category>interface specs</category>
zzzPreferencesSetupSpec "The funky name just about assures that this spec will be the last built - build is in order of spec name." ^#(#FullSpec #window: #(#WindowSpec #label: 'Unlabeled Canvas' #bounds: #(#Rectangle 0 0 0 0 ) ) #component: #(#SpecCollection #collection: #() ) )
</methods> <methods> VWHelp.AHSTranslationText <category>comparing</category>
= aText "Can't use AHSUtils>>text:equals: because that checks the species." ^(aText isKindOf: #{Smalltalk.Text} value) and: [self translated = aText translated and: [self string = aText string and: [AHSUtils runArray: self runs equals: aText runs]]]
</methods> <methods> VWHelp.AHSTranslationText <category>converting</category>
asAHSTextBinder "Answer an AHSTranslationTextBinder object initialized from the receiver." ^AHSTranslationTextBinder helpText: self
asTranslationText ^self
</methods> <methods> VWHelp.AHSTranslationText <category>printing</category>
storeOn: aStream "Append to the argument aStream a sequence of characters that is an expression whose evaluation creates text similar to the receiver." "Handle degenerate case economically" self translated ifTrue: [^super storeOn: aStream]. (self runs hasChange not and: [self runs first isNil]) ifTrue: [aStream nextPutAll: '('; store: self string; nextPutAll: ' asTranslationText translated: false)'] ifFalse: [aStream nextPutAll: '((AHSTranslationText string: '; store: string; nextPutAll: ' runs: '; store: runs; nextPut: $); nextPutAll: ' translated: false)']
</methods> <methods> VWHelp.AHSTranslationText <category>accessing</category>
translated ^translated isNil ifTrue: [true] ifFalse: [translated]
translated: aBoolean translated := aBoolean. self odbDirty
</methods> <methods> VWHelp.ArborTextAttributes <category>private</category>
actualTextHeightFor: aFontDescription "Answer the actual text height for the font fetched. This may or may not be equal to the requested 'pixelSize'. Some platforms include whitespace above and below font glyphs as part of the pixelSize (MSWindows) while others do not (X-Windows). The actual size is calculated by displaying the font on an off-screen pixmap, then scanning the result to find the highest ascent and lowest descent and subtracting the difference. As a result, this calculation may take several seconds for large fonts." | pix gc image topRowIndex bottomRowIndex font testString blackValue | font := Screen default defaultFontPolicy findFont: aFontDescription copy. "Use a copy or strange stuff happens." "First, get the actual color of 'black' (usually zero, but you never know...')" pix := Pixmap extent: 1@1. pix graphicsContext paint: ColorValue black; displayRectangle: pix bounds. image := (pix contentsOfArea: pix bounds) first. blackValue := image atPoint: 0@0. "Display the string on a pixmap, then scan the image to find the actual height of the text." testString := 'gjplX'. pix := Pixmap extent: ((testString inject: 0 into: [:sum :ch | sum + (font widthOf: ch)]) max: 1) @ (font ascent + font descent). gc := pix graphicsContext. gc paint: ColorValue white; displayRectangle: pix bounds; paint: ColorValue black; font: font; displayString: testString at: 0 @ gc font ascent. image := (pix contentsOfArea: pix bounds) first. topRowIndex := 0. [ ((image rowAt: topRowIndex) detect: [:i | i = blackValue] ifNone: [nil]) isNil and: [(topRowIndex := topRowIndex + 1) < image height]] whileTrue. bottomRowIndex := image height - 1. [ ((image rowAt: bottomRowIndex) detect: [:i | i = blackValue] ifNone: [nil]) isNil and: [(bottomRowIndex := bottomRowIndex - 1) >= 0]] whileTrue. ^(bottomRowIndex - topRowIndex + 1) max: 0
</methods> <methods> VWHelp.ArborTextAttributes <category>system startup</category>
flushGridding "Instead of the laissez faire style that VW 2.5 uses by default, coerce the font to do a lookup now. This is done primarily to be sure that the instances stored in the TextStyles have had their FontDescriptions properly regenerated so that a recalculation is not necessary every time the image is started as it can be quite slow." self updateLineGridding.
install "This is generally sent when some attribute has been changed and recomputation must take place. Nil out the platform so that the #updateBasedOn: method will not be short-circuited." self platform: nil. super install.
updateLineGridding "VW 2.5 & 3.0" self updateLineGridding: (fontPolicySource isNil ifTrue: [Screen default defaultFontPolicy] ifFalse: [fontPolicySource]).
updateLineGridding: aFontPolicy "Update the text attributes so that the fetched font matches (in reality) the requested pixel size. Do not update the font if the platform has not changed. The font update is a relatively slow process, so this will make image startup time significantly less. The down side is that if the platform is the same but does not have the same fonts installed, then a re-lookup may be necessary and will not occur." | font fontD size failures | self platform = OSHandle currentPlatformID ifTrue: [^self]. self platform: OSHandle currentPlatformID. fontD := self defaultFontFor: aFontPolicy. fontD pixelSize: self truePixelSize. characterAttributes setDefaultQuery: fontD for: aFontPolicy; invalidateQueryCache. size := self actualTextHeightFor: fontD. failures := 0. [size < self truePixelSize and: [(failures := failures + 1) < 10]] whileTrue: [ fontD pixelSize: fontD pixelSize + 1. characterAttributes setDefaultQuery: fontD for: aFontPolicy; invalidateQueryCache. size := self actualTextHeightFor: fontD]. failures := 0. [size > self truePixelSize and: [(failures := failures + 1) < 10]] whileTrue: [ (fontD pixelSize > 1) ifTrue: [fontD pixelSize: fontD pixelSize - 1. characterAttributes setDefaultQuery: fontD for: aFontPolicy; invalidateQueryCache. size := self actualTextHeightFor: fontD]]. font := aFontPolicy findFont: (self fontAt: fontAttributeForLeading for: aFontPolicy) copy. baseline := font ascent + topLeading. lineGrid := font height + bottomLeading + topLeading.
</methods> <methods> VWHelp.ArborTextAttributes <category>initialize-release</category>
initialize super initialize. self truePixelSize: 12. "Will be overridden later."
</methods> <methods> VWHelp.ArborTextAttributes <category>accessing</category>
platform ^platform
platform: aPlatformString platform := aPlatformString.
scalingFactor: aNumber "Set the scaling factor. This controls how large the default font will be, relative to the system default font size." aNumber = 1 ifTrue: [super scalingFactor: aNumber] ifFalse: [self error: self class name, ' does not scale.'].
truePixelSize ^truePixelSize
truePixelSize: aSmallInteger truePixelSize := aSmallInteger.
</methods> <methods> VWHelp.ArborTextAttributes class <category>class initialization</category>
addAttributeOfSize: aSmallInteger named: aSymbol "Create a new instance of ArborTextAttributes whose font size is aSmallInteger. Add the new instance into the TextStyles dictionary, registered under the name aSymbol." | style cStyle | cStyle := CharacterAttributes newWithDefaultAttributes. cStyle setDefaultQuery: (FontDescription new family: #('helv' 'helvetica' 'arial' '*'); manufacturer: #('adobe' '*'); fixedWidth: false; serif: false; italic: false; boldness: 0.5; pixelSize: aSmallInteger "The actual value will be set later"). (style := self characterAttributes: cStyle) truePixelSize: aSmallInteger; install. self styleNamed: aSymbol put: style.
initialize "ArborTextAttributes initialize." Cursor wait showWhile: [| squish | #(8 9 10 12 14 16 18 20) do: [:pixelSize || sizeString | (sizeString := pixelSize printString) size = 1 ifTrue: [sizeString := '0', sizeString]. self addAttributeOfSize: pixelSize named: ('Arbor-', sizeString) asSymbol]. "Add extra 12- and 14-pixel fonts whose line grid is based on #normal instead of #large (good for lists, etc.)." squish := (self styleNamed: #'Arbor-12') fontAttributeForLeading: #normal; topLeading: 0; bottomLeading: 0. squish install. self styleNamed: #'Arbor-12-Squeeze' put: squish. squish := (self styleNamed: #'Arbor-14') fontAttributeForLeading: #normal; topLeading: 0; bottomLeading: 0. squish install. self styleNamed: #'Arbor-14-Squeeze' put: squish].
obsolete self removeStyles. super obsolete.
removeStyles "Remove all styles based on ArborTextAttributes. Also flush the font cache to get rid of references that are held through cached font references." "ArborTextAttributes removeStyles" TextStyles copy keysAndValuesDo: [:styleName :style | style class = self ifTrue: [self removeStyleNamed: styleName ifAbsent: []]]. Screen default defaultFontPolicy flushFonts.
</methods> <methods> VWHelp.ArborTextAttributes class <category>utility</category>
refreshInstances "Coerce an immediate refresh of all instances to rebind them to local fonts." "self refreshInstances" self allInstancesDo: [:inst | inst platform: nil]. self allSubInstancesDo: [:inst | inst platform: nil]. super flushGridding.
</methods> <methods> VWHelp.AHSHelpClassData <category>comparing</category>
= anAHSHelpClassData self languages ~= anAHSHelpClassData languages ifTrue: [^false]. self widgetData keys asSortedCollection ~= anAHSHelpClassData widgetData keys asSortedCollection ifTrue: [^false]. self widgetData keysAndValuesDo: [:id :stateDict | |stateDict2| stateDict2 := anAHSHelpClassData widgetData at: id. stateDict keys asSortedCollection ~= stateDict2 keys asSortedCollection ifTrue: [^false]. stateDict keysAndValuesDo: [:state :helpData | |helpData2| helpData2 := stateDict2 at: state. helpData ~= helpData2 ifTrue: [^false]]]. ^true
</methods> <methods> VWHelp.AHSHelpClassData <category>private</category>
addWidgetData: assocArray "This method is invoked when the help is stored as multiple methods (due to the Smalltalk Compiler's 256 literal limit) and is being rebuilt." self widgetData addAll: assocArray.
widgetData: anAHSPersistentDictionary widgetData := anAHSPersistentDictionary
</methods> <methods> VWHelp.AHSHelpClassData <category>installing</category>
convertToLanguages: langArray "Convert data to match langArray" | copy | self languages = langArray ifTrue: [^self]. copy := self copy. copy languages: langArray copy. self widgetData keysAndValuesDo: [:widgetID :stateDict | stateDict keysAndValuesDo: [:state :helpData | |copyHelpData| copyHelpData := (copy widgetData at: widgetID) at: state. copyHelpData setTexts: nil outlineLinks: nil. copy languages do: [:lang | (langArray includes: lang) ifTrue: [copyHelpData textAt: (copy indexForLanguage: lang) put: (helpData textAt: (self indexForLanguage: lang)). copyHelpData outlineLinkAt: (copy indexForLanguage: lang) put: (helpData outlineLinkAt: (self indexForLanguage: lang))]]]]. ^copy
installInto: aHelpInfo className: className "Make sure the languages match at this point" self languages = aHelpInfo languages ifFalse: [^(self convertToLanguages: aHelpInfo languages) installInto: aHelpInfo className: className]. aHelpInfo data at: className put: self widgetData
</methods> <methods> VWHelp.AHSHelpClassData <category>accessing</category>
indexForLanguage: lang ^self languages indexOf: lang
languages ^languages
widgetData ^widgetData
</methods> <methods> VWHelp.AHSHelpClassData <category>initialize-release</category>
initialize languages := Array new. widgetData := AHSPersistentDictionary new
languages: anArray languages := anArray
setLanguages: anArray widgetData: anAHSPersistentDictionary self languages: anArray; widgetData: anAHSPersistentDictionary
</methods> <methods> VWHelp.AHSHelpClassData <category>copying</category>
postCopy languages := languages copy. widgetData := AHSPersistentDictionary withAll: (widgetData associations collect: [:assn | assn key "widgetID"->(AHSPersistentDictionary withAll: (assn value associations collect: [:assn2 | assn2 key "state"->assn2 value copy]))])
</methods> <methods> VWHelp.AHSHelpClassData <category>printing</category>
storeOn: aStream aStream nextPutAll: '(AHSHelpClassData languages: '; store: self languages; nextPutAll: ' widgetData: '; store: self widgetData; nextPut: $)
</methods> <methods> VWHelp.AHSHelpClassData class <category>instance creation</category>
languages: anArray widgetData: anAHSPersistentDictionary ^self new setLanguages: anArray widgetData: anAHSPersistentDictionary
</methods> <methods> VWHelp.AHSHelpData <category>comparing</category>
= anAHSHelpData ^self class == anAHSHelpData class and: [outlineLinks = anAHSHelpData outlineLinks and: [texts notNil ifTrue: [(texts collect: [:t | t notNil ifTrue: [t asTranslationText asAHSTextBinder]]) = (anAHSHelpData texts collect: [:t | t notNil ifTrue: [t asTranslationText asAHSTextBinder]])] ifFalse: [true]]]
hash ^texts hash bitXor: outlineLinks hash
</methods> <methods> VWHelp.AHSHelpData <category>private</category>
adjustCollection: aCollection minSize: anInteger "Private - Answer a collection which can contain at least anInteger elements. Initialize the new collection with data from aCollection. If aCollection is large enough, simply answer aCollection." aCollection isNil ifTrue: [^ Array new: anInteger]. aCollection size >= anInteger ifTrue: [^ aCollection]. ^ (Array new: anInteger) replaceFrom: 1 to: aCollection size with: aCollection
collection: aCollection at: anIndex put: aText assignMethod: settingMethodName "Private - Put aText at anIndex. Adjust aCollection as necessary before adding the element. If a new collection is created. assign it to the proper instance variable by using the given settingMethodName." | theCollection | theCollection := self adjustCollection: aCollection minSize: anIndex. self perform: settingMethodName with: theCollection. theCollection at: anIndex put: aText. theCollection odbDirty
indexOutOfRange: anInteger for: aCollection "Private - Answer true if anInteger is not a valid index in aCollection. This method covers the case where the collection is nil because nil answer 0 to size." ^ anInteger <= 0 or: [anInteger > aCollection size]
outlineLinks ^outlineLinks
setTexts: textsArray outlineLinks: outlineLinksArray texts := textsArray. outlineLinks := outlineLinksArray
texts ^texts
</methods> <methods> VWHelp.AHSHelpData <category>removing</category>
clearIndex: anIndex "Nil out the slot" self clearTextSlot: anIndex; clearOutlineLinkSlot: anIndex.
removeIndex: anIndex "Remove the slot entirely" self removeTextSlot: anIndex; removeOutlineLinkSlot: anIndex.
</methods> <methods> VWHelp.AHSHelpData <category>removing - private</category>
clearOutlineLinkSlot: anIndex "Private - Clear the position indicated by anIndex in the outline links collection." self outlineLinks: (self clearSlot: anIndex in: outlineLinks).
clearSlot: anIndex in: aCollection "Private - Answer a new collection with the given location cleared. If an invalid index was given, or if the aCollection is nil, answer aCollection." | newCollection | (self indexOutOfRange: anIndex for: aCollection) ifTrue: [^ aCollection]. newCollection := aCollection copy. newCollection at: anIndex put: nil. ^ newCollection
clearTextSlot: anIndex "Private - Clear the position indicated by anIndex in the texts collection." self texts: (self clearSlot: anIndex in: texts).
removeOutlineLinkSlot: anInteger "Private - Remove the slot in outline links indicated by anInteger." self outlineLinks: (self removeSlot: anInteger in: outlineLinks).
removeSlot: anInteger in: aCollection "Private - Answer a new collection which represents aCollection with the slot identified by anInteger removed. If the slot isn't removable, answer aCollection." (self indexOutOfRange: anInteger for: aCollection) ifTrue: [^ aCollection]. ^ (aCollection copyFrom: 1 to: anInteger - 1) , (aCollection size > anInteger ifTrue: [aCollection copyFrom: anInteger + 1 to: aCollection size] ifFalse: [#()]).
removeTextSlot: anInteger "Private - Remove the slot in texts indicated by anInteger." self texts: (self removeSlot: anInteger in: texts).
</methods> <methods> VWHelp.AHSHelpData <category>adding</category>
insertIndex: anIndex self insertTextSlot: anIndex; insertOutlineLinkSlot: anIndex. self odbDirty
</methods> <methods> VWHelp.AHSHelpData <category>adding - private</category>
insertOutlineLinkSlot: anIndex "Private - Insert a new position indicated by anIndex in the outline links collection." outlineLinks := self insertSlot: anIndex in: outlineLinks.
insertSlot: anIndex in: aCollection "Private - Answer a new collection containing a new slot inserted at anIndex." aCollection isNil ifTrue: [^ Array new: anIndex]. ^ aCollection size < anIndex ifTrue: [(Array new: anIndex) replaceFrom: 1 to: aCollection size with: aCollection] ifFalse: [(aCollection copyFrom: 1 to: anIndex - 1) , #(nil) , (aCollection copyFrom: anIndex to: aCollection size)].
insertTextSlot: anIndex "Private - Insert a new position indicated by anIndex in the texts collection." texts := self insertSlot: anIndex in: texts.
</methods> <methods> VWHelp.AHSHelpData <category>accessing</category>
outlineLinkAt: anIndex "Answer the value found at anIndex in outlineLinks. If outlineLinks is nil, or if anIndex is invalid, nil is returned." ^ self valueAt: anIndex in: outlineLinks.
outlineLinkAt: anIndex put: aText self collection: outlineLinks at: anIndex put: aText assignMethod: #outlineLinks:
outlineLinks: aCollection "Set outlineLinks to be aCollection. If the collection has changed, mark the system as dirty for the benefit of OODBMS's" outlineLinks == aCollection ifTrue: [^ self]. outlineLinks := aCollection. self odbDirty
textAt: anIndex "Answer the value found at anIndex in texts. If texts is nil, or if anIndex is invalid, nil is returned." ^ self valueAt: anIndex in: texts.
textAt: anIndex put: aText self collection: texts at: anIndex put: aText assignMethod: #texts:
texts: aCollection "Set texts to be aCollection. If the collection has changed, mark the system as dirty for the benefit of OODBMS's" texts == aCollection ifTrue: [^ self]. texts := aCollection. self odbDirty
</methods> <methods> VWHelp.AHSHelpData <category>copying</category>
postCopy texts notNil ifTrue: [texts := texts collect: [:txt | txt notNil ifTrue: [txt ahsDeepCopyOfText]]]. outlineLinks notNil ifTrue: [outlineLinks := outlineLinks collect: [:each | each notNil ifTrue: [each collect: [:elm | elm copy]]]] "elm is <String | nil | Integer>"
</methods> <methods> VWHelp.AHSHelpData <category>printing</category>
storeOn: aStream aStream nextPut: $(; store: self class; nextPutAll: ' texts: '; store: texts; nextPutAll: ' outlineLinks: '; store: outlineLinks; nextPut: $)
</methods> <methods> VWHelp.AHSHelpData <category>accessing - private</category>
valueAt: anIndex in: aCollection "Private - Answer the value found at anIndex in aCollection. The collection is checked for existence and the index is checked for validity before the item is accessed. If the index is invalid, nil is returned." (self indexOutOfRange: anIndex for: aCollection) ifTrue: [^ nil]. ^ aCollection at: anIndex
</methods> <methods> VWHelp.AHSHelpData class <category>instance creation</category>
texts: textsArray outlineLinks: outlineLinksArray ^ self new setTexts: textsArray outlineLinks: outlineLinksArray
</methods> <methods> VWHelp.AHSBalloonHelpPreferencesModel <category>builder accessing</category>
balloonDisplayDelay ^ self builder aspectAt: #balloonDisplayDelay
balloonKillDelay ^ self builder aspectAt: #balloonKillDelay
</methods> <methods> VWHelp.AHSBalloonHelpPreferencesModel <category>interface opening</category>
preBuildWith: aBuilder super preBuildWith: aBuilder. aBuilder aspectAt: #balloonDisplayDelay put: (self adapt: #balloonDisplayDelay for: AHSWHCProcessor); aspectAt: #balloonKillDelay put: (self adapt: #balloonKillDelay for: AHSWHCProcessor); aspectAt: #restrictBalloonToCondensedText put: (self adapt: #restrictBalloonToCondensedText for: AHSWHCProcessor).
</methods> <methods> VWHelp.AHSBalloonHelpPreferencesModel class <category>help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#balloonKillValueField -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'The number of milliseconds to wait before automatically closing an open balloon.' runs: (RunArray runs: #(80) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#balloonHelpConfigGroupBox -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Configure the settings for Ballon Help (sometimes referred to as "Bubble Help") in this section.' runs: (RunArray runs: #(96) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#restrictBalloonToCondensedTextCB -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Uncheck this box to show full help text in balloons. If no specific condensed help then full help text will be used.' runs: (RunArray runs: #(117) values: #(nil))); yourself) outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Check this box to show only condensed help text in balloons. If no condensed help, no balloon will open.' runs: (RunArray runs: #(105) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#balloonDelayValueField -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'The number of milliseconds that will elapse between when a widget is entered and the balloon pops up.' runs: (RunArray runs: #(101) values: #(nil))); yourself) outlineLinks: nil)); yourself)); yourself))
</methods> <methods> VWHelp.AHSBalloonHelpPreferencesModel class <category>class initialization</category>
initialize "self initialize" self addPreferenceSpec: #balloonHelpConfigSpec.
</methods> <methods> Core.MessageSend <category>Arbor Core adds</category>
storeOn: aStream "Append to the argument aStream a sequence of characters that is an expression whose evaluation creates a message similar to the receiver. The general format for messages is ( Message selector: selector arguments: args)" aStream nextPut: $(. aStream nextPutAll: 'MessageSend receiver: '. self receiver storeOn: aStream. aStream nextPutAll: ' selector: '. selector storeOn: aStream. aStream nextPutAll: ' arguments: '. args storeOn: aStream. aStream nextPut: $)
</methods> <methods> Core.String <category>AHS Core adds</category>
ahsContainsString: aString "Answer true if the receiver contains aString within itself." ^ (self indexOfSubCollection: aString startingAt: 1) > 0
asAHSTextBinder "Answer an AHSTextBinder object initialized from the receiver." ^#{VWHelp.AHSTextBinder} value helpText: self
</methods> <methods> Graphics.ColorValue <category>AHS Core adds-printing</category>
htmlColorCode "Answer a string representation of the color value in a format acceptable to HTML." | output | output := WriteStream on: ''. ^ output nextPutAll: '"#'; nextPutAll: ((self red * 255) truncated printStringRadix: 16); nextPutAll: ((self green * 255) truncated printStringRadix: 16); nextPutAll: ((self blue * 255) truncated printStringRadix: 16); nextPutAll: '"'; contents
rtfColorCode "Answer a string representation of the color value in a format acceptable to RTF." | output | output := WriteStream on: ''. ^ output nextPutAll: '\red'; nextPutAll: (self red * 255) truncated printString; nextPutAll: '\green'; nextPutAll: (self green * 255) truncated printString; nextPutAll: '\blue'; nextPutAll: (self blue * 255) truncated printString; nextPutAll: ';'; contents
</methods> <methods> VWHelp.AHSWHCGlobalHelp class <category>AHS Core adds-help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#ahsText -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (AHSTextBinder fullText: (#{Smalltalk.Text} value string: 'This window shows help text for the widgets in the active window. If no help shows here then there is either no help for that widget or the window does not serve help text.' runs: (RunArray runs: #(173) values: #(nil))) condensedText: '' asText); yourself) outlineLinks: nil)); yourself)); add: (#ahsFlag -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (AHSTextBinder fullText: (#{Smalltalk.Text} value string: 'This check box will toggle both widget and bubble help enablement on and off for the entire system. Windows with their own check box will normally only toggle widget help for that particular window.' runs: (RunArray runs: #(199) values: #(nil))) condensedText: '' asText); yourself) outlineLinks: nil)); yourself)); add: (#ahsBackground -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'This window shows help text for the widgets in the active window. If no help shows here then there is either no help for that widget or the window does not serve help text.' runs: (RunArray runs: #(173) values: #(nil))); yourself) outlineLinks: nil)); yourself)); yourself))
</methods> <methods> Core.Object <category>AHS Core adds</category>
odbDeepRefresh "Default to simply do an undirty refresh." self odbRefreshIfNotDirty
odbDirty "If using GemStone, send markDirty. If using Versant, send vDirty" #{GSSessionManager} isDefined ifTrue: [self markDirty]. #{ODBInterface} isDefined ifTrue: [self vDirty]
odbReadLock "If Versant is in the system, obtain a read lock on myself." (#{ODBInterface} isDefined and: [self isPersistent]) ifTrue: [| verr | verr := #{VError} value. ^verr errorSignal handle: [:ex | (verr errorSymbol == #'SM_LOCK_WOULDBLOCK' or: [verr errorSymbol == #'SM_LOCK_DEADLOCK']) ifTrue:[ex returnWith: false] ifFalse:[ex reject]] do: [self upgradeLockTo: #RLOCK withOption: #'O_LK_NOWAIT']]. ^true
odbRefresh "If in Versant, refresh self from the ODB." #{ODBInterface} isDefined ifTrue: [self refresh].
odbRefreshIfNotDirty "If in Versant, refresh self from the ODB if self hasn't been changed locally." #{ODBInterface} isDefined ifTrue: [self proxy isDirty not ifTrue: [self odbRefresh]].
odbRelease "If using GemStone, send stubYourself." #{GemSessionManager} isDefined ifTrue: [self stubYourself].
odbReleaseLock "If Versant is in the system, release any locks on myself by downgrading to a #NOLOCK." (#{ODBInterface} isDefined and: [self isPersistent]) ifTrue: [^self downgradeLockTo: #NOLOCK]. ^true
odbReleaseUnDirtyLock "If in Versant, release the lock on self if undirty." #{ODBInterface} isDefined ifTrue: [self proxy isDirty not ifTrue: [self odbReleaseLock]].
odbWriteLock "If Versant is in the system, obtain a write lock on myself." (#{ODBInterface} isDefined and: [self isPersistent]) ifTrue: [| verr | verr := #{VError} value. ^verr errorSignal handle: [:ex | (verr errorSymbol == #'SM_LOCK_WOULDBLOCK' or: [verr errorSymbol == #'SM_LOCK_DEADLOCK']) ifTrue:[ex returnWith: false] ifFalse:[ex reject]] do: [self upgradeLockTo: #WLOCK withOption: #'O_LK_NOWAIT']]. ^true
</methods> <methods> Core.Text <category>AHS Core adds - copying</category>
ahsDeepCopyOfText ^#{VWHelp.AHSUtils} value deepCopyOfText: self
</methods> <methods> Core.Text <category>AHS Core adds</category>
asAHSTextBinder "Answer an AHSTextBinder object initialized from the receiver." ^#{VWHelp.AHSTextBinder} value helpText: self
asTranslationText ^#{VWHelp.AHSTranslationText} value string: self string runs: self runs
translated "For polymorphism with AHSTranslationText" ^true
</methods> <methods> Core.Stream <category>AHS Core adds</category>
ahsNextPutAllText: aText "Copied out of TextStream as this should be polymorphic to all writeable streams." "Append aText to the receiver, preserving emphasis. Answer aText." | i inStream end span oldEmphasis | aText isEmpty ifTrue: [^aText]. oldEmphasis := self emphasis. i := 1. inStream := aText string readStream. end := aText size. [i <= end] whileTrue: [ self emphasis: (aText emphasisAt: i). span := aText runLengthFor: i. self nextPutAll: (inStream next: span). i := i + span]. self emphasis: oldEmphasis. ^aText
</methods> <methods> UI.UISettings class <category>AHS Core adds</category>
addAHSSectionTo: aDictionary development: devSpecs runtime: runtimeSpecs "Add the Lens set of preferences and settings slices to the arguments." devSpecs addLast: 'AHS'->#(#ahsSettingsSpec #ahsHelp)
ahsDynamicallyGeneratedSpec ^#{VWHelp.AHSPreferences} value dynamicallyGeneratedSpecForTrigger: nil asValue
ahsHelpData ^(#{VWHelp.AHSHelpClassData} value languages: #(#English) widgetData: ((#{VWHelp.AHSPersistentDictionary} value new) add: (#ahsBackground -> ((#{VWHelp.AHSPersistentDictionary} value new) add: (#default -> (#{VWHelp.AHSHelpData}value texts: ((Array new: 1) at: 1 put: ''; yourself) outlineLinks: nil)); yourself)); yourself))
arborHelpEnabled "Answer true if the Arbor Help System is to be enabled for this application. The default is false." ^true
</methods> <methods> UI.UISettings <category>AHS Core adds</category>
ahsAccept (self ahsSubBuilder aspectAt: #ahsTrigger) value: true.
ahsHelp ^'Settings for the Arbor Help System'
ahsReset (self ahsSubBuilder aspectAt: #ahsTrigger) value: false.
ahsSubBuilder ^subBuilder
</methods> <methods> Core.CharacterArray <category>AHS Core adds</category>
asArrayOfLines "Answer an array of items derived from the receiver where each item represents a portion of the receiver delimited by a 'cr'." | stream result | stream := ReadStream on: self. result := OrderedCollection new. [stream atEnd] whileFalse: [result add: (stream upTo: Character cr)]. ^ result asArray
asTranslationText ^ self asText asTranslationText
</methods> <methods> VWHelp.AHSPreferences class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Help System Preferences' #min: #(#Point 431 260 ) #max: #(#Point 431 418 ) #bounds: #(#Rectangle 708 323 1139 741 ) ) #component: #(#SpecCollection #collection: #( #(#SubCanvasSpec #layout: #(#LayoutFrame 2 0 -48 1 -2 1 -2 1 ) #flags: 0 #minorKey: #ahsSpec ) #(#ActionButtonSpec #layout: #(#LayoutFrame -136 1 -85 1 -76 1 -52 1 ) #name: #accept #model: #accept #label: 'OK' #isDefault: false #defaultable: true ) #(#ActionButtonSpec #layout: #(#LayoutFrame -67 1 -85 1 -6 1 -52 1 ) #name: #cancel #model: #cancel #label: 'Cancel' #defaultable: true ) #(#SubCanvasSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 -90 1 ) #name: #dynamicallyGeneratedSubcanvas #flags: 0 #minorKey: #dynamicallyGeneratedSpec ) ) ) )
</methods> <methods> VWHelp.AHSCorePreferencesModel class <category>interface specs</category>
coreConfigSpec "UIPainter new openOnClass: self andSelector: #coreConfigSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Help System Preferences' #min: #(#Point 280 55 ) #max: #(#Point 440 358 ) #bounds: #(#Rectangle 359 485 639 575 ) ) #component: #(#SpecCollection #collection: #( #(#GroupBoxSpec #layout: #(#LayoutFrame 3 0 1 0 -3 1 -1 1 ) #name: #widgetHelpConfigGroupBox #label: 'Widget Help Configuration' #style: #'Arbor-12-Squeeze' ) #(#CheckBoxSpec #layout: #(#Point 20 24 ) #name: #showHelp #model: #showHelp #label: 'Show Help' #style: #'Arbor-12-Squeeze' ) #(#CheckBoxSpec #layout: #(#Point 20 44 ) #name: #useWidgetHelp #model: #useWidgetHelp #label: 'Use Widget Help' #style: #'Arbor-12-Squeeze' ) #(#CheckBoxSpec #layout: #(#Point 20 64 ) #name: #useBalloonHelp #model: #useBalloonHelp #label: 'Use Balloon Help (F3)' #style: #'Arbor-12-Squeeze' ) ) ) )
</methods> <methods> VWHelp.AHSBalloonHelpPreferencesModel class <category>interface specs</category>
balloonHelpConfigSpec "UIPainter new openOnClass: self andSelector: #balloonHelpConfigSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Help System Preferences' #min: #(#Point 417 55 ) #max: #(#Point 440 358 ) #bounds: #(#Rectangle 612 474 1029 577 ) ) #component: #(#SpecCollection #collection: #( #(#GroupBoxSpec #layout: #(#LayoutFrame 3 0 1 0 -3 1 -1 1 ) #name: #balloonHelpConfigGroupBox #label: 'Balloon Help Display Configuration' #style: #'Arbor-12-Squeeze' ) #(#LabelSpec #layout: #(#AlignmentOrigin 20 0 35 0 0 0.5 ) #name: #balloonDelayLabel #label: 'Balloon Display Delay:' #style: #'Arbor-12-Squeeze' ) #(#InputFieldSpec #layout: #(#Rectangle 178 24 221 47 ) #name: #balloonDelayValueField #model: #balloonDisplayDelay #alignment: #right #style: #'Arbor-12-Squeeze' #type: #number #formatString: '0' ) #(#LabelSpec #layout: #(#Point 223 25 ) #name: #msecsLabel #label: 'ms' #style: #'Arbor-12-Squeeze' ) #(#LabelSpec #layout: #(#AlignmentOrigin 20 0 62 0 0 0.5 ) #name: #balloonKillLabel #label: 'Balloon Kill Delay:' #style: #'Arbor-12-Squeeze' ) #(#InputFieldSpec #layout: #(#Rectangle 178 50 221 74 ) #name: #balloonKillValueField #model: #balloonKillDelay #alignment: #right #style: #'Arbor-12-Squeeze' #type: #number #formatString: '0' ) #(#LabelSpec #layout: #(#Point 223 52 ) #name: #msecsLabel #label: 'ms' #style: #'Arbor-12-Squeeze' ) #(#CheckBoxSpec #layout: #(#AlignmentOrigin 21 0 87 0 0 0.5 ) #name: #restrictBalloonToCondensedTextCB #model: #restrictBalloonToCondensedText #label: 'Restrict Balloon to Condensed Text' #style: #'Arbor-12-Squeeze' ) ) ) )
</methods> <methods> UI.UISettings class <category>AHS Core adds</category>
ahsSettingsSpec "UIPainter new openOnClass: self andSelector: #ahsSettingsSpec" <resource: #canvas> ^#(#{FullSpec} #window: #(#{WindowSpec} #label: 'Unlabeled Canvas' #bounds: #(#{Rectangle} 591 417 893 718 ) ) #component: #(#{SpecCollection} #collection: #( #(#{SubCanvasSpec} #layout: #(#{LayoutFrame} 2 0 2 0 -2 1 -86 1 ) #name: #ahsSettings #flags: 9 #minorKey: #ahsDynamicallyGeneratedSpec ) #(#{SubCanvasSpec} #layout: #(#{LayoutFrame} 0 0 -48 1 0 1 0 1 ) #flags: 0 #minorKey: #ahsSpec ) #(#{ActionButtonSpec} #layout: #(#{LayoutFrame} 4 0 -80 1 73 0 -53 1 ) #name: #acceptButton #flags: 40 #model: #ahsAccept #callbacksSpec: #(#{UIEventCallbackSubSpec} #valueChangeSelector: #undisturb ) #label: 'Accept' #style: #'Arbor-12-Squeeze' ) #(#{ActionButtonSpec} #layout: #(#{LayoutFrame} -34 0.5 -80 1 35 0.5 -53 1 ) #name: #resetButton #flags: 40 #model: #ahsReset #callbacksSpec: #(#{UIEventCallbackSubSpec} #valueChangeSelector: #undisturb ) #label: 'Reset' #style: #'Arbor-12-Squeeze' ) #(#{ActionButtonSpec} #layout: #(#{LayoutFrame} -73 1 -80 1 -4 1 -53 1 ) #name: #helpButton #model: #helpAction #callbacksSpec: #(#{UIEventCallbackSubSpec} #valueChangeSelector: #undisturb ) #label: 'Help' #style: #'Arbor-12-Squeeze' ) ) ) )
</methods> <initialize> VWHelp.AHSPreferences </initialize> <initialize> VWHelp.AHSCorePreferencesModel </initialize> <initialize> VWHelp.AHSStorageManager </initialize> <initialize> VWHelp.AHSPreferencesSetup </initialize> <initialize> VWHelp.ArborTextAttributes </initialize> <initialize> VWHelp.AHSBalloonHelpPreferencesModel </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>Stream</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none <imports> private IOConstants.* </imports> <category>Collections-Streams</category> <attributes> <package>Collections-Streams</package> </attributes> </class> <class> <name>CharacterArray</name> <environment>Core</environment> <super>Core.ArrayedCollection</super> <private>false</private> none <imports></imports> <category>Collections-Text</category> <attributes> <package>Collections-Text</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>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>UISettings</name> <environment>UI</environment> <super>UI.ApplicationModel</super> <private>false</private> none list disturbed subBuilder <imports></imports> <category>Interface-Support</category> <attributes> <package>Interface-Support</package> </attributes> </class> <class> <name>ColorValue</name> <environment>Graphics</environment> <super>Graphics.SimplePaint</super> <private>false</private> none red green blue <imports></imports> <category>Graphics-Support</category> <attributes> <package>Graphics-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>SimpleDialog</name> <environment>UI</environment> <super>UI.ApplicationModel</super> <private>false</private> none close accept cancel preBuildBlock postBuildBlock postOpenBlock escapeIsCancel parentView <imports></imports> <category>Interface-Dialogs</category> <attributes> <package>Interface-Dialogs</package> </attributes> </class> <class> <name>MessageSend</name> <environment>Core</environment> <super>Core.Message</super> <private>false</private> none receiver <imports></imports> <category>Kernel-Methods</category> <attributes> <package>Kernel-Methods</package> </attributes> </class> <class> <name>Dictionary</name> <environment>Core</environment> <super>Core.Set</super> <private>false</private> objects <imports></imports> <category>Collections-Unordered</category> <attributes> <package>Collections-Unordered</package> </attributes> </class> <class> <name>VariableSizeTextAttributes</name> <environment>Graphics</environment> <super>Graphics.TextAttributes</super> <private>false</private> none scale bottomLeading topLeading fontAttributeForLeading fontPolicySource lastFontPolicy <imports> private Graphics.TextConstants.* </imports> <category>Graphics-Fonts</category> <attributes> <package>Graphics-Fonts</package> </attributes> </class>