From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:50:13 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>AHSOutlineViewer</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none toolbarTextEditor outliner history infoHasChanged searchEntriesFound searchString outlinerWindowMenu historyIndex shouldUpdateHistoryStack zoomed bookmarks initialSelection outlineSource readOnly lastEntry <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSOutlineViewer
Copyright © 1994, 1995 Arbor Intelligent Systems, Inc. This class is the model for help outliners, which are used to stored and display a help outline. Instance Variables: toolbarTextEditor <ClassOfVariable> description of variable's function outliner <ClassOfVariable> description of variable's function history <ClassOfVariable> description of variable's function infoHasChanged <ClassOfVariable> description of variable's function searchEntriesFound <ClassOfVariable> description of variable's function searchString <ClassOfVariable> description of variable's function outlinerWindowMenu <ClassOfVariable> description of variable's function historyIndex <ClassOfVariable> description of variable's function shouldUpdateHistoryStack <ClassOfVariable> description of variable's function zoomed <ClassOfVariable> description of variable's function bookmarks <ClassOfVariable> description of variable's function initialSelection <ClassOfVariable> description of variable's function outlineSource <ClassOfVariable> description of variable's function readOnly <ClassOfVariable> description of variable's function lastEntry <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSHelpOutlineEntry</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none topic text uniqueID clipboard <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHelpOutlineEntry
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This class is used for storing each of the entries in an outline. Instance Variables: topic <ClassOfVariable> description of variable's function text <ClassOfVariable> description of variable's function uniqueID <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSMemoryFriendlyHelpOutlineEntry</name> <environment>VWHelp</environment> <super>VWHelp.AHSHelpOutlineEntry</super> <private>false</private> none filename <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSMemoryFriendlyHelpOutlineEntry
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This class is used for storing each of the entries in an outline in a filePointer format which allows topics to be loaded as they are needed, rather than requiring the entire outline to be loaded. Instance Variables: filename <ClassOfVariable> description of variable's function
</comment> <class> <name>ArborAbstractTree</name> <environment>VWHelp</environment> <super>Core.Collection</super> <private>false</private> none parent children <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborAbstractTree
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: parent <ClassOfVariable> description of variable's function children <ClassOfVariable> description of variable's function
</comment> <class> <name>ArborSlaveApplicationModel</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none parentWindow windowType relativeOrigin initialExtent alwaysVisible allowUserPlacement isPinned <imports></imports> <category>Help-Arbor GUI Extensions</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborSlaveApplicationModel
Copyright 1996, 1998 Arbor Intelligent Systems, Inc. ArborSlaveApplicationModel This class provides behavior for making an application model's window a 'slave' of another window. This includes collapsing when the master collapses, optionally sticking to a location relative to the master regardless of where it is moved, closing when the master closes, etc. The slave can realign itself if either it or the master window is resized. Optionally, the slave may adhere to the screen boundaries - that is, the slave will not disappear off the screen if the master is too close to the edge. The overall behavior of instances of this class will be very similar to what one finds on some platforms where a window has a palette 'attached' to it. Instance Variables: parentWindow <ClassOfVariable> description of variable's function windowType <ClassOfVariable> description of variable's function relativeOrigin <ClassOfVariable> description of variable's function initialExtent <ClassOfVariable> description of variable's function alwaysVisible <ClassOfVariable> description of variable's function allowUserPlacement <ClassOfVariable> description of variable's function isPinned <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSOutlinerSubsetList</name> <environment>VWHelp</environment> <super>VWHelp.ArborSlaveApplicationModel</super> <private>false</private> none outliner subsetList windowLabel mode <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSOutlinerSubsetList
Copyright Ó 1994 Arbor Intelligent Systems, Inc. This class is used by the help outliner to display a list of topics to the user. Currently used to display the history and search results. Instance Variables: outliner <ClassOfVariable> description of variable's function subsetList <ClassOfVariable> description of variable's function windowLabel <ClassOfVariable> description of variable's function mode <ClassOfVariable> description of variable's function
</comment> <class> <name>ArborOutlineBrowserModel</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none getChildrenBlock getParentBlock hasChildrenBlock displayBlock openedSet menuHolder forest clipModel newEntryBlock moveBlock deleteBlock readOnly includeArrows <imports></imports> <category>Help-Arbor Widget Extensions-Outline Browser</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborOutlineBrowserModel
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: getChildrenBlock <ClassOfVariable> description of variable's function getParentBlock <ClassOfVariable> description of variable's function hasChildrenBlock <ClassOfVariable> description of variable's function displayBlock <ClassOfVariable> description of variable's function openedSet <ClassOfVariable> description of variable's function menuHolder <ClassOfVariable> description of variable's function forest <ClassOfVariable> description of variable's function clipModel <ClassOfVariable> description of variable's function newEntryBlock <ClassOfVariable> description of variable's function moveBlock <ClassOfVariable> description of variable's function deleteBlock <ClassOfVariable> description of variable's function readOnly <ClassOfVariable> description of variable's function includeArrows <ClassOfVariable> description of variable's function
</comment> <class> <name>ArborListOutlineBrowserModel</name> <environment>VWHelp</environment> <super>VWHelp.ArborOutlineBrowserModel</super> <private>false</private> none list <imports></imports> <category>Help-Arbor Widget Extensions-Outline Browser</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborListOutlineBrowserModel
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: list <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSOutlineViewerModel</name> <environment>VWHelp</environment> <super>VWHelp.ArborListOutlineBrowserModel</super> <private>false</private> none master <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSOutlineViewerModel
Copyright © 1997 Arbor Intelligent Systems, Inc. This class is responsible for the Help System specific List Outline Browser functionality, specifically, promoting and demoting, drag and drop, and renaming of topics. Instance Variables: master <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSToolbarTextEditor</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none toolBarMenuHolder text spellChecker findReplace <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSToolbarTextEditor
Copyright © 1996 Arbor Intelligent Systems, Inc. This class is extends the AHSToolbarTextEditor in a way which lets it edit hypertext documents. The class will notify interested parties when key events happen. Instance Variables: toolBarMenuHolder <ClassOfVariable> description of variable's function text <ClassOfVariable> description of variable's function spellChecker <ClassOfVariable> description of variable's function findReplace <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSIndentableComposedText</name> <environment>VWHelp</environment> <super>Graphics.ComposedText</super> <private>false</private> none <imports> private Smalltalk.TextConstants.* </imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSIndentableComposedText
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>AHSTextGraphicSelectionTracker</name> <environment>VWHelp</environment> <super>UI.ScrollingTracker</super> <private>false</private> none pivot current originalStartBlock originalStopBlock <imports></imports> <category>Help-Outline Help-Core-Text/Graphics Mix</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSTextGraphicSelectionTracker
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: pivot <ClassOfVariable> description of variable's function current <ClassOfVariable> description of variable's function originalStartBlock <ClassOfVariable> description of variable's function originalStopBlock <ClassOfVariable> description of variable's function
</comment> <class> <name>ArborDragBarController</name> <environment>VWHelp</environment> <super>UI.Controller</super> <private>false</private> none above below left right boundedDrag <imports></imports> <category>Help-Arbor Widget Extensions</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborDragBarController
Copyright 1998 AppNet Systems, Inc. ArborDragBarController Controls the drag operation in conjunction with ArborDragBarView. Instance Variables: above <ClassOfVariable> description of variable's function below <ClassOfVariable> description of variable's function left <ClassOfVariable> description of variable's function right <ClassOfVariable> description of variable's function boundedDrag <ClassOfVariable> description of variable's function Class Variables: HorizontalDragCursor <ClassOfVariable> description of variable''s function VerticalDragCursor <ClassOfVariable> description of variable''s function
</comment> <class> <name>ArborHierarchicalSequenceSelectionTracker</name> <environment>VWHelp</environment> <super>UI.SequenceSelectionTracker</super> <private>false</private> none switchInTransition <imports></imports> <category>Help-Arbor Widget Extensions-Outline Browser</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborHierarchicalSequenceSelectionTracker
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: switchInTransition <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSPersistentOrderedCollection</name> <environment>VWHelp</environment> <super>Core.OrderedCollection</super> <private>false</private> objects <imports></imports> <category>Help-Outline Help-Core-Collections</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSPersistentOrderedCollection
Copyright Ó 1994 Arbor Intelligent Systems, Inc. This class allows an ordered collection to have persistence properties when used in conjunction with a database.
</comment> <class> <name>AHSTextGraphicLayoutWrapper</name> <environment>VWHelp</environment> <super>Graphics.Wrapper</super> <private>false</private> none nextComponentIsBeneath view isCaption <imports></imports> <category>Help-Outline Help-Core-Text/Graphics Mix</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSTextGraphicLayoutWrapper
AHSTextGraphicLayoutWrapper This class' sole purpose is to provide some layout information that may be queried by a containing AHSTextGraphicComposite. The composite needs to know if the component after me is to be layed out beneath me or alongside of me. Instance Variables: nextComponentIsBeneath <ClassOfVariable> description of variable's function view <ClassOfVariable> description of variable's function isCaption <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSHelpHyperLinkObject</name> <environment>VWHelp</environment> <super>VWHelp.ArborHyperlink</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHelpHyperLinkObject
Copyright © 1994, 1995, 1998 Arbor Intelligent Systems, Inc. Instances of this class's subclasses hold hyperlinked objects from the Arbor Help System Outline Help. Each has a linked object, which is different depending upon which subclass. Instance Variables:
</comment> <class> <name>AHSHyperGraphicLinkObject</name> <environment>VWHelp</environment> <super>VWHelp.AHSHelpHyperLinkObject</super> <private>false</private> none caption imageProportion windowExtent captionLocation isEmbedded <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHyperGraphicLinkObject
Copyright © 1998 Arbor Intelligent Systems, Inc. Instances of this class's subclasses hold hypergraphic link objects from the Arbor Help System Outline Help. The link object corresponds to an entry in the graphics dictionary. Instance Variables: caption <ClassOfVariable> description of variable's function imageProportion <ClassOfVariable> description of variable's function windowExtent <ClassOfVariable> description of variable's function captionLocation <ClassOfVariable> description of variable's function isEmbedded <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSTextGraphicCompositeController</name> <environment>VWHelp</environment> <super>UI.ControllerWithMenu</super> <private>false</private> none selectedComponents <imports></imports> <category>Help-Outline Help-Core-Text/Graphics Mix</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <class> <name>AHSSearchDialog</name> <environment>VWHelp</environment> <super>UI.SimpleDialog</super> <private>false</private> none searchString ignoreCase searchTopics searchText matchWholeWord searchIn <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSSearchDialog
Copyright © 1995 Arbor Intelligent Systems, Inc. This class implements a dialog which lets a user enter a search specification. The specification is used to locate help information which matches the given criteria. Instance Variables: searchString <ValueHolder on: String> ignoreCase <Boolean> future use searchTopics <Boolean> future use searchText <Boolean> future use matchWholeWord <Boolean> future use searchIn <ValueHolder on: (#topics | #text | #both)>
</comment> <class> <name>ArborTextStyleDialog</name> <environment>VWHelp</environment> <super>UI.SimpleDialog</super> <private>false</private> none serif sampleText large underline italic bold paragraphEditor color colorOn <imports></imports> <category>Help-Arbor GUI Extensions</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborTextStyleDialog
Copyright 1995 Arbor Intelligent Systems, Inc. ArborTextStyleDialog Utility for specifying text styles for text selected within a text view. See the example in the class protocol. Instance Variables: serif <ClassOfVariable> description of variable's function sampleText <ClassOfVariable> description of variable's function large <ClassOfVariable> description of variable's function underline <ClassOfVariable> description of variable's function italic <ClassOfVariable> description of variable's function bold <ClassOfVariable> description of variable's function paragraphEditor <ClassOfVariable> description of variable's function color <ClassOfVariable> description of variable's function colorOn <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSOutlineTopicIndex</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none topicIndex allTopics <imports></imports> <category>Help-Outline Help-Core-Export</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSOutlineTopicIndex
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: topicIndex <ClassOfVariable> description of variable's function allTopics <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSGlossaryLinkObject</name> <environment>VWHelp</environment> <super>VWHelp.AHSHelpHyperLinkObject</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSGlossaryLinkObject
Copyright © 1998 Arbor Intelligent Systems, Inc. Instances of this class hold hyperlinked glossary objects from the Arbor Help System Outline Help. Instance Variables:
</comment> <class> <name>AHSHyperGraphicViewer</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none availableGraphics outliner graphic listMenu <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHyperGraphicViewer
Copyright © 1997 Arbor Intelligent Systems, Inc. This class displays the hyperGraphic links defined in the users help system. Instance Variables: availableGraphics <SelectionInList> List of names of graphics within outliner's outline outliner <AHSOutliner> My client outliner graphic <AHSGraphicView> view to display graphics listMenu <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSTopicBodyWriter</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none owner outputStream state currentEmphasis hyperLink inGroup emphasisConversionDictionary specialCharacterDictionary <imports></imports> <category>Help-Outline Help-Core-Export</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSTopicBodyWriter
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: owner <ClassOfVariable> description of variable's function outputStream <ClassOfVariable> description of variable's function state <ClassOfVariable> description of variable's function currentEmphasis <ClassOfVariable> description of variable's function hyperLink <ClassOfVariable> description of variable's function inGroup <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSOutline</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none name outlineLabel nextID fileFormat glossaryDictionary graphicsDictionary forest <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSOutline
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This used for help system outlines, which is an ordered forest of AHSTrees containing AHSHelpOutlineEntries for each tree's data. WARNING: This class answers a deep copy when copied. Instance Variables: name <ClassOfVariable> description of variable's function outlineLabel <ClassOfVariable> description of variable's function nextID <ClassOfVariable> description of variable's function fileFormat <ClassOfVariable> description of variable's function glossaryDictionary <ClassOfVariable> description of variable's function graphicsDictionary <ClassOfVariable> description of variable's function forest <ClassOfVariable> description of variable's function Class Variables: FilenameSignal <ClassOfVariable> description of variable''s function FixupSignal <ClassOfVariable> description of variable''s function
</comment> <class> <name>AHSCompositeCharacterBlock</name> <environment>VWHelp</environment> <super>Graphics.CharacterBlock</super> <private>false</private> none localTranslation localIndex localComponent <imports></imports> <category>Help-Outline Help-Core-Text/Graphics Mix</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSCompositeCharacterBlock
AHSCompositeCharacterBlock This class contains character selection information for a composite part that contains a text view. Instances of this class store composite-relative information in the inherited instance variables, with additional sub-component relative information in the added instance variables. Instance Variables: localTranslation <ClassOfVariable> description of variable's function localIndex <ClassOfVariable> description of variable's function localComponent <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSPersistentSet</name> <environment>VWHelp</environment> <super>Core.Set</super> <private>false</private> objects <imports></imports> <category>Help-Outline Help-Core-Collections</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSPersistentSet
Copyright Ó 1994 Arbor Intelligent Systems, Inc. This class allows a set to have persistence properties when used in conjunction with a database. Instance Variables: *Indexed*
</comment> <class> <name>AHSGraphicView</name> <environment>VWHelp</environment> <super>UI.View</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSGraphicView
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>AHSOHCPreferencesModel</name> <environment>VWHelp</environment> <super>VWHelp.AHSPreferencesModel</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSOHCPreferencesModel
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>ArborSearchAndReplace</name> <environment>VWHelp</environment> <super>VWHelp.ArborSlaveApplicationModel</super> <private>false</private> none searchString replaceString ignoreCase paragraphEditor <imports></imports> <category>Help-Arbor GUI Extensions</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborSearchAndReplace
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: searchString <ClassOfVariable> description of variable's function replaceString <ClassOfVariable> description of variable's function ignoreCase <ClassOfVariable> description of variable's function paragraphEditor <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSToolbarTextEditorController</name> <environment>VWHelp</environment> <super>VWHelp.ArborHypertextEditorController</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSToolbarTextEditorController
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>AHSHelpTextEditorController</name> <environment>VWHelp</environment> <super>VWHelp.AHSToolbarTextEditorController</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHelpTextEditorController
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This class is the controller for editing hyperlinks. It senses whether the cursor is over a hypertext with links changing accordingly. Instance Variables:
</comment> <class> <name>ArborOutlineLabeledObjectHolder</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none object emphasis displayBlock isExpanded canBeExpanded parent indentLevel iconSet <imports></imports> <category>Help-Arbor Widget Extensions-Outline Browser</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborOutlineLabeledObjectHolder
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: object <ClassOfVariable> description of variable's function emphasis <ClassOfVariable> description of variable's function displayBlock <ClassOfVariable> description of variable's function isExpanded <ClassOfVariable> description of variable's function canBeExpanded <ClassOfVariable> description of variable's function parent <ClassOfVariable> description of variable's function indentLevel <ClassOfVariable> description of variable's function iconSet <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSReporter</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none rows <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSReporter
Copyright Ó 1994 Arbor Intelligent Systems, Inc. This class creates a report with information about a certain class. Instance Variables: rows <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSTree</name> <environment>VWHelp</environment> <super>VWHelp.ArborAbstractTree</super> <private>false</private> none data <imports></imports> <category>Help-Outline Help-Core-Collections</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSTree
Copyright Ó 1994 Arbor Intelligent Systems, Inc. Responsibilities: The data for a node is stored in a separate instance variable and is accessed with the data message. Instance Variables: data <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSHelpTextEditorView</name> <environment>VWHelp</environment> <super>UI.TextEditorView</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHelpTextEditorView
Copyright © 1994 Arbor Intelligent Systems, Inc. This class is the view for managing hyperlinks. It changes the cursor according to whether the cursor is over a hypertext with links (which is sensed by the its controller). Instance Variables:
</comment> <class> <name>AHSToolbarHypertextEditor</name> <environment>VWHelp</environment> <super>VWHelp.AHSToolbarTextEditor</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSToolbarHypertextEditor
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>ArborDragBarSpec</name> <environment>VWHelp</environment> <super>UI.DividerSpec</super> <private>false</private> none widgetSet1 widgetSet2 etched boundedDrag <imports></imports> <category>Help-Arbor Widget Extensions</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborDragBarSpec
Copyright 1998 AppNet Systems, Inc. ArborDragBarSpec Defines the VisualWorks attributes necessary for building a drag bar component. Instance Variables: widgetSet1 <Array of: Symbol> IDs of widgets to the left or above the drag bar widgetSet2 <Array of: Symbol> IDs of widgets to the right or below the drag bar etched <Boolean> true if to display the line 'etched' boundedDrag <Boolean> true if the drag operation is bounded by the far side of associated components
</comment> <class> <name>ArborHierarchicalSequenceController</name> <environment>VWHelp</environment> <super>UI.SequenceController</super> <private>false</private> none <imports></imports> <category>Help-Arbor Widget Extensions-Outline Browser</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborHierarchicalSequenceController
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>AHSGlossaryViewer</name> <environment>VWHelp</environment> <super>UI.SimpleDialog</super> <private>false</private> none dictionary key selectedWindowSpec text selectedWord keys <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSGlossaryViewer
Copyright © 1994, 1995 Arbor Intelligent Systems, Inc. This class manages the glossary facilities in the help system. Glossaries are considered just another form of hyperlink and are treated in the same way. Instance Variables: dictionary <ClassOfVariable> description of variable's function key <ClassOfVariable> description of variable's function selectedWindowSpec <ClassOfVariable> description of variable's function text <ClassOfVariable> description of variable's function selectedWord <ClassOfVariable> description of variable's function keys <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSHyperTextLinkObject</name> <environment>VWHelp</environment> <super>VWHelp.AHSHelpHyperLinkObject</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHyperTextLinkObject
Copyright © 1998 Arbor Intelligent Systems, Inc. Instances of this class hold hypertext link objects from the Arbor Help System Outline Help. Instance Variables:
</comment> <class> <name>AHSHTMLGenerator</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none htmlDirectory outline outputStream topicWriter graphicFileNames <imports></imports> <category>Help-Outline Help-Core-Export</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHTMLGenerator
Copyright © 1996 Arbor Intelligent Systems, Inc. This class is responsible for generating HTML output for an outline. Instance Variables: htmlDirectory <ClassOfVariable> description of variable's function outline <ClassOfVariable> description of variable's function outputStream <ClassOfVariable> description of variable's function topicWriter <ClassOfVariable> description of variable's function graphicFileNames <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSHTMLHelpGenerator</name> <environment>VWHelp</environment> <super>VWHelp.AHSHTMLGenerator</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core-Export</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHTMLHelpGenerator
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>ArborHierarchicalSequenceView</name> <environment>VWHelp</environment> <super>UI.SequenceView</super> <private>false</private> none widthCache inTransition <imports></imports> <category>Help-Arbor Widget Extensions-Outline Browser</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborHierarchicalSequenceView
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: widthCache <ClassOfVariable> description of variable's function inTransition <ClassOfVariable> description of variable's function
</comment> <class> <name>ArborDragBarView</name> <environment>VWHelp</environment> <super>UI.VisualDivider</super> <private>false</private> none controller <imports></imports> <category>Help-Arbor Widget Extensions</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborDragBarView
Copyright 1998 AppNet Systems, Inc. ArborDragBarView In conjunction with the ArborDragBarController, the drag bar view provides behavior allowing the adjustment of related component dimensions by dragging a divider. This widget is sometimes known in other implementations as a 'splitter'. Instance Variables: controller <ArborDragBarController>
</comment> <class> <name>AHSReporterData</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none indent topic topicText <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSReporterData
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: indent <ClassOfVariable> description of variable's function topic <ClassOfVariable> description of variable's function topicText <ClassOfVariable> description of variable's function
</comment> <class> <name>AHSOutlineTextGraphicMixViewer</name> <environment>VWHelp</environment> <super>VWHelp.AHSOutlineViewer</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core-Text/Graphics Mix</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSOutlineTextGraphicMixViewer
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>AHSHelpHyperText</name> <environment>VWHelp</environment> <super>VWHelp.ArborHypertext</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHelpHyperText
Copyright © 1994, 1995, 1998 Arbor Intelligent Systems, Inc. This class implements the main functionality for storing hyperlinks. It is an extended version of Text with added structures for keeping track of links from the text to another object. When a hyperlink is created, the text styles from the selected text change to a standard text style, so that a visual feedback can be given to the user. Instance Variables:
</comment> <class> <name>AHSGraphicScreen</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none image graphicLink caption imageProportion parentWindow <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSGraphicScreen
Copyright © 1994, 1995, 1998 Arbor Intelligent Systems, Inc. This class holds graphic images to be used within the HelpOutliner. Instance Variables: image <ClassOfVariable> description of variable's function graphicLink <ClassOfVariable> description of variable's function caption <ClassOfVariable> description of variable's function imageProportion <ClassOfVariable> description of variable's function parentWindow <ClassOfVariable> description of variable's function
</comment> <class> <name>ArborIconSet</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none expandedSelected expandedDeselected expandedTransitionSelected expandedTransitionDeselected contractedSelected contractedDeselected contractedTransitionSelected contractedTransitionDeselected emptySelected emptyDeselected hotRegion indentOffset <imports></imports> <category>Help-Arbor Widget Extensions-Outline Browser</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborIconSet
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: expandedSelected <ClassOfVariable> description of variable's function expandedDeselected <ClassOfVariable> description of variable's function expandedTransitionSelected <ClassOfVariable> description of variable's function expandedTransitionDeselected <ClassOfVariable> description of variable's function contractedSelected <ClassOfVariable> description of variable's function contractedDeselected <ClassOfVariable> description of variable's function contractedTransitionSelected <ClassOfVariable> description of variable's function contractedTransitionDeselected <ClassOfVariable> description of variable's function emptySelected <ClassOfVariable> description of variable's function emptyDeselected <ClassOfVariable> description of variable's function hotRegion <ClassOfVariable> description of variable's function indentOffset <ClassOfVariable> description of variable's function Class Variables: IconSets <ClassOfVariable> description of variable''s function
</comment> <class> <name>ArborCenteredLabelAndIcon</name> <environment>VWHelp</environment> <super>UI.LabelAndIcon</super> <private>false</private> none <imports></imports> <category>Help-Arbor Widget Extensions</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborCenteredLabelAndIcon
Copyright 1998 AppNet Systems, Inc. ArborCenteredLabelAndIcon The same as LabelAndIcon, except that the icon and text are always vertically centered with respect to each other. In other words, given an imaginary line, the line will always pass through the vertical center of both the icon and the text. Instance Variables:
</comment> <class> <name>AHSFullGlossaryViewer</name> <environment>VWHelp</environment> <super>UI.ApplicationModel</super> <private>false</private> none fullGlossaryText fullGlossaryList parent <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSFullGlossaryViewer
Copyright © 1997 Arbor Intelligent Systems, Inc. This class is used to display all entries in the glossary for the current outline. This class is for read only viewing of glossary information. Instance Variables: fullGlossaryText <ValueHolder on: Text> Text for the currently selected glossary entry. fullGlossaryList <SelectionInList> List of glossary dictionary keys. parent <ApplicationModel> The outliner which opened me
</comment> <class> <name>AHSHTMLTopicBodyWriter</name> <environment>VWHelp</environment> <super>VWHelp.AHSTopicBodyWriter</super> <private>false</private> none endEmphasisConversionBlocks <imports></imports> <category>Help-Outline Help-Core-Export</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHTMLTopicBodyWriter
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>ArborHierarchicalSequenceViewSpec</name> <environment>VWHelp</environment> <super>UI.SequenceViewSpec</super> <private>false</private> none <imports></imports> <category>Help-Arbor Widget Extensions-Outline Browser</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.ArborHierarchicalSequenceViewSpec
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>AHSAdjustableBoundedWrapper</name> <environment>VWHelp</environment> <super>Graphics.BoundedWrapper</super> <private>false</private> none <imports></imports> <category>Help-Outline Help-Core-Text/Graphics Mix</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSAdjustableBoundedWrapper
AHSAdjustableBoundedWrapper Just like a BoundedWrapper, except I will adjust my bounds if my component announces that its preferredBounds have changed. This is most useful when wrapping TextEditorViews, since normally a BoundedWrapper defines the bounds of the ComposedText, but if the ComposedText changes (such as by the user typing), I will conform to the new bounds.
</comment> <class> <name>AHSHistory</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none stack topOfStack linearHistory <imports></imports> <category>Help-Outline Help-Core</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSHistory
Copyright Ó 1994, 1995 Arbor Intelligent Systems, Inc. This class contains the history for an outline browser. It stores each page in two places, a linear list of all topics that have been visited and a "stack" of the most recent tree. The stack is not a proper stack, although "pop" still answers the top element, the element isn't removed from the stack. Rather the pointer to the top of the stack decrements by one. If an element is then pushed onto the stack, any elements above stackIndex are removed. This is to allow moving both backward and forward through the history stack. Any topic visited should be added to the linear history. The one exception is that consecutive duplications are not allowed. A topic should *not* be pushed onto the stack if it was selected using the back or forward methods, this is to allowed traversal through the stack without modifying it. Also, consecutive duplications are not allowed in the stack, either. The history is considered empty if the linearHistory is empty. Testing the stack will produce an invalid result because using the back method can result in an empty (appearing) stack that is actually not empty. Instance Variables: stack <OrderedCollection> Contains the stack elements. topOfStack <Integer> The index of the element that is at the top of the stack. linearHistory <List> Contains all the topics that have been visited.
</comment> <class> <name>AHSTextGraphicComposite</name> <environment>VWHelp</environment> <super>UI.CompositeView</super> <private>false</private> none outliner <imports></imports> <category>Help-Outline Help-Core-Text/Graphics Mix</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> </class> <comment> VWHelp.AHSTextGraphicComposite
AHSTextGraphicComposite A specialized composite part that will mix graphics and text for display. The model is intended to be a value-held AHSHelpHyperText which is scanned to separate the various text and graphic components. Instance Variables: outliner <ClassOfVariable> description of variable's function
</comment> <name>FixupSignal</name> <environment>VWHelp.AHSOutline</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> <name>FilenameSignal</name> <environment>VWHelp.AHSOutline</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> <name>VerticalDragCursor</name> <environment>VWHelp.ArborDragBarController</environment> <private>false</private> <constant>false</constant> <category>Cursors</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> <name>HorizontalDragCursor</name> <environment>VWHelp.ArborDragBarController</environment> <private>false</private> <constant>false</constant> <category>Cursors</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> <name>IconSets</name> <environment>VWHelp.ArborIconSet</environment> <private>false</private> <constant>false</constant> <category>Class Vars</category> <attributes> <package>Arbor Help System Outline Help Core</package> </attributes> <methods> VWHelp.AHSOutlineViewer <category>accessing</category>
bookmarks ^bookmarks
bookmarks: aDictionary ^bookmarks := aDictionary
currentTopic "Private - Answer the currently selected topic." ^ self outliner list selection value
history ^history
historyIndex ^historyIndex
historyIndex: anIndexOrNil "Update the history index considering its boundaries in relation to the history size." (anIndexOrNil notNil and: [self historyIndex notNil]) ifTrue: [anIndexOrNil > (self history size + 1) ifTrue: [^ historyIndex := self history size + 1]. anIndexOrNil < 0 ifTrue: [^ historyIndex := 0]]. ^ historyIndex := anIndexOrNil
infoHasChanged ^infoHasChanged
infoHasChanged: aBoolean infoHasChanged := aBoolean
initialSelection: aTree initialSelection := aTree. self builder isNil ifFalse: [self builder window isOpen ifTrue: [self outliner selectEntry: aTree]]
isReadOnly ^ true
lastEntry ^lastEntry
lastEntry: anAHSHelpOutlineEntry ^lastEntry := anAHSHelpOutlineEntry.
list: aSelectionInList outliner list: aSelectionInList.
outline ^self outliner outline odbRefreshIfNotDirty.
outlineFileFormat ^self outline fileFormat
outlineName "Lookup key in database or a file name" ^self outline name
outliner ^outliner
outlinerWindowMenu "Answer the contents of the menu bar" outlinerWindowMenu isNil ifTrue: [outlinerWindowMenu := self menuBar asValue]. ^ outlinerWindowMenu
outlinerWindowMenu: aValueHolder outlinerWindowMenu := aValueHolder
outlineSource ^outlineSource
outlineSource: aSymbol outlineSource := aSymbol
searchEntriesFound ^searchEntriesFound
searchString ^searchString
searchString: aString searchString := aString
selectedTopic "Answer the currently selected topic, or nil if no topic is selected." ^ self outliner selectionValue
shouldUpdateHistoryStack ^shouldUpdateHistoryStack
shouldUpdateHistoryStack: aBoolean shouldUpdateHistoryStack := aBoolean
text ^self toolbarTextEditor text
textController ^self toolbarTextEditor textController
toolbarTextEditor ^toolbarTextEditor
</methods> <methods> VWHelp.AHSOutlineViewer <category>events</category>
noticeOfWindowClose: aWindow self release. ^ super noticeOfWindowClose: aWindow
</methods> <methods> VWHelp.AHSOutlineViewer <category>history</category>
goBackwardsOnce "Go back one entry in the history list according to historyIndex." | topic | self history isEmpty ifTrue: [^Dialog warn: #historyEmpty << self messageCatalogID]. (topic := self history back) isNil ifTrue: [^Dialog warn: #noPrevEntries << self messageCatalogID]. self setTopic: topic.
goForwardOnce "Go forward one entry in the history list according to historyIndex." | topic | self history isEmpty ifTrue: [^Dialog warn: #historyEmpty << self messageCatalogID]. (topic := self history forward) isNil ifTrue: [^Dialog warn: #noMoreEntries << self messageCatalogID]. self setTopic: topic.
openHistory "opens a history of the selected entries in the outline" | historyListWindow | (historyListWindow := self openedHistoryWindow) isNil ifTrue: [self openHistoryViewer] ifFalse: [self restoreWindow: historyListWindow model]
selectEntryNoHistoryUpdate: obj "Select the desired entry but avoid updating the history stack." self shouldUpdateHistoryStack: false. self outliner selectEntry: obj. self shouldUpdateHistoryStack: true.
</methods> <methods> VWHelp.AHSOutlineViewer <category>private</category>
checkForAutoAccept "Private - Accept any changes if auto accept is active." self builder window keyboardProcessor checkForAutoAccept.
findBookmarkTopic: aBookmark "Private - Answer the topic in the outline at the specified bookmark." ^ self outliner outline findTopicNumber: (bookmarks at: aBookmark)
fixOutlinerSizeForUnzoom "fix the outline boundaries when opening the hyperlink manager in order to give as much space as possible to the topics outline." self aisMakeVisible: #dragBar. self listOutlineBrowser newBounds: self topicListUnzoomedBoundaries; newLayout: self topicListUnzoomedLayout. self textSubCanvas newBounds: self topicTextUnzoomedBoundaries; newLayout: self topicTextUnzoomedLayout.
fixOutlinerSizeForZoom "fix the outline boundaries when opening the hyperlink manager in order to give as much space as possible to the topics outline." self aisMakeInvisible: #dragBar. self textSubCanvas newBounds: self topicTextZoomedBoundaries; newLayout: self topicTextZoomedLayout. self listOutlineBrowser newBounds: self topicListZoomedBoundaries; newLayout: self topicListZoomedLayout.
forceAccept self builder isNil ifFalse: [self toolbarTextEditor accept]
getDBAssociationForOpen "Selects which database open operation should be included in the File menu for the help outliner. Since flat files are always in the File menu, avoid duplicating this menu entry..." AHSStorageManager outlineSource == #GemStone ifTrue: [^ ('#openOutlineFromGemStone' -> #openOutlineFromGemStone)]. "AHSStorageManager outlineSource == #Oracle ifTrue: [^ ('Open Outline From Oracle...' -> #openOutlineFromOracle)]. AHSStorageManager outlineSource == #Sybase ifTrue: [^ ('Open Outline From Sybase...' -> #openOutlineFromSybase)]." AHSStorageManager outlineSource == #Versant ifTrue: [^ ('#openOutlineFromVersant' -> #openOutlineFromVersant)]. AHSStorageManager outlineSource == #Envy ifTrue: [^ ('#openOutlineFromEnvy' -> #openOutlineFromEnvy)]. ^nil
getDBAssociationForSave "Selects which database save operation should be included in the File menu for the help outliner." ^ nil
glossaryDictionary "Private - Answer the glossary held by the outline." ^ self outline glossaryDictionary
graphicsDictionary "Private - Answer the graphics dictionary held by the outline." ^self outline graphicsDictionary
isHelpVis ^(self builder componentAt: #help) isVisible
jumpToTopicReferencedBy: aHyperlink "Private - Jump to the topic referenced by aHyperlink." | topic | (topic := self outline findTopicNumber: (aHyperlink topicName)) isNil ifTrue: [^ Dialog warn: 'This is a link to a deleted topic.']. self checkForAutoAccept. self outliner selectEntry: topic. self toolbarTextEditor deselect
openHistoryViewer "Private - Open a new history window." | historyList label | historyList := AHSOutlinerSubsetList new. historyList parentWindow: self builder window; relativeOrigin: #left; outliner: self; mode: #history. historyList subsetList list: self history linearHistory. label := (#outlineHistory << self messageCatalogID) asString. self builder window isModalDialog ifTrue: [historyList openDialogWithLabel: label] ifFalse: [historyList openWithLabel: label]
openOutlineViewerFor: aHyperlink "Private - Open a new outline window for the item referenced in aHyperlink. If the link references an outline which is already open, reuse the one that is already open. This assumes that the outline is not the outline being viewed by the receiver." | otherOutline | otherOutline := aHyperlink outlineName isNil ifTrue: [self outlineName] ifFalse: [aHyperlink outlineName]. ^ self class openOutlineNamed: otherOutline topicNumber: (aHyperlink topicName) modal: self builder window isModalDialog raiseExisting: self raiseExistingOutlineViewer.
releaseGlossaryLock "Private - If the glossary link wasn't created, release the lock. Check to make sure the glossary isn't open somewhere, so I don't interfere with it's lock on the glossary" self openedGlossaryWindow isNil ifTrue: [self glossaryDictionary odbReleaseUnDirtyLock]
restoreWindow: anApplicationModel "Restore the window identifiied by anApplicationModel." | window | window := anApplicationModel builder window. window isCollapsed ifTrue: [window expand]. window raise
setTextValue: aText "Private - Set the value for the text model. Make sure the update mechanism isn't triggered." self text value: aText.
</methods> <methods> VWHelp.AHSOutlineViewer <category>menu messages</category>
contractAll "contract absolutely all entries in the outline." | flag | flag := nil. self outline do: [:entry | flag isNil ifTrue: [self outliner selectEntry: entry. flag := 1]. self outliner contract: entry]
expandAll "expand absolutely all entries in the outline." | obj | obj := nil. self outline do: [:entry | obj isNil ifTrue: [obj := self outliner selectionValue]. self outliner expandFully: entry]. obj notNil ifTrue: [self outliner selectEntry: obj; expandFully: obj]
newOutline self builder window isModalDialog ifTrue: [self openAsDialog] ifFalse: [self open]
openOutlineFrom: aString "Private - Open an outline from the source indicated by aString. aString should be one of 'Envy', 'File'. 'GemStone' or 'Versant'" | outlineName chooseMethod | chooseMethod := ('chooseOutlineNameIn' , aString) asSymbol. outlineName := AHSStorageManager perform: chooseMethod. outlineName isNil ifTrue: [^ self]. ^ self class openOutlineNamed: outlineName modal: self builder window isModalDialog source: aString asSymbol
openOutlineFromEnvy ^ self openOutlineFrom: 'Envy'
openOutlineFromFile ^ self openOutlineFrom: 'File'
openOutlineFromGemStone ^ self openOutlineFrom: 'GemStone'
openOutlineFromVersant ^ self openOutlineFrom: 'Versant'
saveAsTextFile "Save the outline into a text file" | fname | (fname := Dialog requestNewFileName: 'File name:' default: 'outline.txt') isEmpty ifTrue: [^ self]. Cursor wait showWhile: [(AHSReporter on: outliner outline) writeToFileNamed: fname]
showBalloons AHSWHCProcessor helpEnabled ifTrue: [AHSWHCProcessor balloonHelpEnabled: AHSWHCProcessor balloonHelpEnabled not] ifFalse: [AHSWHCProcessor balloonHelpEnabled ifTrue: [AHSWHCProcessor helpEnabled: true] ifFalse: [AHSWHCProcessor balloonHelpEnabled: true. AHSWHCProcessor helpEnabled: true]]
showHelp (self builder aspectAt: #ahsFlag) value: self isHelpVis not
zoom "Private - Toggle the zoom state of the window." zoomed ifTrue: [self unzoomTopicText] ifFalse: [self zoomTopicText]
</methods> <methods> VWHelp.AHSOutlineViewer <category>bookmarks</category>
addBookmark "Add a bookmark to the bookmark dictionary for the current page. The name of the bookmark defaults to the current topic. The bookmark name must be unique." | aTree bookmark aMenuItem | (aTree := self outliner selectionValue) isNil ifTrue: [^ Dialog warn: 'No topic selected.']. (bookmark := self getNewBookmarkNameFromUser: aTree data topic) isNil ifTrue: [ ^ nil]. self bookmarks at: bookmark put: aTree data uniqueID. self saveBookmarksInFile. aMenuItem := MenuItem labeled: (bookmark copyReplaceAll: '&' with: '&&'). self bookmarkMenu numberOfItems == 2 ifTrue: [self bookmarkMenu aisAddSeparator]. self bookmarkMenu addItem: aMenuItem value: [self engageBookmark: bookmark] nameKey: bookmark.
bookmarkFilename ^ self outlineName ~= 'Untitled' ifTrue: [| extensionPosition fname oName | oName := self outlineName asFilename tail. fname := (extensionPosition := oName lastIndexOf: $.) == 0 ifTrue: [oName] ifFalse: [oName copyFrom: 1 to: extensionPosition - 1]. fname, '.bkm'] ifFalse: ['untitled.bkm']
bookmarkMenu ^(self outlinerWindowMenu value atNameKey: #bookmark) submenu
buildBookmarkMenu "Build the bookmarks from the bookmarks dictionary." self bookmarks keys do: [:bookmark || aMenuItem | aMenuItem := MenuItem labeled: (bookmark copyReplaceAll: '&' with: '&&'). self bookmarkMenu numberOfItems == 2 ifTrue: [self bookmarkMenu aisAddSeparator]. self bookmarkMenu addItem: aMenuItem value: [self engageBookmark: bookmark] nameKey: bookmark].
deleteBookmark "Delete a bookmark that is selected by the user in a list of bookmarks from the bookmark menu. " | bookmarkList bookmark | (bookmarkList := self bookmarks keys asList) isEmpty ifTrue: [^ Dialog warn: 'There are no bookmarks to delete.']. (bookmark := Dialog choose: 'Bookmark to delete:' fromList: bookmarkList values: bookmarkList lines: 10 cancel: [nil]) isNil ifTrue: [^ nil]. self bookmarks removeKey: bookmark. self saveBookmarksInFile. self bookmarkMenu removeItem: (self bookmarkMenu atNameKey: bookmark)
engageBookmark: aBookmark "Set the outline viewer to display the topic associated with the specified bookmark." self outliner selectEntry: (self findBookmarkTopic: aBookmark).
loadBookmarksFromFile "Load the bookmarks from a flat file, if it exists. The name of the file is built from the name of outline with the extension .bkm." | newBookmarks | (newBookmarks := AHSStorageManager bookmarksInFlatFileNamed: self bookmarkFilename) notNil ifTrue: [self bookmarks: newBookmarks; buildBookmarkMenu].
saveBookmarksInFile "Save the bookmarks in a flat file. If there are no bookmarks, then remove the file if it exists." self bookmarks isEmpty ifTrue: [AHSStorageManager removeBookmarksInFlatFileNamed: self bookmarkFilename] ifFalse: [ AHSStorageManager bookmarksInFlatFileNamed: self bookmarkFilename put: self bookmarks].
</methods> <methods> VWHelp.AHSOutlineViewer <category>testing</category>
haveBookmark: aBookmark "Answer true if we currently have the given bookmark." ^ self bookmarks includesKey: aBookmark
raiseExistingOutlineViewer "Private - Answer true if we should utilize an existing outline viewer looking at the same outline." ^ InputState default shiftDown not.
referencesSameOutlineAs: aHyperlink "Private - Answer true if aHyperlink references the same outline name as the one we are currently viewing." ^ aHyperlink outlineName isNil or: [aHyperlink outlineName = self outline name]
shouldCloseHelpSubcanvas "Private - Answer true if we should close the help subcanvas pane." ^self isHelpVis and: [AHSWHCProcessor helpEnabled not or: [(self builder aspectAt: #ahsFlag) value not]]
shouldOpenHelpSubcanvas "Private - Answer true if we should open the help subcanvas pane." ^self isHelpVis not and: [AHSWHCProcessor helpEnabled and: [(self builder aspectAt: #ahsFlag) value]]
shouldOpenNewOutlineViewerFor: aHyperlink "Private - Answer true if we should open a new outline viewer for the given hyperlink." ^ (self referencesSameOutlineAs: aHyperlink) not or: [self raiseExistingOutlineViewer not]
</methods> <methods> VWHelp.AHSOutlineViewer <category>interface components</category>
dragBar "Private - Answer the drag bar." ^ self builder componentAt: #dragBar
listOutlineBrowser "Private - Answer the listOutlineBrowser pane." ^ self builder componentAt: #listOutlineBrowser
textSubCanvas "Private - Answer the textSubCanvas pane." ^ self builder componentAt: #textSubCanvas
</methods> <methods> VWHelp.AHSOutlineViewer <category>menu construction - private</category>
addBookmarkSubmenuTo: aMenu "Private - Add the Bookmark submenu to aMenu." | bookmarkMenu | bookmarkMenu := Menu new. bookmarkMenu addItem: ((MenuItem labeled: #addBookmark << self messageCatalogID) value: #addBookmark; shortcutKeyCharacter: $K; enabled: [self outliner list selectionIndex ~= 0]); addItem: ((MenuItem labeled: #deleteBookmark << self messageCatalogID) value: #deleteBookmark; enabled: [self bookmarks keys isEmpty not]). ^aMenu addItem: ((MenuItem labeled: #bookmark << self messageCatalogID) nameKey: #bookmark; submenu: bookmarkMenu)
addFileSubmenuTo: aMenu "Private - Add the File submenu to aMenu." | sub assoc | sub := Menu new. sub addItem: ((MenuItem labeled: #openOutlineFromFile << self messageCatalogID) value: #openOutlineFromFile; nameKey: #fileOpen; shortcutKeyCharacter: $O). (assoc := self getDBAssociationForOpen) notNil ifTrue: [sub addItemLabel: assoc key << self messageCatalogID value: assoc value]. self addExportItemsTo: sub. self addPrintSubmenuTo: sub. sub aisAddSeparator; addItem: ((MenuItem labeled: #exit << self messageCatalogID) value: #closeRequest). ^aMenu addItem: ((MenuItem labeled: #file << self messageCatalogID) nameKey: #file; submenu: sub)
addHelpSubmenuTo: aMenu "Private - Add the Help submenu to aMenu." | helpMenu | helpMenu := Menu new. helpMenu addItem: ((MenuItem labeled: #useWidgetHelp << self messageCatalogID) value: #showHelp; indication: [self isHelpVis]); addItem: ((MenuItem labeled: #useBalloonHelp << self messageCatalogID) value: #showBalloons; indication: [AHSWHCProcessor helpEnabled and: [self ahsWindow ahsProcessor balloonHelpEnabled]]). ^aMenu addItem: ((MenuItem labeled: #help << self messageCatalogID) nameKey: #help; submenu: helpMenu)
addNavigateSubmenuTo: aMenu "Private - Add the 'navigate' components to aMenu." | navigateMenu | navigateMenu := Menu new. navigateMenu addItem: ((MenuItem labeled: #open << self messageCatalogID) value: #openHistory; shortcutKeyCharacter: $H; enabled: [self history stack isEmpty not]); addItem: ((MenuItem labeled: #goBackwardsOnce << self messageCatalogID) value: #goBackwardsOnce; shortcutKeyCharacter: $B; enabled: [self history topOfStack > 1]); addItem: ((MenuItem labeled: #goForwardOnce << self messageCatalogID) value: #goForwardOnce; shortcutKeyCharacter: $F; enabled: [self history stack size ~= self history topOfStack]); aisAddSeparator; addItem: ((MenuItem labeled: #search << self messageCatalogID) value: #search); addItem: ((MenuItem labeled: #repeatLastSearch << self messageCatalogID) value: #repeatLastSearch; shortcutKeyCharacter: $R; enabled: [self searchString notNil]); addItem: ((MenuItem labeled: #findNextWithinText << self messageCatalogID) value: #nextOccurrence; shortcutKeyCharacter: $T). ^aMenu addItem: ((MenuItem labeled: #navigate << self messageCatalogID) nameKey: #navigate; submenu: navigateMenu)
addPrintSubmenuTo: aMenu "Private - Add the Print submenu to aMenu" ^aMenu addItem: ((MenuItem labeled: #print << self messageCatalogID) submenu: (Menu new addItemLabel: #fullOutline << self messageCatalogID value: #hardcopy; addItem: ((MenuItem labeled: #selectedTopic << self messageCatalogID) value: #printTopic; shortcutKeyCharacter: $P); addItemLabel: #selectedTopicAndChildren << self messageCatalogID value: #printTopicTree))
addViewSubmenuTo: aMenu "Private - Add the View submenu to aMenu." | viewMenu | viewMenu := Menu new. viewMenu addItem: ((MenuItem labeled: #expandAll << self messageCatalogID) value: #expandAll; shortcutKeyCharacter: $X); addItem: ((MenuItem labeled: #contractAll << self messageCatalogID) value: #contractAll; shortcutKeyCharacter: $C); aisAddSeparator; addItem: ((MenuItem labeled: #zoom << self messageCatalogID) value: #zoom; nameKey: #zoom; shortcutKeyCharacter: $Z); aisAddSeparator; addItem: ((MenuItem labeled: #glossary << self messageCatalogID) value: #showFullGlossary; shortcutKeyCharacter: $L); addItem: ((MenuItem labeled: #graphics << self messageCatalogID) value: #showGraphics; shortcutKeyCharacter: $G). ^aMenu addItem: ((MenuItem labeled: #view << self messageCatalogID) nameKey: #view; submenu: viewMenu)
</methods> <methods> VWHelp.AHSOutlineViewer <category>menu resources</category>
constructedMenuBar | menu | menu := Menu new. ^self addFileSubmenuTo: menu; addViewSubmenuTo: menu; addNavigateSubmenuTo: menu; addBookmarkSubmenuTo: menu; addHelpSubmenuTo: menu
menuBar "A menu that provides all operations for the help outliner." ^self constructedMenuBar
</methods> <methods> VWHelp.AHSOutlineViewer <category>enumerating</category>
outlineDo: aBlock ^self outliner outlineDo: aBlock
</methods> <methods> VWHelp.AHSOutlineViewer <category>searching</category>
getSearchWindow "Return the search window or nil if one isn't open." ^ScheduledControllers scheduledControllers relate: [:sc || mdl | mdl := sc model. ((mdl isKindOf: AHSOutlinerSubsetList) and: [mdl mode = #search and: [mdl parentWindow = self builder window]]) ifTrue: [sc view]] ifNone: [nil]
highlightSearchedWord "highlight the selection that was the objective of the search." ^self toolbarTextEditor findAndSelectString: self searchString.
nextOccurrence "search for the next entry of the selected text within the same piece of text." self toolbarTextEditor nextOccurrence ifFalse: [ Dialog warn: (#noEntriesMatching << self messageCatalogID) asString , ' "', self searchString, '" ' , (#foundInOutline << self messageCatalogID) asString]
openSearchResultsList "opens a list containing the search results." | aResultsWindow aResultsList label | aResultsWindow := self getSearchWindow. aResultsWindow isNil ifTrue: [ aResultsList := AHSOutlinerSubsetList new. aResultsList parentWindow: self builder window; relativeOrigin: #top; outliner: self; mode: #search. aResultsList subsetList list: self searchEntriesFound. label := (#searchResultsFor << self messageCatalogID) asString , ' "', self searchString, '"'. self builder window isModalDialog ifTrue: [aResultsList openDialogWithLabel: label] ifFalse: [aResultsList openWithLabel: label]] ifFalse: [ aResultsWindow model windowLabel: ((#searchResultsFor << self messageCatalogID) asString , ' "', self searchString, '"'). aResultsWindow isCollapsed ifTrue: [aResultsWindow expand]. aResultsWindow raise].
repeatLastSearch "Repeat the last search performed." self showSearchResults
search "Get the search specifications from an AHSSearchDialog, and then perform the search." | searchDictionary shouldSearchTopics shouldSearchText | searchDictionary := AHSSearchDialog searchFor: ''. searchDictionary isNil ifTrue: [^nil]. self searchString: (searchDictionary at: #searchString) asString. shouldSearchTopics := searchDictionary at: #searchTopics ifAbsent: [false]. shouldSearchText := searchDictionary at: #searchText ifAbsent: [false]. self searchEntriesFound removeFrom: 1 to: self searchEntriesFound size. self outline do: [:aTree | aTree do: [:currentTree || noMatch | noMatch := true. shouldSearchTopics ifTrue: [(currentTree data topic asString asLowercase indexOfSubCollection: self searchString asLowercase startingAt: 1) ~= 0 ifTrue: [self searchEntriesFound add: currentTree data. noMatch := false]]. (shouldSearchText and: [noMatch]) ifTrue: [(currentTree data text asString asLowercase indexOfSubCollection: self searchString asLowercase startingAt: 1) ~= 0 ifTrue: [self searchEntriesFound add: currentTree data]]]]. self showSearchResults
showSearchResults | aSearchWindow | (self searchEntriesFound isNil or: [self searchEntriesFound isEmpty]) ifTrue: [self searchString isNil ifTrue: [^Dialog warn: #noPreviousSearch << self messageCatalogID]. aSearchWindow := self getSearchWindow. aSearchWindow notNil ifTrue: [aSearchWindow model windowLabel: ((#searchResultsFor << self messageCatalogID) asString , ' "', self searchString, '"')]. Dialog warn: (#noEntriesMatching << self messageCatalogID) asString , ' "', self searchString, '" ' , (#foundInOutline << self messageCatalogID) asString] ifFalse: [self openSearchResultsList]
</methods> <methods> VWHelp.AHSOutlineViewer <category>printing</category>
hardcopy "Send the outline to the printer" self print: outliner outline.
print: anOutline "Send the outline to the printer" | stream | stream := TextStream on: ''. Cursor wait showWhile: [stream nextPutAllText: (#{Smalltalk.Text} value new: 7 withAll: Character tab); nextPutAllText: self printableOutlineName; nextPutAllText: (#{Smalltalk.Text} value new: 2 withAll: Character cr); nextPutAllText: (AHSReporter on: anOutline) text. stream contents asComposedText hardcopy]
printHyperLinksOn: aStream "loops through outline and prints out report summarizing all links available" self outliner outline reportHyperLinksOn: aStream
printTopic "Print the selected topic only." self print: self topicOutline
printTopicTree "Print information for the selected topic and its children." self print: self topicTreeOutline
saveLinksInCSVFile "Generate a report on Hyperlinks and save to a CSV File, which can be read by Excel" | fname aStream | fname := Dialog requestNewFileName: 'CSV File name:' default: 'outlin27.csv'. Cursor wait showWhile: [ fname isEmpty ifFalse: [aStream := fname asFilename writeStream. self printHyperLinksOn: aStream. aStream close].].
tempOutlineFrom: aTopic "Private - Answer a temporary outline used for printing information found in aTopic." ^ AHSOutline fromTopicTree: aTopic labeled: self outliner outline outlineLabel
topicOutline "Private - Answer a new outline which contains only the currently selected topic. Answer nil if no topic is currently selected." | topic | (topic := self selectedTopic) isNil ifTrue: [^ nil]. ^ self tempOutlineFrom: topic treeTop.
topicTreeOutline "Private - Answer a new outline which contains the currently selected topic tree. Answer nil if no topic is currently selected." | topic | (topic := self selectedTopic) isNil ifTrue: [^ nil]. ^ self tempOutlineFrom: topic.
</methods> <methods> VWHelp.AHSOutlineViewer <category>interface configuration</category>
closeHelpSubcanvas "Private - Close the help subcanvas which is currently visible at the bottom on the window." | uiBuilder | uiBuilder := self builder. (uiBuilder componentAt: #mainCanvas) newLayout: self layoutWithoutHelpPane. (uiBuilder componentAt: #help) beInvisible. uiBuilder window refresh
layoutWithHelpPane "Private - Answer a LayoutFrame for a pane containing the help text subcanvas." ^ LayoutFrame leftFraction: 0 offset: 0 topFraction: 0 offset: 0 rightFraction: 1 offset: 0 bottomFraction: 1 offset: -45.
layoutWithoutHelpPane "Private - Answer a LayoutFrame for a pane which doesn't contain the help text subcanvas." ^ LayoutFrame leftFraction: 0 offset: 0 topFraction: 0 offset: 0 rightFraction: 1 offset: 0 bottomFraction: 1 offset: 0.
openHelpSubcanvas "Private - Open the help pane subcanvas. This subcanvas displays real-time help information for the receiver." | uiBuilder | uiBuilder := self builder. (uiBuilder componentAt: #mainCanvas) newLayout: self layoutWithHelpPane. (uiBuilder componentAt: #help) beVisible. uiBuilder window refresh.
relabelZoomMenuItem: aSymbol "Private - Relabel the 'zoom' menu item to reflect the current zoom state." (self outlinerWindowMenu value someMenuItemWithValue: #zoom) rawLabel: aSymbol << self messageCatalogID
topicListUnzoomedBoundaries "Private - Answer the unzoomed boundaries for the topic list view when the topic text pane is unzoomed." | oldBoundaries | oldBoundaries := self listOutlineBrowser bounds. ^ Rectangle left: oldBoundaries left right: oldBoundaries right top: self textSubCanvas container bounds top bottom: self dragBar bounds center y rounded.
topicListUnzoomedLayout "Private - Answer the LayoutFrame to be used for the topic list when the topic text pane is unzoomed." | oldLayout dragBarLayout | oldLayout := self listOutlineBrowser layout. dragBarLayout := self dragBar layout. ^ LayoutFrame leftFraction: oldLayout leftFraction offset: oldLayout leftOffset rightFraction: oldLayout rightFraction offset: oldLayout rightOffset topFraction: oldLayout topFraction offset: oldLayout topOffset bottomFraction: dragBarLayout topFraction offset: 0.
topicListZoomedBoundaries "Private - Answer the zoomed boundaries for the topic list view when the topic text pane is zoomed." | oldBoundaries | oldBoundaries := self listOutlineBrowser bounds. ^ Rectangle left: oldBoundaries left right: oldBoundaries right top: oldBoundaries top bottom: oldBoundaries top.
topicListZoomedLayout "Private - Answer the LayoutFrame to be used for the topic list when the topic text pane is zoomed." | oldLayout | oldLayout := self listOutlineBrowser layout. ^ LayoutFrame leftFraction: oldLayout leftFraction offset: oldLayout leftOffset rightFraction: oldLayout rightFraction offset: oldLayout rightOffset topFraction: oldLayout topFraction offset: oldLayout topOffset bottomFraction: oldLayout topFraction offset: oldLayout topOffset.
topicTextUnzoomedBoundaries "Private - Answer the unzoomed boundaries for the topic text pane when the topic text pane is unzoomed." | oldBoundaries | oldBoundaries := self textSubCanvas bounds. ^ Rectangle left: oldBoundaries left right: oldBoundaries right top: self listOutlineBrowser bounds bottom bottom: oldBoundaries bottom.
topicTextUnzoomedLayout "Private - Answer the LayoutFrame to be used for the topic text when the topic text pane is unzoomed." | oldLayout dragBarLayout | oldLayout := self textSubCanvas layout. dragBarLayout := self dragBar layout. ^ LayoutFrame leftFraction: oldLayout leftFraction offset: oldLayout leftOffset rightFraction: oldLayout rightFraction offset: oldLayout rightOffset topFraction: dragBarLayout bottomFraction offset: 0 bottomFraction: 1 offset: 0.
topicTextZoomedBoundaries "Private - Answer the zoomed boundaries for the topic text pane when the topic text pane is zoomed." | oldBoundaries | oldBoundaries := self textSubCanvas bounds. ^ Rectangle left: oldBoundaries left right: oldBoundaries right top: self textSubCanvas container bounds top bottom: oldBoundaries bottom.
topicTextZoomedLayout "Private - Answer the LayoutFrame to be used for the topic text when the topic text pane is zoomed." | oldLayout | oldLayout := self textSubCanvas layout. ^ LayoutFrame leftFraction: oldLayout leftFraction offset: oldLayout leftOffset rightFraction: oldLayout rightFraction offset: oldLayout rightOffset topFraction: oldLayout topFraction offset: oldLayout topOffset bottomFraction: 1 offset: oldLayout bottomOffset.
unzoomTopicText "Private - Make the topic text area return to its normal size." zoomed := false. self relabelZoomMenuItem: #zoom; fixOutlinerSizeForUnzoom. self builder window label: self windowLabel
windowLabel "Private - Answer the base component of the window label" ^ (self outline respondsTo: #outlineLabel) ifTrue: [self outline outlineLabel asString] ifFalse: ['Help Outline'].
zoomTopicText "Private - Make the topic text area occupy the entire window." zoomed := true. self fixOutlinerSizeForZoom; relabelZoomMenuItem: #unzoom. self currentTopic isNil ifTrue: [^ self]. self builder window label: self windowLabel , ' - ' , self currentTopic data topic asString.
</methods> <methods> VWHelp.AHSOutlineViewer <category>initialize-release</category>
configureOutliner "Private - Configure the model used to handle information manipulated by the receiver." outliner := self outlinerModelClass new. outliner displayBlock: [:obj | obj data topic displayString]; getParentBlock: [:obj | obj parent]; master: self.
initialize super initialize. zoomed := false. history := AHSHistory new. bookmarks := AHSPersistentDictionary new. shouldUpdateHistoryStack := true. searchEntriesFound := List new. self configureOutliner. toolbarTextEditor := self textEditorClass on: (#noTopicSelected << self messageCatalogID). infoHasChanged := false. lastEntry := nil.
release super release. self toolbarTextEditor release. AHSWHCProcessor helpEnabledModel retractInterestsFor: self. AHSWHCProcessor balloonHelpEnabledModel retractInterestsFor: self. self releaseForGemstone.
</methods> <methods> VWHelp.AHSOutlineViewer <category>glossary - private</category>
displayFullGlossary "Private - Open a window or dialog capable of displaying the full glossary." self builder window isModalDialog ifTrue: [self fullGlossaryViewerClass fullGlossaryDialogOn: self] ifFalse: [self fullGlossaryViewerClass fullGlossaryOn: self]
fullGlossaryViewerClass "Private - Answer the class used for viewing all glossary entries." ^ AHSFullGlossaryViewer.
glossaryViewerClass "Private - Answer the class used for viewing a single glossary entry." ^ AHSGlossaryViewer
graphicsViewerClass "Private - Answer the class used for viewing all graphical entries." ^AHSHyperGraphicViewer
lockGlossary "Private - Lock the glossary, answer true if sucessful. We don't need to lock in runtime so answer true." ^ true
lockGraphics "Private - Lock the graphics dictionary, answer true if sucessful. For this class, always answer true because we are running in read-only mode." ^ true
openedFullGlossaryWindow "Private - Answer the first available full glossary editor or viewer found. Answer nil if no such window exists." ^ self openedWindow: self fullGlossaryViewerClass
openedGlossaryWindow "Private - Answer the first available full glossary editor or viewer found. Answer nil if no such window exists." ^ self openedWindow: self glossaryViewerClass
openedGraphicsWindow "Private - Answer the first available full graphics editor or viewer found. Answer nil if no such window exists." ^ self openedWindow: self graphicsViewerClass
openedHistoryWindow "Private - Answer the first available history viewer found. Answer nil if no such window exists." ^ScheduledControllers scheduledControllers relate: [:sc || mdl | mdl := sc model. ((mdl isKindOf: AHSOutlinerSubsetList) and: [mdl mode = #history and: [mdl parentWindow = self builder window]]) ifTrue: [sc view]] ifNone: [nil]
openedWindow: anApplicationModelClass "Private - Answer the first available window which has a class matching anApplicationModelClass." | controller | controller := ScheduledControllers scheduledControllers detect: [:dep | (dep model isKindOf: anApplicationModelClass)] ifNone: [nil]. ^ controller notNil ifTrue: [controller model] ifFalse: [nil]
</methods> <methods> VWHelp.AHSOutlineViewer <category>change messages</category>
helpEnabledChanged "Help has been enabled or disabled. If appropriate, open or close the help subcanvas. Note that we need to check the' open and close cases independently, i.e. a false answer to the question 'shouldOpenHelpCanvas' does not imply that we should close a help canvas." self shouldOpenHelpSubcanvas ifTrue: [^self openHelpSubcanvas]. self shouldCloseHelpSubcanvas ifTrue: [self closeHelpSubcanvas].
selectionChanged | entry entryData | "If the last entry wasn't changed, release the lock on it." (self isReadOnly not and: [self lastEntry notNil]) ifTrue: [self lastEntry data odbReleaseUnDirtyLock]. entry := outliner list selection. entry isNil ifTrue: [self text value: (#noTopicSelected << self messageCatalogID) asString. lastEntry := nil] ifFalse: [entryData := entry value data. (self outlineSource == #Versant and: [self isReadOnly not]) ifTrue: [entryData odbWriteLock ifTrue: [self toolbarTextEditor editable] ifFalse: [Dialog warn: 'Someone else is accessing that topic, so it is being read as read-only.'. self toolbarTextEditor readOnly]]. entryData odbDeepRefresh. self lastEntry: entry value. self setTextValue: entryData text. self history add: entryData. self shouldUpdateHistoryStack ifTrue: [self history push: entryData]. zoomed ifTrue: [self builder window label: ((self outliner outline respondsTo: #outlineLabel) ifTrue: [self outliner outline outlineLabel asString] ifFalse: ['Help Outline']) , ' - ' , self outliner list selection value data topic asString]].
</methods> <methods> VWHelp.AHSOutlineViewer <category>private - configuration</category>
configureEvents "Private - Configure the events which only happen when the editor is in a read only state." | editor | editor := self toolbarTextEditor. editor expressInterestIn: #engageHyperlink for: self sendBack: #engageHyperlink:. editor expressInterestIn: #engageHyperGraphic for: self sendBack: #engageHyperGraphic:. editor expressInterestIn: #engageGlossary for: self sendBack: #engageGlossary:.
configureTextEditor self isReadOnly ifTrue: [self toolbarTextEditor readOnly].
outlinerModelClass "Private - Answer the ApplicationModel subclass used to managed the outline display." ^ AHSOutlineViewerModel
textEditorClass "Private - Answer the ApplicationModel subclass used for text editing operations." ^ AHSToolbarHypertextEditor
</methods> <methods> VWHelp.AHSOutlineViewer <category>outline</category>
jumpToOutline: outlineName topic: topicName "Private - Jump to the topic referenced by aHyperlink." | topic | Cursor wait showWhile: [(topic := self outline findTopicForOutline: outlineName name: topicName) isNil ifTrue: [^ Dialog warn: 'The linked topic could not be found']]. self checkForAutoAccept. self outliner selectEntry: topic. self toolbarTextEditor deselect
setTopicSelectionTo: aTopic self builder window keyboardProcessor checkForAutoAccept. self outliner selectEntry: aTopic.
</methods> <methods> VWHelp.AHSOutlineViewer <category>interface opening</category>
openAsDialog | dlog | dlog := SimpleDialog new. self builder: dlog builder. dlog preBuildBlock: [:mdl :bldr | self preBuildWith: bldr]. dlog postBuildBlock: [:mdl :bldr | self postBuildWith: bldr]. dlog postOpenBlock: [:mdl :bldr | self postOpenWith: bldr]. ^ dlog openFor: self interface: #dialogSpec
postBuildWith: aBuilder super postBuildWith: aBuilder. aBuilder window icon: AHSWHCProcessor reducedHelpWindowIcon. zoomed := false. self configureTextEditor. outliner list selectionIndexHolder onChangeSend: #selectionChanged to: self. self configureEvents. self infoHasChanged: false. (self builder window) label: self outline outlineLabel; application: self. AHSPreferences expandOutlines ifTrue: [self expandAll]. (aBuilder aspectAt: #ahsFlag) onChangeSend: #helpEnabledChanged to: self. AHSWHCProcessor helpEnabledModel onChangeSend: #helpEnabledChanged to: self. AHSWHCProcessor balloonHelpEnabledModel onChangeSend: #helpEnabledChanged to: self. self helpEnabledChanged
postOpenWith: aBuilder super postOpenWith: aBuilder. "Make sure the selection is showing (esp. for modal windows)" self outliner selectEntry: initialSelection. self outliner list selectionIndex ~= 0 ifTrue: [(self outliner builder componentAt: #list) widget makeVisible: self outliner list selectionIndex. self selectionChanged]
</methods> <methods> VWHelp.AHSOutlineViewer <category>graphics</category>
displayGraphicsWindow "Private - Open the window which lets the user view all the graphics defined in the help system." self graphicsViewerClass openFrom: self modal: self builder window isModalDialog
engageHyperGraphic: aLink "Do the appropriate actions for engaging a hyperGraphic specified by aLink." | graphics | graphics := self openedGraphicsWindow. graphics isNil ifTrue: [self graphicsDictionary odbDeepRefresh]. self graphicsViewerClass showGraphicLinkedTo: aLink onHelpOutliner: self.
firstAvailableHyperGraphic "Answer the first available hyper graphic from the selected text." ^ self toolbarTextEditor firstAvailableHyperGraphic
graphicAt: aGraphicKey ^self outline graphicAt: aGraphicKey asSymbol ifAbsent: [ AHSHyperGraphicViewer notFoundGraphic: aGraphicKey. nil]
graphicsKeys "Answer a collection of keys corresponding to all available graphics." ^self outline graphicsKeys
showGraphics "The user has requested the window which displays all available graphics." | graphics | graphics := self openedGraphicsWindow. graphics isNil ifTrue: [self lockGraphics ifTrue: [self displayGraphicsWindow]] ifFalse: [self restoreWindow: graphics]
</methods> <methods> VWHelp.AHSOutlineViewer <category>text editor</category>
deselect self toolbarTextEditor deselect.
</methods> <methods> VWHelp.AHSOutlineViewer <category>saving</category>
reloadOutline: newOutline "Reload the outline" Cursor wait showWhile: [ | openedTopics selectedIndex newOpenedSet | openedTopics := outliner openedSet collect: [:entry | entry data topic]. selectedIndex := outliner list selectionIndex. "go through each openedTopic and find the corresponding tree node to reconstruct the openedSet" newOpenedSet := IdentitySet new. openedTopics do: [:topic | (newOutline detect: [:tree | (tree detect: [:node | node data topic = topic ifTrue: [newOpenedSet add: node. true] ifFalse: ["a true result will break out of the enumeration loop" false]] ifNone: [nil]) notNil] ifNone: [nil]) isNil ifTrue: ["if this answers true, we didn't find a node!" "should be impossible" self error: 'couldn''t find node']]. outliner outline: newOutline; openedSet: newOpenedSet; updateDisplay. outliner list selectionIndex: selectedIndex].
</methods> <methods> VWHelp.AHSOutlineViewer <category>glossary</category>
engageGlossary: aLink "Display the glossary entry associated with aLink." (self glossaryViewerClass openOn: self glossaryDictionary key: aLink linkObject) ifTrue: [self infoHasChanged: true].
glossaryAt: aKey ^self outline glossaryAt: aKey asSymbol
showFullGlossary "Display the glossary." | glossaryWindow | (glossaryWindow := self openedFullGlossaryWindow) isNil ifTrue: [self lockGlossary ifTrue: [self displayFullGlossary]] ifFalse: [self restoreWindow: glossaryWindow]
</methods> <methods> VWHelp.AHSOutlineViewer <category>drag drop</category>
wantToDrag ^self isReadOnly not
wantToDrop ^self isReadOnly not
</methods> <methods> VWHelp.AHSOutlineViewer <category>bookmarks - private</category>
getNewBookmarkNameFromUser: defaultNameString "Private - Answer a new bookmark entered by the user, or nil if the user cancels the operation." | bookmark | [true] whileTrue: [bookmark := (Dialog request: 'Bookmark name:' initialAnswer: defaultNameString) trimExteriorBlanks. bookmark isEmpty ifTrue: [^ nil]. (self haveBookmark: bookmark) ifTrue: [Dialog warn: 'A bookmark named "', bookmark ,'" already exists.'] ifFalse: [^ bookmark]]
</methods> <methods> VWHelp.AHSOutlineViewer <category>AHS Export adds</category>
saveAsHTML "Save the outline as a series of HTML files. One file will contain an indented topic list, one file will contain any glossary entries, and several files containing help topic text, one help topic per file." (AHSHTMLGenerator outline: outliner outline) generateHTML
saveAsHTMLHelp "Save the outline as a series of HTML files, slightly modified to be suitable for creating HTMLHelp. In addition, generate the project file and contents file so that the HTML Help Workshop (available for free from Microsoft - http://www.microsoft.com/workshop/author/htmlhelp/default.asp) can be used to compile the HTML files into a '.chm' file (compiled HTML)." (AHSHTMLHelpGenerator outline: outliner outline) generateHTML
</methods> <methods> VWHelp.AHSOutlineViewer <category>gemstone</category>
releaseForGemstone "Private - If GemStone is active, release the outline held by GemStone. This releases the lock on the outline when the screen closes instead of when it is saved to gemstone." AHSStorageManager outlineSource ~= #GemStone ifTrue: [^ self]. AHSStorageManager removeLockForOutlineNamed: self outlineName. self outline odbRelease.
</methods> <methods> VWHelp.AHSOutlineViewer <category>printing - private</category>
printableOutlineName "Private - Answer the name of the outline in a form suitble for printing." ^ (outliner outline outlineLabel asText emphasizeAllWith: #(bold large))
</methods> <methods> VWHelp.AHSOutlineViewer <category>history - private</category>
setTopic: aTopic "Private - Set the current topic to aTopic." | obj | obj := self outline findTopicNumber: aTopic uniqueID. self selectEntryNoHistoryUpdate: obj
</methods> <methods> VWHelp.AHSOutlineViewer <category>hyperlinks</category>
engageHyperlink: aHyperlink "jump to a hyperlink destination specified by aHyperlink" Cursor normal show. (self shouldOpenNewOutlineViewerFor: aHyperlink) ifTrue: [self openOutlineViewerFor: aHyperlink] ifFalse: [self jumpToTopicReferencedBy: aHyperlink]
</methods> <methods> VWHelp.AHSOutlineViewer <category>Help Core mods</category>
addExportItemsTo: aMenu aMenu aisAddSeparator; addItemLabel: #'Save As Text File' << self messageCatalogID value: #saveAsTextFile.
</methods> <methods> VWHelp.AHSOutlineViewer class <category>interface opening</category>
open ^ (self onOutline: AHSOutline new) open
openAsDialog ^ (self onOutline: AHSOutline new) openAsDialog
openOutlineNamed: outlineName ^ self openOutlineNamed: outlineName topicNumber: nil
openOutlineNamed: outlineName modal: aBoolean ^ self openOutlineNamed: outlineName topicNumber: nil modal: aBoolean
openOutlineNamed: outlineName modal: modal source: source ^ self openOutlineNamed: outlineName topicNumber: nil modal: modal raiseExisting: modal not readOnly: self allowEditing not source: source
openOutlineNamed: outlineName source: source ^ self openOutlineNamed: outlineName modal: false source: source
openOutlineNamed: outlineName topicNumber: topicNumberOrNil ^ self openOutlineNamed: outlineName topicNumber: topicNumberOrNil modal: false
openOutlineNamed: outlineName topicNumber: topicNumberOrNil modal: modal ^ self openOutlineNamed: outlineName topicNumber: topicNumberOrNil modal: modal raiseExisting: modal not
openOutlineNamed: outlineName topicNumber: topicNumberOrNil modal: modal raiseExisting: raiseExisting ^ self openOutlineNamed: outlineName topicNumber: topicNumberOrNil modal: modal raiseExisting: raiseExisting readOnly: AHSStorageManager allowEditing not
openOutlineNamed: outlineName topicNumber: topicNumberOrNil modal: modal raiseExisting: raiseExisting readOnly: readOnly ^ self openOutlineNamed: outlineName topicNumber: topicNumberOrNil modal: modal raiseExisting: raiseExisting readOnly: readOnly source: AHSStorageManager outlineSource
openOutlineNamed: outlineName topicNumber: topicNumberOrNil modal: modal raiseExisting: raiseExisting readOnly: readOnly source: source | anOutliner outline needToOpen obj | "Only raise an existing window if the outline has the same name, the same read only status, and the same source" (modal not and: [raiseExisting]) ifTrue: [anOutliner := self findOpenOutlinerNamed: outlineName readOnly: readOnly source: source]. anOutliner isNil ifTrue: [needToOpen := true. outline := AHSStorageManager getOutlineNamed: outlineName readOnly: readOnly source: source. outline isNil ifTrue: [ "The storage manager should have posted a dialog already if there was a problem." ^nil]. anOutliner := self onOutline: outline source: source] ifFalse: [needToOpen := false. anOutliner restoreWindow: anOutliner]. "Set selection to the topic if possible" topicNumberOrNil notNil ifTrue: [obj := anOutliner outline findTopicNumber: topicNumberOrNil. obj isNil ifTrue: [Dialog warn: 'Could not find the topic'] ifFalse: [anOutliner initialSelection: obj]]. needToOpen ifTrue: [modal ifTrue: [anOutliner openAsDialog] ifFalse: [anOutliner open]]. ^anOutliner
</methods> <methods> VWHelp.AHSOutlineViewer class <category>help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#underline -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/Remove underline text style' runs: (RunArray runs: #(11 9 11) values: #(nil #underline nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#large -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/Remove Large text style' runs: (RunArray runs: #(27) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#textSubCanvas -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Use these buttons to operate on the text below' runs: (RunArray runs: #(46) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#help -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); yourself)); add: (#undo -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Undo last text edit' runs: (RunArray runs: #(19) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#cut -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Cut selected text to clipboard.' runs: (RunArray runs: #(31) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#paste -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Paste contents of clipboard' runs: (RunArray runs: #(27) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#serif -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/Remove Serif text style' runs: (RunArray runs: #(27) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#bold -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/Remove bold style.' runs: (RunArray runs: #(11 4 7) values: #(nil #bold nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#menuBar -> ((AHSPersistentDictionary new) add: (#'File/Print/Selected Topic Only' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Print the selected topic on the default printer.' runs: (RunArray runs: #(48) values: #(nil))); yourself) outlineLinks: nil)); add: (#'View/Contract Text' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Contract the text part of this window so the outline topics are visible' runs: (RunArray runs: #(71) values: #(nil))); yourself) outlineLinks: nil)); add: (#'Bookmarks/Delete...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Delete a bookmark' runs: (RunArray runs: #(17) values: #(nil))); yourself) outlineLinks: #(nil))); add: (#'Navigate/Search...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Open a search dialog that allows you the search the outline topics and text' runs: (RunArray runs: #(75) values: #(nil))); yourself) outlineLinks: nil)); add: (#'Help/Use Widget Help' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Show help information in an area at the bottom of the window' runs: (RunArray runs: #(60) values: #(nil))); yourself) outlineLinks: nil)); add: (#'Navigate/History...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Open a window that shows the linear history of which topics you''ve visited, and allows you to go to any of them' runs: (RunArray runs: #(111) values: #(nil))); yourself) outlineLinks: nil)); add: (#'File/Create HTMLHelp Project...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Create HTMLHelp project and support files, specially formatted ready to be compiled by the HTMLHelp compiler. Visit http://www.microsoft.com/workshop/author/htmlhelp/ for more info.' runs: (RunArray runs: #(117 50 15) values: ((Array new: 3) at: 2 put: ((Array new: 2) at: 1 put: (#color -> ColorValue blue); at: 2 put: #underline; yourself); yourself))); yourself) outlineLinks: nil)); add: (#'File/Open from File...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Open an outline from a file' runs: (RunArray runs: #(27) values: #(nil))); yourself) outlineLinks: nil)); add: (#'View/Contract All Topics' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Contract all the topics in this outline entirely' runs: (RunArray runs: #(48) values: #(nil))); yourself) outlineLinks: nil)); add: (#'File/Exit' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Close this window' runs: (RunArray runs: #(17) values: #(nil))); yourself) outlineLinks: nil)); add: (#'View/Graphics...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Open a window allowing you to browse the graphics that are part of this outline' runs: (RunArray runs: #(79) values: #(nil))); yourself) outlineLinks: nil)); add: (#'View/Expand Text' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Expand the text part of this window to fill entire window' runs: (RunArray runs: #(57) values: #(nil))); yourself) outlineLinks: nil)); add: (#'Navigate/Repeat Last Search' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Repeat the last search operation' runs: (RunArray runs: #(32) values: #(nil))); yourself) outlineLinks: nil)); add: (#'File/Print/Full Outline' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Print the entire outline on the default printer' runs: (RunArray runs: #(47) values: #(nil))); yourself) outlineLinks: nil)); add: (#'File/Print' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Select the type of printing desired.' runs: (RunArray runs: #(36) values: #(nil))); yourself) outlineLinks: nil)); add: (#'View/Expand All Topics' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Expand all topics in this outline entirely' runs: (RunArray runs: #(42) values: #(nil))); yourself) outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Highlight a menu item for specific help.' runs: (RunArray runs: #(40) values: #(nil))); yourself) outlineLinks: #(nil))); add: (#'Help/Use Balloon Help (F3)' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Show help information in a pop-up "balloon" window' runs: (RunArray runs: #(50) values: #(nil))); yourself) outlineLinks: nil)); add: (#'File/Print/Selected Topic and Children' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Print the selected topic and all of its children on the default printer.' runs: (RunArray runs: #(72) values: #(nil))); yourself) outlineLinks: nil)); add: (#'View/Glossary...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Open a window showing all glossary entries' runs: (RunArray runs: #(42) values: #(nil))); yourself) outlineLinks: nil)); add: (#'Bookmarks/Add...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add a new bookmark for the current page' runs: (RunArray runs: #(39) values: #(nil))); yourself) outlineLinks: #(nil))); add: (#'File/Create #{Smalltalk.Text} value File...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Create a text file from this outline' runs: (RunArray runs: #(36) values: #(nil))); yourself) outlineLinks: nil)); add: (#'Navigate/Find Next Within Text' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Find the next occurrance of the selected text within the currently open topic' runs: (RunArray runs: #(77) values: #(nil))); yourself) outlineLinks: nil)); add: (#'Navigate/Forward' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Go forward to the next topic that you had already visited' runs: (RunArray runs: #(57) values: #(nil))); yourself) outlineLinks: nil)); add: (#'Navigate/Back' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Go back to the last topic' runs: (RunArray runs: #(25) values: #(nil))); yourself) outlineLinks: nil)); add: (#'File/Create HTML Files...' -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Create HTML files from this outline.' runs: (RunArray runs: #(36) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#remove -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Remove all links (if any) from the specified text.' runs: (RunArray runs: #(50) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#hypertext -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Create a hypertext link from selected text' runs: (RunArray runs: #(42) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#color -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Change color' runs: (RunArray runs: #(7 5) values: ((Array new: 2) at: 2 put: (#color -> ColorValue darkMagenta); yourself))); yourself) outlineLinks: #(nil))); yourself)); add: (#close -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Close window' runs: (RunArray runs: #(12) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#glossary -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Create a glossary from selected text.' runs: (RunArray runs: #(37) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#italic -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/Remove italic text style' runs: (RunArray runs: #(11 6 11) values: #(nil #italic nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#hypergraphic -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Create a hypergraphic link from selected text' runs: (RunArray runs: #(45) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#listOutlineBrowser -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); yourself)); add: (#mainCanvas -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); yourself)); add: (#text -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Text associated with the selected topic' runs: (RunArray runs: #(39) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#copy -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Copy selected text to clipboard.' runs: (RunArray runs: #(32) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); yourself))
arborHelpEnabled "Answer true if this application utilizes Arbor Help." ^ true
</methods> <methods> VWHelp.AHSOutlineViewer class <category>accessing</category>
messageCatalogID ^#arborHelpSystem
</methods> <methods> VWHelp.AHSOutlineViewer class <category>queries</category>
findOpenOutlinerNamed: outlineName readOnly: readOnly source: source | ctrl | ctrl := ScheduledControllers scheduledControllers detect: [:c | (c view model isKindOf: self) and: [outlineName asUppercase = c view model outlineName asString asUppercase and: [readOnly = c view model isReadOnly and: [source = c view model outlineSource]]]] ifNone: [nil]. ^ ctrl notNil ifTrue: [ctrl view model] ifFalse: [nil]
</methods> <methods> VWHelp.AHSOutlineViewer class <category>instance creation</category>
new "Answer either a readonly class or an editing version of the class based on whether read only has been specified and if an editing class exists in the image." | editingVersion result | editingVersion := self classForEditing. result := (self allowEditing and: [editingVersion notNil]) ifTrue: [editingVersion basicNew] ifFalse: [AHSPreferences outlineViewerClass basicNew]. ^ result initialize
onOutline: anOutline "anOutline is an OrderedCollection of Trees" "use only when the source is nil, meaning a newly created outline" ^ self onOutline: anOutline source: nil
onOutline: anOutline source: aSymbol "anOutline is an OrderedCollection of Trees" | aHelpOutliner | aHelpOutliner := self new. aHelpOutliner outlineSource: aSymbol. aHelpOutliner outliner outline: anOutline. aHelpOutliner loadBookmarksFromFile. anOutline isEmpty ifFalse: [aHelpOutliner initialSelection: anOutline first]. ^ aHelpOutliner
</methods> <methods> VWHelp.AHSOutlineViewer class <category>private</category>
allowEditing "Private - Answer true if editing is currently allowed." ^AHSStorageManager allowEditing
classForEditing "Private - Answer the class to use for editing an outline, or nil if that class isn't installed." ^#{AHSOutlineEditor} valueOrDo: [nil]
</methods> <methods> VWHelp.AHSOutlineViewer class <category>examples</category>
openOnClasses "self openOnClasses" |recursionBlock root| recursionBlock := [:parentTree :cls | |tree| parentTree addChild: (tree := AHSTree data: (AHSHelpOutlineEntry new topic: cls name; text: cls comment)). (cls subclasses asSortedCollection: [:a :b | a name <= b name]) do: [:sc | recursionBlock value: tree value: sc]]. root := AHSTree new. Cursor wait showWhile: [ recursionBlock value: root value: Collection]. (self onOutline: ((AHSOutline withAll: root children) name: 'Class Comments')) open window label: 'Class Comments'
</methods> <methods> VWHelp.AHSHelpOutlineEntry <category>accessing</category>
text ^text
text: aValue text := aValue. self odbDirty
topic ^topic
topic: aValue topic := aValue. self odbDirty
uniqueID ^uniqueID
</methods> <methods> VWHelp.AHSHelpOutlineEntry <category>protected</category>
uniqueID: anInteger "Assign my id, unique within the outline I belong to. Don't call this unless you are sure it's really unique!" uniqueID := anInteger
</methods> <methods> VWHelp.AHSHelpOutlineEntry <category>printing</category>
printOn: aStream aStream nextPutAll: topic displayString
</methods> <methods> VWHelp.AHSHelpOutlineEntry <category>initialize-release</category>
initialize text := String new. topic := String new. self odbDirty
</methods> <methods> VWHelp.AHSHelpOutlineEntry <category>copying</category>
postCopy super postCopy. topic := topic asString copy. text := AHSUtils deepCopyOfText: text.
</methods> <methods> VWHelp.AHSHelpOutlineEntry <category>odb support</category>
odbDeepRefresh self odbRefreshIfNotDirty. self text odbDeepRefresh.
</methods> <methods> VWHelp.AHSHelpOutlineEntry <category>testing</category>
containsFilePointers ^false
</methods> <methods> VWHelp.AHSHelpOutlineEntry <category>displaying</category>
asText ^self topic displayString
</methods> <methods> VWHelp.AHSHelpOutlineEntry class <category>class release</category>
cleanUp "Private - Clean up the class so that it doesn't reference extraneous objects. Typically this method might be called when the class is being unloaded in an ENVY environment." self flushClip.
</methods> <methods> VWHelp.AHSHelpOutlineEntry class <category>BOSS conversion</category>
binaryRepresentationVersion ^'AHS 2.5'
</methods> <methods> VWHelp.AHSHelpOutlineEntry class <category>class accessing</category>
flushClip "self flushClip" clipboard := nil
getClip "Answer the last HelpOutlineEntry instance putClipped" ^clipboard
putClip: aHelpOutlineEntry clipboard := aHelpOutlineEntry
</methods> <methods> VWHelp.AHSHelpOutlineEntry class <category>instance creation</category>
new ^super new initialize
</methods> <methods> VWHelp.AHSMemoryFriendlyHelpOutlineEntry <category>converting</category>
asAHSHelpOutlineEntry |newEntry| newEntry := AHSHelpOutlineEntry new topic: self topic. newEntry text: self text. newEntry uniqueID: self uniqueID. ^newEntry
</methods> <methods> VWHelp.AHSMemoryFriendlyHelpOutlineEntry <category>testing</category>
containsFilePointers ^(text isKindOf: Integer)
</methods> <methods> VWHelp.AHSMemoryFriendlyHelpOutlineEntry <category>accessing</category>
filename ^filename
filename: aFilename filename := aFilename asFilename. self odbDirty
text |textOrPosn| textOrPosn := text. "The text may still be in its 'persistent' form for storage in a file. Convert to the transient form if necessary" (self class isPositionPersistent: textOrPosn) ifTrue: [text := textOrPosn := self class positionAsTransient: textOrPosn]. (textOrPosn isKindOf: Integer) ifTrue: [ "text is on disk" Cursor read showWhile: [|bos| bos := #{BinaryObjectStorage} value onOldNoScan: self filename readStream. [bos position: textOrPosn. textOrPosn := bos next] ensure: [bos close]]]. ^textOrPosn
</methods> <methods> VWHelp.AHSMemoryFriendlyHelpOutlineEntry <category>copying</category>
postCopy topic := topic asString copy. (text isKindOf: CharacterArray) ifTrue: [text := AHSUtils deepCopyOfText: text].
</methods> <methods> VWHelp.AHSMemoryFriendlyHelpOutlineEntry class <category>utilities</category>
isPositionPersistent: anObject "Answer whether anObject is in its persistent form" ^anObject class == LargePositiveInteger
positionAsPersistent: anInteger "Convert a file position to the representation used in files. Canonical representation is a 4-byte positive integer" | int | int := Integer new: 4 neg: false. 1 to: 4 do: [:i | int digitAt: i put: ((anInteger bitShift: -8 * (i - 1)) bitAnd: 16rFF)]. ^int
positionAsTransient: aLargePositiveInteger "Convert the persistent form of a file position back to transient form" ^aLargePositiveInteger compressed
</methods> <methods> VWHelp.AHSMemoryFriendlyHelpOutlineEntry class <category>constants</category>
maxPosition ^16rFFFFFFFF
zeroPosition "Answer the object representing the zero position" ^Integer new: 4 neg: false
</methods> <methods> VWHelp.ArborAbstractTree <category>testing</category>
hasChildren "Answer whether the receiver has children" ^self isLeaf not
hasParent "Answer whether the receiver has a parent." ^self isRoot not
isEmpty "Answer whether the receiver contains any elements." "Trees always contain at least the receiver. Note that this is different than whether the receiver is an empty tree, which implies that it has no children" ^false
isLeaf "Answer whether or not this tree is a leaf" ^self children isEmpty
isRoot "Answer true if the receiver is the top node in the tree hierarchy" ^self parent isNil
</methods> <methods> VWHelp.ArborAbstractTree <category>accessing</category>
ancestors "Answer an ordered collection of the receiver's ancestors, starting with the root. Do not include the receiver." | ancestors ancestor | ancestor := self. ancestors := self species new: 10. [(ancestor := ancestor parent) notNil] whileTrue: [ancestors addFirst: ancestor]. ^ancestors
children "Answer a collection of the children Trees" "For performance reasons, I answer the collection that I own. Senders should not modify the returned collection, but should modify the children via other messages sent to me." ^children
children: anOrderedCollectionOfTrees "Set the children Trees" anOrderedCollectionOfTrees do: [:tree | tree parent: self]. children := anOrderedCollectionOfTrees
depth ^self isRoot ifTrue: [0] ifFalse: [self parent depth + 1]
parent ^parent
parent: aTree "Should only be called from the receiver or from another Tree" parent := aTree.
root "Answer the node that acts as the root for the tree." ^self isRoot ifTrue: [self] ifFalse: [self parent root]
siblings "Answer my siblings (including me)" ^self isRoot ifTrue: [self species with: self] ifFalse: [self parent children]
withAncestors "Answer my ancestors up to and including me, root first." ^self ancestors addLast: self; yourself
</methods> <methods> VWHelp.ArborAbstractTree <category>copying</category>
copyEmpty: aSize "Answer a copy of the receiver that contains no elements" self shouldNotImplement
postCopy super postCopy. self children: (self children collect: [:child | child copy parent: self]).
</methods> <methods> VWHelp.ArborAbstractTree <category>private</category>
do: aBlock after: aTree "Start an iteration in my children AFTER aTree, then proceed to request the same from my parent." | index kids | index := (kids := self children copy) indexOf: aTree ifAbsent: [^self]. index + 1 to: kids size do: [:i | (kids at: i) do: aBlock]. self isRoot not ifTrue: [self parent do: aBlock after: self].
species "Answer the preferred class for reconstructing the receiver. Doing a select: or a collect: on a Tree results in an OrderedCollection. This is kind of a hack, but then so is the species method in the first place" ^OrderedCollection
</methods> <methods> VWHelp.ArborAbstractTree <category>enumerating</category>
do: aBlock "Evaluate aBlock with each of the receiver's elements as the argument." "Evaluate by default in preorder" self preorderDo: aBlock
postorderDo: aBlock "Evaluate aBlock with each of the receiver's elements as the argument." self children copy do: [:child | child postorderDo: aBlock]. aBlock value: self.
preorderDo: aBlock "Evaluate aBlock with each of the receiver's elements as the argument." aBlock value: self. self children copy do: [:child | child preorderDo: aBlock]
remainderDo: aBlock "Evaluate aBlock with each of the receiver's elements as the argument. Same as #do: except the receiver will NOT evaluate aBlock and will forward iteration to its parent in order to complete iteration over the rest of the tree." self children copy do: [:child | child do: aBlock]. self isRoot not ifTrue: [self parent do: aBlock after: self].
</methods> <methods> VWHelp.ArborAbstractTree <category>printing</category>
printOn: aStream aStream nextPutAll: self class name; nextPut: $(. self size - 1 storeOn: aStream. aStream nextPutAll: ' child nodes)'.
storeOn: aStream "Append to the argument aStream a sequence of characters that is an expression whose evaluation creates an collection similar to the receiver." self notYetImplemented
</methods> <methods> VWHelp.ArborAbstractTree <category>adding</category>
add: newObject "Include newObject as one of the receiver's elements. Answer newObject. This message should not be sent to instances of subclasses of ArrayedCollection." "Ambiguous concept for trees" self shouldNotImplement
addChild: aTree "Add aTree to the end of the ordered list of children" self addChild: aTree after: (self children isEmpty ifTrue: [nil] ifFalse: [self children last]).
addChild: aTree after: aSiblingTree "Add aTree to the ordered list of children, after aSiblingTree. If aSiblingTree is nil, then add it to the beginning." aSiblingTree isNil ifTrue: [self children addFirst: aTree] ifFalse: [self children add: aTree after: aSiblingTree]. aTree parent: self.
addChild: aTree before: aSiblingTree "Add aTree to the ordered list of children, before aSiblingTree. If aSiblingTree is nil, then add it to the end." aSiblingTree isNil ifTrue: [self children addLast: aTree] ifFalse: [self children add: aTree before: aSiblingTree]. aTree parent: self.
</methods> <methods> VWHelp.ArborAbstractTree <category>removing</category>
remove: oldObject ifAbsent: anExceptionBlock "Remove oldObject as one of the receiver's elements. If several of the elements are equal to oldObject, only one is removed. If no element is equal to oldObject, answer the result of evaluating anExceptionBlock. Otherwise, answer the argument, oldObject." self notYetImplemented
removeChild: aTree ^self removeChild: aTree ifAbsent: [self notFoundError]
removeChild: aTree ifAbsent: anExceptionBlock "Remove aTree as one of the receiver's children. If no child is equal to aTree, answer the result of evaluating anExceptionBlock. Otherwise, answer the argument, aTree." | fail result | fail := false. result := self children remove: aTree ifAbsent: [ fail := true. anExceptionBlock]. fail not ifTrue: [aTree parent: nil]. ^result
</methods> <methods> VWHelp.ArborAbstractTree <category>initialize-release</category>
initialize self children: self species new.
</methods> <methods> VWHelp.ArborAbstractTree <category>converting</category>
asOrderedCollection "Answer a new instance of OrderedCollection whose elements are the elements of the receiver. The order in which elements are added depends on the order in which the receiver enumerates its elements. In the case of unordered collections, the ordering is not necessarily the same for multiple requests for the conversion." "Optimized so size is not sent, which iterates the whole tree" | anOrderedCollection | anOrderedCollection := OrderedCollection new. self do: [:each | anOrderedCollection addLast: each]. ^anOrderedCollection
</methods> <methods> VWHelp.ArborAbstractTree class <category>instance creation</category>
new ^super new initialize
</methods> <methods> VWHelp.ArborSlaveApplicationModel <category>accessing</category>
allowUserPlacement ^allowUserPlacement
allowUserPlacement: aBoolean allowUserPlacement := aBoolean.
alwaysVisible ^alwaysVisible
alwaysVisible: aBoolean alwaysVisible := aBoolean. self resetWindowOrigin.
initialExtent ^initialExtent
initialExtent: aPoint initialExtent := aPoint.
isPinned ^isPinned
isPinned: aBoolean ^isPinned := aBoolean
parentWindow ^parentWindow
parentWindow: aWindow parentWindow := aWindow.
relativeOrigin ^relativeOrigin
relativeOrigin: aValue "aValue may be #top, #bottom, #left, #right, #mouse, a Point, or an Association. If a Point, then the point is assumed to be fractional (for X and Y values between 0 and 1). If an Association, the key must be #fractional or #absolute, and the value is a Point. If #mouse, then the window is centered around the mouse cursor." | val | (aValue isSymbol or: [aValue aisIsAssociation]) ifTrue: [val := aValue] ifFalse: [val := #fractional->aValue]. relativeOrigin = val ifTrue: [^self]. relativeOrigin := val. self resetWindowOrigin.
</methods> <methods> VWHelp.ArborSlaveApplicationModel <category>private</category>
captureRelativeOrigin "If appropriate, snag the current relative origin and record it." (self allowUserPlacement and: [self builder window displayBox ~= self windowBox]) ifTrue: [self relativeOrigin: #absolute->(self builder window globalOrigin - self parentWindow globalOrigin)].
computedOrigin ^self parentWindow isNil ifTrue: [InputState default mousePoint] ifFalse: [self parentWindow globalOrigin + self computedRelativeOrigin]
computedRelativeOrigin "Compute my origin as relative to my parent window's origin. The relative origin value may be a symbol (#left #right #top #bottom), or an association whose key is either #fractional or #absolute. A fractional specification results in taking an X or Y between 0 and 1 as a fractional offset of the placement region. For #absolute values (or #fractional values not between 0 and 1), the X and Y values are considered an absolute relative offset from my parent window's origin." | slaveExtent parentExtent ro | slaveExtent := self windowExtent. parentExtent := self parentWindow extent. (ro := self relativeOrigin) = #mouse ifTrue: [ro := #absolute->(InputState default mousePoint - self parentWindow globalOrigin - (slaveExtent / 2) rounded)]. ^ro isSymbol ifTrue: [| dec | dec := self class decoratorOffset. (#(left right top bottom) includes: ro) ifFalse: [ro := #top]. ro = #left ifTrue: [ro := (slaveExtent x negated - dec x) @ 0]. ro = #right ifTrue: [ro := (parentExtent x + dec x) @ 0]. ro = #bottom ifTrue: [ro := 0 @ (parentExtent y + dec y)]. ro = #top ifTrue: [ro := 0 @ (slaveExtent y negated - dec y)]. ro] ifFalse: [| x y placementExtent | x := ro value x. y := ro value y. (ro key = #fractional or: [ro key ~= #absolute]) ifTrue: [| offset | offset := slaveExtent + self class decoratorOffset. placementExtent := parentExtent + (2 * offset). (x between: 0 and: 1) ifTrue: [x := (placementExtent x * x - (slaveExtent x * x)) rounded - offset x]. (y between: 0 and: 1) ifTrue: [y := (placementExtent y * y - (slaveExtent y * y)) rounded - offset y]]. x@y]
doClose "Close the window, no questions asked. Note that #requestForWindowClose will NOT be invoked." self builder window isNil ifTrue: [^self]. self builder window controller closeAndUnschedule.
doMasterClose "The master window has closed. Default is to close myself as well." self doClose.
doSlaveClose "I have been requested to close. Default is to unmap myself ('hide' the window). Subclasses may wish to actually close the window instead (which may be accomplished by simply overriding this method to return 'true')." ^self parentWindow isNil or: [self parentWindow isOpen not or: [ self builder window unmap. self changed: #unmap. false]]
isHostWin4 "Answer true if our host OS is Windows 95, 98, or NT." | id | id := OSHandle currentPlatformID. ^('win32* 95 *' match: id) or: [('win32* 98 *' match: id) or: ['win32* nt *' match: id]]
openWindowIn: aRectangle "Subclasses may override this message to provide specific opening behaviors." self builder openIn: aRectangle
resetWindowOrigin | myWin newBox | (self builder isNil or: [self builder window isNil]) ifTrue: [^self]. self isPinned ifTrue: [^self]. myWin := self builder window. newBox := self windowBox. myWin displayBox ~= newBox ifTrue: [myWin displayBox: newBox].
setupParentWindow "Set up my parent window's event dispatching and application." | parentWin | (parentWin := self parentWindow) isNil ifTrue: [^self]. parentWin application isNil ifTrue: [parentWin application: parentWin model]. parentWin sendWindowEvents: ((parentWin sendWindowEvents isNil ifTrue: [Set new] ifFalse: [parentWin sendWindowEvents asSet]) addAll: #(#close #expand #resize #bounds #move #release #collapse); yourself) asArray. parentWin receiveWindowEvents: ((parentWin receiveWindowEvents isNil ifTrue: [Set new] ifFalse: [parentWin receiveWindowEvents asSet]) addAll: #(#expand); yourself) asArray.
setupSlaveWindow "Set up my window's application and event dispatching." | win | self parentWindow isNil ifTrue: [^self]. win := self builder window. win application: self parentWindow application. win beSlave. win sendWindowEvents: ((win sendWindowEvents isNil ifTrue: [Set new] ifFalse: [win sendWindowEvents asSet]) addAll: #(#resize #bounds #enter #move); yourself) asArray. "Events my window dispatches to its master" win receiveWindowEvents: ((win receiveWindowEvents isNil ifTrue: [Set new] ifFalse: [win receiveWindowEvents asSet]) addAll: #(#resize #bounds #move #release); yourself) asArray. "Events my window receives from its master." "The following block processes events from my master. If my master has multiple slaves, then this block may also get events from other slaves which need to be ignored. Other events are handled in a dependency update - see #windowEvent:for:" win windowEventBlock: [:myWin :event :otherWin | otherWin = self parentWindow ifTrue: [ (#(resize #bounds #move) includes: event key) ifTrue: [ "In event driven mode, expose events are processed as resize events and come through before anything else. If the slave is moved (and is allowed to move) and exposes some of the master, then the resize/expose event should be ignored. This condition is checked by seeing if the current window is the slave window. This could cause problems for slaves that resize the master window, or if the master window is in fact resized when the slave is the active window." (event key ~= #resize or: [Window currentWindow ~= self builder window]) ifTrue: [self resetWindowOrigin]] ifFalse: [ "Check for the #release event rather than #close because a bug (?) in VW has the #release event being dispatched for both regular windows and dialogs, but the #close only gets propagated for regular windows." (otherWin = self parentWindow and: [event key = #release]) ifTrue: [self doClose]]]. "Answering true means no further processing is necessary. For the #collapse event, the window will hide automatically in 95, 98 & NT (assuming the master window is set), so ignore it." otherWin ~= self parentWindow or: [event key = #collapse and: [self isHostWin4]]].
windowBox "Answer the box for the window. If the window is supposed to be always visible, coerce the box to be within the bounds of the screen. This method may be overridden if subclasses have differing ideas about what this means." | box | box := self computedOrigin extent: self windowExtent. ^self alwaysVisible ifTrue: [Screen default makeRectangleVisible: box] ifFalse: [box]
windowEvent: anEvent for: aWindow "Note: This method only gets invoked due to the additional dependency placed upon my parentWindow's model. This is because my window's application is set to be my parentWindow, so all event dispatching goes there. A dependency was added to my parentWindow's model (which is the same as my window's application) to dispatch all event notifications back to here so we can handle the ones that are appropriate." aWindow = self builder window ifTrue: [ (#(#bounds #resize #enter #move) includes: anEvent key) ifTrue: [self captureRelativeOrigin]. "Store new location, if necessary." (#(#bounds #resize #move) includes: anEvent key) ifTrue: [self resetWindowOrigin]. "Re-layout if my size has changed." "While sometimes useful, the following causes some problems, such as mouse actions bleeding through the slave into the master if they overlap and have events turned on. So it's commented out by default." "(#enter = anEvent key and: [self parentWindow isOpen]) ifTrue: [self parentWindow raise]"]. "Always keep my parent with focus when possible."
windowExtent "Answer the extent for the window. This method may be overridden if subclasses have differing ideas about how this is calculated." ^self builder window extent
</methods> <methods> VWHelp.ArborSlaveApplicationModel <category>interface opening</category>
allButOpenInterface: aSymbol "Set up some of the necessary dependencies to make my window a slave and size the window properly for opening." | bldr extent | bldr := super allButOpenInterface: aSymbol. bldr window masterWindow: self parentWindow. extent := self initialExtent isNil ifTrue: [(self class interfaceSpecFor: aSymbol) window bounds extent] ifFalse: [self initialExtent]. bldr window minimumSize: (builder window minimumSize max: 10@10). bldr window displayBox: (0@0 extent: extent). self resetWindowOrigin. self setupParentWindow. self setupSlaveWindow. ^bldr
makeWindowVisible (self builder isNil or: [self builder window isNil or: [self builder window isOpen not]]) ifTrue: [self open] ifFalse: [ self builder window map; expand].
openInterface: aSymbol | bldr | bldr := self allButOpenInterface: aSymbol. bldr doFinalHookup. bldr window openIn: bldr window displayBox withType: #normal. self postOpenWith: bldr. bldr window displayPendingInvalidation. ^bldr
openInterface: aSymbol withPolicy: aPolicy inSession: anApplicationContext "VW 3.0 or later. This method will only be invoked if a subclass overrides the opening process. Everything needs to go through #openInterface: for the dependencies to be set up correctly, so I override this method to co-opt control and return it to #openInterface:." ^self openInterface: aSymbol
postOpenWith: aBuilder "Have my window's application (which is the model of my parentWindow) notify me when it gets updated. This is mainly to catch the events coming into my window which then get dispatched to its application. Normal windows generally have their application be the same as their model. However, since I am a slave window, my window's application isn't me so it takes a bit more work for me to get notified when my window receives events." super postOpenWith: aBuilder. aBuilder window application notNil ifTrue: [ aBuilder window application expressInterestIn: #windowState for: self sendBack: #windowEvent:for:].
</methods> <methods> VWHelp.ArborSlaveApplicationModel <category>events</category>
noticeOfWindowClose: aWindow super noticeOfWindowClose: aWindow. self builder window application retractInterestIn: #windowState for: self.
requestForWindowClose "Special case - if everything looks OK then invoke #doSlaveClose (which may choose to not close the window but do something different, like unmap the window!)" ^super requestForWindowClose and: [self doSlaveClose]
</methods> <methods> VWHelp.ArborSlaveApplicationModel <category>initialize-release</category>
initialize super initialize. self isPinned: false. self allowUserPlacement: false. self alwaysVisible: true. self relativeOrigin: #top.
</methods> <methods> VWHelp.ArborSlaveApplicationModel <category>actions</category>
togglePin | c | self isPinned: self isPinned not. (c := self builder componentAt: #pinButton) notNil ifTrue: [ c widget label: (self isPinned ifTrue: [self class pinDownIcon] ifFalse: [self class pinUpIcon])]. self captureRelativeOrigin. self isPinned not ifTrue: [self resetWindowOrigin].
</methods> <methods> VWHelp.ArborSlaveApplicationModel class <category>interface opening</category>
openWith: aWindow "Open an instance of myself attached to aWindow." ^self new parentWindow: aWindow; open
openWith: aWindow at: aLocation "Open an instance of myself attached to aWindow at aLocation (one of #top, #right, #left, #bottom, or a fractional point, or an association - see the instance method #relativeOrigin: for details)." ^self new parentWindow: aWindow; relativeOrigin: aLocation; open
openWith: aWindow at: aLocation extent: aPoint "Open an instance of myself attached to aWindow at aLocation (one of #top, #right, #left, #bottom, or a fractional point, or an association - see the instance method #relativeOrigin: for details) whose extent is aPoint." ^self new parentWindow: aWindow; relativeOrigin: aLocation; initialExtent: aPoint; open
</methods> <methods> VWHelp.ArborSlaveApplicationModel class <category>resources</category>
pinDownIcon ^OpaqueImage figure: self pinDownImage shape: self pinDownMask
pinUpIcon ^OpaqueImage figure: self pinUpImage shape: self pinUpMask
</methods> <methods> VWHelp.ArborSlaveApplicationModel class <category>examples</category>
masterSlaveExample "This method opens a master window with a single slave window directly above it." "self masterSlaveExample" self openWith: (ApplicationWindow new model: ApplicationModel new; open).
masterSlaveExample2 "This method opens a master window with a slave window on either side of it that can hide/show." "self masterSlaveExample2" | win mw rcc left right sub | win := (ApplicationWindow new) model: ApplicationModel new; open. left := self openWith: win at: #left extent: 25 @ 250. right := self openWith: win at: #right extent: 80 @ 30. "The following code is overly complex in order to avoid creating a new ApplicationModel to support a menuBar." sub := Menu new. (Array with: left with: right) with: #('Left Palette' 'Right Palette') do: [:bldr :str || on | on := true. bldr source expressInterestIn: #unmap for: [on := false] sendBack: #value. sub addItem: ((MenuItem labeled: str) indication: [on]; value: [ (on := on not) ifTrue: [bldr window map] ifFalse: [bldr window unmap]])]. mw := (UIBuilder defaultPolicyClass new menuBarClass menu: (Menu new addItem: ((MenuItem labeled: 'Slave Controls') submenu: sub); yourself) performer: nil) inMenuBarWrapper. rcc := ReComposingComposite new. rcc addWrapper: mw. win keyboardProcessor: KeyboardProcessor new; component: rcc; extentEvent: win extent.
masterSlaveExample3 "This method opens a master window with a single slave window in the master's center that: - can be relocated by the user - can be partially visible (that is, can be 'pushed' off the screen)" "self masterSlaveExample3" | bldr | bldr := self openWith: (ApplicationWindow new model: ApplicationModel new; open) at: 0.5 @ 0.5 extent: 80@40. bldr source allowUserPlacement: true; alwaysVisible: false.
</methods> <methods> VWHelp.ArborSlaveApplicationModel class <category>constants</category>
decoratorOffset "The amount to pad for X and Y to take into account the window system decorations." ^10@30
</methods> <methods> VWHelp.AHSOutlinerSubsetList <category>actions</category>
clearHistory | selection | (Dialog confirm: #areYouSure << self messageCatalogID) ifFalse: [^self]. selection := self outliner outliner list selection. self outliner history clear. selection notNil ifTrue: [self outliner history add: selection value data; push: selection value data]. self subsetList list: self outliner history linearHistory. self subsetList list isEmpty not ifTrue: [self subsetList selectionIndex: 1]
</methods> <methods> VWHelp.AHSOutlinerSubsetList <category>private</category>
doSlaveClose "Always close the slave when requested (default is to unmap the window and answer false)." ^true
</methods> <methods> VWHelp.AHSOutlinerSubsetList <category>interface opening</category>
openAsDialog |dlog| dlog :=SimpleDialog new. self builder: dlog builder. dlog preBuildBlock: [:mdl :bldr | self preBuildWith: bldr]. dlog postBuildBlock: [:mdl :bldr | self postBuildWith: bldr]. ^dlog openFor: self interface: (self mode == #history ifTrue: [#historyWindowSpec] ifFalse: [#windowSpec])
openDialogWithLabel: aLabel "open my windowSpec with label aLabel." self windowLabel: aLabel. self openAsDialog
openInterface "Open the ApplicationModel's user interface, using the specification resource of the standard name." ^self openInterface: (self mode == #history ifTrue: [#historyWindowSpec] ifFalse: [#windowSpec])
openWithLabel: aLabel "open my windowSpec with label aLabel." self windowLabel: aLabel. self open
postBuildWith: aBuilder super postBuildWith: aBuilder. self builder window label: self windowLabel. windowLabel onChangeSend: #windowLabelChanged to: self. self subsetList selectionIndexHolder onChangeSend: #subsetListChanged to: self.
</methods> <methods> VWHelp.AHSOutlinerSubsetList <category>accessing</category>
mode ^mode
mode: aSymbol mode := aSymbol
outliner ^outliner
outliner: anOutline outliner := anOutline
windowLabel ^windowLabel value
windowLabel: aLabel ^windowLabel value: aLabel
</methods> <methods> VWHelp.AHSOutlinerSubsetList <category>aspects</category>
subsetList "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^subsetList isNil ifTrue: [subsetList := SelectionInList new] ifFalse: [subsetList]
</methods> <methods> VWHelp.AHSOutlinerSubsetList <category>change messages</category>
subsetListChanged | obj | obj := self subsetList selection. obj notNil ifTrue: [obj := self outliner outline findTopicNumber: obj uniqueID]. self outliner builder window keyboardProcessor checkForAutoAccept. self outliner outliner selectEntry: obj. self outliner historyIndex: self subsetList selectionIndexHolder value. self mode == #search ifTrue: [self outliner highlightSearchedWord]. "Uncomment the following to have the SubsetList close when an item is selected." "self closeRequest"
windowLabelChanged self builder window label: self windowLabel.
</methods> <methods> VWHelp.AHSOutlinerSubsetList <category>initialize-release</category>
initialize super initialize. windowLabel := String new asValue. self allowUserPlacement: true.
</methods> <methods> VWHelp.AHSOutlinerSubsetList class <category>accessing</category>
messageCatalogID ^#arborHelpSystem
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>menu messages</category>
contract "Contract the receiver's current selection and all of its children to a single item, keeping the state of expanded children expanded." | oc | Cursor wait showWhile: [ oc := List withAll: self displayedObjects. self updateDisplayUsing: (self contractIndex: self selectedRowIndex in: oc fully: false)].
contract: anEntry "Contract anEntry and all of its children to a single item, keeping the state of expanded children expanded." | oc | Cursor wait showWhile: [ oc := List withAll: self displayedObjects. self updateDisplayUsing: (self contractIndex: (self holderIndexOf: anEntry in: oc) in: oc fully: false)].
contractFully "Contract the receiver's current selection and all of its children to a single item" | oc | Cursor wait showWhile: [ oc := List withAll: self displayedObjects. self updateDisplayUsing: (self contractIndex: self selectedRowIndex in: oc fully: true)].
contractFully: anEntry "Contract anEntry and all of its children to a single item" | oc | Cursor wait showWhile: [ oc := List withAll: self displayedObjects. self updateDisplayUsing: (self contractIndex: (self holderIndexOf: anEntry in: oc) in: oc fully: true)].
copy "Copy the currently selected entry into my local clipboard." self clipModel value: self selectedObject value.
cut | curEntry | curEntry := self selectedObject value. "Contract it to clean up the openedSet." self contractIndex: self selectedRowIndex in: (List withAll: self displayedObjects) fully: true. self deselectEntry. curEntry isNil ifTrue: [^false]. (self parentFor: curEntry) isNil ifTrue: [self forest remove: curEntry]. self deleteBlock value: curEntry. self clipModel value: curEntry. "If we've just deleted the last child, close the parent node" self openedSet: (self openedSet select: self hasChildrenBlock). self updateDisplay
expand "Expand the receiver's current selection." | oc | Cursor wait showWhile: [ oc := List withAll: self displayedObjects. self updateDisplayUsing: (self expandIndex: self selectedRowIndex in: oc fully: false)].
expand: anEntry "Expand anEntry" | oc | Cursor wait showWhile: [ oc := List withAll: self displayedObjects. self updateDisplayUsing: (self expandIndex: (self holderIndexOf: anEntry in: oc) in: oc fully: false)].
expandFully "Expand the receiver's current selection and all of its children." | oc | Cursor wait showWhile: [ oc := List withAll: self displayedObjects. self updateDisplayUsing: (self expandIndex: self selectedRowIndex in: oc fully: true)].
expandFully: anEntry "Expand anEntry and all of its children." | oc | Cursor wait showWhile: [ oc := List withAll: self displayedObjects. self updateDisplayUsing: (self expandIndex: (self holderIndexOf: anEntry in: oc) in: oc fully: true)].
newAfter ^self addNewEntry: #after
newBefore ^self addNewEntry: #before
newChild ^self addNewEntry: #child
pasteAfter ^self pasteEntry: #after
pasteBefore ^self pasteEntry: #before
pasteChild ^self pasteEntry: #child
toggle self toggleIndex: self list selectionIndex fully: InputState default ctrlDown
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>interface</category>
selectedObject "Answer the outline object currently selected or nil." ^self subclassResponsibility
selectedRowIndex "Answer the row index that is currently selected. 0 means no selection." ^self subclassResponsibility
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>accessing</category>
clipModel ^clipModel
deleteBlock ^deleteBlock
displayBlock ^displayBlock
forest ^forest
forest: aCollection forest := aCollection.
getChildrenBlock ^getChildrenBlock
getParentBlock ^getParentBlock
hasChildrenBlock ^hasChildrenBlock
includeArrows "Answer whether we are to include the arrows in the display. The arrows, when selected by the user, will contract or expand a node in the hierarchical display." ^includeArrows
includeArrows: aBoolean "Set whether we are to include the arrows in the display. The arrows, when selected by the user, will contract or expand a node in the hierarchical display." includeArrows := aBoolean.
isReadOnly ^readOnly == true
isReadOnly: aBoolean readOnly := aBoolean.
menu ^menuHolder isNil ifTrue: [menuHolder := self buildMenu asValue] ifFalse: [menuHolder]
menu: aPopUpMenu menuHolder isNil ifTrue: [menuHolder := ValueHolder new]. menuHolder value: aPopUpMenu.
moveBlock ^moveBlock
newEntryBlock ^newEntryBlock
openedSet ^openedSet
openedSet: aSet openedSet := aSet.
outline "Answer the outline I'm displaying/editing" ^self forest
outline: anOrderedCollection "Set the forest that makes up the outline we're viewing/editing. This includes clearing the current selection as well as clearing out the openedSet and any other miscellaneous operations." self deselectEntry; openedSet: IdentitySet new; forest: anOrderedCollection; updateDisplay
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>default blocks</category>
defaultDeleteBlock "Default to using the Tree protocol (a bad assumption?)." ^[:obj | obj parent isNil ifFalse: [obj parent removeChild: obj ifAbsent: []]]
defaultDisplayBlock ^[:obj | obj displayString]
defaultGetChildrenBlock "Default to the Tree protocol (a bad assumption?)." ^[:parent | parent children]
defaultGetParentBlock "Default to using the tree protocol." ^[:child | child parent]
defaultHasChildrenBlock "By default, use the getChildrenBlock to determine whether there are children. There may be a more efficient way of doing this." ^[:parent | (self getChildrenBlock value: parent) isEmpty not]
defaultMoveBlock "Default to using the Tree protocol (a bad assumption?)." ^[:newChild :parent :olderSibling | newChild parent isNil ifFalse: [newChild parent removeChild: newChild ifAbsent: []]. parent isNil ifFalse: [parent addChild: newChild after: olderSibling]].
defaultNewEntryBlock "Default to using a Tree (a bad assumption?)." ^[ArborAbstractTree new]
secondaryDefaultGetParentBlock "Default to using the labeled object holders. It would be best if the user overrode this implementation as it has (at least) two flaws: a) It will be get slower with the number of nodes displayed b) It only works for those nodes actually displayed. This means that methods like #selectEntry: may NOT work since it might require fetching the parent of a node that is not yet displayed. The parent of an undisplayed node is nil (just like a root node - got a better idea?)." "Use this as the 'get parent' block if you are not using trees in the outline and choose not to maintain parental references." ^[:child | | holder | (holder := self displayedObjects detect: [:obj | obj value = child] ifNone: [nil]) isNil ifTrue: [nil] ifFalse: [holder parent value]]
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>private</category>
addChild: anObject to: anOrderedCollection parent: aParent |isOpen loh| isOpen := self isOpen: anObject. loh := self labeledObjectHolderFor: anObject parent: aParent. anOrderedCollection add: loh. isOpen ifTrue: [ | children | children := self childrenFor: anObject. children do: [:child | self addChild: child to: anOrderedCollection parent: loh]]
childrenFor: anObject ^self getChildrenBlock value: anObject
contractIndex: anIndex in: aCollection fully: aBoolean "Contract the entry at anIndex in aCollection. If aBoolean is true, then contract all children recursively." ^self contractIndex: anIndex in: aCollection fully: aBoolean topNode: true
contractIndex: anIndex in: aCollection fully: aBoolean topNode: isTop "Contract the entry at anIndex in aCollection. If aBoolean is true, then contract all children recursively. If we are the top node (as indicated by isTop) then remove the element at anIndex from the openedSet also." | anEntry lohEntry lohChild | anIndex isZero ifTrue: [^self]. anEntry := (lohEntry := aCollection at: anIndex) value. ((self openedSet includes: anEntry) and: [self hasChildren: anEntry]) ifTrue: [(self childrenFor: anEntry) size timesRepeat: [ lohChild := aCollection at: anIndex + 1. self contractIndex: anIndex + 1 in: aCollection fully: aBoolean topNode: false. aBoolean ifTrue: [self openedSet remove: lohChild value ifAbsent: []]. aCollection removeAtIndex: anIndex + 1]. isTop ifTrue: [self openedSet remove: anEntry ifAbsent: []]. lohEntry isExpanded: false. lohEntry canBeExpanded: true] ifFalse: [ "There may be undisplayed children that are open. Close those too." (aBoolean and: [self hasChildren: anEntry]) ifTrue: [| nodes | nodes := OrderedCollection withAll: (self childrenFor: anEntry). [nodes isEmpty not] whileTrue: [| n | n := nodes removeFirst. self openedSet remove: n ifAbsent: []. nodes addAllLast: (self childrenFor: n)]]]. ^aCollection
displayedObjects "Answer the collection of objects being displayed in the window." ^self subclassResponsibility
emphasisFor: anObject ^#bold
expandIndex: anIndex in: aCollection fully: aBoolean "Expand the entry at anIndex in aCollection. If aBoolean is true, then expand all children recursively." | anEntry children lohEntry | anEntry := (lohEntry := aCollection at: anIndex) value. (self hasChildren: anEntry) ifTrue: [ children := self childrenFor: anEntry. (self openedSet includes: anEntry) ifFalse: [ self openedSet add: anEntry. lohEntry isExpanded: true. lohEntry canBeExpanded: false. children reverseDo: [:child | aCollection add: (self labeledObjectHolderFor: child parent: lohEntry) beforeIndex: anIndex + 1. (self openedSet includes: child) ifTrue: [self openedSet remove: child. "A wee little kludge." self expandIndex: anIndex + 1 in: aCollection fully: false]]]. aBoolean ifTrue: [| bareCollection | bareCollection := aCollection collect: [:loh | loh value]. children reverseDo: [:child | self expandIndex: (self indexOf: child in: bareCollection) in: aCollection fully: true]]]. ^aCollection
hasChildren: anObject ^self hasChildrenBlock value: anObject
holderIndexOf: anObject in: aSequenceableCollection "Answer the index of the holder of anObject in aSequenceableCollection." ^self indexOf: anObject in: (aSequenceableCollection collect: [:loh | loh value])
indexOf: anObject in: aSequenceableCollection "Use #== to compare and find the index - the normal #indexOf: implementation on SequenceableCollection uses #=." ^(1 to: aSequenceableCollection size) detect: [:i | (aSequenceableCollection at: i) == anObject] ifNone: [0]
isOpen: anObject "Make sure anObject can still BE open. The hierarchy may have been edited w/o my knowledge..." | open | open := self openedSet includes: anObject. (open and: [(self hasChildren: anObject) not]) ifTrue: [open := false. self openedSet remove: anObject]. ^open
labeledObjectHolderFor: anObject parent: aParent | loh | (loh := ArborOutlineLabeledObjectHolder newValue: anObject indentLevel: (aParent isNil ifTrue: [0] ifFalse: [aParent indentLevel + 1]) parent: aParent) isExpanded: (self isOpen: anObject); canBeExpanded: ((self isOpen: anObject) not and: [self hasChildren: anObject]). loh emphasis: (self emphasisFor: anObject). self displayBlock isNil ifFalse: [loh displayBlock: self displayBlock]. ^loh
parentFor: anEntry ^(self forest includes: anEntry) ifTrue: [nil] ifFalse: [getParentBlock value: anEntry]
pContractFully: aNode "Remove aNode and all children from the opened set." | n | n := self openedSet remove: aNode ifAbsent: []. n == aNode ifFalse: [^self]. (self childrenFor: aNode) do: [:child | self pContractFully: child]
redrawDisplayUsing: aCollection "Physically refresh the outline displayed." self subclassResponsibility.
toggleIndex: anInteger fully: aBoolean | loh oc redisplay | redisplay := false. oc := List withAll: self displayedObjects. loh := self list list at: anInteger. loh isExpanded ifTrue: [oc := self contractIndex: anInteger in: oc fully: aBoolean. redisplay := true] ifFalse: [loh canBeExpanded ifTrue: [oc := self expandIndex: anInteger in: oc fully: aBoolean. redisplay := true]]. redisplay ifTrue: [self updateDisplayUsing: oc]
updateDisplayUsing: aCollection "Update the display on the screen with a new/modified outline. It is assumed that related instance variables are properly maintained (such as the openedSet)." self redrawDisplayUsing: aCollection.
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>actions</category>
deselectEntry "Deselect any existing selection." ^self subclassResponsibility
removeEntry: aNode "Remove aNode from the outline. This method does not require that aNode be the currently selected object (unlike #cut)." self removeEntryQuietly: aNode. self updateDisplay.
removeEntryQuietly: aNode "Remove aNode from the outline. This method does not require that aNode be the currently selected object (unlike #cut). Does not update the display when finished. This is useful when multiple removes are performed so the outline doesn't flash. Be sure to send #updateDisplay when complete." | oc | aNode isNil ifTrue: [^false]. self selectedObject value == aNode ifTrue: [self deselectEntry]. "Contract it to clean up the openedSet." oc := List withAll: self displayedObjects. self contractIndex: (self holderIndexOf: aNode in: oc) in: oc fully: true. (self parentFor: aNode) isNil ifTrue: [self forest remove: aNode ifAbsent: []]. self deleteBlock value: aNode. self clipModel value: aNode. "If we've just deleted the last child, close the parent node" self openedSet: (self openedSet select: self hasChildrenBlock).
selectEntry: anEntry "Try to select anEntry in the outline, expanding if necessary. If a node requires expansion, then update the display once all expansions are complete." "Expand all ancestors" | anc updateRequired | self selectedObject value == anEntry ifTrue: [^self]. updateRequired := false. anc := anEntry notNil ifTrue: [self parentFor: anEntry] ifFalse: [anEntry]. [anc isNil] whileFalse: [ (self openedSet includes: anc) not ifTrue: [ self openedSet add: anc. updateRequired := true]. anc := self parentFor: anc]. updateRequired ifTrue: [self updateDisplay].
updateDisplay "Update the display on the screen with a new/modified outline. Entirely rebuild the display tree from the openedSet and base forest. This is as opposed to using #updateDisplayUsing: which is used to avoid generating excess garbage as well as avoiding repeated hierarchy traversal whenever a node is expanded or contracted (which can get quite slow for large and/or deep hierarchies)." | coll | coll := List new. self forest do: [:tree | self addChild: tree to: coll parent: nil]. self redrawDisplayUsing: coll.
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>client hooks</category>
clipModel: aValueModel "Set the clipboard channel. Should be a value model that provides clipboard functionality." clipModel := aValueModel.
deleteBlock: aBlockClosure deleteBlock := aBlockClosure
displayBlock: aBlockClosure "Provide a block for displaying objects. The default is to send it the #displayString message. The block takes the object as an argument, and should answer a String" displayBlock := aBlockClosure
getChildrenBlock: aBlockClosure "Provide a block for getting the children from an object. The default sends the message #children to the object. The block should take the object as an argument, and answer an OrderedCollection of children objects" getChildrenBlock := aBlockClosure
getParentBlock: aBlockClosure "Provide a block for getting the parent of an object. The default sends the message #parent to the object. The block should take the object as an argument, and answer the parent" getParentBlock := aBlockClosure
hasChildrenBlock: aBlockClosure "Provide a block for finding out whether an object has children. The default evaluates the getChildren block and checks the size. The block should take the object as an argument" hasChildrenBlock := aBlockClosure
moveBlock: aBlockClosure "Provide a block for moving a new or old entry in the outline. The default assumes Tree protocol (see intialize). The block takes three arguments: 1. The object to be moved 2. The new parent of the object, or nil. If nil, then the object is being moved to the top of the hierarchy, and it will be added to the forest proper (in which case the block is not responsible for doing that) 3. The sibling object that the object should be added after. If nil, then it should be the first child of the new parent" moveBlock := aBlockClosure
newEntryBlock: aBlockClosure "Provide a block for creating a new entry in the outline. The default creates an empty instance of Tree. The block takes no arguments. After the entry is created, it will then be inserted into the outline by evaluating the moveBlock (see moveBlock:)" newEntryBlock := aBlockClosure
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>private-outline editing</category>
addEntry: anEntry where: aSymbol "aSymbol: <#before | #after | #child | #firstChild | #lastChild > (#child defaults to #lastChild)" ^self addEntry: anEntry where: aSymbol inRelationTo: self selectedObject value
addEntry: anEntry where: aSymbol inRelationTo: anotherEntry "aSymbol: <#before | #after | #child | #firstChild | #lastChild > (#child defaults to #lastChild)" | parent siblings| parent := anotherEntry notNil ifTrue: [self parentFor: anotherEntry]. siblings := parent isNil ifTrue: [self forest] ifFalse: [self childrenFor: parent]. aSymbol == #before ifTrue: [|afterSibling i| i := 1. [(siblings at: i) == anotherEntry] whileFalse: [i := i + 1]. i > 1 ifTrue: [afterSibling := siblings at: i - 1]. parent isNil ifTrue: [afterSibling isNil ifTrue: [self forest addFirst: anEntry] ifFalse: [self forest add: anEntry after: afterSibling]]. self moveBlock value: anEntry value: parent value: afterSibling]. aSymbol == #after ifTrue: [parent isNil ifTrue: [anotherEntry isNil ifTrue: [self forest addFirst: anEntry] ifFalse: [self forest add: anEntry after: anotherEntry]]. self moveBlock value: anEntry value: parent value: anotherEntry]. (aSymbol == #child or: [aSymbol == #firstChild or: [aSymbol == #lastChild]]) ifTrue: [| olderSibling | self openedSet add: anotherEntry. (aSymbol ~= #firstChild and: [anotherEntry children isEmpty not]) ifTrue: [olderSibling := anotherEntry children last]. self moveBlock value: anEntry value: anotherEntry value: olderSibling]. self updateDisplay.
addNewEntry: aSymbol "aSymbol: <#before | #after | #child | #firstChild | #lastChild > (#child defaults to #lastChild)" |new| new := self newEntryBlock value. ^new isNil ifFalse: [self addEntry: new where: aSymbol]
pasteEntry: aSymbol "aSymbol: <#before | #after | #child>" |entry| entry := self clipModel value copy. entry isNil ifTrue: [self error: 'Nothing on the clipboard']. ^self addEntry: entry where: aSymbol
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>initialize-release</category>
initialize super initialize. self includeArrows: true; openedSet: IdentitySet new; clipModel: nil asValue; forest: List new; getChildrenBlock: self defaultGetChildrenBlock; getParentBlock: self defaultGetParentBlock; hasChildrenBlock: self defaultHasChildrenBlock; displayBlock: self defaultDisplayBlock; newEntryBlock: self defaultNewEntryBlock; moveBlock: self defaultMoveBlock; deleteBlock: self defaultDeleteBlock.
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>private-menu building</category>
addCopyCutPasteToMenu: aMenu | group | group := OrderedCollection new: 4. #(copy cut) with: #(selectedCopy selectedCut) do: [:action :id | group add: ((MenuItem labeled: action) value: action; nameKey: id; hidden: [self selectedObject value isNil or: [self isReadOnly]])]. group add: ((MenuItem labeled: 'paste') value: #paste; nameKey: #unselectedPaste; enabled: [self clipModel value notNil]; hidden: [self selectedObject value notNil or: [self isReadOnly]]); add: ((MenuItem labeled: 'paste') submenu: (Menu labelArray: #('before' 'after' 'child') values: #(pasteBefore pasteAfter pasteChild)); nameKey: #selectedPaste; enabled: [self clipModel value notNil]; hidden: [self selectedObject value isNil or: [self isReadOnly]]). aMenu addItemGroup: group.
addEntryCreationToMenu: aMenu | group | group := OrderedCollection new: 4. group add: ((MenuItem labeled: 'new') value: #newAfter; nameKey: #unselectedNew; hidden: [self selectedObject value notNil or: [self isReadOnly]]); add: ((MenuItem labeled: 'new') submenu: (Menu labelArray: #('before' 'after' 'child') values: #(newBefore newAfter newChild)); nameKey: #selectedNew; hidden: [self selectedObject value isNil or: [self isReadOnly]]). aMenu addItemGroup: group.
addExpandContractToMenu: aMenu | group hasChildren canExpand canContract | group := OrderedCollection new: 4. #('expand' 'expand fully' 'contract' 'contract fully') with: #(expand expandFully contract contractFully) do: [:label :action | group add: ((MenuItem labeled: label) value: action; nameKey: action; hidden: [self selectedObject value isNil])]. aMenu addItemGroup: group. hasChildren := [self hasChildren: self selectedObject value]. canExpand := [hasChildren value and: [(self isOpen: self selectedObject value) not]]. canContract := [hasChildren value and: [self isOpen: self selectedObject value]]. (aMenu atNameKey: #expand) enabled: canExpand. (aMenu atNameKey: #expandFully) enabled: hasChildren. (aMenu atNameKey: #contract) enabled: canContract. (aMenu atNameKey: #contractFully) enabled: hasChildren.
buildMenu "Build and answer the menu." | m | m := Menu new. self addExpandContractToMenu: m; addEntryCreationToMenu: m; addCopyCutPasteToMenu: m. ^m
</methods> <methods> VWHelp.ArborOutlineBrowserModel <category>change messages</category>
doubleClickOccurred self toggle. self changed: #doubleClick with: self selectedObject.
selectionChanged self changed: #selection with: self selectedObject.
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>interface</category>
selectedObject (self list list size >= self list selectionIndexHolder value) ifTrue: [^self list selection] ifFalse: [^nil asValue]
selectedRowIndex "Answer the row index that is currently selected in the list. 0 means no selection." ^self list selectionIndex
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>private</category>
displayedObjects "Answer the collection of objects being displayed in the window." ^self list listHolder value
expandIndex: anIndex in: aCollection fully: aBoolean "Adjust the list so that after expanding as many of the children as possible are visible." | startSize | startSize := aCollection size. super expandIndex: anIndex in: aCollection fully: aBoolean. aCollection size ~= startSize ifTrue: [ (self builder componentAt: #list) widget makeVisibleFrom: anIndex to: anIndex + aCollection size - startSize]. ^aCollection
redrawDisplayUsing: aCollection "Reset the list, but be careful of how it gets redrawn. The parameter is a collection of appropriately indented strings." | start min disp | start := (((1 to: (min := ((disp := self displayedObjects) size min: aCollection size))) detect: [:i | (disp at: i) ~~ (aCollection at: i)] ifNone: [min + 1]) - 1) max: 1. self list listHolder setValue: aCollection. self builder isNil ifFalse: [| view | view := (self builder componentAt: #list) widget. view targetIndex > aCollection size ifTrue: [view targetIndex: view zeroIndex]. view selectionIndex > aCollection size ifTrue: [view setSelectionIndex: view zeroIndex]. "Duplicate some of SelectionView>>updateModel" view sequence: aCollection; elementsInSequenceHaveChanged; changedPreferredBounds: nil; forceMaximumVisibility; invalidateToBottomFromElementIndex: start].
toggleIndex: anInteger fully: aBoolean "Be sure the element being toggled is selected." self list selectionIndex: anInteger. ^super toggleIndex: anInteger fully: aBoolean
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>interface opening</category>
autoConvertList "Support subclasses that expect my #postBuildWith: method to convert the list from a regular list to a hierarchical list. This should only happen for subclasses in older modules. The new approach is to use Arbor's hierarchical list widget from the painter." | seqView outSeqView | seqView := (self builder componentAt: #list) widget. (seqView isKindOf: ArborHierarchicalSequenceView) ifTrue: [^self]. outSeqView := ArborHierarchicalSequenceView new. 1 to: SequenceView instSize do: [:i | outSeqView instVarAt: i put: (seqView instVarAt: i)]. outSeqView controller: nil. 1 to: SequenceController instSize do: [:i | outSeqView controller instVarAt: i put: (seqView controller instVarAt: i)]. seqView become: outSeqView.
postBuildWith: aBuilder | seqView style | super postBuildWith: aBuilder. self autoConvertList. seqView := (aBuilder componentAt: #list) widget. seqView includeArrows: self includeArrows. "Adjust the style for appropriate list-type viewing. This is done in case the user has overridden the text style - otherwise the lineGrid is too large and the list looks ugly." style := seqView textStyle copy. style gridForFont: nil withLead: 0. seqView setTextStyle: style.
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>private-outline editing</category>
addEntry: anEntry where: aSymbol super addEntry: anEntry where: aSymbol. self list selection: anEntry.
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>actions</category>
deselectEntry "Deselect the entry in the list." self list selection: nil
selectEntry: anEntry super selectEntry: anEntry. "Be sure any pending redraws are complete, otherwise it can get messy (visually)." ScheduledControllers checkForEvents. self list selection: anEntry
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>accessing</category>
includeArrows: aBoolean "Remove arrows (or whatever the expand/contract icons may be) from the display." | view | includeArrows = aBoolean ifTrue: [^self]. super includeArrows: aBoolean. self builder notNil ifTrue: [ view := (self builder componentAt: #list) widget. view includeArrows: aBoolean. view invalidate].
list "Answer our SelectionInList" ^list
list: aSelectionInList list := aSelectionInList.
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>initialize-release</category>
initialize super initialize. self list: (SelectionInList with: self forest). self list selectionIndexHolder onChangeSend: #selectionChanged to: self.
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>default blocks</category>
defaultDisplayBlock ^[:obj | obj displayString]
</methods> <methods> VWHelp.ArborListOutlineBrowserModel <category>obsolete</category>
indentString: aString "OBSOLETE - support for earlier releases."
</methods> <methods> VWHelp.AHSOutlineViewerModel <category>private</category>
buildMenu "Build and answer the menu." | m | m := Menu new. self addExpandContractToMenu: m. ^m
canExpand: anEntry fully: fully "Answer true if able to get a read lock on all of the trees that will be opened by expanding anEntry." | canExpand | canExpand := true. anEntry value children do: [:child | | loh | child odbReadLock ifTrue: [loh := self labeledObjectHolderFor: child parent: anEntry. (loh isExpanded or: [fully]) ifTrue: [(self canExpand: loh fully: fully) ifFalse: [canExpand := false]]] ifFalse: [canExpand := false]]. ^ canExpand.
canSelect: anEntry "Answer true if able to get a read lock on all of the trees that will be displayed by selecting anEntry." | canSelect currEntry | canSelect := true. currEntry := anEntry. [(currEntry := currEntry parent) isNil not and: [canSelect]] whileTrue: [currEntry children do: [:child | child odbReadLock ifFalse: [canSelect := false]]]. ^canSelect.
contractIndex: anIndex in: aCollection fully: aBoolean topNode: isTop self master textController textHasChanged ifTrue: [self master forceAccept]. ^ super contractIndex: anIndex in: aCollection fully: aBoolean topNode: isTop
expandIndex: anIndex in: aCollection fully: aBoolean self master textController textHasChanged ifTrue: [self master forceAccept]. ^ super expandIndex: anIndex in: aCollection fully: aBoolean
labeledObjectHolderFor: anObject parent: aParent | loh | loh := super labeledObjectHolderFor: anObject parent: aParent. loh isExpanded: ((self isOpen: anObject) and: [self hasChildren: anObject]). loh iconSet: #book. ^ loh
toggleIndex: anInteger fully: aBoolean | loh | self list selectionIndex: anInteger. loh := self list list at: anInteger. loh isExpanded ifTrue: [aBoolean ifTrue: [self contractFully: loh value] ifFalse: [self contract: loh value]] ifFalse: [loh canBeExpanded ifTrue: [aBoolean ifTrue: [self expandFully: loh value] ifFalse: [self expand: loh value]]].
updateLocks "Update locks. Since we are read only we shouldn't need to do anything. In fact, we should find out if we need to use this method at all."
</methods> <methods> VWHelp.AHSOutlineViewerModel <category>testing</category>
hasEmptySelection "Answer true if the list associated with the receiver does not have an active selection." ^ self hasSelection not
hasSelection "Answer true if the list associated with the receiver has an active selection." ^ self list selection notNil
</methods> <methods> VWHelp.AHSOutlineViewerModel <category>actions</category>
outlineDo: aBlock ^self outline do: [:each | each do: aBlock]
selectEntry: anEntry "If all the topics that will be displayed by selected anEntry can aquire a read lock, then select the entry." (anEntry isNil or: [self canSelect: anEntry]) ifTrue: [super selectEntry: anEntry] ifFalse: [self updateLocks. Dialog warn: 'Can not select the entry because someone is changing the outline structure.']
updateDisplay "Update the display on the screen with a new/modified outline. Entirely rebuild the display tree from the openedSet and base forest. This is as opposed to using #updateDisplayUsing: which is used to avoid generating excess garbage as well as avoiding repeated hierarchy traversal whenever a node is expanded or contracted (which can get quite slow for large and/or deep hierarchies)." | oc | oc := List new. self outline odbDeepRefresh. self updateLocks. self openedSet: (self openedSet select: self hasChildrenBlock). self outline do: [:tree | self addChild: tree to: oc parent: nil]. self redrawDisplayUsing: oc.
</methods> <methods> VWHelp.AHSOutlineViewerModel <category>accessing</category>
forest ^super forest odbRefreshIfNotDirty.
isReadOnly ^ true
master ^master
master: anApplicationModel ^master := anApplicationModel
selectionValue "Answer the value of the current selection, or nil if no selection exists." ^ self hasSelection ifTrue: [self list selection value] ifFalse: [nil]
</methods> <methods> VWHelp.AHSOutlineViewerModel <category>menu messages</category>
contract "Contract the receiver's current selection and all of its children to a single item, keeping the state of expanded children expanded." | oc | Cursor wait showWhile: [oc := self displayedObjects asOrderedCollection. self updateDisplayUsing: (self contractIndex: self selectedRowIndex in: oc fully: false). self updateLocks].
contract: anEntry "Contract anEntry and all of its children to a single item, keeping the state of expanded children expanded." | oc | Cursor wait showWhile: [oc := self displayedObjects asOrderedCollection. self updateDisplayUsing: (self contractIndex: (oc indexOf: anEntry) in: oc fully: false). self updateLocks].
contractFully "Contract the receiver's current selection and all of its children to a single item" | oc | Cursor wait showWhile: [ oc := self displayedObjects asOrderedCollection. self updateDisplayUsing: (self contractIndex: self selectedRowIndex in: oc fully: true). self updateLocks].
contractFully: anEntry "Contract anEntry and all of its children to a single item" | oc | Cursor wait showWhile: [oc := self displayedObjects asOrderedCollection. self updateDisplayUsing: (self contractIndex: (oc indexOf: anEntry) in: oc fully: true). self updateLocks].
expand "Expand the receiver's current selection." | oc | Cursor wait showWhile: [oc := self displayedObjects asOrderedCollection. self outline odbDeepRefresh. self updateLocks. (self canExpand: self selectedObject fully: false) ifTrue: [self updateDisplayUsing: (self expandIndex: self selectedRowIndex in: oc fully: false)] ifFalse: [self updateLocks. Dialog warn: 'Unable to expand because someone is modifying the outline structure.']].
expand: anEntry "Expand anEntry" | oc | Cursor wait showWhile: [ oc := self displayedObjects asOrderedCollection. self outline odbDeepRefresh. self updateLocks. (self canExpand: (oc at: (oc indexOf: anEntry)) fully: false) ifTrue: [self updateDisplayUsing: (self expandIndex: (oc indexOf: anEntry) in: oc fully: false)] ifFalse: [self updateLocks. Dialog warn: 'Unable to expand because someone is modifying the outline structure.']].
expandFully "Expand the receiver's current selection and all of its children." | oc | Cursor wait showWhile: [ oc := self displayedObjects asOrderedCollection. self outline odbDeepRefresh. self updateLocks. (self canExpand: self selectedObject fully: true) ifTrue: [self updateDisplayUsing: (self expandIndex: self selectedRowIndex in: oc fully: true)] ifFalse: [self updateLocks. Dialog warn: 'Unable to expand because someone is modifying the outline structure.']].
expandFully: anEntry "Expand anEntry and all of its children." | oc | Cursor wait showWhile: [ oc := self displayedObjects asOrderedCollection. self outline odbDeepRefresh. self updateLocks. (self canExpand: (oc at: (oc indexOf: anEntry)) fully: true) ifTrue:[self updateDisplayUsing: (self expandIndex: (oc indexOf: anEntry) in: oc fully: true)] ifFalse: [self updateLocks. Dialog warn: 'Unable to expand because someone is modifying the outline structure.']].
</methods> <methods> VWHelp.AHSOutlineViewerModel class <category>configuration constants</category>
outlineViewClass "Answer the class to be used by the model when displaying the outline view." ^ ArborHierarchicalSequenceView
</methods> <methods> VWHelp.AHSOutlineViewerModel class <category>help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#list -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'This is disabled because linking to an outline is not appropriate for this widget, or no state or key is currently selected' runs: (RunArray runs: #(123) values: #(nil))); yourself) outlineLinks: #(nil))); add: (#empty -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Specify an Outline Name above and the outline''s topics will be displayed here.' runs: (RunArray runs: #(78) values: #(nil))); yourself) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Select the desired topic to link to. Use the triangles to the left of topics to expand or contract topics as necessary.' runs: (RunArray runs: #(119) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); yourself))
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>interface opening</category>
configureWindow "Private - Configure the window to use the proper controller, view, menu, etc." self replaceEditorView; replaceEditorController; replaceEditorMenu.
postBuildWith: aBuilder "Make sure the receiver is using the proper controller." super postBuildWith: aBuilder. self configureWindow. self initializeSpellChecker. self findReplace: (ArborSearchAndReplace new paragraphEditor: self textController).
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>toolbar control</category>
hideCopyCutPaste self setCopyCutPasteVisibilityTo: false
hideFindReplace self setFindReplaceVisibilityTo: false
hideFormatting self setFormattingVisibilityTo: false
hideSpellCheck self setSpellCheckVisibilityTo: false
hideStyles self setStylesVisibilityTo: false
setCopyCutPasteVisibilityTo: aBoolean #(copy cut paste) do: [:nameKey | (self toolBarMenuHolder value atNameKey: nameKey) hidden: aBoolean not]. self updateToolBar.
setFindReplaceVisibilityTo: aBoolean (self toolBarMenuHolder value atNameKey: #findReplace) hidden: aBoolean not. self updateToolBar.
setFormattingVisibilityTo: aBoolean #(indent outdent) do: [:nameKey | (self toolBarMenuHolder value atNameKey: nameKey) hidden: aBoolean not]. self updateToolBar.
setSpellCheckVisibilityTo: aBoolean "Don't allow spell check button to display if the spell checker isn't loaded or can't be run, regardless of the value of aBoolean." | item | (item := self toolBarMenuHolder value atNameKey: #spellCheckButton) isNil ifTrue: [^self]. item hidden: ( AHSUtils spellCheckerIsLoaded not or: [(self respondsTo: #doSpellCheck) not or: [aBoolean not]]). self updateToolBar.
setStylesVisibilityTo: aBoolean #(bold italic underline serif large color) do: [:nameKey | (self toolBarMenuHolder value atNameKey: nameKey) hidden: aBoolean not]. self updateToolBar.
showCopyCutPaste self setCopyCutPasteVisibilityTo: true
showFindReplace self setFindReplaceVisibilityTo: true
showFormatting self setFormattingVisibilityTo: true
showSpellCheck self setSpellCheckVisibilityTo: true
showStyles self setStylesVisibilityTo: true
updateToolBar "Get the tool bar to rebuild itself." self toolBarMenuHolder value: self toolBarMenuHolder value.
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>selecting</category>
deselect "Deselect any current selection found in the text view." self textController view deselect
hideSelection "Hide the selection" self textController view displaySelection: false.
replaceSelectionWith: aString "Replace the selected text with aString." self textController replaceSelectionWith: aString
restoreSelection "Restore the last selection" self textController restoreSelection
selectAll "Select all text in the editor window." ((self widgetWithID: #text) takeKeyboardFocus; widget) controller selectEntireText.
selectedText "Answer the text currently selected in the text view." ^ self textController selection
showSelection "Show the selection" self textController view displaySelection: true.
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>searching</category>
findAndSelectString: aString "Find and highlight aString." self textController view selectionStartIndex: 1 stopIndex: 1; displaySelection: true. self textController view controller findNext: aString ignoreCase: true.
nextOccurrence "search for the next entry of the selected text within the same piece of text." ^self textController findNextIgnoreCase: true
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>actions</category>
changeColor self textController changeColor
decreaseIndent self textController decreaseIndent.
doCopy self textController copySelection; restoreSelection
doCut self textController cut; restoreSelection
doFindReplace self activateFindReplace beStandard.
doPaste self textController paste; restoreSelection
editable "Make the receiver editable." self showToolbar. self textController readOnly: false.
hideToolbar "Hide the icon toolbar in the text subcanvas" self toolbarVisible ifTrue: [self toggleToolbar]
increaseIndent self textController increaseIndent.
readOnly "Make the receiver read only." self hideToolbar; hideSelection. self textController readOnly: true.
selectEditorText "Private - Select all of the text contained in the toolbar text editor." | txtWidget | txtWidget := self widgetWithID: #text. txtWidget takeKeyboardFocus. txtWidget widget controller selectEntireText. self preventHelpTextChange
showToolbar "Show the icon toolbar in the text subcanvas" self toolbarVisible ifFalse: [self toggleToolbar]
toggleBold self textController toggleEmphasis: #bold.
toggleItalic self textController toggleEmphasis: #italic
toggleLarge self textController toggleEmphasis: #large
toggleSerif self textController toggleEmphasis: #serif
toggleToolbar "Show/Hide the icon toolbar in the text view" self aisSetVisibilityOf: #toolBar to: self toolbarVisible not; adjustTextComponentLayout.
toggleUnderline self textController toggleEmphasis: #underline
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>aspects</category>
text "This method was generated by UIDefiner. Any edits made here may be lost whenever methods are automatically defined. The initialization provided below may have been preempted by an initialize method." ^text isNil ifTrue: [text := String new asValue] ifFalse: [text]
toolBar ^ToolBar menu: self toolBarMenuHolder performer: self
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>private-toolbar</category>
addCopyCutPasteTo: aMenu | m | m := Menu new addItem: ((MenuItem labeled: 'Cut') nameKey: #cut; value: #doCut; labelImage: (self bound: self class cutIcon)); addItem: ((MenuItem labeled: 'Copy') nameKey: #copy; value: #doCopy; labelImage: (self bound: self class copyIcon)); addItem: ((MenuItem labeled: 'Paste') nameKey: #paste; value: #doPaste; labelImage: (self bound: self class pasteIcon)). aMenu aisAddMenu: m withSeparator: true.
addFormattingTo: aMenu | m | m := Menu new addItem: ((MenuItem labeled: 'Outdent') nameKey: #outdent; value: #decreaseIndent; labelImage: (self bound: self class outdentIcon)); addItem: ((MenuItem labeled: 'Indent') nameKey: #indent; value: #increaseIndent; labelImage: (self bound: self class indentIcon)). aMenu aisAddMenu: m withSeparator: true.
addSearchReplaceTo: aMenu aMenu aisAddItem: ((MenuItem labeled: 'Find and Replace...') nameKey: #findReplace; value: #doFindReplace; labelImage: (self bound: self class findIcon)) after: (aMenu atNameKey: #paste)
addSpellCheckTo: aMenu | item | item := AHSUtils performReceiver: self selector: #spellCheckMenuItem arguments: #() ifAbsent: [^self]. item labelImage: (self bound: self class spellCheckIcon). aMenu aisAddItem: item after: (aMenu atNameKey: #findReplace).
addStylesTo: aMenu | m | m := Menu new addItem: ((MenuItem labeled: 'Bold') nameKey: #bold; value: #toggleBold; labelImage: (self bound: self class boldIcon)); addItem: ((MenuItem labeled: 'Italic') nameKey: #italic; value: #toggleItalic; labelImage: (self bound: self class italicIcon)); addItem: ((MenuItem labeled: 'Underline') nameKey: #underline; value: #toggleUnderline; labelImage: (self bound: self class underlineIcon)); addItem: ((MenuItem labeled: 'Serif') nameKey: #serif; value: #toggleSerif; labelImage: (self bound: self class serifIcon)); addItem: ((MenuItem labeled: 'Large') nameKey: #large; value: #toggleLarge; labelImage: (self bound: self class largeIcon)); addItem: ((MenuItem labeled: 'Color') nameKey: #color; value: #changeColor; labelImage: (self bound: self class colorIcon)). aMenu aisAddMenu: m withSeparator: true.
bound: anIcon "Define a fixed bounds for anIcon - this is meant to be used with button icons for the toolbar. By using this method, all buttons will have the same shape." ^VisualBlock block: [:gc :bounds | anIcon displayOn: gc at: bounds center - anIcon bounds extent half] extent: 20 @ 20
defaultToolBarMenu | menu | menu := Menu new. self addCopyCutPasteTo: menu; addStylesTo: menu; addFormattingTo: menu; addSearchReplaceTo: menu; addSpellCheckTo: menu. ^menu
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>private</category>
activateFindReplace ^self findReplace makeWindowVisible; yourself
adjustTextComponentLayout "Private - The toolbar has just been toggled. Readjust the text component accordingly." | cmp | cmp := self widgetWithID: #text. cmp newLayout: (cmp layout topOffset: (cmp layout topOffset bitXor: 30)); bounds: (cmp rectangleRelativeTo: cmp container bounds). cmp container invalidate
controllerClass "Private - Answer the controller used by the receiver." ^ AHSToolbarTextEditorController
preventHelpTextChange "Private - Reset the focus so that the help text doesn't change from what it currently says." | processor | (processor := self ahsWindow ahsProcessor) isNil ifTrue: [^ self]. processor resetFocusChanged.
replaceEditorController "Private - Replace the default controller class with one appropriate for the receiver." self textController changeClassToThatOf: self controllerClass basicNew. self textController paragraph changeClassToThatOf: AHSIndentableComposedText new.
replaceEditorMenu "Private - Replace the default controller menu with one appropriate for the receiver. The default action is to do nothing."
replaceEditorView "Private - Replace the default controller view with one appropriate for the receiver. The default action is to do nothing."
textMenu | menu spellItem find | menu := AHSUtils textMenu. "Only add a spell check item if the AHS spell check extensions are loaded." spellItem := AHSUtils performReceiver: self selector: #spellCheckMenuItem arguments: #() ifAbsent: [(MenuItem labeled: 'Spell Check Placeholder') hidden: true]. menu aisAddItem: spellItem before: (menu menuItemWithValue: #hardcopy); aisAddSeparatorBefore: spellItem; removeItem: (menu menuItemWithValue: #find); removeItem: (menu menuItemWithValue: #replace); aisAddItem: (find := (MenuItem labeled: 'Find/Replace...') nameKey: #findReplace; value: [self doFindReplace]) after: nil; aisAddSeparatorAfter: find. ^menu
textView "Private - Answer the view containing the text to edit." ^ (self widgetWithID: #text) widget.
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>controller interface</category>
accept self textController accept.
replaceFrom: start to: stop with: aString self textController replaceFrom: start to: stop with: aString.
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>accessing</category>
findReplace ^findReplace
findReplace: aSearchAndReplace findReplace := aSearchAndReplace.
setTextValue: aString "Set the value of text to aString. This method will not cause the change mechanism to be invoked if one is defined for text." self text setValue: aString.
spellChecker ^spellChecker
textController ^(self widgetWithID: #text) widget controller
textValue: aString "Set the value of text to aString. This method will cause the change mechanism to be invoked if one is defined for text." self text value: aString.
toolBarMenuHolder toolBarMenuHolder isNil ifTrue: [toolBarMenuHolder := self defaultToolBarMenu asValue]. ^toolBarMenuHolder
toolBarMenuHolder: aValueModel toolBarMenuHolder := aValueModel
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>testing</category>
hasEmptySelection "Answer true if no text is currently selected." ^ self textController selection isEmpty
hasSelection "Answer true if some text is currently selected." ^ self hasEmptySelection not
hasTextChanged "Answer true if the text has changed." ^ self textController textHasChanged
toolbarVisible "Answer true if the toolbar is visible." ^(self widgetWithID: #toolBar) isVisible
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>event handlers</category>
textChanged "Private - The text in the editor has changed. Notify our dependents." self changed: #editorText.
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>spell check</category>
closeSpellChecker self spellChecker notNil ifTrue: [self spellChecker closeSpellInterface].
initializeSpellChecker spellChecker := AHSUtils spellCheckerIsAvailable ifTrue: [AHSUtils spellCheckerClass new] ifFalse: [nil].
</methods> <methods> VWHelp.AHSToolbarTextEditor <category>initialize-release</category>
release self closeSpellChecker. super release.
setText: aString "Set the text variable to aString as a value holder." text := aString asValue
</methods> <methods> VWHelp.AHSToolbarTextEditor class <category>resources</category>
boldIcon ^OpaqueImageWithEnablement figure: self boldImage shape: self boldMask inactiveMask: self boldInactiveMask
colorIcon ^OpaqueImage figure: self colorImage shape: self colorMask
copyIcon ^OpaqueImage figure: self copyImage shape: self copyMask
cutIcon ^OpaqueImage figure: self cutImage shape: self cutMask
findIcon ^OpaqueImage figure: self findImage shape: self findMask
indentIcon ^OpaqueImage figure: self indentImage shape: self indentMask
italicIcon ^OpaqueImage figure: self italicImage shape: self italicMask
largeIcon ^OpaqueImage figure: self largeImage shape: self largeMask
outdentIcon ^OpaqueImage figure: self outdentImage shape: self outdentMask
pasteIcon ^OpaqueImage figure: self pasteImage shape: self pasteMask
serifIcon ^OpaqueImage figure: self serifImage shape: self serifMask
spellCheckIcon ^OpaqueImageWithEnablement figure: self spellCheckImage shape: self spellCheckMask inactiveMask: self spellCheckInactiveMask
underlineIcon ^OpaqueImage figure: self underlineImage shape: self underlineMask
</methods> <methods> VWHelp.AHSToolbarTextEditor class <category>instance creation</category>
on: aString "Answer a new instance of the receiver, using aString as the default text value." ^ self basicNew setText: aString
</methods> <methods> VWHelp.AHSToolbarTextEditor class <category>help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#paste -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Paste contents of clipboard' runs: (RunArray runs: #(27) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#serif -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove serif style' runs: (RunArray runs: #(11 5 6) values: #(nil #serif nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#large -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove large style' runs: (RunArray runs: #(11 5 6) values: #(nil #large nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#copy -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Copy selected text to clipboard' runs: (RunArray runs: #(31) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#underline -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove underline style' runs: (RunArray runs: #(11 9 6) values: #(nil #underline nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#bold -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove bold style' runs: (RunArray runs: #(11 4 6) values: #(nil #bold nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#spellCheckButton -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Perform a spell check on the text.' runs: (RunArray runs: #(34) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#findReplace -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Find and optionally replace text.' runs: (RunArray runs: #(33) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#italic -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove italic style' runs: (RunArray runs: #(11 6 6) values: #(nil #italic nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#color -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Change the color of the selected text.' runs: (RunArray runs: #(11 1 1 1 1 1 22) values: ((Array new: 7) at: 2 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> (ColorValue scaledRed: 8191 scaledGreen: 4915 scaledBlue: 2056)); yourself); at: 3 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> ColorValue blue); yourself); at: 4 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> (ColorValue scaledRed: 0 scaledGreen: 4112 scaledBlue: 4112)); yourself); at: 5 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> ColorValue purple); yourself); at: 6 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> ColorValue red); yourself); yourself))); yourself) outlineLinks: #(nil))); yourself)); add: (#text -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Edit text here' runs: (RunArray runs: #(14) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#cut -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Cut selected text to clipboard' runs: (RunArray runs: #(30) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); yourself))
</methods> <methods> VWHelp.AHSIndentableComposedText <category>private</category>
backgroundColor "Answer the receiver's background color." ^ColorValue white
baseIndentOffset "Answer the number of pixels to indent for each indent level." ^DefaultTab
indentLevelAt: anIndex "Support a text with an emphasis indicating an indent level." | index | index := anIndex isNil ifTrue: [1] ifFalse: [anIndex]. index > self text size ifTrue: [^0]. self text emphasis: (self text emphasisAt: index) do: [:emph | (emph aisIsAssociation and: [emph key = self class indentKey]) ifTrue: [^emph value]]. ^0
indentOffsetAt: anIndex ^(self indentLevelAt: anIndex) * self baseIndentOffset
leftMarginForCompositionForLine: lineIndex "Answer the left margin, taking into account information in the text requesting an indent. Do not allow a left indent to exceed the right margin or the display routines blow up (when line wrapping is enabled, which is usually)." ^((super leftMarginForCompositionForLine: lineIndex) + (self indentOffsetAt: (lineTable lineStartAt: lineIndex))) min: self rightMarginForComposition - 20
</methods> <methods> VWHelp.AHSIndentableComposedText class <category>constants</category>
indentKey "Answer the key to use in an association within a Text to indicate an indent level." ^#ahsIndent
</methods> <methods> VWHelp.AHSTextGraphicSelectionTracker <category>events</category>
redButtonReleasedEvent: aMouseButtonEvent "Be sure the controller gets a chance to handle red button released events." | ctrlr | ctrlr := controller. super redButtonReleasedEvent: aMouseButtonEvent. ctrlr redButtonReleasedEvent: aMouseButtonEvent.
</methods> <methods> VWHelp.AHSTextGraphicSelectionTracker <category>accessing</category>
current ^current
current: aValue current := aValue.
originalStartBlock ^originalStartBlock
originalStartBlock: aValue originalStartBlock := aValue.
originalStopBlock ^originalStopBlock
originalStopBlock: aValue originalStopBlock := aValue.
pivot ^pivot
pivot: aValue pivot := aValue.
</methods> <methods> VWHelp.AHSTextGraphicSelectionTracker <category>private</category>
doSelectionTrackingOperationAt: aPoint self controller selectionTrackFrom: self current to: aPoint pivot: self pivot. self current: aPoint.
finishSelectionFor: aPoint | tmp | process notNil ifTrue: [process terminate. process := nil]. tmp := self controller. controller := nil. self pivot notNil ifTrue: [ tmp selectionEndAt: aPoint pivot: self pivot originalStart: self originalStartBlock originalStop: self originalStopBlock].
setUpFor: aMouseButtonEvent | point comps blk | point := self cursorPointFor: aMouseButtonEvent. self originalStartBlock: self controller startBlock. self originalStopBlock: self controller stopBlock. self current: point. self pivot: (self controller selectionStartAt: point shiftDown: aMouseButtonEvent shiftDown). ((self originalStartBlock isNil or: [self originalStopBlock isNil]) and: [(comps := controller selectedComponents) isEmpty not]) ifTrue: [ blk := controller characterBlockAtLocalPoint: 0@0 for: comps first. self originalStartBlock: blk. self originalStopBlock: blk].
trackSelectionFor: aPoint "If the setup answered a nil pivot, then we don't want to do any tracking. Also don't track if already handling a tracking operation." self pivot notNil ifTrue: [super trackSelectionFor: aPoint].
</methods> <methods> VWHelp.ArborDragBarController <category>accessing</category>
above ^above
above: aCollection above := aCollection.
below ^below
below: aCollection below := aCollection.
boundedDrag ^boundedDrag
boundedDrag: aBoolean boundedDrag := aBoolean.
left ^left
left: aCollection left := aCollection.
right ^right
right: aCollection right := aCollection.
</methods> <methods> VWHelp.ArborDragBarController <category>private</category>
adjustAboveBy: offset self above do: [:component || layout b | layout := component layout asLayout. layout bottomOffset: layout bottomOffset + offset. component layout: layout; newBounds: ((b := component bounds) origin corner: (b corner + (0@offset)))].
adjustBelowBy: offset self below do: [:component || layout b | layout := component layout asLayout. layout topOffset: layout topOffset + offset. component layout: layout; newBounds: ((b := component bounds) origin + (0 @ offset) corner: b corner)].
adjustComponentsBy: adjustmentPoint self isVertical ifTrue: [ self adjustLeftBy: adjustmentPoint x. self adjustHorizontallyBy: adjustmentPoint x. self adjustRightBy: adjustmentPoint x] ifFalse: [ self adjustAboveBy: adjustmentPoint y. self adjustVerticallyBy: adjustmentPoint y. self adjustBelowBy: adjustmentPoint y].
adjustHorizontallyBy: offset "Move my view horizontally by offset pixels." | specWrapper layout | specWrapper := self view aisWidgetWrapper. specWrapper isNil ifTrue: [^self]. "Shouldn't happen, but better to be safe..." layout := specWrapper layout asLayout. layout rightOffset: layout rightOffset + offset; leftOffset: layout leftOffset + offset. specWrapper layout: layout; newBounds: (specWrapper bounds translatedBy: offset @ 0).
adjustLeftBy: offset self left do: [:component || layout b | layout := component layout asLayout. layout rightOffset: layout rightOffset + offset. component layout: layout; newBounds: ((b := component bounds) origin corner: (b corner + (offset@0)))].
adjustRightBy: offset self right do: [:component || layout b | layout := component layout asLayout. layout leftOffset: layout leftOffset + offset. component layout: layout; newBounds: ((b := component bounds) origin + (offset @ 0) corner: b corner)].
adjustVerticallyBy: offset "Move my view vertically by offset pixels." | specWrapper layout | specWrapper := self view aisWidgetWrapper. specWrapper isNil ifTrue: [^self]. "Shouldn't happen, but better to be safe..." layout := specWrapper layout asLayout. layout topOffset: layout topOffset + offset; bottomOffset: layout bottomOffset + offset. specWrapper layout: layout; newBounds: (specWrapper bounds translatedBy: 0 @ offset).
doDragFrom: startPoint "startPoint refers to the current mouse position in window-relative coordinates." | endPoint | self dragCursor showWhile: [| shape | self isVertical ifTrue: [| topEnd | topEnd := (self view globalPointToLocal: startPoint) y negated. shape := Array with: 0 @ topEnd with: 0 @ (topEnd + self view bounds height)] ifFalse: [| leftEnd | leftEnd := (self view globalPointToLocal: startPoint) x negated. shape := Array with: leftEnd @ 0 with: (leftEnd + self view bounds width) @ 0]. endPoint := Screen default dragShape: shape lineWidth: (self view lineWidth max: 1) offset: 0 @ 0 gridPhase: 0 @ 0 gridSpacing: 1 @ 1 boundedBy: (Rectangle left: (self limitLeftFrom: startPoint) right: (self limitRightFrom: startPoint) top: (self limitTopFrom: startPoint) bottom: (self limitBottomFrom: startPoint)) whileButton: 1 isDown: true]. endPoint := endPoint - self view topComponent globalOrigin. self adjustComponentsBy: endPoint - startPoint.
dragCursor ^self isVertical ifTrue: [self class verticalDragCursor] ifFalse: [self class horizontalDragCursor]
limitBottomFrom: startPoint "Answer the bottom edge of the bounding box for dragging. Use #localPointToGlobal: instead of a simple #bounds request because #bounds may not be actual bounds within the window, especially if the component is within a ReComposingComposite which can dynamically relocate widgets (such as due to a menubar dynamically wrapping in a window)." | tc y | y := (tc := self view topComponent) globalOrigin y. ^self isVertical ifTrue: [y + startPoint y] ifFalse: [ self boundedDrag ifTrue: [(self below inject: tc height into: [:edge :c | edge min: (c localPointToGlobal: c bounds corner) y]) + y] ifFalse: [y + tc height]]
limitLeftFrom: startPoint "Answer the left edge of the bounding box for dragging." | x | x := self view topComponent globalOrigin x. ^self isVertical ifTrue: [ self boundedDrag ifTrue: [(self left inject: 0 into: [:edge :c | edge max: c bounds left]) + x] ifFalse: [x]] ifFalse: [x + startPoint x]
limitRightFrom: startPoint "Answer the right edge of the bounding box for dragging." | tc x | x := (tc := self view topComponent) globalOrigin x. ^self isVertical ifTrue: [ self boundedDrag ifTrue: [(self right inject: tc width into: [:edge :c | edge min: c bounds right]) + x] ifFalse: [x + tc width]] ifFalse: [x + startPoint x]
limitTopFrom: startPoint "Answer the top edge of the bounding box for dragging. Use #localPointToGlobal: instead of a simple #bounds request because #bounds may not be actual bounds within the window, especially if the component is within a ReComposingComposite which can dynamically relocate widgets (such as due to a menubar dynamically wrapping in a window)." | y | y := self view topComponent globalOrigin y. ^self isVertical ifTrue: [y + startPoint y] ifFalse: [ self boundedDrag ifTrue: [(self above inject: 0 into: [:edge :c | edge max: (c localPointToGlobal:c bounds origin) y]) + y] ifFalse: [y]]
</methods> <methods> VWHelp.ArborDragBarController <category>control defaults</category>
controlActivity "Use 'window sensor' instead of 'windowSensor' because #windowSensor is only available in VW 2.5 if events are loaded." self sensor redButtonPressed ifTrue: [self doDragFrom: self sensor window sensor cursorPoint].
controlInitialize self dragCursor show. super controlInitialize.
controlTerminate Cursor normal show. super controlTerminate.
</methods> <methods> VWHelp.ArborDragBarController <category>initialize-release</category>
initialize self above: OrderedCollection new; below: OrderedCollection new; left: OrderedCollection new; right: OrderedCollection new; boundedDrag: false.
</methods> <methods> VWHelp.ArborDragBarController <category>events</category>
redButtonPressedEvent: event self doDragFrom: event point.
</methods> <methods> VWHelp.ArborDragBarController <category>testing</category>
isVertical ^self view isVertical
</methods> <methods> VWHelp.ArborDragBarController class <category>cursors</category>
horizontalDragCursor ^HorizontalDragCursor isNil ifTrue: [ HorizontalDragCursor := Cursor image: self horizontalDragImage mask: self horizontalDragMask hotSpot: 7@8 name: 'horizontal drag'] ifFalse: [HorizontalDragCursor]
verticalDragCursor ^VerticalDragCursor isNil ifTrue: [ VerticalDragCursor := Cursor image: self verticalDragImage mask: self verticalDragMask hotSpot: 7@8 name: 'vertical drag'] ifFalse: [VerticalDragCursor]
</methods> <methods> VWHelp.ArborHierarchicalSequenceSelectionTracker <category>events</category>
mouseMovedEvent: aMouseMovedEvent switchInTransition isNil ifTrue: [^super mouseMovedEvent: aMouseMovedEvent]. ^nil
redButtonPressedEvent: aMouseButtonEvent self doSwitchPressed: aMouseButtonEvent. switchInTransition notNil ifTrue: [^nil]. ^super redButtonPressedEvent: aMouseButtonEvent
redButtonReleasedEvent: aMouseButtonEvent switchInTransition isNil ifTrue: [^super redButtonReleasedEvent: aMouseButtonEvent]. self doSwitchReleased: aMouseButtonEvent. ^nil
</methods> <methods> VWHelp.ArborHierarchicalSequenceSelectionTracker <category>switch</category>
doSwitchPressed: aMouseButtonEvent "Answer true if the button is pressed on an expansion switch, false otherwise" | pt index | switchInTransition := nil. pt := self cursorPointFor: aMouseButtonEvent. index := self controller findElementFor: pt. index = 0 ifTrue: [^false]. (self view isHotspot: pt) ifTrue: [self view showTransition: true for: index. switchInTransition := index. aMouseButtonEvent initiator grabMouseEventFor: self. ^true]. ^false
doSwitchReleased: aMouseButtonEvent "Answer true if the button is pressed on an expansion switch, false otherwise" | pt index | self sensor ungrabMouseEventFor: self. pt := self cursorPointFor: aMouseButtonEvent. index := self controller findElementFor: pt. (switchInTransition = index and: [self view isHotspot: pt]) ifTrue: [ self view inTransition: false. self controller outlineModel toggleIndex: index fully: aMouseButtonEvent ctrlDown] ifFalse: [self view showTransition: false for: switchInTransition].
</methods> <methods> VWHelp.AHSPersistentOrderedCollection <category>converting</category>
asArray "Answer a new instance of PersistentArray whose elements are the elements of the receiver, in the same order." self shouldNotImplement "| newPA | newPA := AHSPersistentArray new: self size. 1 to: self size do: [:index | newPA at: index put: (self at: index)]. ^newPA"
asOrderedCollection "Return a copy of myself because I am conceptually more of an OrderedCollection variant than a subclass of OrderedCollection." ^self copy
</methods> <methods> VWHelp.AHSPersistentOrderedCollection <category>removing</category>
removeFirst self odbDirty. ^super removeFirst.
removeFirst: numElements self odbDirty. ^super removeFirst: numElements.
removeIndex: anIndex self odbDirty. ^super removeIndex: anIndex.
removeLast self odbDirty. ^super removeLast
removeLast: numElements self odbDirty. ^super removeLast: numElements
</methods> <methods> VWHelp.AHSPersistentOrderedCollection <category>adding</category>
addFirst: newObject "Add newObject to the beginning of the receiver. Answer newObject." self odbDirty. ^super addFirst: newObject.
addLast: newObject "Add newObject to the end of the receiver. Answer newObject." self odbDirty. ^super addLast: newObject.
addLastNoCheck: newObject "Add newObject to the end of the receiver." self odbDirty. ^super addLastNoCheck: newObject.
insert: anObject before: anIndex self odbDirty. ^super insert: anObject before: anIndex.
makeRoomAtFirst self odbDirty. ^super makeRoomAtFirst
makeRoomAtLast self odbDirty. ^super makeRoomAtLast
</methods> <methods> VWHelp.AHSPersistentOrderedCollection <category>accessing</category>
at: anInteger put: anObject "Put anObject at element index anInteger. at:put: can not be used to append, front or back, to an ordered collection; it is used by a knowledgeable client to replace an element." self odbDirty. ^super at: anInteger put: anObject
</methods> <methods> VWHelp.AHSTextGraphicLayoutWrapper <category>testing</category>
wrapsCaptionTextView ^self isCaption
wrapsNormalTextView ^self wrapsTextView and: [self wrapsCaptionTextView not]
wrapsTextView ^self wrapsCaptionTextView or: [self view isKindOf: ComposedTextView]
</methods> <methods> VWHelp.AHSTextGraphicLayoutWrapper <category>accessing</category>
backgroundColor "Answer the receiver's background color." ^ColorValue white
isCaption ^isCaption
isCaption: aBoolean isCaption := aBoolean.
nextComponentIsBeneath ^nextComponentIsBeneath
nextComponentIsBeneath: aBoolean nextComponentIsBeneath := aBoolean.
nextComponentIsBeside ^self nextComponentIsBeneath not
view ^view
view: aView view := aView.
</methods> <methods> VWHelp.AHSTextGraphicLayoutWrapper class <category>instance creation</category>
on: aComponent view: aView ^self on: aComponent view: aView nextIsBeneath: true
on: aComponent view: aView isCaption: captionBoolean nextIsBeneath: beneathBoolean ^(super on: aComponent) view: aView; isCaption: captionBoolean; nextComponentIsBeneath: beneathBoolean
on: aComponent view: aView nextIsBeneath: aBoolean ^self on: aComponent view: aView isCaption: false nextIsBeneath: aBoolean
</methods> <methods> VWHelp.AHSHelpHyperLinkObject <category>attributes</category>
attributeAt: aString "Answer the attribute that matches aString" ^self attributeAt: aString ifAbsent: [self error: 'No such attribute: ', aString printString]
attributeAt: aString ifAbsent: aBlock "Answer the attribute that matches aString, if no such attribute evaluate aBlock" ^AHSUtils performReceiver: self selector: aString arguments: #() ifAbsent: aBlock
attributeAt: aString put: aValue "Store aValue into the attribute named aString" ^self attributeAt: aString put: aValue ifAbsent: [self error: 'No such attribute or cannot store into attribute: ', aValue printString]
attributeAt: aString put: aValue ifAbsent: aBlock "Store aValue into the attribute named aString. If no such attribute is present, evaluate aBlock" ^AHSUtils performReceiver: self selector: aString, ':' arguments: (Array with: aValue) ifAbsent: aBlock
attributes "Answer a collection of attributes which are written during RTF export. It's done this way to minimize having to make changes throughout the system if a hyperlink is enhanced." "Attributes should be either a number, a string, or nil. If an attribute is nil, it is ignored." ^#()
type "Answer a unique identifier for the type, used during RTF exports to indicate the type of the link." ^self class type
</methods> <methods> VWHelp.AHSHelpHyperLinkObject <category>AHS Export adds</category>
writeHyperlinkUsing: aTopicBodyWriter ^self subclassResponsibility
</methods> <methods> VWHelp.AHSHelpHyperLinkObject <category>testing</category>
isGlossary ^false
isHyperGraphic ^false
isHyperText ^false
</methods> <methods> VWHelp.AHSHelpHyperLinkObject <category>initialize-release</category>
initialize "Stub."
</methods> <methods> VWHelp.AHSHelpHyperLinkObject class <category>attributes</category>
type "Answer a unique identifier for the type, used during RTF exports to indicate the type of the link." ^self subclassResponsibility
</methods> <methods> VWHelp.AHSHelpHyperLinkObject class <category>instance creation</category>
new ^super new initialize
newForType: aType "Answer a new instance of the appropriate subclass. If none found, answer nil." self allSubclasses do: [:cls | cls type = aType asSymbol ifTrue: [^cls new]]. ^nil
</methods> <methods> VWHelp.AHSHelpHyperLinkObject class <category>BOSS conversion</category>
binaryReaderBlockForVersion: oldVersion format: oldFormat " An attempt is being made to read instances of an obsolete version of this class. Answer a block that converts old instances (represented as an array or string of instance variable values) to new ones." ^oldVersion = 'Help System version 2.0' ifTrue: [ [:oldObj | | inst | inst := (oldObj first = #hyperGraphic ifTrue: [ AHSHyperGraphicLinkObject new caption: ''; imageProportion: 1.0] ifFalse: [ oldObj first = #glossary ifTrue: [AHSGlossaryLinkObject new] ifFalse: [AHSHyperTextLinkObject new]]). 2 to: oldObj size do: [:i | inst instVarAt: i - 1 put: (oldObj at: i)]. oldObj become: inst]] ifFalse: [super binaryReaderBlockForVersion: oldVersion format: oldFormat]
binaryRepresentationVersion ^'AHS 3.0'
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject <category>testing</category>
captionIsAtCenter ^self captionLocation = #center
captionIsAtLeft ^self captionLocation = #left
captionIsAtRight ^self captionLocation = #right
hasCaption ^self caption notNil and: [self caption isEmpty not]
isHyperGraphic ^true
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject <category>accessing</category>
caption ^caption
caption: aValue caption := aValue asString.
captionLocation ^captionLocation
captionLocation: aSymbol | sym | sym := aSymbol asSymbol. (#(left right center) includes: sym) not ifTrue: [self error: 'Invalid caption location']. captionLocation := sym.
imageProportion ^imageProportion
imageProportion: aValue imageProportion := aValue
isEmbedded ^isEmbedded
isEmbedded: aBoolean isEmbedded := aBoolean.
windowExtent ^windowExtent
windowExtent: aPoint windowExtent := aPoint
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject <category>engaging</category>
engageFor: anObject "The hyperlink has been engaged within the context of anObject." ^anObject engageHyperGraphic: self
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject <category>attributes</category>
attributes ^super attributes, #(key caption imageProportion width height embedded captionLocation)
embedded "Attributes must be either a number, a string, or nil. If an attribute is nil, it is ignored." ^self isEmbedded ifTrue: ['y'] ifFalse: ['n']
embedded: aValue "Attributes must be either a number, a string, or nil. If an attribute is nil, it is ignored." aValue notNil ifTrue: [self isEmbedded: (aValue = 'y')].
height ^self windowExtent isNil ifTrue: [nil] ifFalse: [self windowExtent y]
height: aValue aValue notNil ifTrue: [ self windowExtent isNil ifTrue: [self windowExtent: 100@100]. self windowExtent y: aValue].
key ^self linkObject asString
key: aValue ^self linkObject: aValue asSymbol
width ^self windowExtent isNil ifTrue: [nil] ifFalse: [self windowExtent x]
width: aValue aValue notNil ifTrue: [ self windowExtent isNil ifTrue: [self windowExtent: 100@100]. self windowExtent x: aValue].
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject <category>copying</category>
postCopy super postCopy. imageProportion := imageProportion copy. caption := caption copy. windowExtent := windowExtent copy.
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject <category>printing</category>
printOn: aStream aStream nextPutAll: 'HyperGraphic,'. self linkObject printOn: aStream.
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject <category>AHS Export adds</category>
writeHyperlinkUsing: aTopicBodyWriter ^aTopicBodyWriter writeHypergraphicLink: self
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject <category>initialize-release</category>
initialize super initialize. self caption: 'Enter Caption Text Here' asText. self imageProportion: 0.75. "Only used if isEmbedded is false" self windowExtent: nil. "Only used if isEmbedded is false" self isEmbedded: false. self captionLocation: #center. "Only used if isEmbedded is true"
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject class <category>instance creation</category>
newGraphicLink: aSymbol caption: aString "creates an instance of a graphic link with a caption" ^self new linkObject: aSymbol; caption: aString
newGraphicLink: aSymbol caption: aString proportion: anInteger extent: aPoint "creates an instance of a graphic link with a caption" ^self new linkObject: aSymbol; caption: aString; imageProportion: anInteger; windowExtent: aPoint
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject class <category>color & emphasis</category>
defaultColor ^self defaultColorValueClass blue
defaultEmphasis ^#italic
</methods> <methods> VWHelp.AHSHyperGraphicLinkObject class <category>attributes</category>
type "Answer a unique identifier for the type, used during RTF exports to indicate the type of the link." ^#graphic
</methods> <methods> VWHelp.AHSTextGraphicCompositeController <category>accessing</category>
selectedComponents ^selectedComponents
selectedComponents: aCollection selectedComponents := aCollection.
</methods> <methods> VWHelp.AHSTextGraphicCompositeController <category>private</category>
characterBlockAtLocalPoint: aPoint for: aComponent ^self view characterBlockAtLocalPoint: aPoint for: aComponent
characterBlockAtPoint: aPoint ^self view characterBlockAtPoint: aPoint
compileSelection "Compile the current text selection as an expression and answer the resulting method. Signal CompilationError if compilation fails." | compiler | compiler := self doItReceiver class evaluatorClass new. ^compiler compile: self selection readStream in: self doItContext allowReceiver: true class: self doItReceiver class environment: self doItEnvironment noPattern: true notifying: self ifFail: [CompilationError raise] handler: SilentCompilerErrorHandler new
debug: aCompiledMethod "Open the debugger on the first expression of the argument CompiledMethod. This method partly duplicates the logic of #evaluateCompiled: but it is necessary because of problems with automatic stepping through that method." | doItReceiver doItContext guineaPig context | doItReceiver := self doItReceiver. doItContext := self doItContext. guineaPig := doItContext isNil ifTrue: [[doItReceiver performMethod: aCompiledMethod] newProcess] ifFalse: [[doItReceiver performMethod: aCompiledMethod with: doItContext] newProcess]. "Need to manually push copied values from the closure into the context before stepping because they are not getting pushed during the simulation!" context := guineaPig suspendedContext. context receiver pushCopiedValues: context. [context method == aCompiledMethod] whileFalse: [context := context send]. guineaPig suspendedContext: context. Notifier developmentNotifier openOnProcess: guineaPig interrupted: true label: (#DebugIt << #pdp >> 'Debug It').
deselectAll self view deselect. self selectedComponents: #().
doItContext ^nil
doItEnvironment ^Examples
doItReceiver ^nil
evaluateCompiled: aMethod "Assuming the argument is a method answered by #compileSelection, evaluate it on the proper receiver and answer the result." | context | context := self doItContext. ^context isNil ifTrue: [self doItReceiver performMethod: aMethod] ifFalse: [self doItReceiver performMethod: aMethod with: context]
evaluateSelection "Evaluate the current text selection as an expression and answer the result. CompilationError may be signaled by #compileSelection." | code result | code := self compileSelection. result := Cursor execute showWhile: [self evaluateCompiled: code]. SourceFileManager default logChange: self selection string. ^result
globalBlockClosestTo: startBlock | rightMost | (self selectedComponents includes: startBlock localComponent) ifTrue: [^startBlock]. ^startBlock >= (rightMost := self rightMostCharacterBlock) ifTrue: [rightMost] ifFalse: [self leftMostCharacterBlock]
growComponentSelectionTo: aComponent "Extend the selection up to aComponent. Select all text in each intermediate component." | comps goal current new | comps := self view components collect: [:c | c view]. (goal := comps indexOf: aComponent) < (current := comps indexOf: self selectedComponents first) ifTrue: [self selectedComponents addAllFirst: (new := comps copyFrom: goal to: current - 1)] ifFalse: [self selectedComponents addAllLast: (new := comps copyFrom: (comps indexOf: self selectedComponents last) + 1 to: goal)]. new remove: aComponent ifAbsent: []. new do: [:c | (c respondsTo: #selectionStartIndex:stopIndex:) ifTrue: [ c selectionStartIndex: 1 stopIndex: c displayContents text size + 1. c select]].
leftMostCharacterBlock "Answer the left-most character block in the selected components." ^self characterBlockAtPoint: (self view globalPointToLocal: (self selectedComponents first localPointToGlobal: 0@0))
localBlock: startBlock basedOn: endBlock ^startBlock localComponent = endBlock localComponent ifTrue: [startBlock asLocalCharacterBlock] ifFalse: [ startBlock < endBlock ifTrue: [endBlock localComponent characterBlockAtPoint: 0@0] ifFalse: [endBlock localComponent characterBlockAtPoint: endBlock localComponent bounds corner]]
rightMostCharacterBlock "Answer the right-most character block in the selected components." ^self characterBlockAtPoint: (self view globalPointToLocal: (self selectedComponents last localPointToGlobal: self selectedComponents last preferredBounds corner))
selectAtPoint: aPoint | blk | self deselectAll. (blk := self characterBlockAtPoint: aPoint) isNil ifTrue: [^self]. blk localComponent controller selectAt: blk localIndex. self selectedComponents: (OrderedCollection with: blk localComponent).
shrinkComponentSelectionTo: aComponent fromRight: aBoolean "Shrink the selection down to aComponent. Shrink from the end (right) if aBoolean is true, otherwise shrink from the left." | comps | comps := self selectedComponents. aBoolean not ifTrue: [comps := comps reverse]. [comps last ~= aComponent] whileTrue: [| c | c := comps removeLast. (c respondsTo: #deselect) ifTrue: [c deselect]]. self selectedComponents: (aBoolean ifTrue: [comps] ifFalse: [comps reverse]).
startBlock | c | self selectedComponents isEmpty ifTrue: [^nil]. c := self selectedComponents first. ^self characterBlockAtLocalPoint: c startBlock center for: c
stopBlock | c | self selectedComponents isEmpty ifTrue: [^nil]. c := self selectedComponents last. ^self characterBlockAtLocalPoint: c stopBlock center for: c
</methods> <methods> VWHelp.AHSTextGraphicCompositeController <category>private-selection</category>
selection ^self view selection
selectionEndAt: aPoint pivot: pivot originalStart: originalStart originalStop: originalStop "Selection has ended." (self selectedComponents size = 1 and: [self selectedComponents first controller readOnly not]) ifTrue: [| comp | comp := self selectedComponents first. comp controller completeSelectionWithPrevStart: originalStart asLocalCharacterBlock prevStop: originalStop asLocalCharacterBlock pivotBlock: pivot asLocalCharacterBlock showingCaret: (comp startBlock = comp stopBlock and: [comp selectionShowing])].
selectionStartAt: aPoint shiftDown: aBoolean "Answer the pivot point." ^(aBoolean and: [self selectedComponents isEmpty not]) ifTrue: [| start stop current pivot | start := self startBlock. stop := self stopBlock. current := self characterBlockAtPoint: aPoint. (current stringIndex - start stringIndex) abs < (current stringIndex - stop stringIndex) abs ifTrue: [ start := start origin. pivot := stop] ifFalse: [ pivot := start. start := stop corner]. self selectionTrackFrom: start to: aPoint pivot: pivot. pivot] ifFalse: [ self selectAtPoint: aPoint. self characterBlockAtPoint: aPoint]
selectionTrackFrom: startPoint to: endPoint pivot: pivot "Track the dragging selection." | start end | self view scrollIfNeededTo: endPoint. start := self characterBlockAtPoint: startPoint. end := self characterBlockAtPoint: endPoint. start = end ifTrue: [^self]. "Handle the case where start and end (and maybe the pivot) are within the same component." start localComponent = end localComponent ifTrue: [^self trackLocalFrom: start to: end pivot: pivot]. "Handle the case where start and end are on the same side of the pivot but in different components." (start <= pivot and: [end <= pivot]) ifTrue: [ ^start < end ifTrue: [self trackGlobalShrinkFrom: start to: end pivot: pivot] ifFalse: [self trackGlobalGrowFrom: start to: end pivot: pivot]]. (start >= pivot and: [end >= pivot]) ifTrue: [ ^start < end ifTrue: [self trackGlobalGrowFrom: start to: end pivot: pivot] ifFalse: [self trackGlobalShrinkFrom: start to: end pivot: pivot]]. "If here, then start and end straddle the pivot across components." self trackGlobalShrinkFrom: start to: pivot pivot: pivot. ^self trackGlobalGrowFrom: pivot to: end pivot: pivot
showingCaretIn: aComponent ^aComponent startBlock = aComponent stopBlock and: [aComponent selectionShowing]
trackGlobalGrowFrom: startBlock to: stopBlock pivot: pivotBlock "startBlock and stopBlock are on the same side of pivotBlock, but (probably) not in the same component." | c | "Start and stop blocks may have the same index - if so we still grow the components, but don't touch the selection." startBlock ~= stopBlock ifTrue: [ stopBlock > startBlock ifTrue: ["grow right" c := self selectedComponents last. c controller selection isEmpty ifTrue: [c deselect]. c selectionStopIndex: c displayContents text size + 1. c turnSelectionOn: c graphicsContext within: c clippingBox. stopBlock localComponent selectionStartIndex: 1 stopIndex: 1] ifFalse: ["grow left" | sz | c := self selectedComponents first. c controller selection isEmpty ifTrue: [c deselect]. c selectionStartIndex: 1. c turnSelectionOn: c graphicsContext within: c clippingBox. sz := stopBlock localComponent displayContents text size. stopBlock localComponent selectionStartIndex: sz + 1 stopIndex: sz + 1]]. self growComponentSelectionTo: stopBlock localComponent. stopBlock localComponent select. self trackLocalFrom: ((startBlock > stopBlock) ifTrue: [self startBlock] ifFalse: [self stopBlock]) to: stopBlock pivot: pivotBlock.
trackGlobalShrinkFrom: startBlock to: stopBlock pivot: pivotBlock "startBlock and stopBlock are on the same side of pivotBlock, but (probably) not in the same component." self shrinkComponentSelectionTo: stopBlock localComponent fromRight: (startBlock > stopBlock). self trackLocalFrom: ((startBlock > stopBlock) ifTrue: [self stopBlock] ifFalse: [self startBlock]) to: stopBlock pivot: pivotBlock.
trackLocalFrom: startBlock to: stopBlock pivot: pivotBlock "start and stop blocks are within the same component - the pivot may or may not be in the same component. Note that the start and stop blocks may, in fact, be outside of the current selection so this condition must be checked (and the selection grown if necessary)." | comp | comp := startBlock localComponent. (self selectedComponents includes: comp) not ifTrue: [self trackGlobalGrowFrom: (self globalBlockClosestTo: startBlock) to: startBlock pivot: pivotBlock] ifFalse: [ "Does the selection need to shrink?" ((startBlock > pivotBlock and: [startBlock localComponent ~= self selectedComponents last]) or: [startBlock < pivotBlock and: [startBlock localComponent ~= self selectedComponents first]]) ifTrue: [ startBlock >= pivotBlock ifTrue: [self trackGlobalShrinkFrom: self rightMostCharacterBlock to: startBlock pivot: pivotBlock]. startBlock <= pivotBlock ifTrue: [self trackGlobalShrinkFrom: self leftMostCharacterBlock to: startBlock pivot: pivotBlock]]]. ^comp controller trackSelectionFrom: startBlock asLocalCharacterBlock to: (comp globalPointToLocal: (self view localPointToGlobal: stopBlock center)) pivotBlock: (self localBlock: pivotBlock basedOn: startBlock) showingCaret: (self showingCaretIn: comp)
</methods> <methods> VWHelp.AHSTextGraphicCompositeController <category>selection</category>
findAndSelect: aString ^self findAndSelect: aString ignoreCase: false
findAndSelect: aString ignoreCase: aBoolean "Starting after the current selection (or at the top if there is no selection), highlight the next string that matches aString. Answer true if a match was found, else answer false." | startC comps | comps := (self view components select: [:c | c wrapsTextView]) collect: [:c | c view]. comps isEmpty ifTrue: [^false]. self selectedComponents isEmpty ifTrue: [startC := comps first] ifFalse: [startC := self selectedComponents last]. [comps first ~= startC and: [comps isEmpty not]] whileTrue: [comps removeFirst]. comps isEmpty ifTrue: [^false]. "Shouldn't happen, but to be safe..." comps do: [:c | (c controller findNext: aString ignoreCase: aBoolean) ifTrue: [ self deselectAll. c controller select. self selectedComponents: (OrderedCollection with: c). self view scrollIfNeededTo: self stopBlock center. ^true]]. ^false
</methods> <methods> VWHelp.AHSTextGraphicCompositeController <category>event driven</category>
mouseMovedEvent: anEvent "Forward mouse move events to the local component's controller - the controller may change the cursor for hyperlinks." | cb | cb := self characterBlockAtPoint: (self sensor mousePointFor: anEvent). cb notNil ifTrue: [cb localComponent controller mouseMovedEvent: anEvent].
redButtonPressedEvent: event self selectEvent: event.
redButtonReleasedEvent: anEvent "Forward red button release events to the local component's controller - the controller may wish to engage a hyperlink." | cb | cb := self characterBlockAtPoint: (self sensor mousePointFor: anEvent). cb notNil ifTrue: [cb localComponent controller redButtonReleasedEvent: anEvent].
selectionTracker ^AHSTextGraphicSelectionTracker on: self
</methods> <methods> VWHelp.AHSTextGraphicCompositeController <category>menu messages</category>
copySelection | sel | sel := self selection. sel isEmpty not ifTrue: [ParagraphEditor currentSelection: sel].
debugIt "Prepare to evaluate the current text selection as an expression. Break and bring up the debugger before the first statement." | code | self selection isEmpty ifTrue: [^self]. code := [self compileSelection] on: CompilationError do: [:ex | Dialog warn: 'Compilation error'. ex return: nil]. code notNil ifTrue: [SourceFileManager default logChange: self selection string. self debug: code]
doIt "Evaluate the current text selection as an expression." self selection isEmpty ifTrue: [^self]. "If the current selection is empty, just return." [self evaluateSelection] on: CompilationError do: [:ex | Dialog warn: 'Compilation error'. ex return: nil]
explain "Evaluate the current text selection as an expression." self explainFor: nil
explainFor: aModel "Evaluate the current text selection as an expression." self selection isEmpty ifTrue: [^self]. Explainer explain: self selection for: aModel
inspectIt "Evaluate the current text selection as an expression and open an inspector on the result." self selection isEmpty ifTrue: [^self]. "If the current selection is empty, just return." [self evaluateSelection inspect] on: CompilationError do: [:ex | Dialog warn: 'Compilation error'. ex return: nil]
printIt "Evaluate the current text selection as an expression and then print it on the transcript." self selection isEmpty ifTrue: [^self]. "If the current selection is empty, just return." [Transcript cr; print: self evaluateSelection; flush] on: CompilationError do: [:ex | Dialog warn: 'Compilation error'. ex return: nil]
</methods> <methods> VWHelp.AHSTextGraphicCompositeController <category>initialize-release</category>
initialize super initialize. self resetState.
initializeMenu | menu | menu := Menu new. menu addItem: ((MenuItem labeled: 'Copy') value: #copySelection; enabled: [self view selection isEmpty not]). menu addPart: ParagraphEditor evaluateGroup. menuHolder := menu asValue
resetState self selectedComponents: #().
</methods> <methods> VWHelp.AHSSearchDialog <category>aspects</category>
searchIn "This method was generated by UIDefiner. Any edits made here may be lost whenever methods are automatically defined. The initialization provided below may have been preempted by an initialize method." ^searchIn isNil ifTrue: [searchIn := nil asValue] ifFalse: [searchIn]
searchString "This method was generated by UIDefiner. Any edits made here may be lost whenever methods are automatically defined. The initialization provided below may have been preempted by an initialize method." ^searchString isNil ifTrue: [searchString := String new asValue] ifFalse: [searchString]
</methods> <methods> VWHelp.AHSSearchDialog <category>actions</category>
ok self accept value: true.
</methods> <methods> VWHelp.AHSSearchDialog <category>initialize-release</category>
initialize super initialize. self searchIn value: #text.
</methods> <methods> VWHelp.AHSSearchDialog class <category>interface opening</category>
searchFor: defaultString | aSearch answerDictionary | aSearch := self new. aSearch searchString value: defaultString. answerDictionary := nil. aSearch open ifTrue: [| searchIn | searchIn := aSearch searchIn value. answerDictionary := Dictionary new. answerDictionary at: #searchString put: aSearch searchString value. answerDictionary at: #searchTopics put: (searchIn = #topics or: [searchIn = #both]). answerDictionary at: #searchText put: (searchIn = #text or: [searchIn = #both])]. ^answerDictionary
</methods> <methods> VWHelp.ArborTextStyleDialog <category>aspects</category>
bold "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^bold isNil ifTrue: [bold := false asValue] ifFalse: [bold]
color "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^color isNil ifTrue: [color := nil asValue] ifFalse: [color]
colorOn "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^colorOn isNil ifTrue: [colorOn := false asValue] ifFalse: [colorOn]
italic "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^italic isNil ifTrue: [italic := false asValue] ifFalse: [italic]
large "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^large isNil ifTrue: [large := false asValue] ifFalse: [large]
sampleText ^sampleText isNil ifTrue: [sampleText := 'The quick brown fox jumped over the lazy sleeping dog.' asText asValue] ifFalse: [sampleText]
serif "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^serif isNil ifTrue: [serif := false asValue] ifFalse: [serif]
underline "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^underline isNil ifTrue: [underline := false asValue] ifFalse: [underline]
</methods> <methods> VWHelp.ArborTextStyleDialog <category>interface opening</category>
postBuildWith: aBuilder super postBuildWith: aBuilder. self changeColorSetting.
</methods> <methods> VWHelp.ArborTextStyleDialog <category>actions</category>
closeAccept self accept value ifTrue: [self changeStyle]. ^super closeAccept
setColor |c| c := self class pickColor: (self color value isNil ifTrue: [ColorValue black] ifFalse: [self color value]). c notNil ifTrue: [self color value: c]
</methods> <methods> VWHelp.ArborTextStyleDialog <category>accessing</category>
emphasis |oc| oc := OrderedCollection new. self serif value ifTrue: [oc add: #serif]. self large value ifTrue: [oc add: #large]. self underline value ifTrue: [oc add: #underline]. self italic value ifTrue: [oc add: #italic]. self bold value ifTrue: [oc add: #bold]. (self colorOn value and: [self color value notNil]) ifTrue: [oc add: #color->self color value]. ^oc asArray
paragraphEditor ^paragraphEditor
paragraphEditor: editor | selection emphasis emphases clr | paragraphEditor := editor. editor selectionStartIndex = editor selectionStopIndex ifTrue: [emphasis := editor instVarAt: 7 "emphasisHere". emphasis notNil ifTrue: [emphasis := self emphasisAsArray: emphasis. self serif value: (emphasis includes: #serif). self large value: (emphasis includes: #large). self underline value: (emphasis includes: #underline). self italic value: (emphasis includes: #italic). self bold value: (emphasis includes: #bold). self color value: ((emphasis detect: [:e | (e isKindOf: Association) and: [e key = #color]] ifNone: [nil]) value)]] ifFalse: [selection := editor selection. emphases := (1 to: selection size) collect: [:i | (self emphasisAsArray: (selection emphasisAt: i))]. emphases detect: [:e | (e includes: #serif) not] ifNone: [self serif value: true]. emphases detect: [:e | (e includes: #large) not] ifNone: [self large value: true]. emphases detect: [:e | (e includes: #underline) not] ifNone: [self underline value: true]. emphases detect: [:e | (e includes: #italic) not] ifNone: [self italic value: true]. emphases detect: [:e | (e includes: #bold) not] ifNone: [self bold value: true]. (clr := emphases inject: nil into: [:acc :each | |thisColor| each detect: [:eachEmph | thisColor := ((eachEmph isKindOf: Association) and: [eachEmph key = #color]) ifTrue: [eachEmph value]. thisColor notNil] ifNone: [nil]. thisColor = acc ifTrue: [acc] ifFalse: [acc isNil ifTrue: [thisColor] ifFalse: [nil]]]) notNil ifTrue: [clr notNil ifTrue:[self colorOn value: true. self color value: clr.] ifFalse:[self colorOn value: false. self color value: clr].]]
</methods> <methods> VWHelp.ArborTextStyleDialog <category>change messages</category>
changeColorSetting "Change color on setting, disable/enable SetColor button" | button | (button := self builder namedComponents at: #setColor ifAbsent: []) notNil ifTrue:[self colorOn value ifTrue:[button enable] ifFalse:[button disable]. self changeSampleText].
changeSampleText | text | Cursor wait showWhile: [text := self sampleText value. self sampleText value: ''. self sampleText value: (text emphasizeAllWith: self emphasis)]
</methods> <methods> VWHelp.ArborTextStyleDialog <category>initialize-release</category>
initialize super initialize. serif := false asValue. large := false asValue. underline := false asValue. italic := false asValue. bold := false asValue. colorOn := false asValue. color := nil asValue. serif onChangeSend: #changeSampleText to: self. large onChangeSend: #changeSampleText to: self. underline onChangeSend: #changeSampleText to: self. italic onChangeSend: #changeSampleText to: self. bold onChangeSend: #changeSampleText to: self. colorOn onChangeSend: #changeColorSetting to: self. color onChangeSend: #changeSampleText to: self.
</methods> <methods> VWHelp.ArborTextStyleDialog <category>private</category>
changeStyle |start stop| start := self paragraphEditor selectionStartIndex. stop := self paragraphEditor selectionStopIndex. self paragraphEditor deselect. start = stop ifTrue: [self paragraphEditor aisSetEmphasisHere: self emphasis] ifFalse: [| newText | newText := self paragraphEditor selection addEmphasis: self emphasis removeEmphasis: #{Smalltalk.Text} value aisAllEmphases allowDuplicates: false. self paragraphEditor replaceSelectionWith: newText. self paragraphEditor selectFrom: start to: stop - 1]
emphasisAsArray: emph ^(emph isNil or: [emph isSymbol or: [emph isKindOf: Association]]) ifTrue: [Array with: emph] ifFalse: [emph]
</methods> <methods> VWHelp.ArborTextStyleDialog class <category>interface opening</category>
openForParagraphEditor: aParagraphEditor |dlg| dlg := self new. dlg paragraphEditor: aParagraphEditor. ^dlg open
</methods> <methods> VWHelp.ArborTextStyleDialog class <category>utility</category>
colorsAndTexts "Answer a collection of associations where the key is a ColorValue and the value is a text representing the color." "ArborCoreUtils colorsAndTexts." | colorNames | colorNames := (ColorValue constantNames asSortedCollection) sortBlock: [:a :b ||cv1 cv2| cv1 := ColorValue perform: a. cv2 := ColorValue perform: b. cv1 brightness < cv2 brightness or: [cv1 brightness = cv2 brightness and: [cv1 hue < cv2 hue or: [cv1 hue = cv2 hue and: [cv1 saturation < cv2 saturation]]]]]. ^colorNames collect: [:colorName || color textStream | color := ColorValue perform: colorName. textStream := TextStream on: String new. textStream emphasis: (Array with: #bold with: #color->color). colorName do: [:ch | ch isUppercase ifTrue: [ textStream nextPut: Character space; nextPut: ch asLowercase] ifFalse: [ textStream nextPut: (textStream position = 0 ifTrue: [ch asUppercase] ifFalse: [ch])]]. color->textStream contents]
pickColor "Use a color picker to pick a color. Answer the new color, or nil if user cancelled." "self pickColor" ^self pickColor: ColorValue white
pickColor: aColorValue "Use a color picker to pick a color - use the Arbor color picker if installed, otherwise build a list of colors dynamically. Answer the new color, or nil if user cancelled. Start with the current color aColorValue, if applicable" "self pickColor: ColorValue blue" ^(#{ColorPicker} isDefined and: [#{ColorPicker} value canOpen]) ifTrue: [#{ColorPicker} value openAsDialogOn: aColorValue] ifFalse: [| colors | colors := self colorsAndTexts. Dialog choose: 'Please pick a color:' fromList: (colors collect: [:assoc | assoc value]) values: (colors collect: [:assoc | assoc key]) lines: 15 cancel: [nil]]
</methods> <methods> VWHelp.ArborTextStyleDialog class <category>examples</category>
example "self example" self openForParagraphEditor: (ScheduledControllers activeController model dependents detect: [:dep | dep isKindOf: ComposedTextView]) controller
</methods> <methods> VWHelp.AHSOutlineTopicIndex <category>accessing</category>
addItem: aTreeNode "Update the index with information about aTreeNode." | info | info := aTreeNode data uniqueID. allTopics add: info. topicIndex at: info put: allTopics size
nextNode: aTreeNode "Answer the node which immediately follows aTreeNode, or nil if no node exists." | index | index := topicIndex at: aTreeNode uniqueID. ^ index = allTopics size ifTrue: [nil] ifFalse: [allTopics at: index + 1]
previousNode: aTreeNode "Answer the node previous to aTreeNode, or nil if no node exists." | index | index := topicIndex at: aTreeNode uniqueID. ^ index = 1 ifTrue: [nil] ifFalse: [allTopics at: index - 1]
</methods> <methods> VWHelp.AHSOutlineTopicIndex <category>initialize-release</category>
initialize "Private - Initialize the receiver by creating an empty topicIndex and allTopics." topicIndex := Dictionary new. allTopics := OrderedCollection new.
</methods> <methods> VWHelp.AHSOutlineTopicIndex class <category>instance creation</category>
new "Answer a new, initialized instance of the receiver." ^ super new initialize.
</methods> <methods> VWHelp.AHSGlossaryLinkObject <category>attributes</category>
attributes ^super attributes, #(key)
key ^self linkObject asString
key: aValue ^self linkObject: aValue asSymbol
</methods> <methods> VWHelp.AHSGlossaryLinkObject <category>engaging</category>
engageFor: anObject "The hyperlink has been engaged within the context of anObject." ^anObject engageGlossary: self
</methods> <methods> VWHelp.AHSGlossaryLinkObject <category>AHS Export adds</category>
writeHyperlinkUsing: aTopicBodyWriter ^aTopicBodyWriter writeGlossaryLink: self
</methods> <methods> VWHelp.AHSGlossaryLinkObject <category>testing</category>
isGlossary "Is my linkType a glossary type?" ^true
</methods> <methods> VWHelp.AHSGlossaryLinkObject <category>printing</category>
printOn: aStream aStream nextPutAll: 'Glossary,'. self linkObject printOn: aStream.
</methods> <methods> VWHelp.AHSGlossaryLinkObject class <category>color & emphasis</category>
defaultColor ^self defaultColorValueClass darkRed
defaultEmphasis ^#italic
</methods> <methods> VWHelp.AHSGlossaryLinkObject class <category>attributes</category>
type "Answer a unique identifier for the type, used during RTF exports to indicate the type of the link." ^#glossary
</methods> <methods> VWHelp.AHSHyperGraphicViewer <category>aspects</category>
availableGraphics "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." ^ availableGraphics isNil ifTrue: [availableGraphics := SelectionInList new] ifFalse: [availableGraphics]
graphic graphic isNil ifTrue: [graphic := AHSGraphicView new model: self blankImage; yourself]. ^ graphic
</methods> <methods> VWHelp.AHSHyperGraphicViewer <category>interface opening</category>
openAsDialog | dlog | dlog :=SimpleDialog new. self builder: dlog builder. dlog preBuildBlock: [:mdl :bldr | self preBuildWith: bldr]. dlog postBuildBlock: [:mdl :bldr | self postBuildWith: bldr]. ^ dlog openFor: self interface: #windowSpec
postBuildWith: aBuilder super postBuildWith: aBuilder. self updateGraphicsList. self availableGraphics selectionIndexHolder onChangeSend: #graphicSelectionChanged to: self.
</methods> <methods> VWHelp.AHSHyperGraphicViewer <category>accessing</category>
currentGraphicKey "Answer the currently selected graphic key." ^ self availableGraphics selection
graphicsDictionary "Private - Answer the dictionary of all graphic images." ^ self outline graphicsDictionary
graphicsKeys "Private - Answer an ordered collection of all the graphic keys." ^List withAll: self graphicsDictionary keys asSortedCollection
listMenu listMenu isNil ifTrue: [listMenu := Menu new asValue]. ^ listMenu
outline ^ outliner outline
outliner ^ outliner
outliner: anOutliner outliner := anOutliner
</methods> <methods> VWHelp.AHSHyperGraphicViewer <category>events</category>
noticeOfWindowClose: aWindow self graphicsDictionary odbReleaseUnDirtyLock. ^ super noticeOfWindowClose: aWindow
</methods> <methods> VWHelp.AHSHyperGraphicViewer <category>change messages</category>
graphicSelectionChanged "The availableGraphics selection has changed." self currentGraphicKey isNil ifTrue: [self clearGraphic] ifFalse: [self setGraphic]. graphic invalidate
</methods> <methods> VWHelp.AHSHyperGraphicViewer <category>private</category>
blankImage "Private - Answer a blank image which can be displayed." ^ Image extent: 0 @ 0 depth: 1 palette: MappedPalette whiteBlack
clearGraphic "Private - Clear the graphic pane." graphic model: self blankImage
setGraphic "Private - Set the graphic which is displayed to correspond to the current key selection." graphic model: (self outliner graphicAt: self currentGraphicKey)
updateGraphicsList "Private - Update the graphics list with keys from the graphics dictionary." self availableGraphics list: self graphicsKeys
</methods> <methods> VWHelp.AHSHyperGraphicViewer class <category>interface opening</category>
openFrom: anOutliner modal: aBoolean "Builds or removes a hyperGraphic link." | me | me := self new. me outliner: anOutliner. aBoolean ifTrue: [me openAsDialog] ifFalse: [me open]
showGraphicLinkedTo: aLinkObject onHelpOutliner: aHelpOutliner "Shows the graphic (if any) associated to the information stored in aLinkObject." | image mdl | image := aHelpOutliner outline graphicAt: aLinkObject linkObject ifAbsent: [^self notFoundGraphic: aLinkObject linkObject]. mdl := self graphicScreenClass onImage: image link: aLinkObject parent: aHelpOutliner ahsWindow. aHelpOutliner ahsWindow isModalDialog ifTrue: [mdl openAsDialog] ifFalse: [mdl open].
</methods> <methods> VWHelp.AHSHyperGraphicViewer class <category>defaults</category>
graphicScreenClass ^AHSGraphicScreen
</methods> <methods> VWHelp.AHSHyperGraphicViewer class <category>accessing</category>
messageCatalogID ^#arborHelpSystem
</methods> <methods> VWHelp.AHSHyperGraphicViewer class <category>errors</category>
notFoundGraphic: aGraphicName ^Dialog warn: 'The graphic named ' , aGraphicName printString , ' no longer exists.'
</methods> <methods> VWHelp.AHSTopicBodyWriter <category>private</category>
appendEmphasisFrom: anElem to: aStream "Private - Answer a new emphasis value derived from anEmphasisElement." | aKey | aKey := self emphasisKeyFrom: anElem. inGroup := true. aStream isEmpty ifTrue: [self appendGroupStartTo: aStream]. aStream nextPutAll: (self conversionStringFor: anElem at: aKey)
appendGroupStartTo: aStream "Private - Append the group start sequence to aStream" ^ self subclassResponsibility
asAttributeArray: anEmphasisCollection "Answer a flattened Array containing TextAttributes. Believe it or not, aTextAttribute may be an array that contains arrays." anEmphasisCollection isNil ifTrue: [^#()]. ^ (anEmphasisCollection isSymbol not and: [anEmphasisCollection isSequenceable]) ifTrue: [| stream | stream := (Array new: 20) writeStream. anEmphasisCollection do: [:item | stream nextPutAll: (self asAttributeArray: item)]. stream contents] ifFalse: [Array with: anEmphasisCollection]
conversionStringFor: anElem at: aKey "Private - Answer a string which represents the converted emphasis element value." ^ ((self emphasisConversionBlockAt: aKey) value: self value: anElem)
convertedEmphasisFrom: anEmphasis "Private - Answer a new emphasis which is appropriate for RTF output." | newEmphasis emphasisStream | newEmphasis := self strippedEmphasisFrom: anEmphasis. emphasisStream := WriteStream on: ''. newEmphasis do: [:anElem | (anElem aisIsAssociation and: [anElem isArborHyperlinkAssociation and: [anElem value isKindOf: AHSHelpHyperLinkObject]]) ifTrue: [ newEmphasis size == 1 ifTrue: [inGroup := false]. hyperLink := anElem value] ifFalse: [ self appendEmphasisFrom: anElem to: emphasisStream]]. ^ emphasisStream contents
emphasisConversionBlockAt: aKey "Private - Answer the emphasis conversion block found at a key. If absent, simply answer a block which will answer an empty string." ^ self emphasisConversionDictionary at: aKey ifAbsent: [[:writer :anEmph | String new]]
emphasisKeyFrom: anElem "Private - Answer the emphasis key from anElem, where anElem may be an association." ^ (anElem isKindOf: Association) ifTrue: [anElem key] ifFalse: [anElem].
exportableEmphasisFrom: anEmphasis "Answer an exportable emphasis derived from the ST emphasis." hyperLink := nil. ^ (self definesEmphasis: anEmphasis) ifTrue: [self convertedEmphasisFrom: anEmphasis] ifFalse: [inGroup := false. String new].
exportableStringFrom: aString "Convert aString to an exportable string, which means replacing any special character with their exportable equivalents." | outStream | outStream := WriteStream on: String new. aString do: [:aChar | outStream nextPutAll: (self translatedCharacterStringFor: aChar)]. ^ outStream contents asString
setOwner: anObject owner := anObject
strippedEmphasisFrom: anEmphasis "Private - Answer a new emphasis which has had link information stripped from it." ^ self removeHyperlinkEmphasis: anEmphasis.
translatedCharacterStringFor: aChar "Private - Answer a translated character string for the given character. Some characters need to be modified before being sent to the output stream." ^ self specialCharacterDictionary at: aChar ifAbsent: [String with: aChar].
</methods> <methods> VWHelp.AHSTopicBodyWriter <category>accessing</category>
emphasisConversionDictionary ^ self class emphasisConversionDictionary
owner ^ owner
specialCharacterDictionary ^ self class specialCharacterDictionary
</methods> <methods> VWHelp.AHSTopicBodyWriter <category>writing</category>
writeBody: aText "Convert aText and write it out." 1 to: aText size do: [:index | self writeText: aText at: index].
writeBody: aText on: aStream "Convert aText and write it out on aStream" outputStream := aStream. inGroup := false. self writeBody: aText asAHSHyperText. self writeTopicTermination.
writeCharacter: aChar "Write the character out to outputStream, converting it if necessary." outputStream nextPutAll: (self translatedCharacterStringFor: aChar).
writeConvertedEmphasis: anEmphasis "Private - Write anEmphasis in a form appropriate to the format used for the output file." ^ self subclassResponsibility
writeCurrentEmphasisTermination "Private - Write the sting which terminates the current emphasis." ^ self subclassResponsibility
writeEmphasisChange: anEmphasis "Write the RTF code for the any changes in the emphasis." (self isNewEmphasis: anEmphasis) ifFalse: [^ self]. self writeGroupTermination. self writeConvertedEmphasis: anEmphasis. currentEmphasis := anEmphasis
writeGlossaryLink: theLink ^self subclassResponsibility
writeGroupTermination "Write an appropriate group termination string for the receiver." ^self subclassResponsibility
writeHypergraphicLink: theLink ^self subclassResponsibility
writeHyperLink: oldLink "If oldLink and the current link, self hyperLink, are different, write out the needed tags to denote the ending or beginning of a new tag." hyperLink = oldLink ifTrue: [^self]. oldLink notNil ifTrue: [self writeHyperlinkTermination: oldLink]. hyperLink isNil ifTrue: [^self]. "The hyperlink writing method may set hyperLink to nil if the link is to be ignored." hyperLink writeHyperlinkUsing: self.
writeHyperlinkTermination: aLink "Private - Write the string which represents the end of a hyperlink definition." self subclassResponsibility.
writeHypertextLink: theLink "Write a hypertext link definition for the recevier." ^self subclassResponsibility
writeText: aText at: anInteger "Private - Write the character in aText located at the index position indicated by anInteger." | emphasis oldLink | emphasis := aText emphasisAt: anInteger asArray: true. oldLink := hyperLink. self writeEmphasisChange: emphasis; writeHyperLink: oldLink. "Only write out the link text if it's a non-embedded hypergraphic." "Embedded graphic links are to have their text ignored." (hyperLink notNil and: [hyperLink isHyperGraphic and: [self shouldImbed: hyperLink]]) not ifTrue: [self writeCharacter: (aText at: anInteger)].
writeTopicTermination hyperLink notNil ifTrue: [ self writeHyperlinkTermination: hyperLink. hyperLink := nil]. self writeGroupTermination.
</methods> <methods> VWHelp.AHSTopicBodyWriter <category>testing</category>
definesEmphasis: anEmphasis "Private - Answer true if anEmphasis actually defines an emphasis." ^ (anEmphasis notNil and: [anEmphasis isEmpty not])
isNewEmphasis: anEmphasis "Private - Answer true if anEmphasis represents a new emphasis" ^ (anEmphasis ~= currentEmphasis)
</methods> <methods> VWHelp.AHSTopicBodyWriter <category>utility</category>
removeHyperlinkEmphasis: anEmphasis "If anEmphasis has a hyperlink in it, remove any associated text emphasis." | flattenedEmphasis | flattenedEmphasis := (self asAttributeArray: anEmphasis) asSet. flattenedEmphasis copy do: [:emph | (emph aisIsAssociation and: [emph isArborHyperlinkAssociation]) ifTrue: [ (self asAttributeArray: emph value textEmphasis) do: [:em | flattenedEmphasis remove: em ifAbsent: []]]]. ^flattenedEmphasis asArray
</methods> <methods> VWHelp.AHSTopicBodyWriter class <category>class initialization</category>
initializeEmphasisConversionDictionary ^self subclassResponsibility
initializeSpecialCharacters ^self subclassResponsibility
reinitialize "Initialize the class. This method would typically be used to reinitialize the special dictionaries if their code definition has changed. Otherwise, the dictionaries are self-initializing." self initializeEmphasisConversionDictionary; initializeSpecialCharacters
</methods> <methods> VWHelp.AHSTopicBodyWriter class <category>accessing</category>
emphasisConversionDictionary emphasisConversionDictionary isNil ifTrue: [self initializeEmphasisConversionDictionary]. ^ emphasisConversionDictionary
specialCharacterDictionary specialCharacterDictionary isNil ifTrue: [self initializeSpecialCharacters]. ^ specialCharacterDictionary
</methods> <methods> VWHelp.AHSTopicBodyWriter class <category>constants</category>
graphicExtension "The extension to be used for graphic files." ^'.bos'
graphicsDirectory ^'graphics'
</methods> <methods> VWHelp.AHSTopicBodyWriter class <category>instance creation</category>
forOwner: anObject "Answer a new instance of the receiver which can be used to output topic body text for anOwner." ^ self basicNew setOwner: anObject
</methods> <methods> VWHelp.AHSOutline <category>copying</category>
postCopy self postCopyWithoutForest. forest := forest collect: [:tree | tree copy]
postCopyWithoutForest name := name copy. outlineLabel := outlineLabel copy. graphicsDictionary := AHSPersistentDictionary withAll: (graphicsDictionary associations collect: [:assn | assn key -> assn value copy]). glossaryDictionary := AHSPersistentDictionary withAll: (glossaryDictionary associations collect: [:assn | assn key -> (AHSUtils deepCopyOfText: assn value)]).
</methods> <methods> VWHelp.AHSOutline <category>accessing</category>
fileFormat ^ fileFormat isNil ifTrue: [#fastAccess] ifFalse:[fileFormat]
fileFormat: aSymbol ^ fileFormat := aSymbol
forest ^forest
forest: anAHSPersistentOrderedCollection forest := anAHSPersistentOrderedCollection. self odbDirty
idCollection "Answer the collection of IDs which are currently in use." | aSet | aSet := Set new. self topNodesDo: [:aTree | aTree data uniqueID notNil ifTrue: [aSet add: aTree data uniqueID]]. ^ aSet.
memoryFormat "Answer #fastAccess or #memoryFriendly. Note that this is independent of the fileFormat (except if fileFormat == #fastAccess, then the memoryFormat must be #fastAccess also)" ^self containsFilePointers ifTrue: [#memoryFriendly] ifFalse: [#fastAccess]
name ^name
name: aValue self odbDirty. name := aValue
nextID "Answer the next ID for AHSHelpOutlineEntries" self odbDirty. ^nextID := nextID + 1
outlineLabel ^outlineLabel
outlineLabel: aValue self odbDirty. outlineLabel := aValue
</methods> <methods> VWHelp.AHSOutline <category>backward compatibility-collection protocol</category>
add: newObject after: oldObject self forest odbDirty. ^self forest add: newObject after: oldObject
addAll: aCollection self forest odbDirty. ^self forest addAll: aCollection
addFirst: newObject "Add newObject to the beginning of the receiver. Answer newObject." self forest odbDirty. ^self forest addFirst: newObject.
addLast: newObject "Add newObject to the end of the receiver. Answer newObject." self forest odbDirty. ^ self forest addLast: newObject.
at: anInteger ^self forest at: anInteger
at: anInteger put: anObject self forest odbDirty. ^self forest at: anInteger put: anObject
detect: aBlock ifNone: exceptionBlock ^ self forest detect: aBlock ifNone: exceptionBlock
do: aBlock ^ self forest do: aBlock
first ^ self forest first
includes: anObject ^self forest includes: anObject
indexOf: anElement "Answer the index of the first occurrence of anElement within the receiver. If the receiver does not contain anElement, answer 0." ^self forest indexOf: anElement
isEmpty ^self forest isEmpty
remove: oldObject self forest odbDirty. ^self forest remove: oldObject
remove: oldObject ifAbsent: anExceptionBlock self forest odbDirty. ^self forest remove: oldObject ifAbsent: anExceptionBlock
size ^self forest size
</methods> <methods> VWHelp.AHSOutline <category>accessing-glossary</category>
glossaryAt: aSymbol ^self glossaryDictionary at: aSymbol
glossaryAt: aSymbol ifAbsent: aBlock "Answer the glossary entry found in the dictionary at the key location indicated by aSymbol. If not found, answer the result of evaluating aBlock." ^ self glossaryDictionary at: aSymbol ifAbsent: [aBlock value].
glossaryDictionary ^glossaryDictionary
glossaryDictionary: aDictionary ^glossaryDictionary := aDictionary
</methods> <methods> VWHelp.AHSOutline <category>private</category>
graphicsDictionary ^graphicsDictionary
graphicsDictionary: aDictionary ^graphicsDictionary := aDictionary
nextID: anInteger nextID := anInteger
</methods> <methods> VWHelp.AHSOutline <category>fileIn/Out</category>
fixupWith: aString "Fixup the receiver. This object must have been created during a BOSS read, and needs to have some items modified which weren't able to be modified during BOSS processing." self forest do: [:tree | tree do: [:node | (node data isKindOf: AHSMemoryFriendlyHelpOutlineEntry) ifTrue: [node data filename: aString asFilename]. node data uniqueID isNil ifTrue: [node data uniqueID: self nextID]]]. self name: aString
representBinaryOn: binWriter " Represent an OrderedCollection by its contents (elements). Added support for my instance variables" | tmp | tmp := Array new: self forest size + 7. tmp at: 1 put: self class binaryRepresentationVersion asSymbol; at: 2 put: self name; at: 3 put: self outlineLabel; at: 4 put: nextID; at: 5 put: fileFormat; at: 6 put: glossaryDictionary; at: 7 put: graphicsDictionary. 8 to: tmp size do: [:i | tmp at: i put: (self forest at: i - 7)]. ^MessageSend receiver: self class selector: #unboss: argument: tmp
</methods> <methods> VWHelp.AHSOutline <category>testing</category>
containsFilePointers "Answer whether there are any outline entries that contain file pointers" ^ self graphicsDictionaryHasPointers or: [self treeHasPointers]
graphicsDictionaryHasPointers "Private - Answer true if the graphics dictionary has pointers." ^ (self graphicsDictionary detect: [:val | val isKindOf: Integer] ifNone: [nil]) notNil
hasGlossaryEntries "Answer true if the glossary contains any entries." ^ self glossaryDictionary isEmpty not
isMemoryFriendly ^ self memoryFormat = #memoryFriendly
treeHasPointers "Private - Answer true if any element of the tree contains pointers." ^ (self detect: [:tree | (tree detect: [:node | node data containsFilePointers] ifNone: [nil]) notNil] ifNone: [nil]) notNil
</methods> <methods> VWHelp.AHSOutline <category>searching</category>
findTopic: topicName "Find the topic in the outline that matches topicName (case insensitive) and answer the Tree node" | obj | topicName isNil ifTrue: [^nil]. self forest detect: [:eachTree | obj := eachTree detect: [:node | node data topic asString asUppercase = topicName asString asUppercase] ifNone: [nil]. obj notNil] ifNone: []. ^ obj
findTopicForOutline: outlineName name: topicName "Find the topic in the outline and answer the Tree node, or nil if not found" "Modified to build the xmlOutline before searching for a topic. The test to see if the xmlOutline is already built is done in the #buildXmlOutlineFrom: method" | obj anEntry | obj := nil. self forest detect: [:eachTree | anEntry := eachTree data. ((anEntry isKindOf:VWHelp.OutlineEntry) and: [anEntry proxy notNil]) ifTrue: [(outlineName = (anEntry proxy fileID asLogicalFileSpecification tail)) ifTrue: [self buildXmlOutlineFrom: eachTree]]. (outlineName = anEntry outlineFile) ifTrue: [ obj := eachTree detect: [:node | node data uniqueID = topicName] ifNone: [nil]]. obj notNil] ifNone: []. ^obj
findTopicNumber: topicNumber "Find the topic in the outline that has the topic number topicNumber and answer the Tree node, or nil if not found" | obj | self forest detect: [:eachTree | obj := eachTree detect: [:node | node data uniqueID = topicNumber] ifNone: [nil]. obj notNil] ifNone: []. ^obj
</methods> <methods> VWHelp.AHSOutline <category>accessing-graphics</category>
graphicAt: aSymbol ^self graphicAt: aSymbol ifAbsent: [KeyedCollection keyNotFoundSignal raise]
graphicAt: aSymbol ifAbsent: aBlock "The Image may be in the dictionary, or it may still be on disk" |graphic| graphic := self graphicsDictionary at: aSymbol ifAbsent: [^aBlock value]. (AHSMemoryFriendlyHelpOutlineEntry isPositionPersistent: graphic) ifTrue: [graphic := AHSMemoryFriendlyHelpOutlineEntry positionAsTransient: graphic. self graphicsDictionary at: aSymbol put: graphic]. graphic isInteger ifTrue: [ "Image is on disk" Cursor read showWhile: [|bos| bos := #{BinaryObjectStorage} value onOldNoScan: self name asFilename readStream. [bos position: graphic. graphic := bos next] ensure: [bos close]]]. ^graphic
graphicsKeys ^self graphicsDictionary keys asSortedCollection
</methods> <methods> VWHelp.AHSOutline <category>enumerating</category>
nodesWithoutIDsDo: aBlock "For each node in the outline which hasn't been assigned an id, evaluate aBlock passing the node as the argument." self topNodesDo: [:aTree | aTree data uniqueID isNil ifTrue: [aBlock value: aTree]]
nodesWithTextDo: aBlock "Private - For each node whose data contains text, evaluate the block with the node as the parameter." Cursor wait showWhile: [self topNodesDo: [:aTree | aTree dataHasText ifTrue: [aBlock value: aTree]]]
topNodesDo: aBlock "Iterate over all top nodes managed by the receiver, evaluating aBlock with the node as the argument." self forest do: [:rootTree | rootTree do: [:aTree | aBlock value: aTree]]
</methods> <methods> VWHelp.AHSOutline <category>odb support</category>
odbDeepRefresh "Refresh the entire outline" self odbRefreshIfNotDirty. self do: [:aRoot | aRoot odbDeepRefresh].
</methods> <methods> VWHelp.AHSOutline <category>AHS Export adds-accessing-glossary</category>
sortedGlossary "Answer an ordered collection of glossary entries (associations) sorted by the glossary key." | result | result := SortedCollection sortBlock: [:a :b | a key <= b key]. self glossaryDictionary associationsDo: [:assoc | result add: assoc]. ^ result asOrderedCollection
</methods> <methods> VWHelp.AHSOutline <category>references</category>
linksLike: aLink do: aBlock "For each link that is like aLink, evaluate aBlock with the link as the parameter. This allows for things like changing the contents of the link." | linkEmphasis | linkEmphasis := aLink asEmphasis. self nodesWithTextDo: [:aTree | self updateTreeTextFor: aTree using: [:text || change | change := false. text emphasesLike: linkEmphasis do: [:emph || old | old := emph value copy. aBlock value: emph value. change := change or: [(emph = old) not]]. change]].
removeReferencesToLink: aLinkObject | emphasis | emphasis := Array with: aLinkObject asEmphasis. self nodesWithTextDo: [:aTree | self updateTreeTextFor: aTree using: [:text || old | old := text copy. text addEmphasis: #() removeEmphasis: emphasis allowDuplicates: false. (AHSUtils text: text equals: old) not]]
</methods> <methods> VWHelp.AHSOutline <category>initialize-release</category>
initialize name := 'Untitled' copy. outlineLabel := 'Untitled' copy. fileFormat := #fastAccess. glossaryDictionary := AHSPersistentDictionary new. graphicsDictionary := AHSPersistentDictionary new. nextID := 0. forest := AHSPersistentOrderedCollection new
</methods> <methods> VWHelp.AHSOutline <category>references - private</category>
updateTreeTextFor: aTree using: aBlock "Evaluate aBlock and update the data text value maintained by aTree if a change has occured. If a change occurred make a deep copy before installing it - this is for database support. We only mark dirty at the data's #text: level, we don't bother going deeper. So if the text is the same but the contents (such as the runs) are different, then we need to get a whole new text or the new runs won't make it into the database." | thisText | thisText := aTree dataTextValue. (aBlock value: thisText) ifTrue: [aTree data text: (AHSUtils deepCopyOfText: thisText)].
</methods> <methods> VWHelp.AHSOutline <category>reporting</category>
reportHyperLinksOn: aStream "Loops through outline and prints out report detailing hyperlinks into a CSV file." self do: [ :current | aStream nextPutAll: '0,Root, '. current data topic printOn: aStream. aStream nextPut: $,. current depth printOn: aStream. aStream cr. current do: [:currentTree | aStream nextPutAll: '0, Topic, '. currentTree data topic printOn: aStream. aStream nextPut: $,. currentTree depth printOn: aStream. aStream cr. currentTree data text printLinksOn: aStream]].
</methods> <methods> VWHelp.AHSOutline class <category>instance creation</category>
fromTopicTree: aTopicTree "Answer a new outline with aTopicTree as its contents. The label of the outline is the same as the name of the top level node in the tree." ^ self fromTopicTree: aTopicTree labeled: aTopicTree label.
fromTopicTree: aTopicTree labeled: aString "Answer a new outline with aTopicTree as its contents. Set the label of the outline to aString." ^ (self new: 1) addFirst: aTopicTree; outlineLabel: aString; yourself
new ^super new initialize
new: anInteger |newOutline| newOutline := self new. newOutline forest: (AHSPersistentOrderedCollection new: anInteger). ^newOutline
withAll: aCollection |newOutline| newOutline := self new. newOutline forest: (AHSPersistentOrderedCollection withAll: aCollection). ^newOutline
</methods> <methods> VWHelp.AHSOutline class <category>accessing</category>
filenameSignal ^FilenameSignal isNil ifTrue: [FilenameSignal := Object informationSignal newSignal] ifFalse: [FilenameSignal]
fixupSignal "Answer the signal used to retrieve the collection of fixup blocks. When this signal is raised, the handler is expected to resume the process, passing an OrderedCollection as the value." ^ FixupSignal isNil ifTrue: [FixupSignal := Object informationSignal newSignal] ifFalse: [FixupSignal]
</methods> <methods> VWHelp.AHSOutline class <category>BOSS conversion</category>
binaryReaderBlockForVersion: oldVersion format: oldFormat "An attempt is being made to read instances of an obsolete version of this class. Answer a block that converts old instances (represented as an array or string of instance variable values) to new ones." "This is never used, but is requested anyway by BOSS" ^[:oldObj | self error: 'unexpected execution']
binaryRepresentationVersion ^'AHS 2.5'
getFixupCollectionFromSignal "Private - Answer the collection used to store fixup blocks. The collection is answered as a result of raising a signal." ^ Signal noHandlerSignal handle: [:ex | ex returnWith: OrderedCollection new] do: [self fixupSignal raiseRequest].
unboss: aCollection "Answer a new instance of this class, whose elements are the elements of aCollection. Handle instance variables appropriately" | newOutline fixups | newOutline := self new: aCollection size - 7. newOutline forest addAll: (aCollection copyFrom: 8 to: aCollection size). newOutline name: (aCollection at: 2); outlineLabel: (aCollection at: 3); nextID: (aCollection at: 4); fileFormat: (aCollection at: 5); glossaryDictionary: (aCollection at: 6); graphicsDictionary: (aCollection at: 7). fixups := self getFixupCollectionFromSignal. fixups add: [:fn | newOutline fixupWith: fn]. ^ newOutline
</methods> <methods> VWHelp.AHSOutline class <category>links</category>
newGlossaryLinkOn: aKey "Answer a new glossary hypertext link." ^AHSGlossaryLinkObject newLink: aKey asSymbol.
newHyperTextLinkOn: outlineName and: topicNumber "Answer a new hyper text link object." ^ AHSHyperTextLinkObject newLink: (Array with: outlineName with: topicNumber).
</methods> <methods> VWHelp.AHSCompositeCharacterBlock <category>accessing</category>
localComponent ^localComponent
localComponent: aTextView localComponent := aTextView.
localIndex ^localIndex
localIndex: anInteger localIndex := anInteger.
localTranslation ^localTranslation
localTranslation: aPoint localTranslation := aPoint.
</methods> <methods> VWHelp.AHSCompositeCharacterBlock <category>converting</category>
asLocalCharacterBlock "Answer a character block that is relative to the localComponent." ^CharacterBlock stringIndex: self localIndex character: self character boundingRectangle: (self translatedBy: self localTranslation negated)
</methods> <methods> VWHelp.AHSCompositeCharacterBlock class <category>instance creation</category>
stringIndex: anInteger translation: aPoint component: aView localBlock: aCharacterBlock "Answer an instance of the receiver with values set to the arguments." ^self new newStringIndex: anInteger character: aCharacterBlock character boundingRectangle: (aCharacterBlock translatedBy: aPoint); localIndex: aCharacterBlock stringIndex; localTranslation: aPoint; localComponent: aView
</methods> <methods> VWHelp.AHSPersistentSet <category>accessing</category>
add: anObject self odbDirty. ^super add: anObject.
remove: anObject ifAbsent: aBlock self odbDirty. ^super remove: anObject ifAbsent: aBlock.
</methods> <methods> VWHelp.AHSPersistentSet <category>gemstone replication support</category>
stValues: anArray "the super implementation of stValues uses the #add: method which marks the object dirty, but since we are just faulting in the object from Gemstone we are not making the object dirty so we must unmark it after it is faulted in" super stValues: anArray. self markNotDirty.
</methods> <methods> VWHelp.AHSPersistentSet <category>private</category>
atNewIndex: index put: anObject self odbDirty. ^super atNewIndex: index put: anObject
changeCapacityTo: newCapacity self odbDirty. ^super changeCapacityTo: newCapacity
fixCollisionsFrom: index self odbDirty. ^super fixCollisionsFrom: index
swap: oneElement with: otherElement self odbDirty. ^super swap: oneElement with: otherElement
</methods> <methods> VWHelp.AHSGraphicView <category>displaying</category>
displayOn: aGraphicsContext model notNil ifTrue: [model displayOn: aGraphicsContext]
preferredBounds ^model preferredBounds
</methods> <methods> VWHelp.AHSOHCPreferencesModel <category>interface opening</category>
postBuildWith: aBuilder super postBuildWith: aBuilder. self bookmarkDirectoryChanged.
preBuildWith: aBuilder super preBuildWith: aBuilder. aBuilder aspectAt: #expandOutlines put: (self adaptPreference: #expandOutlines); aspectAt: #bookmarkDirectory put: (self adaptPreference: #bookmarkDirectory); aspectAt: #specifiedDirectory put: (self adaptPreference: #specifiedDirectory); aspectAt: #outlineViewerStyle put: (self adaptPreference: #outlineViewerStyle). (aBuilder aspectAt: #bookmarkDirectory) onChangeSend: #bookmarkDirectoryChanged to: self.
</methods> <methods> VWHelp.AHSOHCPreferencesModel <category>actions</category>
selectDirectory "Use a dialog to select the directory." | aDirectory | aDirectory := Dialog requestFileName: 'Choose a Directory' default: self specifiedDirectory value version: #mustBeOld. (aDirectory notNil and: [aDirectory isEmpty not]) ifTrue: [ aDirectory asFilename isDirectory ifFalse: [aDirectory := aDirectory asFilename directory asString]. self specifiedDirectory value: aDirectory asString].
</methods> <methods> VWHelp.AHSOHCPreferencesModel <category>builder accessing</category>
bookmarkDirectory ^self builder aspectAt: #bookmarkDirectory
specifiedDirectory ^self builder aspectAt: #specifiedDirectory
</methods> <methods> VWHelp.AHSOHCPreferencesModel <category>updating</category>
bookmarkDirectoryChanged self bookmarkDirectory value == #specified ifTrue: [self aisEnable: #(#specifiedDirectory #selectDirectory)] ifFalse: [self aisDisable: #(#specifiedDirectory #selectDirectory)].
</methods> <methods> VWHelp.AHSOHCPreferencesModel class <category>class initialization</category>
initialize self addPreferenceSpec: #bookmarkSpec. self addPreferenceSpec: #outlinerSpec.
</methods> <methods> VWHelp.AHSOHCPreferencesModel class <category>help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#currentDirectoryRB -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'The Bookmark file will now be saved in the current directory.' runs: (RunArray runs: #(61) 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: 'Select this option to save the Bookmark file in the current directory.' runs: (RunArray runs: #(70) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#specifiedDirectory -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'When the radio button is selected, the Bookmark file will be stored in this directory.' runs: (RunArray runs: #(86) values: #(nil))); yourself) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'The Bookmark file will be stored in this directory.' runs: (RunArray runs: #(51) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#expandOutlines -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Outlines will open will all topics fully expanded. Deselect this checkbox to have outlines open with no expansion.' runs: (RunArray runs: #(115) 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: 'Outlines will open with no topics expanded. Select this checkbox to have all outlines open already expanded.' runs: (RunArray runs: #(108) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#linkGraphicsRB -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Outlines with graphics marked as "embedded" will not embed - the graphics will appear as hyperlinks.' runs: (RunArray runs: #(44 8 48) values: #(nil #bold 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: 'Select this option to present all graphics as links within the text.' runs: (RunArray runs: #(68) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#outlinerBox -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'This section provides some configuration options of the Outliner.' runs: (RunArray runs: #(65) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#outlineDirectoryRB -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'The Bookmark file will now be stored in the same location as the outline file.' runs: (RunArray runs: #(78) values: #(nil))); yourself) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Select this option to store Bookmark files in the same location as the outline file.' runs: (RunArray runs: #(84) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#specifiedDirectoryRB -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'The Bookmark file will be stored in the directory shown. Use the Select... button to change the directory.' runs: (RunArray runs: #(65 9 32) values: #(nil #bold 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: 'Select this option to specify the directory where the Bookmark file is to be stored.' runs: (RunArray runs: #(84) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#bookmarkBox -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Define the location of the bookmark file. Users may create bookmarks when viewing an outline.' runs: (RunArray runs: #(94) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#embedGraphicsRB -> ((AHSPersistentDictionary new) add: (#on -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Outlines with graphics marked as "embedded" will display with the graphics embedded in the text.' runs: (RunArray runs: #(44 4 48) values: #(nil #bold 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: 'Select this option to embed graphics within the text when possible.' runs: (RunArray runs: #(67) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#selectDirectory -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Please choose the neighboring radio button to enable this button.' runs: (RunArray runs: #(65) values: #(nil))); yourself) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Presents a dialog used to specify the directory where Bookmark files will be stored.' runs: (RunArray runs: #(84) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); yourself))
</methods> <methods> VWHelp.ArborSearchAndReplace <category>private</category>
doSlaveClose ^true
handleFailedSearch ^self highlightNextMatchFromTop
highlightNextMatch "Answer true if a match was found, false if not." ^self paragraphEditor aisFindAndSelect: self searchString value ignoreCase: self ignoreCase value
highlightNextMatchFromTop self paragraphEditor deselect. self paragraphEditor selectionStartIndex: 1 stopIndex: 1. ^self highlightNextMatch
makeCapitalizationOf: aString match: rootString "By default, only worry about the capitalization of the first letter and only if it's to be uppercased." | result | result := String with: (rootString first isUppercase ifTrue: [aString first asUppercase] ifFalse: [aString first]). ^aString size > 1 ifTrue: [result, (aString copyFrom: 2 to: aString size)] ifFalse: [result]
replaceSelection self paragraphEditor deselect; replaceSelectionWith: (self makeCapitalizationOf: replaceString value match: self paragraphEditor selection); selectAndScroll.
setReplaceEnablement self aisSetEnablementOf: #(replaceButton replaceAllButton) to: (self searchString value size > 0 and: [self replaceString value size > 0]).
setSearchEnablement self aisSetEnablementOf: #findNextButton to: self searchString value size > 0. self setReplaceEnablement.
setWindowLabel (self builder notNil and: [self builder window notNil]) ifTrue: [| ss | (ss := self searchString value) isEmpty not ifTrue: [ss := ' - ', ss]. self builder window label: 'Find/Replace', ss].
</methods> <methods> VWHelp.ArborSearchAndReplace <category>interface opening</category>
openInterface: aSpec ^self paragraphEditor isNil ifTrue: [Dialog warn: 'A ParagraphEditor must be specified!'] ifFalse: [ self parentWindow isNil ifTrue: [self parentWindow: self paragraphEditor view topComponent]. super openInterface: aSpec]
postBuildWith: aBuilder super postBuildWith: aBuilder. self searchString changed: #value. self replaceString changed: #value. (aBuilder componentAt: #searchString) widget controller continuousAccept: true. (aBuilder componentAt: #replaceString) widget controller continuousAccept: true. self setWindowLabel.
</methods> <methods> VWHelp.ArborSearchAndReplace <category>actions</category>
doSearch "Answer true if the search was successful, false if nothing found." | range | range := self paragraphEditor selectionStartIndex to: self paragraphEditor selectionStopIndex - 1. ^self highlightNextMatch or: [self handleFailedSearch or: [ self paragraphEditor selectFrom: range first to: range last. Dialog warn: 'Search item not found.'. false]].
doSearchAndReplace "Answer true if an item was replaced, false if none." | result | "In VW 2.5 and 2.5.1, the method #equivalentTo:ignoreCase: does the opposite of what is expected, although it has been fixed in later releases. To make this code generic, we perform a little dance using exclusive-or and inversion to ensure we pass the correct value to the #findString:... method." (result := self paragraphEditor selection string equivalentTo: self searchString value ignoreCase: (self ignoreCase value xor: ($A equivalentTo: $a ignoreCase: true)) not) ifTrue: [self replaceSelection]. self doSearch. ^result
doSearchAndReplaceAll "Answer true if an item was replaced, false if none." | result range | range := self paragraphEditor selectionStartIndex to: self paragraphEditor selectionStopIndex - 1. (result := self highlightNextMatchFromTop) ifTrue: [ [self replaceSelection. self highlightNextMatch] whileTrue] ifFalse: [ self paragraphEditor selectFrom: range first to: range last. Dialog warn: 'Search item not found.']. ^result
</methods> <methods> VWHelp.ArborSearchAndReplace <category>initialize-release</category>
beEnhanced "A placeholder. Subclasses may wish to do something to effect an 'enhanced' set of options or widgets."
beStandard "A placeholder. Subclasses may wish to do something to effect a 'standard' set of options or widgets."
initialize super initialize. self allowUserPlacement: true. self relativeOrigin: #mouse. self searchString compute: [ self setSearchEnablement. self setWindowLabel]. self replaceString compute: [self setReplaceEnablement].
</methods> <methods> VWHelp.ArborSearchAndReplace <category>find & replace</category>
replace: findString with: replacementString ignoreCase: ignoreBoolean self searchString value: findString string. self ignoreCase value: ignoreBoolean. replacementString isNil ifTrue: [self doSearch] ifFalse: [ self replaceString value: replacementString string. self doSearchAndReplace].
</methods> <methods> VWHelp.ArborSearchAndReplace <category>aspects</category>
ignoreCase ^ignoreCase isNil ifTrue: [ignoreCase := true asValue] ifFalse: [ignoreCase]
replaceString ^replaceString isNil ifTrue: [replaceString := String new asValue] ifFalse: [replaceString]
searchString ^searchString isNil ifTrue: [searchString := String new asValue] ifFalse: [searchString]
</methods> <methods> VWHelp.ArborSearchAndReplace <category>accessing</category>
paragraphEditor ^paragraphEditor
paragraphEditor: aParagraphEditor paragraphEditor := aParagraphEditor.
</methods> <methods> VWHelp.ArborSearchAndReplace class <category>find & replace</category>
find: findString ignoreCase: ignoreBoolean in: aParagraphEditor ^self replace: findString with: nil ignoreCase: ignoreBoolean in: aParagraphEditor
find: findString in: aParagraphEditor ^self find: findString ignoreCase: true in: aParagraphEditor
replace: findString with: replaceString ignoreCase: ignoreBoolean in: aParagraphEditor | model | model := self new. model paragraphEditor: aParagraphEditor. model open. ^model replace: findString with: replaceString ignoreCase: ignoreBoolean.
replace: findString with: replaceString in: aParagraphEditor ^self replace: findString with: replaceString ignoreCase: true in: aParagraphEditor
searchAndReplaceIn: aParagraphEditor | mdl | mdl := self new. mdl searchString value: aParagraphEditor selection string. mdl paragraphEditor: aParagraphEditor. mdl open. ^mdl
</methods> <methods> VWHelp.AHSToolbarTextEditorController <category>private</category>
emphasis: emph1 includes: emph2 ^(self emphasisAsArray: emph1) includes: emph2
emphasisAsArray: anEmphasis ^(anEmphasis isSequenceable and: [anEmphasis isSymbol not]) ifTrue: [anEmphasis] ifFalse: [Array with: anEmphasis]
fixIndentationFrom: start to: stop "Ensure that the indentation is consistent from start to stop. This means that if start is in the middle of a line, have it inherit the line's indentation, and if stop is in the middle of a line, continue that indentation to the end of the line." | indentEmphasis indentDepthBlock lines offset | self deselect. indentEmphasis := AHSIndentableComposedText indentKey->0. indentDepthBlock := [:emphasis | ((self emphasisAsArray: emphasis) detect: [:emph | emph supersedesAsTextEmphasis: indentEmphasis] ifNone: [indentEmphasis]) value]. (lines := self lineRangesBetween: start and: stop) isEmpty not ifTrue: [ lines first first < start ifTrue: [ offset := (indentDepthBlock value: (self text rawEmphasisAt: start - 1)) - (indentDepthBlock value: (self text rawEmphasisAt: start)). offset ~= 0 ifTrue: [self changeIndentFrom: start to: stop by: offset]]. ((stop + 1) <= lines last last) ifTrue: [ offset := (indentDepthBlock value: (self text rawEmphasisAt: stop)) - (indentDepthBlock value: (self text rawEmphasisAt: stop + 1)). offset ~= 0 ifTrue: [self changeIndentFrom: stop + 1 to: lines last last by: offset]]]. self restoreSelection.
lineRangeAt: anIndex "Answer an interval describing the start and end positions of the line encompassing anIndex. The answered range WILL include the terminating carraige return (if one exists). If anIndex is at the end of the text and the text is empty or the last character is a CR, the start will be less than the stop." | end start | anIndex > self text size ifTrue: [end := self text size] ifFalse: [ end := anIndex. [end < self text size and: [(self text at: end) ~= Character cr]] whileTrue: [end := end + 1]]. start := anIndex - 1. [start > 0 and: [(self text at: start) ~= Character cr]] whileTrue: [start := start - 1]. start := start + 1. ^start to: end
lineRangesBetween: start and: stop "Answer a collection of intervals describing the start and end positions of all lines intercepted by start and stop." | ranges end | end := stop = 0 ifTrue: [1] ifFalse: [self text size min: stop]. ranges := OrderedCollection new. ranges add: (self lineRangeAt: start). [ranges last last < end] whileTrue: [ranges addLast: (self lineRangeAt: ranges last last + 1)]. ^ranges reject: [:r | r first > r last]
resetState "Maintain emphasisHere so buttons can take focus without losing it" |oldEmphasisHere| oldEmphasisHere := emphasisHere. super resetState. emphasisHere := oldEmphasisHere
selectionAllEmphasizedWith: anEmphasis "Does the entire selection have the emphasis anEmphasis?" |seln| seln := self selection. seln isEmpty ifTrue: [^self emphasis: emphasisHere includes: anEmphasis]. 1 to: seln size do: [:i | (self emphasis: (seln rawEmphasisAt: i) includes: anEmphasis) ifFalse: [^false]]. ^true
silentCut "Keep indentation consistent." super silentCut. self fixIndentationFrom: self selectionStartIndex to: self selectionStopIndex.
</methods> <methods> VWHelp.AHSToolbarTextEditorController <category>editing-functions</category>
backspaceKey: aCharEvent "Keep indentation consistent." self selectionStartIndex < self selectionStopIndex ifTrue: [super backspaceKey: aCharEvent] ifFalse: [ super backspaceKey: aCharEvent. self fixIndentationFrom: self selectionStartIndex to: self selectionStopIndex].
findNext "Search for the next entry of the selected text." ^self findNextIgnoreCase: false
findNext: aString ignoreCase: aBoolean "Search for the next entry of the aString." | index | index := (self text findString: aString startingAt: self selectionStopIndex ignoreCase: aBoolean useWildcards: false) first. index = 0 ifTrue: [^false]. self selectAndScrollFrom: index to: index + aString size - 1. ^ true
findNextIgnoreCase: aBoolean "Search for the next entry of the selected text." ^self findNext: self selection ignoreCase: aBoolean
</methods> <methods> VWHelp.AHSToolbarTextEditorController <category>editing</category>
changeColor |clr| clr := AHSUtils pickColor: ColorValue black. clr notNil ifTrue: [self toggleEmphasis: #color->clr] ifFalse: [self restoreSelection]
changeIndentBy: indentOffset "Change the indent level for the lines identified by the selection." self deselect. (self selectionStartIndex > self text size and: [self text size isZero or: [(self text at: self text size) = Character cr]]) ifTrue: [ "Since the indentation is an emphasis, be sure there's a character there to emphasize so it will 'stick'." self replaceFrom: self text size + 1 to: self text size with: ((String with: Character cr) asText emphasizeAllWith: emphasisHere)]. (self lineRangesBetween: self selectionStartIndex and: self selectionStopIndex - 1) do: [:range | self changeIndentFrom: range first to: range last by: indentOffset]. self indentEmphasisHereBy: indentOffset. self restoreSelectionKeepingEmphasisHere.
changeIndentFrom: start to: stop by: indentOffset | sel indentEmphasis skip oldSelStart oldSelStop later | oldSelStart := self selectionStartIndex. oldSelStop := self selectionStopIndex. self selectionStartIndex: start stopIndex: stop + 1. sel := self selection. indentEmphasis := AHSIndentableComposedText indentKey->indentOffset. skip := Set new. later := Set new. sel copy emphasesDo: [:emph :interval | (skip includes: interval) not ifTrue: [ (indentEmphasis supersedesAsTextEmphasis: emph) ifTrue: [ later remove: interval ifAbsent: []. skip add: interval. sel addEmphasis: ((indentOffset positive or: [indentOffset abs < emph value]) ifTrue: [Array with: emph key->(emph value + indentOffset)] ifFalse: [#()]) removeEmphasis: ((indentOffset negative and: [indentOffset abs >= emph value]) ifTrue: [Array with: indentEmphasis] ifFalse: [#()]) allowDuplicates: false from: interval first to: interval last] ifFalse: [later add: interval]]]. indentOffset positive ifTrue: [ later do: [:interval | sel addEmphasis: (Array with: indentEmphasis) removeEmphasis: #() allowDuplicates: false from: interval first to: interval last]]. self replaceSelectionWith: sel saveSelectionForUndo: false. self selectionStartIndex: oldSelStart stopIndex: oldSelStop.
decreaseIndent "Decrease the indent level for the lines identified by the selection by 1." self changeIndentBy: -1.
deleteKey: aCharEvent "Keep indentation consistent." self selectionStartIndex < self selectionStopIndex ifTrue: [super deleteKey: aCharEvent] ifFalse: [ super deleteKey: aCharEvent. self fixIndentationFrom: self selectionStartIndex to: self selectionStopIndex].
increaseIndent "Increase the indent level for the lines identified by the selection by 1." self changeIndentBy: 1.
indentEmphasisHereBy: indentOffset | txt indentEmphasis removeEmphasis | txt := 'X' asArborHypertext emphasizeAllWith: emphasisHere. indentEmphasis := AHSIndentableComposedText indentKey->0. txt emphasesLike: indentEmphasis do: [:emph | indentEmphasis value: emph value]. removeEmphasis := (indentEmphasis value + indentOffset) <= 0. txt addEmphasis: (removeEmphasis ifTrue: [#()] ifFalse: [Array with: (indentEmphasis value: indentEmphasis value + indentOffset)]) removeEmphasis: (removeEmphasis ifTrue: [Array with: indentEmphasis] ifFalse: [#()]) allowDuplicates: false. emphasisHere := txt emphasisAt: 1.
toggleEmphasis: anEmphasis |seln| seln := self selection. self deselect. (self selectionAllEmphasizedWith: anEmphasis) ifTrue: [self selection isEmpty ifTrue: [(emphasisHere isKindOf: Array) ifTrue: [emphasisHere := emphasisHere copyWithout: anEmphasis] ifFalse: [emphasisHere := nil]] ifFalse: [self replaceSelectionWith: (seln addEmphasis: #() removeEmphasis: (Array with: anEmphasis) allowDuplicates: false)]] ifFalse: [self selection isEmpty ifTrue: [emphasisHere isNil ifTrue: [emphasisHere := anEmphasis] ifFalse: [(emphasisHere isKindOf: Array) ifTrue: [emphasisHere := emphasisHere copyWith: anEmphasis] ifFalse: [emphasisHere := Array with: emphasisHere with: anEmphasis]]] ifFalse: [self replaceSelectionWith: (seln addEmphasis: (Array with: anEmphasis) removeEmphasis: #() allowDuplicates: false)]]. self restoreSelectionKeepingEmphasisHere.
</methods> <methods> VWHelp.AHSToolbarTextEditorController <category>selecting</category>
restoreSelection self selectFrom: self selectionStartIndex to: self selectionStopIndex - 1. keyboardProcessor notNil ifTrue: [keyboardProcessor requestActivationFor: self]
restoreSelectionKeepingEmphasisHere | emph | emph := emphasisHere. self restoreSelection. emphasisHere := emph.
selectAt: characterIndex "When positioning, ensure that the default emphasis is set by the current location, not by the first character in the editor." super selectAt: characterIndex. self setEmphasisHere.
</methods> <methods> VWHelp.AHSToolbarTextEditorController <category>menu messages</category>
cut "Keep indentation consistent." super cut. self fixIndentationFrom: self selectionStartIndex to: self selectionStopIndex.
paste "Keep indentation consistent." super paste. self fixIndentationFrom: self selectionStartIndex to: self selectionStopIndex - 1.
undo "Keep indentation consistent." super undo. self fixIndentationFrom: self selectionStartIndex to: self selectionStopIndex - 1.
</methods> <methods> VWHelp.AHSToolbarTextEditorController <category>accessing</category>
deactivate "Make this text field not be the keyboard focus" view hasFocus: false. self view isOpen ifTrue: [self resetTypein. self controlTerminate. self focusOut]
</methods> <methods> VWHelp.AHSToolbarTextEditorController <category>view access</category>
view: aView super view: aView. self paragraph changeClassToThatOf: AHSIndentableComposedText new.
</methods> <methods> VWHelp.AHSHelpTextEditorController <category>searching</category>
findNext "Search for the next entry of the selected text." | index | index := (self text findString: self selection startingAt: self selectionStopIndex ignoreCase: true useWildcards: false) first. index = 0 ifTrue: [^false]. self selectAndScrollFrom: index to: index + self selection size - 1. ^true
</methods> <methods> VWHelp.AHSHelpTextEditorController <category>text updates</category>
updateHyperLinkForLastWord "If a hyperlink is added to the very last word in this text, then add a few blank spaces at the end, in order to avoid text style assimilation when the text is expanded." (self selectionStopIndex > self model value size) ifTrue: [self model value: (self model value , ' ' asText)]
</methods> <methods> VWHelp.AHSHelpTextEditorController <category>selecting</category>
selectFrom: start to: stop "When selecting a region, also set the default emphasis." super selectFrom: start to: stop. self setEmphasisHere.
</methods> <methods> VWHelp.ArborOutlineLabeledObjectHolder <category>private</category>
iconForSelected: isSelected inTransition: isInTransition "Build the appropriate selector and fetch the necessary icon." | set exp trans sel | set := self iconSet. exp := self isExpanded ifTrue: ['expanded'] ifFalse: [ self canBeExpanded ifTrue: ['contracted'] ifFalse: ['empty']]. trans := (isInTransition and: [exp ~= 'empty']) ifTrue: ['Transition'] ifFalse: ['']. sel := isSelected ifTrue: ['Selected'] ifFalse: ['Deselected']. ^set perform: (exp, trans, sel) asSymbol
iconSetNamed: aName ^ArborIconSet iconSetNamed: aName
indentDistance ^self indentLevel * self indentOffset
indentOffset "Pixel value - how far to indent for each level." ^self iconSet indentOffset
indentString ^(String new: 10) writeStream next: self indentLevel * 3 put: Character space; contents
</methods> <methods> VWHelp.ArborOutlineLabeledObjectHolder <category>accessing</category>
canBeExpanded ^canBeExpanded
canBeExpanded: aBoolean canBeExpanded := aBoolean.
displayBlock ^displayBlock
displayBlock: aBlockClosure displayBlock := aBlockClosure
emphasis ^emphasis
emphasis: anEmphasis emphasis := anEmphasis
iconSet ^(iconSet isSymbol or: [iconSet isNil]) ifTrue: [self iconSetNamed: iconSet] ifFalse: [iconSet]
iconSet: aSymbol iconSet := aSymbol.
indentLevel ^indentLevel
indentLevel: anInteger indentLevel := anInteger.
isExpanded ^isExpanded
isExpanded: aBoolean isExpanded := aBoolean.
parent ^parent
parent: anOutlineLabeledObjectHolder parent := anOutlineLabeledObjectHolder.
value ^object
value: anObject object := anObject.
</methods> <methods> VWHelp.ArborOutlineLabeledObjectHolder <category>printing</category>
displayString "Generally shouldn't be used, but if it is then include the indentation with the string." | str | str := self value isNil ifTrue: [self indentString] ifFalse: [self indentString, (self displayBlock value: object)]. ^self canBeExpanded ifTrue: [str, '...'] ifFalse: [str]
printOn: aStream super printOn: aStream. aStream nextPut: $(; print: self value; nextPut: $).
</methods> <methods> VWHelp.ArborOutlineLabeledObjectHolder <category>testing</category>
hasChildren ^self isExpanded or: [self canBeExpanded]
isHot: aPoint ^self hasChildren and: [self iconSet isHot: aPoint - (self indentDistance @ 0)]
</methods> <methods> VWHelp.ArborOutlineLabeledObjectHolder <category>comparing</category>
= anObject ^(anObject isKindOf: self class) ifTrue: [self == anObject or: [self value = anObject value]] ifFalse: [self value = anObject]
hash ^self value hash
</methods> <methods> VWHelp.ArborOutlineLabeledObjectHolder <category>converting</category>
asPureText "Answer the 'pure' text - without any indentation." ^(self displayBlock value: object) asText emphasizeAllWith: self emphasis
asText "Answer the text representation of myself, including indentation." ^self indentString asText, self asPureText
asVisualComponentWhereSelected: isSelected inTransition: isInTransition attributes: aTextAttributes | label | label := ArborCenteredLabelAndIcon with: self asPureText attributes: aTextAttributes offset: self indentDistance @ 0. label icon: (self iconForSelected: isSelected inTransition: isInTransition). label gap: 2. ^BoundedWrapper on: label at: 0@0
</methods> <methods> VWHelp.ArborOutlineLabeledObjectHolder <category>initialize-release</category>
initialize self iconSet: #default. self displayBlock: [:obj | obj displayString]
</methods> <methods> VWHelp.ArborOutlineLabeledObjectHolder class <category>instance creation</category>
new ^self newValue: nil indentLevel: 0 parent: nil
newValue: anObject indentLevel: anInteger parent: anOutlineLabeledObjectHolderOrNil ^super new initialize value: anObject; indentLevel: anInteger; parent: anOutlineLabeledObjectHolderOrNil
</methods> <methods> VWHelp.AHSReporter <category>private</category>
writeBodyTo: aStream "Write each of the topic texts to aStream" rows do: [:row | row writeTopicBodyTo: aStream].
writeOutlineAsText "Answer the Outline Report as a Text object" | textStream | textStream := TextStream on: ''. self writeOutlineWithTOCOn: textStream. ^ textStream contents
writeOutlineWithTOCOn: aStream "Answer the Outline Report as a Text object" rows do: [:row | row writeTopicLineTo: aStream]. self writeSeparatorTo: aStream; writeBodyTo: aStream.
writeSeparatorTo: aStream aStream nextPutAll: '**********************************************************************' ; cr.
</methods> <methods> VWHelp.AHSReporter <category>initialization</category>
initFromOutline: anOutline "Private - Initialize the receiver with information found in anOutline." rows := OrderedCollection new. anOutline topNodesDo: [:aTopic | rows add: (AHSReporterData onTopic: aTopic)].
</methods> <methods> VWHelp.AHSReporter <category>writing</category>
text "answers the report as a Text object" ^self writeOutlineAsText
writeToFileNamed: aString "Writes the Outline Report to the file named aString" | ws | ws := aString asFilename writeStream. [self writeOutlineWithTOCOn: ws] ensure: [ws close].
</methods> <methods> VWHelp.AHSReporter class <category>instance creation</category>
on: anOutline "creates a HelpReport from the contents of anOutline" ^ self new initFromOutline: anOutline
</methods> <methods> VWHelp.AHSTree <category>accessing</category>
children: anOrderedCollectionOfTrees "Set the children Trees" self odbDirty. super children: anOrderedCollectionOfTrees
data "Answer the data object associated with the receiver" ^data
data: anObject "Set the data object associated with the receiver" self odbDirty. data := anObject
dataTextValue "Answer a hyper text represenation of the text held on to by the data." ^ self data text asAHSHyperText.
parent: aTree "Should only be called from the receiver or from another Tree" self odbDirty. super parent: aTree
treeTop "Answer a copy of the receiver which represents the top most element of the tree." | result | result := self copy. result children: OrderedCollection new. ^ result.
</methods> <methods> VWHelp.AHSTree <category>adding</category>
addChild: aTree "Add aTree to the end of the ordered list of children" self odbDirty. children odbDirty. super addChild: aTree
addChild: aTree after: aSiblingTree "Add aTree to the ordered list of children, after aSiblingTree. If aSiblingTree is nil, then add it to the beginning." self odbDirty. children odbDirty. super addChild: aTree after: aSiblingTree
</methods> <methods> VWHelp.AHSTree <category>removing</category>
removeChild: aTree ifAbsent: anExceptionBlock "Remove aTree as one of the receiver's children. If no child is equal to aTree, answer the result of evaluating anExceptionBlock. Otherwise, answer the argument, aTree." self odbDirty. children odbDirty. ^super removeChild: aTree ifAbsent: anExceptionBlock
</methods> <methods> VWHelp.AHSTree <category>copying</category>
postCopy super postCopy. data := data copy
</methods> <methods> VWHelp.AHSTree <category>converting</category>
asText ^self data asText.
</methods> <methods> VWHelp.AHSTree <category>printing</category>
printOn: aStream "print data out" aStream nextPutAll: self class name; nextPut: $(; nextPutAll: self data printString; nextPut: $); cr
</methods> <methods> VWHelp.AHSTree <category>testing</category>
dataHasText "Answer true if the data held on to by the receiver has non-empty text." ^ self data text isEmpty not
</methods> <methods> VWHelp.AHSTree <category>odb support</category>
odbDeepRefresh "Refresh self and everything underneath me." self odbRefreshIfNotDirty. self children odbRefreshIfNotDirty. self children do: [:aChild | aChild odbDeepRefresh]. self data odbRefreshIfNotDirty.
</methods> <methods> VWHelp.AHSTree class <category>instance creation</category>
data: anObject ^self new data: anObject
</methods> <methods> VWHelp.AHSTree class <category>boss conversion</category>
binaryRepresentationVersion ^'Help System version 2.0'
</methods> <methods> VWHelp.AHSHelpTextEditorView <category>model accessing</category>
editString: aString "The paragraph to be displayed is created from the characters in aString." self editText: aString
editText: aTextOrString "Set the text of the receiver to be a non-nil text value." super editText: (self nonNilText: aTextOrString).
getContents "Answer the contents to be displayed by the receiver." ^ self nonNilText: model value.
newText: aText "Set aText to be the text model for the receiver. If aText is nil, it's value will be substituted with a text object compatible with the receiver." self editText: aText.
</methods> <methods> VWHelp.AHSHelpTextEditorView <category>conversion</category>
compatibleTextFrom: aTextOrString "Private - Answer a form of aTextOrString which is guaranteed to be compatible with the receiver." ^ aTextOrString asAHSHyperText.
nonNilText: aTextOrString "Private - Answer a non-nil instance of aTextOrString. If aTextOrString is non-nil, answer aText, otherwise answer a new instance of a text object compatible with the receiver." ^ aTextOrString == nil ifTrue: [self compatibleTextFrom: ''] ifFalse: [self compatibleTextFrom: aTextOrString].
</methods> <methods> VWHelp.AHSHelpTextEditorView <category>private</category>
backgroundColor "Answer the receiver's background color." ^ColorValue white
displayInsertionPointFor: aCharacterBlock on: aGraphicsContext "Display the insertion point on aGraphicsContext for aCharacterBlock." ((self controller respondsTo: #readOnly) not or: [self controller readOnly not]) ifTrue: [super displayInsertionPointFor: aCharacterBlock on: aGraphicsContext].
</methods> <methods> VWHelp.AHSHelpTextEditorView <category>controller access</category>
defaultControllerClass "Answer the default controller class for the receiver." ^AHSHelpTextEditorController
</methods> <methods> VWHelp.AHSHelpTextEditorView <category>initialize-release</category>
initialDisplayContents "Answer a text compatible with the receiver." ^AHSIndentableComposedText new text: (self nonNilText: nil).
</methods> <methods> VWHelp.AHSToolbarHypertextEditor <category>actions</category>
engageGlossary: aText "The user has clicked on a glossary entry. Notify the interested party sending the selected text." ^ self changed: #engageGlossary with: aText
engageHyperGraphic: aLink "The controller has detected a graphic link access. Notify interested party." ^ self changed: #engageHyperGraphic with: aLink
engageHyperlink: aLink "The controller has detected a link access. Notify interested parties." ^self changed: #engageHyperlink with: aLink
</methods> <methods> VWHelp.AHSToolbarHypertextEditor <category>event handlers</category>
link "Private - The user has requested the link operation. Trigger the link event." self changed: #createLink.
openGlossary "Private - The user has requested the open glossary operation. Trigger the event." self changed: #openGlossary
openHyperGraphics "Private - The user has requested the open hypergraphic link operation. Trigger the event." self changed: #openHyperGraphics.
</methods> <methods> VWHelp.AHSToolbarHypertextEditor <category>hyperlinks</category>
firstAvailableHyperGraphic "Answer the first available hyper graphic from the selected text." ^ self textController selection asAHSHyperText firstAvailableHyperGraphic.
updateHyperLinkForLastWord "Update the hyper text link for the last word." self textController updateHyperLinkForLastWord
</methods> <methods> VWHelp.AHSToolbarHypertextEditor <category>private-toolbar</category>
addHyperlinkingTo: aMenu | m | m := Menu new addItem: ((MenuItem labeled: 'Hypertext') nameKey: #hypertext; value: #link; labelImage: (self bound: self class linkIcon)); addItem: ((MenuItem labeled: 'Glossary') nameKey: #glossary; value: #openGlossary; labelImage: (self bound: self class glossaryIcon)); addItem: ((MenuItem labeled: 'Hypergraphic') nameKey: #hypergraphic; value: #openHyperGraphics; labelImage: (self bound: self class graphicsIcon)). aMenu aisAddMenu: m withSeparator: true.
defaultToolBarMenu | menu | menu := super defaultToolBarMenu. self addHyperlinkingTo: menu. ^menu
</methods> <methods> VWHelp.AHSToolbarHypertextEditor <category>menu messages</category>
findNextFor: aHelpTextEditorController "Search for the next entry of the selected text within the same piece of text." aHelpTextEditorController findNext
removeLinkFrom: aTextController | selectedText | selectedText := aTextController selection. selectedText removeAllHyperLinks. aTextController replaceSelectionWith: selectedText; accept. self changed: #linkRemoved. aTextController restoreSelection.
</methods> <methods> VWHelp.AHSToolbarHypertextEditor <category>private</category>
controllerClass "Private - Answer the controller used by the receiver." ^ AHSHelpTextEditorController
editorViewClass "Private - Answer the view used by the receiver." ^ AHSHelpTextEditorView
replaceEditorMenu "Private - Replace the default controller menu with one appropriate for the receiver." self textController menuHolder: self textMenu
replaceEditorView "Private - Replace the default controller view with one appropriate for the receiver." self textView changeClassToThatOf: self editorViewClass basicNew. self textView widgetState colors: (LookPreferences new backgroundColor: ColorValue white).
textMenu "Answer a text menu that provides operations for style changes and managing hyperlinks" | menu hyperMenu | menu := super textMenu. hyperMenu := Menu new addItemLabel: 'Hypertext' value: #link; addItemLabel: 'Graphic' value: #openHyperGraphics; addItemLabel: 'Glossary' value: #openGlossary; addItemGroupLabels: #('Remove') values: (Array with: [:aHelpTextEditorController | self removeLinkFrom: aHelpTextEditorController]). menu aisAddItem: ((MenuItem labeled: 'Find Next') value: [:aHelpTextEditorController | self findNextFor: aHelpTextEditorController]) after: (menu atNameKey: #findReplace); aisAddItem: ((MenuItem labeled: 'Hyperlinks') submenu: hyperMenu) after: (menu atNameKey: #noEmphasis). ^menu
</methods> <methods> VWHelp.AHSToolbarHypertextEditor class <category>resources</category>
glossaryIcon ^OpaqueImage figure: self glossaryImage shape: self glossaryMask
graphicsIcon ^OpaqueImage figure: self graphicsImage shape: self graphicsMask
linkIcon ^OpaqueImage figure: self linkImage shape: self linkMask
</methods> <methods> VWHelp.AHSToolbarHypertextEditor class <category>help info (AHS)</category>
ahsHelpData ^(AHSHelpClassData languages: #(#English) widgetData: ((AHSPersistentDictionary new) add: (#paste -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Paste contents of clipboard' runs: (RunArray runs: #(27) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#serif -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove serif style' runs: (RunArray runs: #(11 5 6) values: #(nil #serif nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#large -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove large style' runs: (RunArray runs: #(11 5 6) values: #(nil #large nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#copy -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Copy selected text to clipboard' runs: (RunArray runs: #(31) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#underline -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove underline style' runs: (RunArray runs: #(11 9 6) values: #(nil #underline nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#bold -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove bold style' runs: (RunArray runs: #(11 4 6) values: #(nil #bold nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#spellCheckButton -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Perform a spell check on the text.' runs: (RunArray runs: #(34) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#findReplace -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: nil outlineLinks: nil)); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Find and optionally replace text.' runs: (RunArray runs: #(33) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#italic -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Add/remove italic style' runs: (RunArray runs: #(11 6 6) values: #(nil #italic nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#color -> ((AHSPersistentDictionary new) add: (#disabled -> (AHSHelpData texts: #(nil) outlineLinks: #(nil))); add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Change the color of the selected text.' runs: (RunArray runs: #(11 1 1 1 1 1 22) values: ((Array new: 7) at: 2 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> (ColorValue scaledRed: 8191 scaledGreen: 4915 scaledBlue: 2056)); yourself); at: 3 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> ColorValue blue); yourself); at: 4 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> (ColorValue scaledRed: 0 scaledGreen: 4112 scaledBlue: 4112)); yourself); at: 5 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> ColorValue purple); yourself); at: 6 put: ((Array new: 2) at: 1 put: #bold; at: 2 put: (#color -> ColorValue red); yourself); yourself))); yourself) outlineLinks: #(nil))); yourself)); add: (#text -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Edit text here' runs: (RunArray runs: #(14) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#cut -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Cut selected text to clipboard' runs: (RunArray runs: #(30) values: #(nil))); yourself) outlineLinks: #(nil))); yourself)); add: (#indent -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Increase the indent of all selected text (shift text right).' runs: (RunArray runs: #(60) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#outdent -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Reduce the indent of all selected text (shift text left).' runs: (RunArray runs: #(57) values: #(nil))); yourself) outlineLinks: nil)); yourself)); add: (#hypergraphic -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Link to a graphic. The graphic may open in a separate window or be embedded in the text.' runs: (RunArray runs: #(4 85) values: ((Array new: 2) at: 1 put: ((Array new: 2) at: 1 put: (#color -> ColorValue blue); at: 2 put: #italic; yourself); yourself))); yourself) outlineLinks: nil)); yourself)); add: (#glossary -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Link the selected text to the outline''s glossary.' runs: (RunArray runs: #(4 45) values: ((Array new: 2) at: 1 put: ((Array new: 2) at: 1 put: (#color -> ColorValue darkRed); at: 2 put: #italic; yourself); yourself))); yourself) outlineLinks: nil)); yourself)); add: (#hypertext -> ((AHSPersistentDictionary new) add: (#default -> (AHSHelpData texts: ((Array new: 1) at: 1 put: (#{Smalltalk.Text} value string: 'Link the selected text to another entry, either in this outline or in an outline in another file.' runs: (RunArray runs: #(4 93) values: ((Array new: 2) at: 1 put: ((Array new: 2) at: 1 put: #underline; at: 2 put: (#color -> ColorValue darkGreen); yourself); yourself))); yourself) outlineLinks: nil)); yourself)); yourself))
</methods> <methods> VWHelp.ArborDragBarSpec <category>accessing</category>
aboveWidgets ^self isVertical ifTrue: [#()] ifFalse: [self widgetSet1]
belowWidgets ^self isVertical ifTrue: [#()] ifFalse: [self widgetSet2]
boundedDrag ^boundedDrag isNil ifTrue: [true] ifFalse: [boundedDrag]
boundedDrag: aBoolean ^aBoolean = true ifTrue: [boundedDrag := nil] ifFalse: [boundedDrag := aBoolean]
etched ^etched isNil ifTrue: [true] ifFalse: [etched]
etched: aBoolean aBoolean = true ifTrue: [etched := nil] ifFalse: [etched := aBoolean].
leftWidgets ^self isVertical ifTrue: [self widgetSet1] ifFalse: [#()]
rightWidgets ^self isVertical ifTrue: [self widgetSet2] ifFalse: [#()]
widgetSet1 ^widgetSet1 isNil ifTrue: [#()] ifFalse: [widgetSet1 asArray]
widgetSet1: aCollection ^aCollection isEmpty ifTrue: [widgetSet1 := nil] ifFalse: [widgetSet1 := aCollection]
widgetSet2 ^widgetSet2 isNil ifTrue: [#()] ifFalse: [widgetSet2 asArray]
widgetSet2: aCollection ^aCollection isEmpty ifTrue: [widgetSet2 := nil] ifFalse: [widgetSet2 := aCollection]
</methods> <methods> VWHelp.ArborDragBarSpec <category>building</category>
dispatchTo: policy with: builder "In concert with the given UILookPolicy, create a component in the builder as indicated by this spec." policy arborDragBarView: self into: builder
</methods> <methods> VWHelp.ArborDragBarSpec <category>testing</category>
isVertical ^self orientation = #vertical
</methods> <methods> VWHelp.ArborHierarchicalSequenceController <category>accessing</category>
outlineModel "Answer the outline model, generally an instance of ArborListOutlineBrowserModel." ^self dispatcher receiver
</methods> <methods> VWHelp.ArborHierarchicalSequenceController <category>private</category>
toggleIndex: anInteger "Select the index being toggled." self outlineModel notNil ifTrue: [self outlineModel toggleIndex: anInteger fully: self sensor ctrlDown].
</methods> <methods> VWHelp.ArborHierarchicalSequenceController <category>event driven</category>
selectionTracker ^ArborHierarchicalSequenceSelectionTracker on: self
</methods> <methods> VWHelp.ArborHierarchicalSequenceController <category>control defaults</category>
redButtonActivity |pt index| pt := sensor cursorPoint. ((index := self findElementFor: pt) ~= 0 and: [sensor redButtonPressed and: [self view isHotspot: pt]]) ifTrue: [ self view showTransition: true for: index. sensor waitNoButton. pt := sensor cursorPoint. ((self findElementFor: pt) = index and: [view isHotspot: pt]) ifTrue: [ self view inTransition: false. self toggleIndex: index] ifFalse: [self view showTransition: false for: index]] ifFalse: [super redButtonActivity]
</methods> <methods> VWHelp.AHSGlossaryViewer <category>private</category>
availableKeys "Answer a dictionary with all available keys." ^ self dictionary isNil ifTrue: [Array with: ''] ifFalse: [self dictionary keys asSortedCollection]
entryAt: aSymbol "Private - Answer the entry for the given key. If the key is absent, return an error string." ^ self dictionary at: aSymbol ifAbsent: ['This glossary entry references a deleted key.' asText allBold]
entryForKey "Private - Answer the current entry for the given key. If the key is nil, return a null string." ^ key isNil ifTrue: ['' asText] ifFalse: [self entryAt: self symbolicKey]
setDictionary: aDictionary key: aSymbol dictionary := aDictionary. key := aSymbol.
symbolicKey "Private - Answer the current key, ensuring it is a symbol." ^ self key asSymbol
</methods> <methods> VWHelp.AHSGlossaryViewer <category>interface opening</category>
postBuildWith: aBuilder super postBuildWith: aBuilder. self selectedWord onChangeSend: #keyChanged to: self. self keyChanged
</methods> <methods> VWHelp.AHSGlossaryViewer <category>testing</category>
haveEntryForKey "Private - Answer true if we have an entry for the current key." ^ self dictionary includesKey: self symbolicKey
</methods> <methods> VWHelp.AHSGlossaryViewer <category>accessing</category>
dictionary ^dictionary
dictionary: aDictionary ^dictionary := aDictionary
key ^key
key: aSymbol ^key := aSymbol
selectedWindowSpec ^selectedWindowSpec
selectedWindowSpec: aSymbol selectedWindowSpec := aSymbol
textValue ^ self text value
textValue: aTextValue self text value: aTextValue
</methods> <methods> VWHelp.AHSGlossaryViewer <category>aspects</category>
keys ^ keys isNil ifTrue: [keys := (List withAll: (self availableKeys)) asValue] ifFalse: [keys]
selectedWord selectedWord isNil ifTrue: [selectedWord := self key asString asText allBold asValue]. ^ selectedWord
text text isNil ifTrue: [text := self entryForKey asValue]. ^ text
</methods> <methods> VWHelp.AHSGlossaryViewer <category>change messages</category>
keyChanged key isNil ifTrue: [^ self]. self key: self selectedWord value. self textValue: (self dictionary at: self symbolicKey ifAbsent: ['']) asText
</methods> <methods> VWHelp.AHSGlossaryViewer class <category>interface opening</category>
on: aGlossaryDictionary key: aGlossaryKey "Answer an unopened glossary window used for viewing a glossary entry." ^ self new setDictionary: aGlossaryDictionary key: aGlossaryKey.
openOn: aGlossaryDictionary key: aGlossaryKey "Open a glossary window for viewing a glossary entry." ^ (self on: aGlossaryDictionary key: aGlossaryKey) open
</methods> <methods> VWHelp.AHSGlossaryViewer class <category>accessing</category>
messageCatalogID ^#arborHelpSystem
</methods> <methods> VWHelp.AHSGlossaryViewer class <category>resources</category>
textMenu ^AHSUtils textMenu
</methods> <methods> VWHelp.AHSHyperTextLinkObject <category>attributes</category>
attributes ^super attributes, #(outlineName topicNumber)
</methods> <methods> VWHelp.AHSHyperTextLinkObject <category>accessing</category>
outlineName ^self linkObject first
outlineName: aStringOrNil self linkObject at: 1 put: aStringOrNil.
topicName "Backward compatibility with older AHS versions." ^self topicNumber
topicNumber ^self linkObject at: 2
topicNumber: aNumber ^self linkObject at: 2 put: aNumber
</methods> <methods> VWHelp.AHSHyperTextLinkObject <category>AHS Export adds</category>
writeHyperlinkUsing: aTopicBodyWriter ^aTopicBodyWriter writeHypertextLink: self
</methods> <methods> VWHelp.AHSHyperTextLinkObject <category>printing</category>
printOn: aStream aStream nextPutAll: 'Hypertext,'. self linkObject printOn: aStream.
</methods> <methods> VWHelp.AHSHyperTextLinkObject <category>initialize-release</category>
initialize super initialize. self linkObject: (Array with: nil with: nil).
</methods> <methods> VWHelp.AHSHyperTextLinkObject <category>engaging</category>
engageFor: anObject "The hyperlink has been engaged within the context of anObject." ^anObject engageHyperlink: self
</methods> <methods> VWHelp.AHSHyperTextLinkObject <category>testing</category>
isHyperText "Is my linkType a hyper text type?" ^true
</methods> <methods> VWHelp.AHSHyperTextLinkObject class <category>color & emphasis</category>
defaultColor ^self defaultColorValueClass darkGreen
defaultEmphasis ^#underline
</methods> <methods> VWHelp.AHSHyperTextLinkObject class <category>instance creation</category>
newLinkWithOutline: aString topic: anInteger "creates an instance of hyper link" | anInstance | anInstance := self new. anInstance linkObject: (Array with: aString with: anInteger). ^anInstance
</methods> <methods> VWHelp.AHSHyperTextLinkObject class <category>attributes</category>
type "Answer a unique identifier for the type, used during RTF exports to indicate the type of the link." ^#text
</methods> <methods> VWHelp.AHSHTMLGenerator <category>helpfile generation - private</category>
fileStreamFor: aHelpOutlineEntry "Private - Answer a file stream for aHelpOutlineEntry. The name of the file is based on the uniqueID of the entry." ^ (self htmlDirectory construct: (self helpHTMLFilename: aHelpOutlineEntry data uniqueID)) writeStream
generateHelpTextFor: aHelpOutlineEntry on: aStream using: aTopicIndex "Generate the help text for the specified outline item. Write the text to aStream." self generateHeaderOn: aStream title: aHelpOutlineEntry topic. self generateNavigateLineFor: aHelpOutlineEntry on: aStream using: aTopicIndex. self generateNavigateLineDividerOn: aStream. aStream nextPutAll: (self headerFor: aHelpOutlineEntry topic level: self topicHeaderLevel); cr; nextPutAll: (self topicTextFor: aHelpOutlineEntry); cr. self generateNavigateLineDividerOn: aStream. self generateNavigateLineFor: aHelpOutlineEntry on: aStream using: aTopicIndex. self generateFooterOn: aStream.
generateNavigateLineDividerOn: aStream aStream nextPutAll: '<hr>'; cr.
generateNavigateLineFor: aHelpOutlineEntry on: aStream using: aTopicIndex "Private - Generate the line which lets a user jump to Contents, Previous or Next. Use the topic index to determine if there is a next or previous and adjust the output accordingly." | previous next contents | previous := aTopicIndex previousNode: aHelpOutlineEntry. next := aTopicIndex nextNode: aHelpOutlineEntry. contents := self link: 'Contents' to: self topicHTMLFilename. aStream nextPutAll: '<pre><center><b>'; nextPutAll: (self navigateDefFor: previous label: 'Previous'); nextPutAll: ' '; nextPutAll: contents; nextPutAll: ' '; nextPutAll: (self navigateDefFor: next label: 'Next'); nextPutAll: '</b></center></pre>'.
helpHTMLFilename: anInteger "Private - Answer the name of the HTML file to use to store the help topic contents found in the node identified by anInteger." ^ self htmlFilenameFor: anInteger printString.
htmlFilenameFor: aString "Private - Answer the filename for storing HTML data. aString is the root of the file name." ^ aString , self fileExtension
processText: aText "Answer a string which consists of the help text with hypertext and glossary links converted into HTML" | result | result := WriteStream on: ''. topicWriter writeBody: aText on: result. ^ result contents
topicHeaderLevel "Return the header level for topics contained in the help text HTML file. Currently this is hardcoded at 2. Ultimately it could be configured by the user." ^ 2
topicTextFor: aHelpOutlineEntry "Private - Answer the string containing the processed topic text. The string contains appropriate HTML substituted for any glossary or hypertext links found in the help topic text." ^ aHelpOutlineEntry text isEmpty ifTrue: [''] ifFalse: [(self paragraphFrom: (self processText: aHelpOutlineEntry text))]
topicTitle: aTree "Private - Answer the string to be generated for the topic associated with aTree." ^ aTree data topic
</methods> <methods> VWHelp.AHSHTMLGenerator <category>private</category>
defaultHTMLDirectory "Private - Answer a string which represents the default directory where the HTML files for the current outline should be stored." ^ self fullOutlineName: outline name
embedGraphic: aHyperLink "Private - Answer an HTML specification for embedding a graphic in the text." | output | output := WriteStream on: ''. ^output nextPutAll: '<img src='''; nextPutAll: (self exportGraphicFrom: aHyperLink); nextPutAll: '''>'; contents
exportGraphicFrom: aHyperLink "Private - File out the graphic identified by aHyperLink. Answer the name of the file to which the graphic was exported. If the user has installed the appropriate graphics conversion software, the graphic will automatically be written to the file, otherwise a dummy file will be created and the user will have to manually convert the graphic." | graphicName name | graphicName := aHyperLink linkObject. name := (self haveWrittenGraphic: graphicName) ifTrue: [self mappedGraphicNameFor: graphicName] ifFalse: [self writeGraphicNamed: graphicName]. ^(aHyperLink isEmbedded or: [aHyperLink hasCaption not]) ifTrue: [name] ifFalse: [ "Create new page with the graphic and caption text combined." Dialog warn: 'Generating HTML for non-embedded graphics that\contain captions is not currently supported.\\Graphic name: ' withCRs, graphicName. name]
externalAnchorFor: aHyperLink "Private - Answer the href portion of an HTML anchor specification for a link residing in an external outline. The reference will include the name of the external outline in addition to the id of the topic. The relative location of the external HTML files will mimic the relative location of the external outline file to the current outline file." | topicDir | topicDir := self externalOutlineDirectory: aHyperLink. ^ topicDir constructString: aHyperLink topicName printString
externalOutlineDirectory: aHyperLink "Private - Answer the external outline directory referenced by aHyperLiink. NOTE: This method is temporary. It doesn't work properly because of the way it handles relative path names. It might generate usable HTML for PC's and Unix system, but the link will behave funny on a PC and won't be correct at all on a Macintosh." | dir | ^ (dir := self outlineDirectory: aHyperLink outlineName) isRelative ifTrue: [('..' , (String with: dir separator) , dir asString) asFilename] "TEMPORARY" ifFalse: [dir]
fileExtension "Private - Answer the extension used to identify HTML files. Currently hardwired to '.htm'." ^ '.htm'.
fullOutlineName "Private - Answer the name of the outline, exclusive of any extension but including any path." ^ self fullOutlineName: outline name
fullOutlineName: aString "Private - Answer the name of the outline, exclusive of any extension but including any path. The name of the outline is specified in aString." ^ (Filename splitExtension: aString) at: 1.
getDirectoryNameFromUser "Private - Answer a directory filestream, nil, or #repeat based on information retrieved from the user. A nil value means the user cancelled the operation. A #repeat means that the user wants to enter another name." | dir | (dir := self outlineDirectory) isNil ifTrue: [^ dir]. dir exists ifTrue: [dir isDirectory ifTrue: [dir := self promptForReuse: dir] ifFalse: [Dialog warn: 'Unable to create or use directory "' , dir asString , '".' , (String with: Character cr) , 'A file of that name already exists.'. dir := #repeat]] ifFalse: [dir makeDirectory]. ^ dir
getHTMLDirectory "Private - Answer a filestream, or nil, which represents the location where HTML files corresponding to the outline should be saved." | dir | dir := #repeat. [dir == #repeat] whileTrue: [(dir := self getDirectoryNameFromUser) isNil ifTrue: [^ dir]]. ^ dir.
glossaryLinkFor: aHyperLink "Private - Answer an HTML specification for a link to the glossary." ^ self glossaryFilename , '#' , aHyperLink linkObject asString
graphicWriter "Private - Answer the tool used to write graphics to the system. Answer either the writer class or nil if that class is unavailable." ^#{ArborGIFReaderWriter} valueOrDo: [nil]
htmlDirectory "Private - Answer the Filename object representing the directory into which the HTML files are stored." htmlDirectory isNil ifTrue: [htmlDirectory := self getHTMLDirectory]. ^ htmlDirectory
hypertextLinkFor: aHyperLink "Private - Answer an HTML specification for a link to another topic." | anchor | anchor := aHyperLink outlineName notNil ifTrue: [self externalAnchorFor: aHyperLink] ifFalse: [aHyperLink topicName printString]. ^ self htmlFilenameFor: anchor
indent: anInteger "Private - Answer a string used to indent anInteger amount." ^ ((String new: anInteger * 4) atAllPut: Character space)
indent: aString amount: anInteger on: aStream "Private - Output aString to aStream indented by anInteger." | indentation cr | indentation := self indent: anInteger. cr := String with: Character cr. aStream nextPutAll: indentation; nextPutAll: (aString copyReplaceAll: cr with: cr, indentation).
linkToGraphic: aHyperLink "Private - Answer an HTML specification for a link to a graphic. Currently only support linking to an external graphic (as opposed to one embedded in the text)." | output | output := WriteStream on: ''. ^output nextPutAll: '<a href='''; nextPutAll: (self exportGraphicFrom: aHyperLink); nextPutAll: '''>'; contents
navigateDefFor: aTopicID label: aString "Private - Answer an HTML definition for navigating from aTopicID." ^ aTopicID isNil ifTrue: [aString] ifFalse: [self link: aString to: (self helpHTMLFilename: aTopicID)].
outlineDirectory "Private - Answer a Filestream which represents the directory where the current outline is stored. Prompt the user to enter the name of the directory, using aString as a default." | result | result := (Dialog requestFileName: 'Enter directory where HTML files should be stored:' default: (self defaultHTMLDirectory)) trimExteriorBlanks. ^ result isEmpty ifTrue: [nil] ifFalse: [result asFilename].
outlineDirectory: aString "Private - Answer a Filename which represents the directory where the current outline is stored." ^ (self fullOutlineName: aString) asFilename
outlineName "Private - Answer the name of the outline, exclusive of any extension or path." ^ (Filename splitPath: (self fullOutlineName)) at: 2.
promptForReuse: aFilename "Private - Answer a directory filename, nil, or #repeat based on information retrieved from the user. A nil value means the user cancelled the operation. A #repeat means that the user wants to enter another name." ^ (Dialog confirm: '"' , aFilename asString , '" already exists. Do you wish to update the contents of this directory? (Old contents will be removed.)') ifTrue: [| fn | fn := aFilename asFilename construct: 'graphics'. (fn exists and: [fn isDirectory]) ifTrue: [ fn directoryContents do: [:name || file | file := fn construct: name. file isWritable ifTrue: [file delete]]. fn isWritable ifTrue: [fn delete]]. (fn := aFilename asFilename) isDirectory ifTrue: [ fn directoryContents do: [:name || file | (('*', self fileExtension match: name) and: [name first isDigit or: [name = self topicHTMLFilename]]) ifTrue: [ file := fn construct: name. file isWritable ifTrue: [file delete]]]]. aFilename] ifFalse: [#repeat]
topicsDo: aBlock "Private - Evaluate aBlock for every topic node found in the outline tree." outline do: [: tree | tree do: [: helpTopic | aBlock value: helpTopic]]
writeDummyGraphicFor: aSymbol to: aFilename "comment" | stream | stream := aFilename writeStream. [stream nextPutAll: 'Placeholder for graphic: '; nextPutAll: aSymbol; cr] ensure: [stream close].
writeGraphic: aSymbol to: aFilename "Output the graphic as a GIF if we have the GIFReadWriter installed. Otherwise, generate a placeholder file." | writer | (writer := self graphicWriter) isNil ifTrue: [self writeDummyGraphicFor: aSymbol to: aFilename] ifFalse: [writer putImage: (self graphicAt: aSymbol) onFileNamed: aFilename]
writeGraphicNamed: aSymbol "Private - Write the graphic identified by aSymbol. Answer the name of the file where the graphic was stored." | directoryName fileName fn | directoryName := 'graphics'. fileName := self mappedGraphicNameFor: aSymbol. fn := self htmlDirectory asFilename construct: directoryName. fn exists not ifTrue: [fn makeDirectory]. self writeGraphic: aSymbol to: (fn construct: fileName). ^ directoryName, '/', fileName
</methods> <methods> VWHelp.AHSHTMLGenerator <category>html generation</category>
adjustFontSizeFor: aString by: anInteger "Private - Answer a generated header specification which wraps aString. The header level is given by anInteger." | stream sign | anInteger = 0 ifTrue: [^ aString]. stream := WriteStream on: ''. sign := anInteger > 0 ifTrue: ['+'] ifFalse: ['']. ^ stream nextPutAll: (self startTag: ('font size=' , sign , anInteger printString)); nextPutAll: aString; nextPutAll: (self endTag: 'font'); contents
anchor: aString named: anchorName "Private - Answer aString as preceeded by an anchor link. Name the link if anchorName is not nil." | name | name := anchorName notNil ifTrue: [' name="' , anchorName , '"'] ifFalse: ['']. ^ '<a' , name , '>' , aString , '</a>'
definition: aString "Private - Answer a glossary definition formatted as a definition list <dd> tag." ^ '<dd>' , aString
definitionTerm: aString "Private - Answer a glossary entry key formatted as a definition term <dt> tag." ^ '<dt>' , aString
endTag: aString "Private - Answer an 'end tag' version of aString." ^ '</' , aString , '>'
generateDefinitionListFor: anAssociationCollection on: aStream "Private - Produce a definition list derived from the contents of anAssociationCollection. The key in the association is the definintion term, the value is the definition itself." aStream nextPutAll: '<dl>'; cr. anAssociationCollection do: [:assoc | aStream nextPutAll: (self glossaryKey: assoc key asString); cr; nextPutAll: (self glossaryDefinition: assoc value); cr ]. aStream nextPutAll: '</dl>'; cr.
generateEndTag: aString for: nestDepth on: aStream "Private - Generate a sufficient number of end tags to close out any open tags. The number of tags needed is indicated by how deeply we are nested." self generateEndTag: '</' , aString , '>' for: nestDepth until: -1 on: aStream.
generateEndTag: aString for: nestDepth until: endDepth on: aStream "Private - Generate a sufficient number of end tags to close out any open tags. The number of tags needed is indicated by how deeply we are nested." | depth | nestDepth < 0 ifTrue: [^ self]. depth := nestDepth. (depth - 1) to: endDepth by: -1 do: [:int | self indent: aString amount: depth on: aStream. aStream cr. depth := depth - 1]
generateFooterOn: aStream "Generate an appropriate HTML footer on the given stream." aStream nextPutAll: '</body>'; cr; nextPutAll: '</html>'; cr
generateHeaderOn: aStream title: titleString "Generate an appropriate HTML Header on the given stream." aStream nextPutAll: '<html>'; cr; cr; nextPutAll: '<!--'; cr; nextPutAll: 'Generated by the Arbor Help System version '; nextPutAll: AHSUtils version; nextPutAll: ' on '; print: Date today; nextPutAll: ' at '; print: Time now; nextPut: $.; cr; nextPutAll: 'Source outline name: ', outline outlineLabel; cr; nextPutAll: 'Source filename: ', outline name; cr; nextPutAll: 'Visit http://www.aisys.com for more info on the Arbor Help system.'; cr; nextPutAll: '-->'; cr; cr; nextPutAll: '<head>'; cr; nextPutAll: '<title>', outline outlineLabel, ' - ', (topicWriter exportableStringFrom: titleString) , '</title>'; cr; nextPutAll: '</head>'; cr; nextPutAll: '<body>'; cr.
generateNestTag: aString oldDepth: depth newDepth: newDepth on: aStream "Private - Generate either a start tag or an end tag for a nestable item. Answer the new depth." depth = newDepth ifTrue: [^ newDepth]. depth < newDepth ifTrue: [self indent: (self startTag: aString) amount: newDepth on: aStream] ifFalse: [self generateEndTag: (self endTag: aString) for: depth until: newDepth on: aStream]. ^ newDepth
generateUnorderedListFor: aCollection on: aStream "Private - Generate an unordered list specification for the contents of aCollection." aStream nextPutAll: (self startTag: self unorderedList); cr. aCollection do: [:each | aStream nextPutAll: (self listItem: each); cr]. self generateEndTag: self unorderedList for: 0 on: aStream.
glossaryDefinition: aString "Private - Answer the glossary definition found in aString as an HTML definition list definition item." ^ self definition: (self paragraphFrom: aString)
glossaryKey: aString "Private - Answer aString formatted for HTML output. We output glossary keys as an anchor entry and formatted with a 'strong' font." ^ self definitionTerm: (self anchor: (self strong: aString) named: aString)
headerFor: aString level: anInteger "Private - Answer a generated header specification which wraps aString. The header level is given by anInteger." | levelString stream | stream := WriteStream on: ''. levelString := 'h' , anInteger printString. ^ stream nextPutAll: (self startTag: levelString); nextPutAll: (topicWriter exportableStringFrom: aString); nextPutAll: (self endTag: levelString); contents
link: aString to: anchorName "Private - Answer aString containing HTML tags to link aString to anchorName." ^ '<a href="' , anchorName , '">' , (topicWriter exportableStringFrom: aString) , '</a>'
listItem: aString "Private - Answer aString as a 'list item' HTML string." ^ '<li>' , aString asString
paragraphFrom: aCharArray "Answer a string containing the paragraph definition for aCharArray. aCharArray is processed and line breaks are added wherever a 'cr' is found in the string." | lines result | lines := aCharArray asArrayOfLines. lines isEmpty ifTrue: [^ '']. result := WriteStream on: ''. result nextPutAll: '<p>'. 1 to: lines size do: [:i || line | line := lines at: i. result nextPutAll: line asString. i = lines size ifTrue: [result nextPutAll: '</p>'] ifFalse: [ "Don't emit the break if there's a blockquote on either side of it - a break is implied." (('</blockquote>*' match: (lines at: i + 1)) or: [('<blockquote>*' match: (lines at: i + 1)) or: [('*blockquote>' match: line)]]) not ifTrue: [result nextPutAll: '<br>']]. result cr]. ^result contents.
startTag: aString "Private - Answer a 'start tag' version of aString." ^ '<' , aString , '>'
strong: aString "Private - Answer aString as a 'strong' HTML string." ^ '<strong>' , aString asString , '</strong>'.
unorderedList "Answer the HTML used for unordered lists." ^ 'ul'
</methods> <methods> VWHelp.AHSHTMLGenerator <category>testing</category>
haveWrittenGraphic: aSymbol "Private - Answer true if we have already written the graphic identified by aSymbol." ^ self graphicFileNames includes: aSymbol
shouldImbed: aGraphicLinkObject "Answer true if the graphic specified by the link is able to be imbedded in the text." ^self graphicWriter notNil and: [aGraphicLinkObject isEmbedded]
</methods> <methods> VWHelp.AHSHTMLGenerator <category>accessing - private</category>
graphicFileNames "Private - Answer the dictionary of filenames used to store graphics objects." graphicFileNames isNil ifTrue: [graphicFileNames := Dictionary new]. ^ graphicFileNames.
</methods> <methods> VWHelp.AHSHTMLGenerator <category>glossary generation</category>
generateGlossaryIn: aDirectory "Generate the HTML page containing the glossary definitions." | stream | outline hasGlossaryEntries ifFalse: [^ self]. stream := (aDirectory construct: self glossaryFilename) writeStream. [self generateGlossaryOn: stream] ensure: [stream close]
generateGlossaryOn: aStream "Produce an HTML file containing glossary information contained in the outline." Cursor write showWhile: [self generateHeaderOn: aStream title: 'Glossary'. self generateDefinitionListFor: outline sortedGlossary on: aStream. self generateFooterOn: aStream]
</methods> <methods> VWHelp.AHSHTMLGenerator <category>graphic generation - private</category>
graphicAt: aSymbol "Private - Answer the graphic object identified by aSymbol." ^ outline graphicAt: aSymbol
graphicFilenameFor: graphicKey "Convert graphicKey into a filename. Restrict the characters in the filename, and guarantee a unique filename of length 12 (8.3) or less." | filename count baseFilename extension lastWasSpace | lastWasSpace := true. baseFilename := (graphicKey asString collect: [:ch || was | was := lastWasSpace. lastWasSpace := ch isSeparator. was ifTrue: [ch asUppercase] ifFalse: [ch]]) select: [:c | c isAlphaNumeric or: ['-_+(){}[]~' includes: c]]. extension := self graphicWriter isNil ifTrue: [''] ifFalse: ['.gif']. filename := baseFilename, extension. count := 1. [self graphicFileNames values includes: filename] whileTrue: [ count := count + 1. filename := baseFilename, count printString, extension]. ^filename
mappedGraphicNameFor: aGraphicName | files | files := self graphicFileNames. ^ files at: aGraphicName ifAbsent: [ files at: aGraphicName put: (self graphicFilenameFor: aGraphicName)]
</methods> <methods> VWHelp.AHSHTMLGenerator <category>topic generation - private</category>
generateGlossaryRefOn: aStream "Private - If a glossary exists, generate a reference to it on the table of contents page." outline hasGlossaryEntries ifFalse: [^ self]. self generateUnorderedListFor: (Array with: (self link: 'Glossary' to: self glossaryFilename)) on: aStream.
generateHeaderCaption: aString on: aStream "Private - Start the HTML document and generate a level 2 header with the text contained in aString." self generateHeaderOn: aStream title: aString. aStream nextPutAll: (self headerFor: aString level: 1); cr.
generateTopicTreeOn: aStream "Private - Generate the topic tree on aStream. Answer the topic index for the topic tree." | depth topicIndex | depth := -1. topicIndex := AHSOutlineTopicIndex new. self topicsDo: [: aTopic | topicIndex addItem: aTopic. depth := self generateNestTag: self unorderedList oldDepth: depth newDepth: aTopic depth on: aStream. aStream cr. self indent: (self listItem: (self topicTitleFor: aTopic)) amount: aTopic depth on: aStream. aStream cr]. self generateEndTag: self unorderedList for: depth on: aStream. ^ topicIndex
topicHTMLFilename "Private - Answer the name of the HTML file to use to store the topic contents" ^ self htmlFilenameFor: self outlineName
topicTitleFor: aTree "Private - Answer the string to be generated for the topic associated with aTree." ^ self link: aTree data topic to: (aTree data uniqueID printString , self fileExtension)
</methods> <methods> VWHelp.AHSHTMLGenerator <category>initialize-release</category>
initialize topicWriter := AHSHTMLTopicBodyWriter forOwner: self.
setOutline: anOutline "Set the instance variables." self initialize. outline := anOutline.
</methods> <methods> VWHelp.AHSHTMLGenerator <category>glossary generation - private</category>
glossaryFilename "Private - Answer the name of the HTML file to use to store the glossary contents" ^ self htmlFilenameFor: 'glossary'
</methods> <methods> VWHelp.AHSHTMLGenerator <category>writing</category>
generateHTML "Generate HTML for the outline. The output will be placed in a subdirectory which has the same name as the outline. Separate files will be generated for the topic hierarchy, glossary, and individual help topic entries." | topicIndex dir | htmlDirectory := nil. (dir := self htmlDirectory) isNil ifTrue: [^ self]. Cursor wait showWhile: [topicIndex := self generateTopicsIn: dir. self generateGlossaryIn: dir; generateHelpFilesUsing: topicIndex].
</methods> <methods> VWHelp.AHSHTMLGenerator <category>topic generation</category>
generateTopicsIn: aDirectory "Generate the HTML page containing the topic structure. Answer the topic index for the topic tree." | stream result | stream := (aDirectory construct: self topicHTMLFilename) writeStream. [result := self generateTopicsOn: stream] ensure: [stream close]. ^ result
generateTopicsOn: aStream "Generate an HTML specification corresponding to the help topic structure. Answer an outline topic index for the generated tree." | topicIndex | Cursor write showWhile: [self generateHeaderCaption: 'Table of Contents' on: aStream. topicIndex := self generateTopicTreeOn: aStream. self generateGlossaryRefOn: aStream. self generateFooterOn: aStream]. ^ topicIndex.
</methods> <methods> VWHelp.AHSHTMLGenerator <category>helpfile generation</category>
generateHelpFilesUsing: aTopicIndex "Generate help files for each help topic in the outline. Generate proper links for imbedded hypertext links." | stream | Cursor write showWhile: [self topicsDo: [: helpTopic | stream := self fileStreamFor: helpTopic. [self generateHelpTextFor: helpTopic data on: stream using: aTopicIndex] ensure: [stream close]]].
</methods> <methods> VWHelp.AHSHTMLGenerator class <category>instance creation</category>
outline: anOutline "Answer a new instance of the receiver capable of generating HTML output for anOutline." ^ self basicNew setOutline: anOutline
</methods> <methods> VWHelp.AHSHTMLHelpGenerator <category>topic generation - private</category>
generateGlossaryRefOn: aStream "Not needed for HTMLHelp." ^self
topicTitleFor: aTree "Private - Answer the string to be generated for the topic associated with aTree. This string is actually an entry in the HTMLHelp contents file." | str break | str := String new writeStream. break := (String with: Character cr), ' '. str nextPutAll: '<object type="text/sitemap">'; nextPutAll: break; nextPutAll: '<param name="Name" value="'; nextPutAll: (topicWriter exportableStringFrom: aTree data topic); nextPutAll: '">'; nextPutAll: break; nextPutAll: '<param name="Type" value="Reference">'; nextPutAll: break; nextPutAll: '<param name="Local" value="'; nextPutAll: aTree data uniqueID printString, self fileExtension; nextPutAll: '">'; nextPutAll: break; nextPutAll: '</object>'. ^str contents
</methods> <methods> VWHelp.AHSHTMLHelpGenerator <category>writing</category>
generateHTML "Generate the HTML, then generate the HTMLHelp project file. The HTMLHelp contents file is generated during #generateHTML." super generateHTML. htmlDirectory isNil ifTrue: [^self]. self generateHTMLHelpProject.
generateHTMLHelpProject "Generate the project file used by HTMLHelp Workshop from Microsoft (a free product)." | projectFile | projectFile := (self htmlDirectory construct: self projectFilename) writeStream. projectFile nextPutAll: '[OPTIONS]'; cr; nextPutAll: 'Compatibility=1.1'; cr; nextPutAll: 'Compiled file=', self compiledFilename; cr; nextPutAll: 'Contents file=', self contentsFilename; cr; nextPutAll: 'Default topic=', (self helpHTMLFilename: outline forest first data uniqueID); cr; nextPutAll: 'Display compile progress=Yes'; cr; nextPutAll: 'Full-text search=Yes'; cr; nextPutAll: 'Language=0x409 English (United States)'; cr; cr; nextPutAll: '[FILES]'; cr. self topicsDo: [:helpTopic | projectFile nextPutAll: (self helpHTMLFilename: helpTopic data uniqueID); cr]. self graphicFileNames do: [:name | projectFile nextPutAll: 'graphics/', name; cr]. projectFile close.
</methods> <methods> VWHelp.AHSHTMLHelpGenerator <category>private</category>
compiledFilename ^self outlineName, '.chm'
contentsFilename ^self outlineName, '.hhc'
projectFilename ^self outlineName, '.hhp'
</methods> <methods> VWHelp.AHSHTMLHelpGenerator <category>helpfile generation - private</category>
generateNavigateLineDividerOn: aStream "Don't generate navigation for HTMLHelp." ^self
generateNavigateLineFor: aHelpOutlineEntry on: aStream using: aTopicIndex "Don't generate navigation for HTMLHelp." ^self
</methods> <methods> VWHelp.AHSHTMLHelpGenerator <category>topic generation</category>
generateTopicsIn: aDirectory "Generate the topic info onto the help contents stream, creating a contents file for the project. Return the topic index." | contents | contents := (aDirectory construct: self contentsFilename) writeStream. contents nextPutAll: '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">'; cr. ^[self generateTopicsOn: contents] ensure: [contents close]
</methods> <methods> VWHelp.ArborHierarchicalSequenceView <category>private</category>
computeWidthForLinesFrom: startIndex to: stopIndex "Measure the receiver's lines from startIndex to stopIndex." | width | width := 0. startIndex to: stopIndex do: [:i | width := width max: (self widthCache at: (sequence at: i) value ifAbsent: [ self widthCache at: (sequence at: i) value put: (self visualComponentForElementIndex: i) preferredBounds width])]. ^width
computeWidthForTextLinesFrom: startIndex to: stopIndex "Measure the receiver's lines from startIndex to stopIndex. Use our cache if possible." | width compositionScanner limit style | width := 0. limit := SmallInteger maxVal. style := self textStyle. compositionScanner := CompositionScanner fontPolicy: Screen default defaultFontPolicy text: '' textAttributes: style. startIndex to: stopIndex do: [:i || w | w := self widthCache at: (sequence at: i) value ifAbsent: [ compositionScanner text: (self displayStringAt: i). compositionScanner composeLine: i fromCharacterIndex: 1 leftMargin: self offsetForTextDisplay rightMargin: limit. self widthCache at: (sequence at: i) value put: compositionScanner rightX]. width < w ifTrue: [width := w]]. width := width + (style firstIndent max: style restIndent) + style rightIndent. ^width
maxItemsVisibleForBounds: aRectangle ^(aRectangle bottom - aRectangle top) // self lineGrid
maxVisibleInterval "Answer the visible interval for the current bounds, regardless of how many elements are actually present in the sequence." | first lineGrid last bounds | bounds := self bounds. lineGrid := self lineGrid. first := bounds top // lineGrid + 1. last := (bounds bottom-lineGrid) // lineGrid + 1. ^first to: last
resetWidthCache self widthCache: IdentityDictionary new.
updateModel self resetWidthCache. ^super updateModel
</methods> <methods> VWHelp.ArborHierarchicalSequenceView <category>accessing</category>
includeArrows ^visualBlock notNil
includeArrows: aBoolean "If 'arrows' (that would be icons) are used, then set up visuals, otherwise use only the text representation." self includeArrows = aBoolean ifTrue: [^self]. aBoolean ifTrue: [self initializeVisuals] ifFalse: [self optimizeForText]. self resetWidthCache.
inTransition ^inTransition
inTransition: aBoolean inTransition := aBoolean.
isHotspot: aPoint "Answer whether aPoint is a hotspot for expansion/contraction by mouse" |index| index := controller findElementFor: aPoint. ^(index = 0 or: [self includeArrows not]) ifTrue: [false] ifFalse: [(sequence at: index) isHot: aPoint]
showTransition: aBoolean for: index "Repair the change if going into the transition. If returning to normal, don't show transition immediately since it is likely an update will occur anyway due to the item being expanded or collapsed." self inTransition: aBoolean. self invalidateRectangle: (self boundsOfElementIndex: index inBounds: self bounds) repairNow: aBoolean
widthCache ^widthCache
widthCache: aDictionary widthCache := aDictionary.
</methods> <methods> VWHelp.ArborHierarchicalSequenceView <category>protected</category>
forceMaximumVisibility "Ensures there are no blank lines at the bottom of the list if there are undisplayed items at the top. Invoked externally." | b vis max | b := self bounds. vis := self visibleIntervalForBounds: b. max := self maxItemsVisibleForBounds: b. vis size < max ifTrue: [self makeVisible: (1 max: (vis first - (max - vis size)))]
invalidateToBottomFromElementIndex: anInteger "Invalidate the list from the element at anInteger to the bottom of the display. If anInteger is 'beneath' the displayed region, don't bother." | b origin | origin := (self boundsOfElementIndex: anInteger inBounds: (b := self bounds)) origin. origin < b corner ifTrue: [self invalidateRectangle: (origin corner: b corner)].
makeVisibleFrom: startIndex to: stopIndex "Adjust the list so that as many as possible from startIndex to stopIndex are shown. Ensure that startIndex is always visible." | range stop offset comp | startIndex > self sequence size ifTrue: [^self]. range := self maxVisibleInterval. (range first = startIndex or: [range first < startIndex and: [range last >= stopIndex]]) ifTrue: [^self]. stop := stopIndex min: startIndex + range last - range first. offset := (range last - stop) * self lineGrid. (comp := self topComponent) notNil ifTrue: [comp displayPendingInvalidation]. scrollOffset value: scrollOffset value + (0@offset).
</methods> <methods> VWHelp.ArborHierarchicalSequenceView <category>controller accessing</category>
defaultControllerClass ^ArborHierarchicalSequenceController
</methods> <methods> VWHelp.ArborHierarchicalSequenceView <category>initialize-release</category>
initialize super initialize. self resetWidthCache. self inTransition: false.
initializeVisuals "Default to using visual blocks for display. This assumes the use of ArborLabeledObjectHolders for the list elements." self visualBlock: [:view :index | (view sequence at: index) asVisualComponentWhereSelected: false inTransition: view inTransition attributes: view textStyle]. self selectedVisualBlock: [:view :index || vc rw | vc := (view sequence at: index) asVisualComponentWhereSelected: true inTransition: view inTransition attributes: view textStyle. rw := ReversingWrapper on: vc component. rw reverse setValue: true. vc component: rw].
</methods> <methods> VWHelp.ArborHierarchicalSequenceView class <category>resources</category>
contractedImage | palette | palette := MappedPalette with: ColorValue white with: ColorValue blue with: ColorValue black. ^Image extent: 7 @ 13 depth: 2 palette: palette bits: #[128 0 0 0 160 0 0 0 152 0 0 0 134 0 0 0 145 128 0 0 132 96 0 0 145 24 0 0 132 96 0 0 145 128 0 0 134 0 0 0 152 0 0 0 160 0 0 0 128 0 0 0 ]
expandedImage | palette | palette := MappedPalette with: ColorValue white with: ColorValue blue with: ColorValue black. ^Image extent: 13 @ 7 depth: 2 palette: palette bits: #[170 170 170 128 36 68 70 0 9 17 24 0 2 68 96 0 0 145 128 0 0 38 0 0 0 8 0 0 ]
</methods> <methods> VWHelp.ArborDragBarView <category>controller accessing</category>
controller "Answer the receiver`s current controller. If the receiver's controller is nil (the default case), an initialized instance of the receiver's default controller is installed and returned." ^self getController
controller: aController "Set the receiver's controller to aController. An instance of NoController can be specified to indicate that the receiver will not have a controller. The model of aController is set to the receiver's model." self setController: aController
defaultController "Answer an initialized instance of the receiver's default controller. Subclasses should redefine this message only if the default controller instances need to be initialized in a nonstandard way." ^self defaultControllerClass new
defaultControllerClass "Answer the class of the default controller for the receiver." ^ArborDragBarController
</methods> <methods> VWHelp.ArborDragBarView <category>testing</category>
containsPoint: aPoint "Revert to the default implementation." ^self bounds containsPoint: aPoint
isVertical ^self orientation = #vertical
</methods> <methods> VWHelp.ArborDragBarView <category>private</category>
getController "Answer the receiver`s current controller. If the receiver's controller is nil (the default case), an initialized instance of the receiver's default controller is installed and returned." controller == nil ifTrue: [self setController: self defaultController]. ^controller
setController: aController "Set the receiver's controller to aController. If aController is not nil, its view is set to the receiver and its model is set to the receiver's model." aController == nil ifFalse: [aController view: self]. controller := aController
</methods> <methods> VWHelp.ArborDragBarView <category>accessing</category>
lineWidth ^lineWidth
</methods> <methods> VWHelp.ArborDragBarView <category>displaying</category>
displayOn: aGraphicsContext "Display the divider on aGraphicsContext." | box hilite | hilite := self hiliteColor. box := self bounds. etched == true ifTrue: [aGraphicsContext paint: self shadowColor] ifFalse: [aGraphicsContext paint: SymbolicPaint foreground]. orientation == #vertical ifTrue: [ box := (box topCenter - ((lineWidth / 2)@0)) corner: box corner. aGraphicsContext displayRectangle: (box origin corner: box bottomLeft + (lineWidth@0)). (etched == true and: [lineWidth > 0]) ifTrue: [ aGraphicsContext paint: hilite. aGraphicsContext displayRectangle: (box origin + ((lineWidth)@0) corner: box bottomLeft + ((lineWidth+1)@0))]] ifFalse: [ box := (box leftCenter - (0@(lineWidth / 2))) corner: box corner. aGraphicsContext displayRectangle: (box origin corner: box topRight + (0@lineWidth)). (etched == true and: [lineWidth > 0]) ifTrue: [ aGraphicsContext paint: hilite. aGraphicsContext displayRectangle: (box origin+ (0@(lineWidth)) corner: box topRight + (0@(lineWidth+1)))]]
</methods> <methods> VWHelp.AHSReporterData <category>private</category>
indentStringFor: aTopicTree "Private - Answer an indent string for the given topic tree." ^ ((String new: aTopicTree depth) atAllPut: Character tab)
</methods> <methods> VWHelp.AHSReporterData <category>accessing</category>
indent ^ indent
topic ^ topic
topicText ^ topicText
</methods> <methods> VWHelp.AHSReporterData <category>writing</category>
writeTopicBodyTo: aStream aStream ahsNextPutAllText: indent; ahsNextPutAllText: (topic asText emphasizeAllWith: #(bold underline)); cr; ahsNextPutAllText: indent; tab; ahsNextPutAllText: topicText; cr; cr
writeTopicLineTo: aTextStream aTextStream ahsNextPutAllText: indent; ahsNextPutAllText: topic; cr.
</methods> <methods> VWHelp.AHSReporterData <category>initialization</category>
initFromTopic: aTree indent := self indentStringFor: aTree. topic := aTree data topic. topicText := aTree data text.
</methods> <methods> VWHelp.AHSReporterData class <category>instance creation</category>
onTopic: aTree "Answer a new instance of the receiver initialized with data found in aTree. A tree is assumed to hold outline data." ^ self new initFromTopic: aTree
</methods> <methods> VWHelp.AHSOutlineTextGraphicMixViewer <category>interface configuration</category>
topicTextGraphicUnzoomedBoundaries "Private - Answer the unzoomed boundaries for the topic text pane when the topic text pane is unzoomed." | oldBoundaries | oldBoundaries := self textGraphicWidget bounds. ^ Rectangle left: oldBoundaries left right: oldBoundaries right top: self listOutlineBrowser bounds bottom bottom: oldBoundaries bottom.
topicTextGraphicUnzoomedLayout "Private - Answer the LayoutFrame to be used for the topic text when the topic text pane is unzoomed." | oldLayout dragBarLayout | oldLayout := self textGraphicWidget layout. dragBarLayout := self dragBar layout. ^ LayoutFrame leftFraction: oldLayout leftFraction offset: oldLayout leftOffset rightFraction: oldLayout rightFraction offset: oldLayout rightOffset topFraction: dragBarLayout bottomFraction offset: 0 bottomFraction: 1 offset: 0.
topicTextGraphicZoomedBoundaries "Private - Answer the zoomed boundaries for the topic text pane when the topic text pane is zoomed." | oldBoundaries | oldBoundaries := self textGraphicWidget bounds. ^ Rectangle left: oldBoundaries left right: oldBoundaries right top: self textSubCanvas container bounds top bottom: oldBoundaries bottom.
topicTextGraphicZoomedLayout "Private - Answer the LayoutFrame to be used for the topic text when the topic text pane is zoomed." | oldLayout | oldLayout := self textGraphicWidget layout. ^ LayoutFrame leftFraction: oldLayout leftFraction offset: oldLayout leftOffset rightFraction: oldLayout rightFraction offset: oldLayout rightOffset topFraction: oldLayout topFraction offset: oldLayout topOffset bottomFraction: 1 offset: oldLayout bottomOffset.
</methods> <methods> VWHelp.AHSOutlineTextGraphicMixViewer <category>private</category>
fixOutlinerSizeForUnzoom super fixOutlinerSizeForUnzoom. self textGraphicWidget newBounds: self topicTextGraphicUnzoomedBoundaries; newLayout: self topicTextGraphicUnzoomedLayout.
fixOutlinerSizeForZoom super fixOutlinerSizeForZoom. self textGraphicWidget newBounds: self topicTextGraphicZoomedBoundaries; newLayout: self topicTextGraphicZoomedLayout.
postOpenWith: aBuilder super postOpenWith: aBuilder. self outliner builder component controller keyboardHook: self copyKeyHook.
textGraphicWidget ^self builder componentAt: #textGraphicComposite
</methods> <methods> VWHelp.AHSOutlineTextGraphicMixViewer <category>private - configuration</category>
configureTextEditor super configureTextEditor. (self builder componentAt: #textSubCanvas) beInvisible.
</methods> <methods> VWHelp.AHSOutlineTextGraphicMixViewer <category>aspects</category>
textGraphicComposite ^AHSTextGraphicComposite new outliner: self
</methods> <methods> VWHelp.AHSOutlineTextGraphicMixViewer <category>searching</category>
highlightSearchedWord "highlight the selection that was the objective of the search." ^self textGraphicWidget widget controller findAndSelect: self searchString ignoreCase: true.
nextOccurrence "search for the next entry of the selected text within the same piece of text." self highlightSearchedWord ifFalse: [ Dialog warn: (#noEntriesMatching << self messageCatalogID) asString , ' "', self searchString, '" ' , (#foundInOutline << self messageCatalogID) asString]
</methods> <methods> VWHelp.AHSOutlineTextGraphicMixViewer <category>As yet unclassified</category>
copyKeyHook ^[:event :object | (event keyValue isSymbol not and: [event keyValue asInteger = 3]) ifTrue: [(builder aspectAt: #textGraphicComposite) controller copySelection. nil] ifFalse: [event]]
</methods> <methods> VWHelp.AHSHelpHyperText <category>converting</category>
asAHSHyperText ^self
</methods> <methods> VWHelp.AHSHelpHyperText <category>printing</category>
printLinksOn: aStream "Print information on the links stored in the AHSHelpHyperText" self emphasesDo: [:emphasis :range | (self isHyperLink: emphasis) ifTrue: [ self printRunOffset: range first emphasis: emphasis text: (self copyFrom: range first to: range last) on: aStream]].
printRunOffset: anInteger emphasis: anEmphasis text: aText on: aStream anInteger printOn: aStream. aStream nextPut: $,. anEmphasis value printOn: aStream. aStream nextPutAll: (',"' , aText ); nextPut: $"; cr
</methods> <methods> VWHelp.AHSHelpHyperText <category>accessing</category>
firstAvailableGlossary "returns the first available Glossary link found in the text or nil" ^self firstAvailable: [:item | self isGlossary: item]
firstAvailableHyperGraphic "returns the first available Hyper Graphic link found in the text or nil" ^self firstAvailable: [:item | self isHyperGraphic: item]
firstAvailableHyperText "returns the first available Hyper Text link found in the text or nil" ^self firstAvailable: [:item | self isHyperText: item]
</methods> <methods> VWHelp.AHSHelpHyperText <category>testing</category>
isGlossary: anEmphasis "Returns true if anEmphasis is a Glossary hyperlink" ^(self isHyperLink: anEmphasis) and:[anEmphasis value isGlossary]
isHyperGraphic: anEmphasis "Returns true if anEmphasis is a HyperGraphic hyperlink" ^(self isHyperLink: anEmphasis) and:[anEmphasis value isHyperGraphic]
isHyperText: anEmphasis "Returns true if anEmphasis is a HyperText hyperlink" ^(self isHyperLink: anEmphasis) and:[anEmphasis value isHyperText]
</methods> <methods> VWHelp.AHSHelpHyperText <category>comparing</category>
= anotherText "Do a full equality check, including the runs." ^AHSUtils text: self equals: anotherText
</methods> <methods> VWHelp.AHSHelpHyperText class <category>BOSS conversion</category>
binaryReaderBlockForVersion: oldVersion format: oldFormat ^oldVersion = 'Help System version 2.0' ifTrue: [self convertBlock20] ifFalse: [ super binaryReaderBlockForVersion: oldVersion format: oldFormat]
binaryRepresentationVersion ^'AHS 3.0'
convertBlock20 "Answer the conversion block for AHS Version 2.0" | inst new textRuns linkRuns textIndex removeArray | ^ [:oldObj | inst := self basicNew. new := Array new: (oldObj size - 2). new at: 1 put: (oldObj at: 1). textRuns := (oldObj at: 2). linkRuns := (oldObj at: 3). textIndex := 1. 1 to: linkRuns values size do: [ :index || item emphasisArray | ((item := linkRuns values at: index) notNil) ifTrue: [(item isKindOf: Array) ifFalse:[item := Array with: item]. emphasisArray := (item inject: OrderedCollection new into: [:oc :next | oc add: (ArborHyperlinkAssociation value: next). oc]) asArray. removeArray := Array new. item do: [:each | removeArray := removeArray , each class textEmphasis]. textRuns := textRuns add: emphasisArray remove: removeArray duplicate: false from: textIndex to: (textIndex + (linkRuns runs at: index) - 1)]. textIndex := textIndex + (linkRuns runs at: index)]. new at: 2 put: textRuns. oldObj become: new. oldObj changeClassToThatOf: inst]
</methods> <methods> VWHelp.AHSGraphicScreen <category>accessing</category>
builtWindow ^ self builder window
captionWidget ^self builder componentAt: #annotatedGraphicSubCanvas
doneButton ^ (self builder componentAt: #doneButton)
graphicLink graphicLink isNil ifTrue: [graphicLink := AHSHyperGraphicLinkObject new asValue]. ^graphicLink
graphicLink: aHyperGraphicLink aHyperGraphicLink isNil ifTrue: [self graphicLink setValue: nil] ifFalse: [self graphicLink value: aHyperGraphicLink].
image "Answer the image to be displayed" ^image
parentWindow "Parent Application" ^parentWindow
parentWindow: anApplication "Parent Application" parentWindow := anApplication.
sliderWidget ^ (self builder componentAt: #imageProportionSlider)
windowExtent | ext | ext := self graphicLink value windowExtent. ^ext isNil ifTrue: [| imageExtent | imageExtent := (self image extent + (20@20)) max: 100@100. imageExtent x @ (imageExtent y / self imageProportion value) rounded] ifFalse: [ext]
</methods> <methods> VWHelp.AHSGraphicScreen <category>interface opening</category>
allButOpenInterface: aSpec "Force the window to be the size saved in the Hyperlink" super allButOpenInterface: aSpec. self builder window displayBox: (0@0 extent: self preferredExtent). ^builder
openAsDialog |dlog box | dlog :=SimpleDialog new. self builder: dlog builder. dlog preBuildBlock: [:mdl :bldr | self preBuildWith: bldr]. dlog postBuildBlock: [:mdl :bldr | self postBuildWith: bldr]. dlog postOpenBlock: [:mdl :bldr | bldr window label: 'Graphic: ', self graphicLink value linkObject]. dlog builder source: self. dlog allButOpenFrom: (self class interfaceSpecFor: #windowSpec). dlog builder doFinalHookup. box := 0@0 extent: self preferredExtent. box := box align: box center with: WindowSensor cursorPoint. dlog builder openPopUpIn: box type: #normal. ^dlog accept value
openInterface: aSymbol self allButOpenInterface: aSymbol. self builder openAroundCursorWithExtent: self builder window extent andType: #normal. self builder window displayPendingInvalidation. self postOpenWith: builder. ^builder
postBuildWith: aBuilder super postBuildWith: aBuilder. self imageProportion onChangeSend: #proportionChanged to: self. self proportionChanged. aBuilder window label: 'Graphic: ', self graphicLink value linkObject; application: self parentWindow application; beSlave.
preBuildWith: aBuilder super preBuildWith: aBuilder. aBuilder visualAt: #image put: (self image).
</methods> <methods> VWHelp.AHSGraphicScreen <category>actions</category>
done self graphicLink: nil. self closeRequest.
</methods> <methods> VWHelp.AHSGraphicScreen <category>updating</category>
proportionChanged "Update the window accordingly." | p widget | self graphicLink value isNil ifTrue: [^self]. (self builder componentAt: #captionTextEditor) isNil ifTrue:[^self]. p := self imageProportion value. widget := self builder componentAt: #image. widget newLayout: (widget layout topFraction: p / 2). widget := self builder componentAt: #captionTextEditor. widget newLayout: (widget layout topFraction: p). self relayoutSubCanvas.
</methods> <methods> VWHelp.AHSGraphicScreen <category>initialize-release</category>
setImage: anImage (anImage isKindOf: Image) ifTrue: [image := CachedImage on: anImage] ifFalse: [image := anImage]
</methods> <methods> VWHelp.AHSGraphicScreen <category>aspects</category>
caption caption isNil ifTrue: [caption := (AspectAdaptor forAspect: #caption) subjectChannel: self graphicLink]. ^caption
imageProportion imageProportion isNil ifTrue: [imageProportion := (AspectAdaptor forAspect: #imageProportion) subjectChannel: self graphicLink]. ^imageProportion
</methods> <methods> VWHelp.AHSGraphicScreen <category>private</category>
preferredExtent "Answer the extent of the window so that the subcanvas containing the annotated graphic is sized correctly." | canvasExtent difference | self builtWindow extentEvent: self builtWindow extent. "Get the components to layout." canvasExtent := self captionWidget bounds extent. difference := self windowExtent value - canvasExtent. ^self builtWindow extent + difference
relayoutSubCanvas | widget | widget := (self builder componentAt: #annotatedGraphicSubCanvas) widget. widget layoutComponentsForBounds: widget bounds; invalidate.
</methods> <methods> VWHelp.AHSGraphicScreen class <category>instance creation</category>
onImage: anImage link: aHyperGraphicsLink parent: aWindow ^self new setImage: anImage; graphicLink: aHyperGraphicsLink; parentWindow: aWindow
</methods> <methods> VWHelp.AHSGraphicScreen class <category>resources</category>
image ^((#noImageDefined << self messageCatalogID >> 'noImageDefined') asText emphasizeAllWith: #(bold large)) asComposedText
</methods> <methods> VWHelp.AHSGraphicScreen class <category>accessing</category>
messageCatalogID ^#arborHelpSystem
</methods> <methods> VWHelp.AHSGraphicScreen class <category>testing</category>
haveExistingWindowFor: aSymbol "Answer true if we opened an existing window for an image with the name aSymbol." | existingWindow | existingWindow := ScheduledControllers scheduledControllers detect: [:c | (c model isMemberOf: self) and: [c view label == aSymbol]] ifNone: [^ false]. existingWindow view isCollapsed ifTrue: [existingWindow view expand]. existingWindow view raise. ^true.
</methods> <methods> VWHelp.ArborIconSet <category>accessing</category>
contractedDeselected ^contractedDeselected isNil ifTrue: [self contractedSelected] ifFalse: [contractedDeselected]
contractedDeselected: anObject contractedDeselected := anObject
contractedSelected ^contractedSelected
contractedSelected: anObject contractedSelected := anObject
contractedTransitionDeselected ^contractedTransitionDeselected isNil ifTrue: [self contractedTransitionSelected] ifFalse: [contractedTransitionDeselected]
contractedTransitionDeselected: anObject contractedTransitionDeselected := anObject
contractedTransitionSelected ^contractedTransitionSelected isNil ifTrue: [self contractedSelected] ifFalse: [contractedTransitionSelected]
contractedTransitionSelected: anObject contractedTransitionSelected := anObject
emptyDeselected ^emptyDeselected isNil ifTrue: [self emptySelected] ifFalse: [emptyDeselected]
emptyDeselected: anObject emptyDeselected := anObject
emptySelected ^emptySelected
emptySelected: anObject emptySelected := anObject
expandedDeselected ^expandedDeselected isNil ifTrue: [self expandedSelected] ifFalse: [expandedDeselected]
expandedDeselected: anObject expandedDeselected := anObject
expandedSelected ^expandedSelected
expandedSelected: anObject expandedSelected := anObject
expandedTransitionDeselected ^expandedTransitionDeselected isNil ifTrue: [self expandedTransitionSelected] ifFalse: [expandedTransitionDeselected]
expandedTransitionDeselected: anObject expandedTransitionDeselected := anObject
expandedTransitionSelected ^expandedTransitionSelected isNil ifTrue: [self expandedSelected] ifFalse: [expandedTransitionSelected]
expandedTransitionSelected: anObject expandedTransitionSelected := anObject
hotRegion hotRegion isNil ifTrue: [| extent img | extent := 0@0. #(expandedSelected expandedDeselected expandedTransitionSelected expandedTransitionDeselected contractedSelected contractedDeselected contractedTransitionSelected contractedTransitionDeselected emptySelected emptyDeselected) do: [:sel | img := self perform: sel. img notNil ifTrue: [extent := extent max: img bounds extent]]. hotRegion := 0@0 extent: extent]. ^hotRegion
hotRegion: aRectangle hotRegion := aRectangle.
indentOffset ^indentOffset isNil ifTrue: [self hotRegion width] ifFalse: [indentOffset]
indentOffset: anIntegerOrNil indentOffset := anIntegerOrNil.
</methods> <methods> VWHelp.ArborIconSet <category>displaying</category>
display: anIconSelector on: aGraphicsContext ^self display: anIconSelector on: aGraphicsContext at: 0@0
display: anIconSelector on: aGraphicsContext at: aPoint | icon | icon := self perform: anIconSelector. icon notNil ifTrue: [icon displayOn: aGraphicsContext at: aPoint]. ^icon
</methods> <methods> VWHelp.ArborIconSet <category>testing</category>
isHot: aPoint "Answer true if aPoint's X value is within the bounds of the hotRegion. aPoint should be in the local coordinate system." ^aPoint x between: self hotRegion left and: self hotRegion right
</methods> <methods> VWHelp.ArborIconSet class <category>class initialization</category>
initialize self iconSets isNil ifTrue: [self initializeIconSets].
initializeBookIconSet self iconSets at: #book put: (self newExpanded: self openBookIcon expandedTransition: self halfwayBookIcon contracted: self closedBookIcon contractedTransition: self halfwayBookIcon empty: self pageIcon hotRegion: nil)
initializeDefaultIconSet self iconSets at: #default put: (self newExpanded: self expandedIcon expandedTransition: self expandedTransitionIcon contracted: self contractedIcon contractedTransition: self contractedTransitionIcon empty: self emptyIcon hotRegion: nil)
initializeIconSets IconSets := Dictionary new. self initializeDefaultIconSet. self initializeBookIconSet.
</methods> <methods> VWHelp.ArborIconSet class <category>resources</category>
closedBookIcon ^OpaqueImage figure: self closedBookImage shape: self closedBookMask
contractedIcon ^OpaqueImage figure: (CachedImage on: self contractedImage) shape: (CachedImage on: self contractedMask)
contractedTransitionIcon ^OpaqueImage figure: (CachedImage on: self contractedTransitionImage) shape: (CachedImage on: self contractedMask)
emptyIcon ^OpaqueImage figure: self emptyImage shape: self emptyMask
expandedIcon ^OpaqueImage figure: (CachedImage on: self expandedImage) shape: (CachedImage on: self expandedMask)
expandedTransitionIcon ^OpaqueImage figure: (CachedImage on: self expandedTransitionImage) shape: (CachedImage on: self expandedMask)
halfwayBookIcon ^OpaqueImage figure: self halfwayBookImage shape: self halfwayBookMask
openBookIcon ^OpaqueImage figure: self openBookImage shape: self openBookMask
pageIcon ^OpaqueImage figure: self pageImage shape: self pageMask
</methods> <methods> VWHelp.ArborIconSet class <category>instance creation</category>
newExpanded: expanded contracted: contracted empty: empty hotRegion: aRectangle "aRectangle may be nil and will then default to the largest image." ^self newExpanded: expanded expandedTransition: nil contracted: contracted contractedTransition: nil empty: empty hotRegion: aRectangle
newExpanded: expanded expandedTransition: expandedTransition contracted: contracted contractedTransition: contractedTransition empty: empty hotRegion: aRectangle "aRectangle may be nil and will then default to the largest image. The transition images may be nil, in which case they default to the non-transition image." ^self new expandedSelected: expanded; expandedTransitionSelected: expandedTransition; contractedSelected: contracted; contractedTransitionSelected: contractedTransition; emptySelected: empty; hotRegion: aRectangle
</methods> <methods> VWHelp.ArborIconSet class <category>icon set accessing</category>
defaultIconSet ^self iconSetNamed: #default
iconSetNamed: anIconSetName ^IconSets at: anIconSetName ifAbsent: [self defaultIconSet]
iconSets ^IconSets
</methods> <methods> VWHelp.ArborCenteredLabelAndIcon <category>accessing</category>
height "Answer the height in pixels of one line of text in the receiver. If the offset is not zero then the answer will include the height of the offset." self width = 0 ifTrue: [^0]. icon == nil ifTrue: [^super height]. ^super height max: (icon preferredBounds height + self offset y)
iconOffset "Answer the offset for displaying the icon, which takes into account the height of the icon and the height of the text." ^(icon preferredBounds height > self attributes lineGrid) ifTrue: [self offset] ifFalse: [self offset + (0 @ ((self attributes lineGrid - icon bounds height) / 2.0) rounded)]
</methods> <methods> VWHelp.ArborCenteredLabelAndIcon <category>displaying</category>
displayOn: aGraphicsContext "Display the receiver on aGraphicsContext. The receiver may alter aGraphicsContext in any way it chooses." icon notNil ifTrue: [icon displayOn: aGraphicsContext at: self iconOffset]. self displayTextOn: aGraphicsContext
displayTextOn: aGraphicsContext | scanner wid yDelta | (text == nil or: [text isEmpty]) ifTrue: [^self]. icon == nil ifTrue: [^super displayTextOn: aGraphicsContext]. yDelta := (self attributes lineGrid > icon preferredBounds height) ifTrue: [self offset y] ifFalse: [self offset y + ((icon preferredBounds height - self attributes lineGrid) / 2.0) rounded]. wid := (width == nil ifTrue: [SmallInteger maxVal] ifFalse: [width]). scanner := DisplayScanner new. scanner textStyle: self attributes. scanner displayLine: (1 to: text size) inText: text left: self left right: wid top: yDelta on: aGraphicsContext.
</methods> <methods> VWHelp.AHSFullGlossaryViewer <category>aspects</category>
fullGlossaryList "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." fullGlossaryList isNil ifTrue: [fullGlossaryList := SelectionInList new]. ^ fullGlossaryList
fullGlossaryText "This method was generated by UIDefiner. The initialization provided below may have been preempted by an initialize method." fullGlossaryText isNil ifTrue: [fullGlossaryText := String new asValue]. ^ fullGlossaryText
</methods> <methods> VWHelp.AHSFullGlossaryViewer <category>private</category>
clearGlossaryText "Private - Clear the glossary text currently displayed." self glossaryText: ''
setGlossaryText "Private - Set the contents of the glossary text pane to the glossary value associated with the selected glossary entry." self glossaryText: self currentGlossaryEntry
updateGlossaryList "Private - Update the glossary list with keys from the glossary dictionary." self fullGlossaryList list: self dictionary keys asSortedCollection.
</methods> <methods> VWHelp.AHSFullGlossaryViewer <category>events</category>
noticeOfWindowClose: aWindow self dictionary odbReleaseUnDirtyLock. ^ super noticeOfWindowClose: aWindow
</methods> <methods> VWHelp.AHSFullGlossaryViewer <category>interface opening</category>
openAsDialog | dlog | dlog := SimpleDialog new. self builder: dlog builder. dlog preBuildBlock: [:mdl :bldr | self preBuildWith: bldr]. dlog postBuildBlock: [:mdl :bldr | self postBuildWith: bldr]. ^ dlog openFor: self interface: #windowSpec
postBuildWith: aBuilder super postBuildWith: aBuilder. self updateGlossaryList. self fullGlossaryList selectionIndexHolder onChangeSend: #selectionChanged to: self.
</methods> <methods> VWHelp.AHSFullGlossaryViewer <category>accessing</category>
currentGlossaryEntry "Answer the glossary entry for the current key." ^ self outliner glossaryAt: self currentGlossaryKey
currentGlossaryKey "Answer the current glossary key selection" ^ self fullGlossaryList selection
dictionary ^ self outline glossaryDictionary
glossaryText: aValue "Private- Set the text to be displayed for the current glossary entry." ^ self fullGlossaryText value: aValue
outline ^ self parent outline
outliner ^self parent
parent ^ parent
parent: anApplicationModel ^ parent := anApplicationModel
</methods> <methods> VWHelp.AHSFullGlossaryViewer <category>change messages</category>
selectionChanged self fullGlossaryText retractInterestsFor: self. self currentGlossaryKey isNil ifTrue: [self clearGlossaryText] ifFalse: [self setGlossaryText]. self fullGlossaryText onChangeSend: #textChanged to: self
</methods> <methods> VWHelp.AHSFullGlossaryViewer class <category>accessing</category>
messageCatalogID ^#arborHelpSystem
</methods> <methods> VWHelp.AHSFullGlossaryViewer class <category>interface opening</category>
fullGlossaryDialogOn: anOutliner ^ self new initialize parent: anOutliner; openAsDialog
fullGlossaryOn: anOutliner ^ self new parent: anOutliner; open
</methods> <methods> VWHelp.AHSHTMLTopicBodyWriter <category>accessing</category>
endEmphasisConversionBlocks ^ self class endEmphasisConversionBlocks
</methods> <methods> VWHelp.AHSHTMLTopicBodyWriter <category>writing</category>
emitCaptionCell: aLink "Emit the caption table cell." aLink hasCaption ifTrue: [ outputStream nextPutAll: '<TD><P>'; nextPutAll: aLink caption; nextPutAll: '</P></TD>'].
emitCaptionCenter: aLink "Emit the graphic and caption with the caption in the center." outputStream nextPutAll: '<TR>'. self emitGraphicCenterCell: aLink. outputStream nextPutAll: '</TR>'. aLink hasCaption ifTrue: [ outputStream nextPutAll: '<TR>'. self emitCaptionCell: aLink. outputStream nextPutAll: '</TR>'].
emitCaptionLeft: aLink "Emit the graphic and caption with the caption on the left." outputStream nextPutAll: '<TR>'. self emitCaptionCell: aLink. self emitGraphicEdgeCell: aLink. outputStream nextPutAll: '</TR>'.
emitCaptionRight: aLink "Emit the graphic and caption with the caption on the right." outputStream nextPutAll: '<TR>'. self emitGraphicEdgeCell: aLink. self emitCaptionCell: aLink. outputStream nextPutAll: '</TR>'.
emitGraphicCenterCell: aLink "Emit the graphic into a cell so that the graphic is centered." outputStream nextPutAll: '<TD><P align="center">'; nextPutAll: (owner embedGraphic: aLink); nextPutAll: '</P></TD>'.
emitGraphicEdgeCell: aLink "Emit the graphic into a cell whose width matches the image size." outputStream nextPutAll: '<TD width='; print: (owner graphicAt: aLink linkObject) width; nextPut: $>; nextPutAll: (owner embedGraphic: aLink); nextPutAll: '</TD>'.
writeBody: aText "Convert aText to HTML and write it out on an outputStream. Override my parent's implementation to properly handle BLOCKQUOTE tags." | blockQuoteLevel | blockQuoteLevel := 0. 1 to: aText size do: [:index | (index = 1 or: [(aText at: index - 1) = Character cr]) ifTrue: [| t depth | t := aText copyFrom: index to: index. depth := 0. t emphasesLike: #ahsIndent->nil do: [:emph | depth := emph value]. depth > blockQuoteLevel ifTrue: [depth - blockQuoteLevel timesRepeat: [outputStream nextPutAll: '<blockquote>']] ifFalse: [blockQuoteLevel - depth timesRepeat: [outputStream nextPutAll: '</blockquote>']]. blockQuoteLevel := depth]. self writeText: aText at: index]. blockQuoteLevel timesRepeat: [outputStream nextPutAll: '</blockquote>'].
writeConvertedEmphasis: anEmphasis "Private - Write anEmphasis in a form appropriate to the format used for the output file." | newEmphasis outputValue | outputValue := (newEmphasis := self exportableEmphasisFrom: anEmphasis) isEmpty ifTrue: [''] ifFalse: [newEmphasis]. outputStream nextPutAll: outputValue
writeCurrentEmphasisTermination "Private - Write the sting which terminates the current emphasis." currentEmphasis isNil ifTrue: [^ self]. outputStream nextPutAll: (self emphasisTerminationStringFor: currentEmphasis)
writeEmbeddedHypergraphicLink: aLink outputStream cr; nextPutAll: '<DIV align="center"><CENTER>'; nextPutAll: '<TABLE WIDTH='. aLink captionIsAtCenter ifTrue: [outputStream print: ((owner graphicAt: aLink linkObject) extent x max: 150)] ifFalse: [outputStream nextPutAll: '100%']. outputStream nextPutAll: '>'. aLink captionIsAtCenter ifTrue: [self emitCaptionCenter: aLink]. aLink captionIsAtLeft ifTrue: [self emitCaptionLeft: aLink]. aLink captionIsAtRight ifTrue: [self emitCaptionRight: aLink]. outputStream nextPutAll: '</TABLE></CENTER></DIV>'; cr.
writeGlossaryLink: theLink "Private - Write a glossary link to the output stream." outputStream nextPutAll: '<a href='''; nextPutAll: (owner glossaryLinkFor: theLink); nextPutAll: '''>'
writeGroupTermination "Private - Write the sting which represents the end of a group." self writeCurrentEmphasisTermination
writeHypergraphicLink: theLink "Private - Write a hypergraphic link to the output stream. If the graphic should be embedded, then DON'T write anything out. When the text hyperlink ends, THEN the HTML will be written (see #writeHyperlinkTermination:) - it is done this way to get the embedded graphic to appear after the text rather than before." (self shouldImbed: theLink) not ifTrue: [outputStream nextPutAll: (owner linkToGraphic: theLink)].
writeHyperlinkTermination: aLink "Private - Write the sting which represents the end of a hyperlink definition." (aLink isHyperGraphic and: [self shouldImbed: aLink]) ifTrue: [self writeEmbeddedHypergraphicLink: aLink] ifFalse: [outputStream nextPutAll: '</a>'].
writeHypertextLink: theLink "Private - Write a hypertext link." outputStream nextPutAll: '<a href='''; nextPutAll: (owner hypertextLinkFor: theLink); nextPutAll: '''>'.
</methods> <methods> VWHelp.AHSHTMLTopicBodyWriter <category>private</category>
appendEmphasisTerminationFor: anElem to: aStream "Private - Append the proper emphasis termination string to aStream.." | aKey | aKey := self emphasisKeyFrom: anElem. aStream nextPutAll: (self terminationStringFor: anElem at: aKey)
appendGroupStartTo: aStream "Private - Append the group start sequence to aStream"
convertedEmphasisEndFrom: anEmphasis "Private - Answer a new emphasis which is appropriate for RTF output." | newEmphasis emphasisStream | newEmphasis := self strippedEmphasisFrom: anEmphasis. emphasisStream := WriteStream on: ''. newEmphasis reverseDo: [:anElem | (anElem isKindOf: AHSHelpHyperLinkObject) ifFalse: [self appendEmphasisTerminationFor: anElem to: emphasisStream]]. ^ emphasisStream contents
emphasisTerminationBlockAt: aKey "Private - Answer the emphasis termination block found at a key. If absent, simply answer a block which will answer an empty string." ^ self endEmphasisConversionBlocks at: aKey ifAbsent: [[:writer :anEmph | String new]]
emphasisTerminationStringFor: anEmphasis "Answer a string which terminates the given emphasis." ^ (self definesEmphasis: anEmphasis) ifTrue: [self convertedEmphasisEndFrom: anEmphasis] ifFalse: [String new].
terminationStringFor: anElem at: aKey "Private - Answer a string which represents the proper termination string for an emphasis element value." ^ ((self emphasisTerminationBlockAt: aKey) value: self value: anElem)
</methods> <methods> VWHelp.AHSHTMLTopicBodyWriter <category>testing</category>
shouldImbed: aHyperGraphicLink "Private - Answer true if we are imbedding the link." ^owner shouldImbed: aHyperGraphicLink
</methods> <methods> VWHelp.AHSHTMLTopicBodyWriter class <category>class initialization</category>
initializeEmphasisConversionDictionary emphasisConversionDictionary := Dictionary new. emphasisConversionDictionary at: #strikeout put: [:writer :emph | '<strike>']. emphasisConversionDictionary at: #bold put: [:writer :emph | '<b>']. emphasisConversionDictionary at: #italic put: [:writer :emph | '<i>']. emphasisConversionDictionary at: #large put: [:writer :emph | '<big>']. emphasisConversionDictionary at: #underline put: [:writer :emph | '<u>']. emphasisConversionDictionary at: #strikeout put: [:writer :emph | '<strike>']. emphasisConversionDictionary at: #serif put: [:write :emph | '<tt>']. emphasisConversionDictionary at: #color put: [:writer :emph | '<font color=' , emph value htmlColorCode , '>']. " emphasisConversionDictionary at: #ahsIndent put: [:writer :emph || s | s := String new writeStream. emph value timesRepeat: [s nextPutAll: '<blockquote>']. s contents]."
initializeEndEmphasisConversionBlocks endEmphasisConversionBlocks := Dictionary new. endEmphasisConversionBlocks at: #strikeout put: [:writer :emph | '</strike>']. endEmphasisConversionBlocks at: #bold put: [:writer :emph | '</b>']. endEmphasisConversionBlocks at: #italic put: [:writer :emph | '</i>']. endEmphasisConversionBlocks at: #large put: [:writer :emph | '</big>']. endEmphasisConversionBlocks at: #underline put: [:writer :emph | '</u>']. endEmphasisConversionBlocks at: #strikeout put: [:writer :emph | '</strike>']. endEmphasisConversionBlocks at: #serif put: [:write :emph | '</tt>']. endEmphasisConversionBlocks at: #color put: [:writer :emph | '</font>']. " endEmphasisConversionBlocks at: #ahsIndent put: [:writer :emph || s | s := String new writeStream. emph value timesRepeat: [s nextPutAll: '</blockquote>']. s contents]."
initializeSpecialCharacters "The SpecialCharacterDictionary hold those character that must be converted to a special RTF representation." specialCharacterDictionary := Dictionary new. specialCharacterDictionary at: $< put: '&lt;'. specialCharacterDictionary at: $> put: '&gt;'. specialCharacterDictionary at: $& put: '&amp;'. specialCharacterDictionary at: $" put: '&quot;'.
reinitialize super reinitialize. self initializeEndEmphasisConversionBlocks
</methods> <methods> VWHelp.AHSHTMLTopicBodyWriter class <category>accessing</category>
endEmphasisConversionBlocks "Answer the dictionary containing the code blocks which will answer a string used to terminate an emphasis." endEmphasisConversionBlocks isNil ifTrue: [self initializeEndEmphasisConversionBlocks]. ^ endEmphasisConversionBlocks
</methods> <methods> VWHelp.ArborHierarchicalSequenceViewSpec <category>accessing</category>
multipleSelections "We do not support multi-selection." ^false
multipleSelections: aBoolean "Ignore it. We do not support multi-selection."
</methods> <methods> VWHelp.ArborHierarchicalSequenceViewSpec <category>private</category>
dispatchTo: policy with: builder policy arborHierarchicalListView: self into: builder
</methods> <methods> VWHelp.AHSAdjustableBoundedWrapper <category>private</category>
backgroundColor "Answer the receiver's background color." ^ColorValue white
changedPreferredBounds: oldPreferredBounds forComponent: aVisualComponent "The preferred bounds of aVisualComponent has changed from oldPreferredBounds. If the old bounds matches my bounds, then update myself to match the change." self bounds: aVisualComponent preferredBounds. "Copied from TranslatingWrapper" container == nil ifFalse: [oldPreferredBounds == nil ifTrue: [container changedPreferredBounds: oldPreferredBounds forComponent: self] ifFalse: [container changedPreferredBounds: (oldPreferredBounds translatedBy: self translation) forComponent: self]].
</methods> <methods> VWHelp.AHSHistory <category>accessing</category>
back "Answer the topic that is before topOfStack, or nil if there isn't one." self topOfStack <= 1 ifTrue: [^nil] ifFalse: [self topOfStack: self topOfStack - 1. ^self stack at: self topOfStack].
first "Answer the first topic visited, which is the first element of the linear history." ^self linearHistory first.
forward "Answer the topic that is after topOfStack, or nil if there isn't one." self stack size == self topOfStack ifTrue: [^nil] ifFalse: [self topOfStack: self topOfStack + 1. ^self stack at: self topOfStack].
linearHistory ^linearHistory
previous "Answer the topic visited previous to the current topic. Note that it retrieves the topic from the linear history." ^self linearHistory size > 1 ifTrue: [self linearHistory at: self linearHistory size - 1] ifFalse: [^nil].
stack ^stack
stack: aList stack := aList
topOfStack ^topOfStack
topOfStack: anInteger ^topOfStack := anInteger
</methods> <methods> VWHelp.AHSHistory <category>removing</category>
clear "Clear out everything." self linearHistory removeFrom: 1 to: self linearHistory size. self stack: OrderedCollection new. self topOfStack: 0.
pop "Answer the element pointed to by topOfStack, then decrement topOfStack. Answer nil if topOfStack is 0 (no element in the stack)." | topElement | self topOfStack isZero ifTrue: [^nil]. topElement := self stack at: self topOfStack. self topOfStack: self topOfStack - 1. ^topElement
</methods> <methods> VWHelp.AHSHistory <category>testing</category>
isEmpty ^self linearHistory isEmpty
</methods> <methods> VWHelp.AHSHistory <category>adding</category>
add: aTopic "Add aTopic to the end of the linear history, avoiding consecutive duplications." | lastEntry | lastEntry := ''. self linearHistory isEmpty ifFalse: [lastEntry := self linearHistory last]. lastEntry ~= aTopic ifTrue: [self linearHistory add: aTopic]
push: anEntry "Stick anEntry onto the end of the stack which is pointed to by topOfStack, avoiding any consecutive duplications. If there are any elements above topOfStack, remove them first." | stackSize lastEntry | lastEntry := ''. self topOfStack > 0 ifTrue: [lastEntry := self stack at: self topOfStack]. lastEntry ~= anEntry ifTrue: [ stackSize := self stack size. self topOfStack < stackSize ifTrue: [self stack removeLast: (stackSize - self topOfStack)]. self stack add: anEntry. self topOfStack: self topOfStack + 1]
</methods> <methods> VWHelp.AHSHistory <category>initialize-release</category>
initialize stack := OrderedCollection new. topOfStack := 0. linearHistory := List new.
</methods> <methods> VWHelp.AHSHistory class <category>instance creation</category>
new ^super new initialize.
</methods> <methods> VWHelp.AHSTextGraphicComposite <category>private-components</category>
addGraphic: aGraphic aboveText: aText self addWrapper: (AHSTextGraphicLayoutWrapper on: (LayoutWrapper on: aGraphic in: (AlignmentOrigin new leftFraction: 0.5 offset: 0; topFraction: 0 offset: 0; leftAlignmentFraction: 0.5; topAlignmentFraction: 0)) view: aGraphic nextIsBeneath: true). (aText notNil and: [aText isEmpty not]) ifTrue: [| view wrapper half | "Display the caption under the graphic. Ensure the width of the text is equal to the graphic but no less than 150." view := self textComponentFor: aText. wrapper := AHSAdjustableBoundedWrapper on: view. half := (aGraphic extent x / 2) rounded max: 75. wrapper layout: (LayoutFrame leftFraction: 0.5 offset: half negated rightFraction: 0.5 offset: half topFraction: 0 offset: 0 bottomFraction: 1 offset: SmallInteger maxVal). self addWrapper: (AHSTextGraphicLayoutWrapper on: wrapper view: view isCaption: true nextIsBeneath: true)].
addGraphic: aGraphic thenText: aText | view wrapper | self addWrapper: (AHSTextGraphicLayoutWrapper on: (LayoutWrapper on: aGraphic in: 10@0) view: aGraphic nextIsBeneath: false). view := self textComponentFor: aText. wrapper := AHSAdjustableBoundedWrapper on: view. wrapper layout: (LayoutFrame leftFraction: 0 offset: aGraphic extent x + 20 rightFraction: 1 offset: 0 topFraction: 0 offset: 0 bottomFraction: 1 offset: SmallInteger maxVal). self addWrapper: (AHSTextGraphicLayoutWrapper on: wrapper view: view isCaption: true nextIsBeneath: true).
addGraphicComponent: anAHSHelpHyperText | graphic hypergraphic | anAHSHelpHyperText isEmpty ifTrue: [^self]. hypergraphic := anAHSHelpHyperText firstAvailableHyperGraphic. graphic := self outliner outliner forest graphicAt: hypergraphic linkObject ifAbsent: [(('<< Missing Graphic: ', hypergraphic linkObject printString, ' >>') asText emphasizeAllWith: (Array with: #bold with: #large with: #color->ColorValue red)) asComposedText]. (hypergraphic hasCaption and: [hypergraphic captionIsAtLeft]) ifTrue: [self addText: hypergraphic caption thenGraphic: graphic]. (hypergraphic hasCaption and: [hypergraphic captionIsAtRight]) ifTrue: [self addGraphic: graphic thenText: hypergraphic caption]. (hypergraphic hasCaption not or: [hypergraphic captionIsAtCenter]) ifTrue: [self addGraphic: graphic aboveText: hypergraphic caption].
addText: aText thenGraphic: aGraphic | view wrapper | view := self textComponentFor: aText. wrapper := AHSAdjustableBoundedWrapper on: view. wrapper layout: (LayoutFrame leftFraction: 0 offset: 0 rightFraction: 1 offset: (aGraphic extent x + 20) negated topFraction: 0 offset: 0 bottomFraction: 1 offset: SmallInteger maxVal). self addWrapper: (AHSTextGraphicLayoutWrapper on: wrapper view: view isCaption: true nextIsBeneath: false). self addWrapper: (AHSTextGraphicLayoutWrapper on: (LayoutWrapper on: aGraphic in: (AlignmentOrigin new leftFraction: 1 offset: -10; topFraction: 0 offset: 0; leftAlignmentFraction: 1; topAlignmentFraction: 0)) view: aGraphic nextIsBeneath: true).
addTextComponent: anAHSHelpHyperText | view | anAHSHelpHyperText isEmpty ifTrue: [^self]. view := self textComponentFor: anAHSHelpHyperText. self addWrapper: (AHSTextGraphicLayoutWrapper on: (AHSAdjustableBoundedWrapper on: view at: 0@0) view: view).
backgroundColor "Answer the receiver's background color." ^ColorValue white.
textComponentFor: aText | view | view := AHSHelpTextEditorView model: aText asValue. view controller performer: self outliner. self outliner isReadOnly ifTrue: [view controller readOnly: true]. ^view
</methods> <methods> VWHelp.AHSTextGraphicComposite <category>private-selection support</category>
allTextComponentsDo: aBlock self components do: [:c | c wrapsTextView ifTrue: [aBlock value: c]].
characterBlockAtLocalPoint: aPoint for: aComponent "Answer a character block based on aPoint (which is in aComponent's coordinate system). The block is translated into my coordinate system, meaning that the string index as well as the bounds of the block are adjusted to be my global view of things." ^self characterBlockAtPoint: aPoint + (self translationFor: aComponent)
characterBlockAtPoint: aPoint "Answer a character block. The block is translated into my coordinate system, meaning that the string index as well as the bounds of the block are adjusted to be my global view of things." | c | ^(c := self textComponentNearestTo: aPoint) isNil ifTrue: [nil] ifFalse: [| localBlock | localBlock := c view characterBlockAtPoint: (c view globalPointToLocal: (self localPointToGlobal: aPoint)). AHSCompositeCharacterBlock stringIndex: (self sizeOfAllTextUpTo: c) + localBlock stringIndex translation: (self translationFor: c view) component: c view localBlock: localBlock]
componentContaining: aPoint ifNone: aBlock ^self components detect: [:c | (c preferredBounds expandedBy: (0@0 corner: 1@1)) containsPoint: aPoint] ifNone: aBlock
deselect self allTextComponentsDo: [:c | c view controller deselect].
scrollBy: aPoint "Before scrolling, be sure there are no display events pending or the scroll and pending invalidations may conflict." self topComponent checkForEvents. self scrollWrapper scroll: aPoint negated
scrollIfNeededTo: aPoint "Scroll if needed to make aPoint visible. When possible, scroll by whole text lines only. Only worry about vertical scrolling." | bounds dy block | bounds := self bounds. block := self characterBlockAtPoint: aPoint. (dy := (aPoint y min: block top) - bounds top) < 0 ifFalse: [ (dy := (aPoint y max: block bottom) - bounds bottom) > 0 ifFalse: [dy := 0]]. dy ~= 0 ifTrue: [self scrollBy: 0@dy]. ^0@dy
selection "This method assumes that the controller has properly managed the components' selection properties. That is, all components with active selections SHOULD be next to each other but this condition is not verified." | str | str := (String new: 500) writeStream. self allTextComponentsDo: [:comp | comp view selectionShowing ifTrue: [ str isEmpty not ifTrue: [str cr; cr]. str nextPutAll: comp view controller selection]]. ^str contents
sizeOfAllTextUpTo: aComponent | size | size := 0. self allTextComponentsDo: [:comp | comp = aComponent ifTrue: [^size]. size := size + comp view displayContents text size]. ^size
textComponentNearestTo: aPoint "Assuming the composite contains at least one text component, answer the one closest to aPoint. At the present time, the closest component will either be the one containing the point, the text element immediately to the left of aPoint, or the next text element deemed after the point." | comp | comp := self componentContaining: aPoint ifNone: [nil]. ^(comp isNil or: [comp wrapsTextView not]) ifTrue: [| before left | before := nil. self allTextComponentsDo: [:c || cb | cb := c preferredBounds. "See if the component is before aPoint." (cb bottom < aPoint y) ifTrue: [ before := c. left := false] ifFalse: [ "See if the component is to the left of aPoint." ((cb top < aPoint y) and: [cb right < aPoint x]) ifTrue: [ before := c. left := true]]. "See if the component is after aPoint." ((cb top > aPoint y) or: [(cb bottom > aPoint y) and: [cb left > aPoint x]]) ifTrue: [^left = true ifTrue: [before] ifFalse: [c]]]. before] ifFalse: [comp]
translationFor: aComponent "Answer the amount aComponent is translated from my origin." ^(aComponent localPointToGlobal: 0@0) - (self localPointToGlobal: 0@0)
</methods> <methods> VWHelp.AHSTextGraphicComposite <category>private</category>
buildComponents "Build the components from the current model's value. Base the build on the hyperlinks in the text." | graphics start mdl | graphics := OrderedCollection new. start := 1. mdl := self model value. mdl isString not ifTrue: [ mdl emphasesDo: [:emph :interval | ((mdl isHyperGraphic: emph) and: [emph value isEmbedded]) ifTrue: [graphics add: interval]]. graphics do: [:interval | self addTextComponent: (mdl copyFrom: start to: interval first - 1). self addGraphicComponent: (mdl copyFrom: interval first to: interval last). start := interval last + 1]]. self addTextComponent: (mdl copyFrom: start to: mdl size).
changedPreferredBounds: oldPreferredBoundsOrNil forComponent: component "Notify the receiver's container that the receiver's preferredBounds has changed. Always assume that if we get this notification that a redraw is necessary." container == nil ifFalse: [| lastBounds | lastBounds := preferredBounds. self bounds: self bounds. lastBounds ~= preferredBounds ifTrue: [ container changedPreferredBounds: lastBounds forComponent: self]. "Invalidate only from the changed guy on down." self invalidateRectangle: (0@component bounds origin y extent: (lastBounds merge: preferredBounds) extent)].
discardComponents "Throw away the current set of components and do any other necessary cleanup." self controller resetState. self components do: [:v | v release]. components := OrderedCollection new.
layoutComponentsForBounds: newBounds "The receiver has been sized to the given parameters. Re-layout all of the receiver's components." | holdTop top | preferredBounds := 0@0 extent: 0@0. holdTop := top := 0. 1 to: components size do: [:i || component | component := components at: i. "1. Set the bounds to coerce the component to recompose itself (if it's a text guy)." "2. Set the bounds to be the same as the preferred bounds since that's what we want in the first place (but couldn't know the actual height without recomposing after defining the width - kind of a catch-22)." "3. Reset the bounds after doing a layout computation so that widgets with special alignments are properly placed." component bounds: (0@top corner: newBounds corner). component bounds: component preferredBounds. component bounds: (self computeDisplayBoxFor: component inDisplayBox: (0@top corner: newBounds corner)). holdTop := holdTop max: component preferredBounds bottom + 10. component nextComponentIsBeneath ifTrue: [top := holdTop]. preferredBounds := preferredBounds merge: component preferredBounds].
scrollWrapper ^self container
setModel: aModel "Coerce an initial update." super setModel: aModel. self update: #value.
</methods> <methods> VWHelp.AHSTextGraphicComposite <category>event driven</category>
handlerForMouseEvent: aMouseEvent "Since I have a controller, ask the controller to handle the event. Copied out of VisualPart>>handlerForMouseEvent." | ctrl | ctrl := self getController. ctrl notNil ifTrue: [| obj | obj := Object errorSignal handle: [:ex | "Trap errors occurring while searching for the object wanting control." Controller badControllerSignal raiseErrorString: 'Bad controller in handlerForMouseEvent:'] do: [ctrl handlerForMouseEvent: aMouseEvent]. obj notNil ifTrue: [^obj]]. ^super handlerForMouseEvent: aMouseEvent
</methods> <methods> VWHelp.AHSTextGraphicComposite <category>accessing</category>
outliner ^outliner
outliner: anAHSOutliner outliner := anAHSOutliner. self model: self outliner toolbarTextEditor text.
</methods> <methods> VWHelp.AHSTextGraphicComposite <category>controller accessing</category>
defaultControllerClass ^AHSTextGraphicCompositeController
</methods> <methods> VWHelp.AHSTextGraphicComposite <category>updating</category>
update: anAspectSymbol "The model has changed. Discard my current set of components and build up a new one. Temporarily set the container to nil during the build so that there is minimal flashing during the update." | parent tc lineGrid | self container isNil ifTrue: [^self]. ((container container isKindOf: BorderedWrapper) and: [container container insideColor isNil]) ifTrue: [container container insideColor: ColorValue white]. parent := self container. container := nil. self discardComponents. self buildComponents. container := parent. self deselect. self layoutComponentsForBounds: self bounds. (tc := self textComponentNearestTo: 0@0) isNil ifTrue: [lineGrid := TextAttributes default lineGrid] ifFalse: [lineGrid := tc view lineGrid]. self scrollWrapper scrollOffsetHolder value: 0@0; grid: 20@lineGrid. self changedPreferredBounds: nil. self invalidate.
</methods> <methods> Core.String <category>AHSOHC adds</category>
asAHSHyperText "Answer an AHSHelpHyperText whose string is the receiver." ^#{VWHelp.AHSHelpHyperText} value fromString: self
</methods> <methods> UI.UILookPolicy <category>Arbor Widgets adds-building</category>
arborDragBarView: spec into: builder | c unhooked | c := #{VWHelp.ArborDragBarView} value new. c etched: spec etched. c setLineWidth: spec lineWidth. c setOrientation: spec orientation. c controller boundedDrag: spec boundedDrag. unhooked := OrderedCollection new. (Array with: spec leftWidgets with: spec rightWidgets with: spec aboveWidgets with: spec belowWidgets) with: #(left right above below) do: [:ids :access | ids do: [:id || sw | (sw := builder componentAt: id) isNil ifTrue: [unhooked add: id] ifFalse: [(c controller perform: access) add: sw]]]. unhooked isEmpty not ifTrue: [| str | str := String new writeStream. (spec name isNil or: [spec name isEmpty]) ifTrue: [str nextPutAll: 'An unnamed drag bar'] ifFalse: [str nextPutAll: 'The drag bar '; print: spec name]. str nextPutAll: ' was unable to hook up to the'; cr; nextPutAll: 'following components:'. unhooked do: [:id | str crtab; print: id]. str cr; cr. builder isEditing ifTrue: [str nextPutAll: 'The specified components do not appear to exist.'] ifFalse: [ str nextPutAll: 'To correct this problem, ensure all component names are'; cr; nextPutAll: 'correct and place the components BEHIND the drag bar in'; cr; nextPutAll: 'the UIPainter.']. Dialog warn: str contents]. c widgetState isEnabled: spec initiallyEnabled. builder isEditing ifFalse: [c widgetState isVisible: spec initiallyVisible]. builder component: c. builder wrapWith: BoundingWrapper new. builder applyLayout: spec layout. builder wrapWith: (self simpleWidgetWrapperOn: builder spec: spec)
arborHierarchicalListView: spec into: builder | lv model menu performer dropSourceCallbacks | model := spec modelInBuilder: builder. lv := #{VWHelp.ArborHierarchicalSequenceView} value new. lv model: model listHolder. spec hasHorizontalScrollBar ifTrue: [lv measureWidth: true]. lv selectionChannel: model selectionIndexHolder. (menu := spec getMenuIn: builder) == nil ifFalse: [lv controller menuHolder: menu]. (performer := spec getPerformerIn: builder) == nil ifFalse: [lv controller performer: performer]. self setStyleOf: lv to: spec style. self arborSetDispatcherOf: lv fromSpec: spec builder: builder. spec tabable ifTrue: [lv widgetState isTabStop: true. builder sendKeyboardTo: lv] ifFalse: [lv widgetState canTakeFocus: true. lv controller keyboardProcessor: builder keyboardProcessor]. lv widgetState isEnabled: spec initiallyEnabled. builder isEditing ifFalse: [lv widgetState isVisible: spec initiallyVisible]. dropSourceCallbacks := spec dropSourceCallbacksOrNilInBuilder: builder. dropSourceCallbacks == nil ifFalse: [lv controller dragDropCallbacks: dropSourceCallbacks. lv controller selectOnDownWithDrag: spec selectOnDownIfDragEnabled]. builder component: lv. self manufactureGeneralWrapperFor: spec into: builder. builder applyLayout: spec layout. builder wrapWith: (self simpleWidgetWrapperOn: builder spec: spec)
arborSetDispatcherOf: component fromSpec: spec builder: builder "This method ensures that the controller will have at least an empty dispatcher with the receiver set to the 'performer' (which is generally the builder's source - the ApplicationModel whose composite view contains 'component')." builder isEditing ifTrue: [^self]. component controller setDispatcher: (UIDispatcher new receiver: (spec getPerformerIn: builder)). self setDispatcherOf: component fromSpec: spec builder: builder.
</methods> <methods> UI.ParagraphEditor <category>Arbor GUI Extensions adds</category>
aisFindAndSelect: aString ignoreCase: aBoolean "Search for the text aString in the text and select it if found." | index | index := (self text findString: aString startingAt: self selectionStopIndex ignoreCase: aBoolean useWildcards: false) first. index = 0 ifTrue: [^false]. self view displaySelection: true. self selectAndScrollFrom: index to: index + aString size - 1. ^true
aisSetEmphasisHere: anEmphasis "Set the current emphasis directly." emphasisHere := anEmphasis.
</methods> <methods> Core.Collection <category>AHS Outline Help Core adds</category>
relate: aBlock "Evaluate aBlock with each of the receiver's elements as the argument. Answer the result of evaluating aBlock the first time that evaluation is non-nil. (That is, find the first non-nil relationship to an element with myself.)" ^self relate: aBlock ifNone: [self notFoundError]
relate: aBlock ifNone: exceptionBlock "Evaluate aBlock with each of the receiver's elements as the argument. Answer the result of evaluating aBlock the first time that evaluation is non-nil. (That is, find the first non-nil relationship to an element with myself.)" self do: [:each | | result | (result := aBlock value: each) notNil ifTrue: [^result]]. ^exceptionBlock value
</methods> <methods> Graphics.CachedImage <category>AHSOHC adds</category>
ahsAsCachedImage ^self
ahsAsImage ^self image
</methods> <methods> UI.Menu <category>AHS Outline Help Core adds</category>
aisAddItem: aMenuItem after: previousMenuItem "Add aMenuItem after previousMenuItem. If previousMenuItem does not exist or is nil, aMenuItem is added as the first item in the menu. The new menu item will become part of the last group of menu items." | index total groupIndex | index := items indexOf: previousMenuItem ifAbsent: [0]. items := items asOrderedCollection add: aMenuItem beforeIndex: index + 1; asArray. total := 0. groupIndex := (1 to: groupSizes size) relate: [:i | (total := total + (groupSizes at: i)) >= index ifTrue: [i] ifFalse: [nil]]. groupSizes at: groupIndex put: ((groupSizes at: groupIndex) + 1).
aisAddItem: aMenuItem before: previousMenuItem "Add aMenuItem before previousMenuItem. If previousMenuItem does not exist or is nil, aMenuItem is added as the last item in the menu. The new menu item will become part of the last group of menu items." | index | (index := self indexOfMenuItem: previousMenuItem) = 0 ifTrue: [index := self menuItems size + 1]. ^self aisAddItem: aMenuItem after: (index = 1 ifTrue: [nil] ifFalse: [self menuItemAt: index - 1])
aisAddMenu: aMenu withSeparator: aBoolean "Add the items from aMenu to myself. If aBoolean is true, place a separator between the current menu contents and the contents of aMenu." | first | first := true. aMenu aisMenuItemGroups do: [:grp || group | group := grp collect: [:item | item copy]. (first and: [aBoolean not]) ifTrue: [ group do: [:item | self addItem: item]. first := false] ifFalse: [self addItemGroup: group]].
aisAddSeparator "Insert a separator at the end of the menu." groupSizes last ~= 0 ifTrue: [groupSizes := groupSizes copyWith: 0].
aisAddSeparatorAfter: aMenuItem "Insert a separator after aMenuItem. If aMenuItem does not exist in the menu, or if aMenuItem is already the last item in a group then no separator is added to the menu." | index newSizes range | (index := self indexOfMenuItem: aMenuItem) = 0 ifTrue: [^self]. newSizes := OrderedCollection new. range := 0 to: 0. groupSizes do: [:size | range := range last + 1 to: range last + size. ((range includes: index) and: [range last ~= index]) ifTrue:[| partial | partial := (index - range first) + 1. newSizes addLast: partial. newSizes addLast: range size - partial] ifFalse: [newSizes addLast: size]]. groupSizes := newSizes asArray.
aisAddSeparatorBefore: aMenuItem "Insert a separator before aMenuItem. If aMenuItem does not exist in the menu, or if aMenuItem is already the first item in a group then no separator is added to the menu." | index | (index := self indexOfMenuItem: aMenuItem) <= 1 ifTrue: [^self]. ^self aisAddSeparatorAfter: (self menuItemAt: index - 1)
aisMenuItemGroups | groups base | groups := OrderedCollection new. base := OrderedCollection withAll: self menuItems. groupSizes do: [:size | groups addLast: OrderedCollection new. size timesRepeat: [groups last addLast: base removeFirst]]. ^groups
</methods> <methods> Graphics.OpaqueImage <category>AHSOHC adds</category>
ahsAsCachedImage ^self class figure: self figure ahsAsCachedImage shape: self shape ahsAsCachedImage
ahsAsImage ^self figure ahsAsImage
</methods> <methods> Graphics.VisualPart <category>Arbor Core adds</category>
aisWidgetWrapper "Try and find the widget wrapper. If it can't be found, answer nil." ^self container isNil ifTrue: [nil] ifFalse: [self container aisWidgetWrapper]
</methods> <methods> UI.ScheduledWindow <category>Arbor Core adds</category>
aisWidgetWrapper "Try and find the widget wrapper. If it can't be found, answer nil." ^nil
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-outlines</category>
bookmarksInFlatFileNamed: aString "Answers nil if not found" | bookmarks aFilename | bookmarks := nil. Cursor wait showWhile: [aFilename := self fullBookmarkFilename: aString. aFilename asFilename exists ifTrue: [bookmarks := AHSUtils bossInObjectFrom: aFilename. "Make sure it's an AHSPersistentDictionary" (bookmarks isKindOf: AHSPersistentDictionary) ifFalse: [bookmarks := nil]]]. ^bookmarks
bookmarksInFlatFileNamed: aString put: bookmarks "Save bookmarks in a flat file." Cursor wait showWhile: [| aFilename | aFilename := self fullBookmarkFilename: aString. AHSUtils bossOutObject: bookmarks on: aFilename]. ^true
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-outlines - private</category>
bossInOutlineNamed: aString "Private - Answer the outline contained in the boss file named aString. Perform any necessary fixups before answering the outline." | fixups outline | fixups := OrderedCollection new. outline := AHSOutline fixupSignal handle: [:ex | ex proceedWith: fixups] do: [AHSUtils bossInObjectFrom: aString]. fixups do: [:each | each value: aString]. ^ outline
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-outlines</category>
chooseOutlineNameInFile "Put up a dialog to choose an outline name for a file" | fname | fname := Dialog requestFileName: 'Outline name:' default: '*' version: #mustBeOld ifFail: [^nil]. ^fname
fullBookmarkFilename: aString "Converts the bookmark filename to the full filename by prepending the bookmark directory from AHSPreferences." | aFilename | aFilename := aString. AHSPreferences bookmarkDirectory == #current ifTrue: [aFilename := aString asFilename tail]. AHSPreferences bookmarkDirectory == #outline ifTrue: [aFilename := aString]. AHSPreferences bookmarkDirectory == #specified ifTrue: [| aDirectory | (aDirectory := AHSPreferences specifiedDirectory) isNil ifTrue: [aDirectory := String new] ifFalse: [(aDirectory asFilename exists and: [aDirectory asFilename isDirectory]) ifFalse: [aDirectory := String new] ifTrue: [aDirectory asString last ~= Filename separator ifTrue: [aDirectory := aDirectory asString, (String with: Filename separator)]]]. aFilename := aDirectory, aFilename]. ^aFilename
getOutlineNamed: aString "Get the outline named aString" "By default, answers a read-only outline" ^self getOutlineNamed: aString readOnly: true
getOutlineNamed: aString readOnly: readOnly "Get the outline named aString" ^self getOutlineNamed: aString readOnly: readOnly source: self outlineSource
getOutlineNamed: aString readOnly: readOnly source: aSymbol "Get the outline named aString in the source aSymbol" aSymbol == #Versant ifTrue: [^ self outlineInVersantNamed: aString readOnly: readOnly]. aSymbol == #GemStone ifTrue: [^ self outlineInGemStoneNamed: aString readOnly: readOnly]. aSymbol == #Envy ifTrue: [^ self outlineInEnvyNamed: aString readOnly: readOnly]. aSymbol == #File ifTrue: [^ self outlineInFileNamed: aString readOnly: readOnly].
getOutlineNamed: aString source: aSymbol "Get the outline named aString, first checking in a database, then try a file by that name" "By default, answers a read-only outline" ^ self getOutlineNamed: aString readOnly: true source: aSymbol
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-private-accessing</category>
helpOutlines "Answer the GemStone help outlines" ^GemStoneHelpOutlines
helpOutlines: aDictionary "Set the GemStone help outlines" GemStoneHelpOutlines := aDictionary.
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-private</category>
invalidOutline: aString "Answer nil. Display a dialog indicating that the the item named aString does not contain a valid outline." Dialog warn: aString asText allBold , ' does not contain an outline.'. ^ nil
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-testing - private</category>
isValidOutline: anOutline "Private - Answer true if anOutline is a valid outline file." ^ anOutline notNil and: [anOutline isKindOf: AHSOutline]
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-outlines</category>
outlineInFileNamed: aString "Answers nil if not found" ^ self outlineInFileNamed: aString readOnly: self allowEditing not
outlineInFileNamed: aString readOnly: readOnly "Answers an outline from the file named aString, or nil if not found. Note that readOnly is not used. I don't know why not. (jwh)" | outline | outline := OSErrorHolder inaccessibleSignal handle: [:ex | nil] do: [self readOutlineFileNamed: aString]. ^(self isValidOutline: outline) ifTrue: [outline] ifFalse: [self invalidOutline: aString].
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-class accessing</category>
outlineSource ^OutlineSource value
outlineSource: aBoolean OutlineSource value: aBoolean
outlineSourceModel ^OutlineSource
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-outlines - private</category>
readBOSSOutline: aString "Private - Answer an outline contained in a BOSS format file named aString. If the file can't be read, answer nil." #{BinaryObjectStorage} isDefined not ifTrue: [ Dialog warn: 'BOSS must be loaded to perform this operation'. ^nil]. ^#{BinaryObjectStorage} value errorSignal handle: [:ex | Dialog warn: ex errorString. ex returnWith: nil] do: [self bossInOutlineNamed: aString]
readOutlineFileNamed: aString "Answer an outline derived from the contents of the file named aString. If the file is not found, answer nil." | outline | outline := AHSUtils performReceiver: self selector: #readRTFOutline: arguments: (Array with: aString) ifAbsent: [nil]. ^ outline isNil ifTrue: [self readBOSSOutline: aString] ifFalse: [outline]
</methods> <methods> VWHelp.AHSStorageManager class <category>AHSOHC adds-outlines</category>
removeBookmarksInFlatFileNamed: aString "Remove the bookmark file." Cursor wait showWhile: [| aFilename | aFilename := (self fullBookmarkFilename: aString) asFilename. aFilename exists ifTrue: [aFilename delete]].
</methods> <methods> UI.ApplicationModel <category>Arbor Core adds</category>
aisDisable: idOrCollection "Disable the component(s) specified in the argument." | bldr | (bldr := self builder) isNil ifTrue: [^self]. idOrCollection isSymbol ifTrue: [| comp | (comp := bldr componentAt: idOrCollection) notNil ifTrue: [comp disable]] ifFalse: [ idOrCollection do: [:id || comp | (comp := bldr componentAt: id) notNil ifTrue: [comp disable]]].
aisEnable: idOrCollection "Enable the component(s) specified in the argument." | bldr | (bldr := self builder) isNil ifTrue: [^self]. idOrCollection isSymbol ifTrue: [| comp | (comp := bldr componentAt: idOrCollection) notNil ifTrue: [comp enable]] ifFalse: [ idOrCollection do: [:id || comp | (comp := bldr componentAt: id) notNil ifTrue: [comp enable]]].
aisMakeInvisible: idOrCollection "Make the component(s) specified in the argument invisible." | bldr | (bldr := self builder) isNil ifTrue: [^self]. idOrCollection isSymbol ifTrue: [| comp | (comp := bldr componentAt: idOrCollection) notNil ifTrue: [comp beInvisible]] ifFalse: [ idOrCollection do: [:id || comp | (comp := bldr componentAt: id) notNil ifTrue: [comp beInvisible]]].
aisMakeVisible: idOrCollection "Make the component(s) specified in the argument visible." | bldr | (bldr := self builder) isNil ifTrue: [^self]. idOrCollection isSymbol ifTrue: [| comp | (comp := bldr componentAt: idOrCollection) notNil ifTrue: [comp beVisible]] ifFalse: [ idOrCollection do: [:id || comp | (comp := bldr componentAt: id) notNil ifTrue: [comp beVisible]]].
aisSetEnablementOf: aCollection to: aBoolean aBoolean ifTrue: [self aisEnable: aCollection] ifFalse: [self aisDisable: aCollection].
aisSetVisibilityOf: aCollection to: aBoolean aBoolean ifTrue: [self aisMakeVisible: aCollection] ifFalse: [self aisMakeInvisible: aCollection].
</methods> <methods> UI.WidgetWrapper <category>Arbor Core adds</category>
aisWidgetWrapper "Try and find the widget wrapper. If it can't be found, answer nil." ^self
</methods> <methods> VWHelp.AHSUtils class <category>AHSOHC adds-file utilities</category>
bossInObjectFrom: aFilename "Answer the first object in the BOSS File named aFilename" | b | #{BinaryObjectStorage} isDefined not ifTrue: [^Dialog warn: 'BOSS must be loaded to perform this operation']. ^Cursor read showWhile: [ b := #{BinaryObjectStorage} value onOld: aFilename asFilename readStream. [b next] ensure: [b close]]
bossOutObject: anObject on: aFilename "Boss out anObject on a filename." | b | #{BinaryObjectStorage} isDefined not ifTrue: [^Dialog warn: 'BOSS must be loaded to perform this operation']. Cursor write showWhile: [ b := #{BinaryObjectStorage} value onNew: aFilename asFilename writeStream. [b nextPut: anObject] ensure: [b close]]
</methods> <methods> VWHelp.AHSUtils class <category>AHSOHC adds-testing</category>
hasEnvy "Answer true if this is an ENVY image." ^#{Application} isDefined and: [#{SubApplication} isDefined and: [#{System} isDefined]]
</methods> <methods> VWHelp.AHSUtils class <category>AHSOHC adds-utilities</category>
performReceiver: anObject selector: selector arguments: arguments ifAbsent: aBlock "If the method identified by selector exists, execute a #perform:withArguments: operation. Otherwise evaluate aBlock. This method can be used to provide optional behavior if certain extensions are loaded, while not requiring that the extension be loaded for a valid operation to occur." | sel args | sel := selector asSymbol. args := arguments asArray. ^(anObject respondsTo: sel) ifTrue: [anObject perform: sel withArguments: args] ifFalse: [aBlock value].
pickColor: defaultColor ^ArborTextStyleDialog pickColor: defaultColor
</methods> <methods> VWHelp.AHSUtils class <category>AHSOHC adds-testing</category>
spellCheckerClass "Answer the spell checker class, or nil if there is none loaded." ^#{ArborSpellChecker} valueOrDo: [nil]
spellCheckerIsAvailable "Answer true if the spell checker is present and useable. That is, answer true if the spell checker code is present in the image and we are running on a supported platform/environment." ^self spellCheckerClass notNil and: [self spellCheckerClass isAvailable]
spellCheckerIsLoaded "Answer true if the spell checker exists in the image, whether or not it can actually run." ^self spellCheckerClass notNil
</methods> <methods> VWHelp.AHSUtils class <category>AHSOHC adds-resources</category>
stringMenu "Answer a string menu" ^MenuBuilder new add: 'Undo'->#undo; line; addCopyCutPaste; menu
textMenu "Answer a text menu that provides operations for style changes" ^MenuBuilder new addDefaultTextMenu; line; add: 'Change Style'->[:ctrlr | ArborTextStyleDialog openForParagraphEditor: ctrlr]; addItem: ((MenuItem labeled: 'Plain') nameKey: #noEmphasis; value: [:ctrlr || selectedText | selectedText := ctrlr selection. selectedText addEmphasis: #() removeEmphasis: #{Smalltalk.Text} value aisAllEmphases allowDuplicates: false. ctrlr replaceSelectionWith: selectedText. ctrlr accept. ctrlr restoreSelection]); line; addHardcopy; menu
</methods> <methods> Graphics.Image <category>AHSOHC adds</category>
ahsAsCachedImage ^CachedImage on: self
ahsAsImage ^self
</methods> <methods> Core.Text class <category>Arbor Core adds</category>
aisAllEmphases "Answer a collection of all normal emphases. Other emphases may be added and interpreted by the CharacterAttributes' attributes." ^#(#strikeout #serif #large #underline #italic #bold) copyWith: #color->nil
</methods> <methods> Core.Text <category>AHSOHC adds</category>
asAHSHyperText ^#{VWHelp.AHSHelpHyperText} value string: self string runs: self runs
emphasisAt: characterIndex asArray: aBoolean "Answer the code for characters in the run beginning at characterIndex." | emph | emph := self emphasisAt: characterIndex. ^(aBoolean and: [emph notNil]) ifTrue:[ (emph isKindOf: Array) ifTrue: [emph] ifFalse: [Array with: emph]] ifFalse: [emph]
</methods> <methods> Tools.VisualLauncher <category>AHSOHC adds</category>
ahsOpenOutlineEnablement ^#{BinaryObjectStorage} isDefined
</methods> <methods> VWHelp.AHSPreferences class <category>AHSOHC adds-accessing</category>
bookmarkDirectory ^self preferenceAt: #bookmarkDirectory ifAbsent: [#current]
bookmarkDirectory: aSymbol ^self preferenceAt: #bookmarkDirectory put: aSymbol
expandOutlines ^self preferenceAt: #expandOutlines ifAbsent: [false]
expandOutlines: aBoolean ^self preferenceAt: #expandOutlines put: aBoolean
outlineViewerClass | style | style := self outlineViewerStyle. style = #embedGraphics ifTrue: [^AHSOutlineTextGraphicMixViewer]. style = #linkGraphics ifTrue: [^AHSOutlineViewer]. Dialog warn: 'Unknown viewer style: ', style printString, '\\Using embedded graphics viewer...' withCRs. ^AHSOutlineTextGraphicMixViewer
outlineViewerStyle ^self preferenceAt: #outlineViewerStyle ifAbsent: [#embedGraphics]
outlineViewerStyle: aSymbol "Either #embedGraphics or #linkGraphics." self preferenceAt: #outlineViewerStyle put: aSymbol.
specifiedDirectory ^self preferenceAt: #specifiedDirectory ifAbsent: [String new]
specifiedDirectory: aString ^self preferenceAt: #specifiedDirectory put: aString
</methods> <methods> VWHelp.AHSOutlineViewer class <category>interface specs</category>
dialogSpec "UIPainter new openOnClass: self andSelector: #dialogSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Help Outline' #min: #(#Point 626 400 ) #bounds: #(#Rectangle 91 83 717 483 ) #flags: 4 #menu: #outlinerWindowMenu ) #component: #(#SpecCollection #collection: #( #(#SubCanvasSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 -40 1 ) #name: #mainCanvas #flags: 0 #majorKey: #AHSOutlineViewer #minorKey: #dialogSubSpec ) #(#SubCanvasSpec #layout: #(#LayoutFrame 0 0 -40 1 0 1 0 1 ) #name: #help #flags: 0 #minorKey: #ahsSpec ) ) ) )
dialogSubSpec "UIPainter new openOnClass: self andSelector: #dialogSubSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Help Outline' #min: #(#Point 626 400 ) #bounds: #(#Rectangle 399 503 1025 903 ) #flags: 4 #menu: #outlinerWindowMenu ) #component: #(#SpecCollection #collection: #( #(#SubCanvasSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 0 0.33 ) #name: #listOutlineBrowser #majorKey: #AHSOutlineViewerModel #minorKey: #verticalScrollingSpec #clientKey: #outliner ) #(#ActionButtonSpec #layout: #(#LayoutFrame -30 0.5 -26 1 30 0.5 -1 1 ) #name: #close #model: #accept #label: #(#UserMessage #key: #closeButton #defaultString: '(close)' #catalogID: #help ) #defaultable: true ) #(#SubCanvasSpec #layout: #(#LayoutFrame 0 0 0 0.33 0 1 -30 1 ) #name: #textSubCanvas #majorKey: #AHSToolbarHypertextEditor #minorKey: #subcanvasSpec #clientKey: #toolbarTextEditor ) ) ) )
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: 'Help Outline' #min: #(#{Core.Point} 189 159 ) #bounds: #(#{Graphics.Rectangle} 427 101 955 690 ) #flags: 4 #menu: #outlinerWindowMenu ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.SubCanvasSpec} #layout: #(#{Graphics.LayoutFrame} 0 0 -45 1 0 1 0 1 ) #name: #help #flags: 0 #minorKey: #ahsSpec ) #(#{UI.SubCanvasSpec} #layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 -45 1 ) #name: #mainCanvas #flags: 0 #minorKey: #windowSubSpec ) ) ) )
windowSubSpec "UIPainter new openOnClass: self andSelector: #windowSubSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: 'Help Outline' #min: #(#{Core.Point} 189 159 ) #bounds: #(#{Graphics.Rectangle} 206 184 819 584 ) #flags: 4 #menu: #outlinerWindowMenu ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.SubCanvasSpec} #layout: #(#{Graphics.LayoutFrame} 0 0 0 0 0 1 0 0.333333 ) #name: #listOutlineBrowser #majorKey: #AHSOutlineViewerModel #minorKey: #verticalScrollingSpec #clientKey: #outliner ) #(#{UI.SubCanvasSpec} #layout: #(#{Graphics.LayoutFrame} 1 0 0 0.333333 0 1 0 1 ) #name: #textSubCanvas #colors: #(#{UI.LookPreferences} #setBackgroundColor: #(#ColorValue #white ) #setSelectionBackgroundColor: #(#ColorValue #white ) ) #majorKey: #{AHSToolbarHypertextEditor} #minorKey: #subcanvasSpec #clientKey: #toolbarTextEditor ) #(#{VWHelp.ArborDragBarSpec} #layout: #(#{Graphics.LayoutFrame} 0 0 -1 0.333333 0 1 1 0.333333 ) #name: #dragBar #lineWidth: 0 #widgetSet1: #(#listOutlineBrowser ) #widgetSet2: #(#textSubCanvas ) #etched: false ) ) ) )
</methods> <methods> VWHelp.ArborSlaveApplicationModel class <category>interface specs</category>
pinSpec "UIPainter new openOnClass: self andSelector: #pinSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Unlabeled Canvas' #bounds: #(#Rectangle 400 627 504 656 ) ) #component: #(#SpecCollection #collection: #( #(#ActionButtonSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 0 1 ) #name: #pinButton #flags: 0 #model: #togglePin #label: #pinUpIcon #hasCharacterOrientedLabel: false #defaultable: true ) ) ) )
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: '' #bounds: #(#Rectangle 127 619 385 763 ) ) #component: #(#SpecCollection #collection: #( #(#SubCanvasSpec #layout: #(#Rectangle 2 0 27 16 ) #flags: 0 #minorKey: #pinSpec ) ) ) )
</methods> <methods> VWHelp.ArborSlaveApplicationModel class <category>resources</category>
pinDownImage "UIMaskEditor new openOnClass: self andSelector: #pinDownImage" <resource: #image> ^CachedImage on: (Image extent: 26@13 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 4) at: 1 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 2 put: ColorValue white; at: 3 put: (ColorValue scaledRed: 7099 scaledGreen: 7099 scaledBlue: 7099); at: 4 put: ColorValue lightGray; yourself)) usingBits: #[85 86 165 85 85 85 80 0 85 171 248 85 85 85 80 0 90 239 252 85 85 85 80 0 111 191 255 21 85 85 80 0 111 191 255 21 85 85 80 0 191 191 255 21 85 85 80 0 191 175 252 85 85 85 80 0 191 195 240 85 85 85 80 0 175 192 0 85 85 85 80 0 111 252 1 85 85 85 80 0 96 255 1 85 85 85 80 0 128 0 5 85 85 85 80 0 5 0 85 85 85 85 80 0])
pinDownMask "UIMaskEditor new openOnClass: self andSelector: #pinDownMask" <resource: #image> ^CachedImage on: (Image extent: 26@13 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[1 192 0 0 15 240 0 0 63 240 0 0 127 248 0 0 127 248 0 0 255 248 0 0 255 240 0 0 255 240 0 0 255 240 0 0 127 224 0 0 127 224 0 0 255 192 0 0 207 0 0 0])
pinUpImage "UIMaskEditor new openOnClass: self andSelector: #pinUpImage" <resource: #image> ^CachedImage on: (Image extent: 26@13 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 4) at: 1 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 2 put: ColorValue white; at: 3 put: (ColorValue scaledRed: 7099 scaledGreen: 7099 scaledBlue: 7099); at: 4 put: ColorValue lightGray; yourself)) usingBits: #[85 85 85 106 85 85 80 0 85 85 85 111 21 86 144 0 85 85 85 111 21 91 192 0 85 85 85 111 42 171 192 0 85 85 85 111 63 251 192 0 85 106 170 175 63 251 192 0 85 80 0 47 63 243 192 0 85 85 85 111 0 3 192 0 65 85 85 111 0 0 0 0 62 85 85 96 5 80 0 0 62 85 85 96 21 84 16 0 105 85 85 96 85 85 80 0 85 85 85 85 85 85 80 0])
pinUpMask "UIMaskEditor new openOnClass: self andSelector: #pinUpMask" <resource: #image> ^CachedImage on: (Image extent: 26@13 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 7 0 0 0 7 129 128 0 7 131 192 0 7 255 192 0 7 255 192 7 255 255 192 3 255 255 192 0 7 255 192 96 7 255 192 240 7 195 192 240 7 129 128 96 7 0 0 0 0 0 0])
</methods> <methods> VWHelp.AHSOutlinerSubsetList class <category>interface specs</category>
historyWindowSpec "UIPainter new openOnClass: self andSelector: #historyWindowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Outline Subset List' #min: #(#Point 280 172 ) #bounds: #(#Rectangle 359 192 639 364 ) ) #component: #(#SpecCollection #collection: #( #(#SequenceViewSpec #layout: #(#LayoutFrame 3 0 3 0 -3 1 -40 1 ) #name: #subsetList #model: #subsetList ) #(#ActionButtonSpec #layout: #(#LayoutFrame -71 1 -35 1 -3 1 -2 1 ) #name: #close #model: #closeRequest #label: #(#UserMessage #key: #closeButton #defaultString: '(close)' #catalogID: #help ) #style: #'Arbor-12-Squeeze' #isDefault: true #defaultable: true ) #(#ActionButtonSpec #layout: #(#LayoutFrame 3 0 -35 1 112 0 -2 1 ) #name: #clearHistory #model: #clearHistory #label: #(#UserMessage #key: #clearHistory #defaultString: '(clear history)' #catalogID: #help ) #style: #'Arbor-12-Squeeze' #defaultable: true ) ) ) )
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Outline Subset List' #min: #(#Point 280 172 ) #bounds: #(#Rectangle 360 224 640 396 ) ) #component: #(#SpecCollection #collection: #( #(#SequenceViewSpec #layout: #(#LayoutFrame 0 0.0107143 0 0.0174419 0 0.989286 -38 1 ) #name: #subsetList #model: #subsetList ) #(#ActionButtonSpec #layout: #(#LayoutFrame -67 1 -33 1 0 0.996428 0 0.988372 ) #name: #close #model: #closeRequest #label: #(#UserMessage #key: #closeButton #defaultString: '(close)' #catalogID: #help ) #style: #'Arbor-12-Squeeze' #isDefault: true ) ) ) )
</methods> <methods> VWHelp.ArborOutlineBrowserModel class <category>resources</category>
downArrow "UIMaskEditor new openOnClass: self andSelector: #downArrow" <resource: #image> ^Image extent: 16@8 depth: 1 palette: CoveragePalette monoMaskPalette bits: #[63 255 0 0 42 1 0 0 21 2 0 0 10 4 0 0 5 8 0 0 2 144 0 0 1 32 0 0 0 192 0 0 ] pad: 32
rightArrow "UIMaskEditor new openOnClass: self andSelector: #rightArrow" <resource: #image> ^Image extent: 13@14 depth: 1 palette: CoveragePalette monoMaskPalette bits: #[6 0 0 0 5 0 0 0 4 128 0 0 4 64 0 0 4 32 0 0 4 16 0 0 4 8 0 0 4 40 0 0 5 80 0 0 6 160 0 0 5 64 0 0 6 128 0 0 5 0 0 0 6 0 0 0 ] pad: 32
</methods> <methods> VWHelp.ArborListOutlineBrowserModel class <category>interface specs</category>
dualScrollingSpec "UIPainter new openOnClass: self andSelector: #dualScrollingSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Unlabeled Canvas' #min: #(#Point 50 50 ) #bounds: #(#Rectangle 343 583 659 836 ) ) #component: #(#SpecCollection #collection: #( #(#ArborHierarchicalSequenceViewSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 0 1 ) #name: #list #flags: 15 #model: #list #callbacksSpec: #(#UIEventCallbackSubSpec #doubleClickSelector: #doubleClickOccurred ) #menu: #menu #useModifierKeys: true #selectionType: #highlight ) ) ) )
verticalScrollingSpec "UIPainter new openOnClass: self andSelector: #verticalScrollingSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Unlabeled Canvas' #min: #(#Point 50 50 ) #bounds: #(#Rectangle 343 583 659 836 ) ) #component: #(#SpecCollection #collection: #( #(#ArborHierarchicalSequenceViewSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 0 1 ) #name: #list #model: #list #callbacksSpec: #(#UIEventCallbackSubSpec #doubleClickSelector: #doubleClickOccurred ) #menu: #menu #useModifierKeys: true #selectionType: #highlight ) ) ) )
</methods> <methods> VWHelp.AHSOutlineViewerModel class <category>resources</category>
closedFolder "UIMaskEditor new openOnClass: self andSelector: #closedFolder" <resource: #image> ^(Image extent: 15@13 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[62 0 0 0 127 0 0 0 255 252 0 0 128 6 0 0 191 254 0 0 191 254 0 0 191 254 0 0 191 254 0 0 191 254 0 0 191 254 0 0 191 254 0 0 255 254 0 0 127 254 0 0])
openFolder "UIMaskEditor new openOnClass: self andSelector: #openFolder" <resource: #image> ^(Image extent: 16@13 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[31 0 0 0 32 128 0 0 95 126 0 0 95 131 0 0 95 255 0 0 255 255 0 0 128 31 0 0 191 255 0 0 95 255 0 0 95 255 0 0 47 255 0 0 63 255 0 0 31 255 0 0])
</methods> <methods> VWHelp.AHSToolbarTextEditor class <category>resources</category>
boldImage "UIMaskEditor new openOnClass: self andSelector: #boldImage" <resource: #image> ^CachedImage on: (Image extent: 10@12 depth: 4 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 14) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 3 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 4 put: ColorValue white; at: 5 put: (ColorValue scaledRed: 5139 scaledGreen: 5139 scaledBlue: 5268); at: 6 put: (ColorValue scaledRed: 4369 scaledGreen: 4369 scaledBlue: 4369); at: 7 put: (ColorValue scaledRed: 546 scaledGreen: 546 scaledBlue: 546); at: 8 put: (ColorValue scaledRed: 2730 scaledGreen: 2730 scaledBlue: 2730); at: 9 put: (ColorValue scaledRed: 4915 scaledGreen: 4915 scaledBlue: 4915); at: 10 put: (ColorValue scaledRed: 1092 scaledGreen: 1092 scaledBlue: 1092); at: 11 put: (ColorValue scaledRed: 3276 scaledGreen: 3276 scaledBlue: 3276); at: 12 put: ColorValue lightGray; at: 13 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 1638); at: 14 put: (ColorValue scaledRed: 3822 scaledGreen: 3822 scaledBlue: 3822); yourself)) usingBits: #[76 204 204 123 51 0 0 0 134 0 0 6 67 0 0 0 140 106 61 0 115 0 0 0 128 10 51 0 35 0 0 0 128 2 82 0 83 0 0 0 128 0 0 109 51 0 0 0 128 12 169 0 211 0 0 0 128 10 51 32 1 0 0 0 128 10 51 112 8 0 0 0 128 2 138 0 97 0 0 0 128 0 0 6 131 0 0 0 186 170 170 209 51 0 0 0])
boldInactiveMask "UIMaskEditor new openOnClass: self andSelector: #boldInactiveMask" <resource: #image> ^CachedImage on: (Image extent: 10@12 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[126 0 0 0 127 0 0 0 115 0 0 0 115 0 0 0 127 0 0 0 126 0 0 0 127 0 0 0 115 128 0 0 115 128 0 0 119 128 0 0 127 0 0 0 126 0 0 0])
boldMask "UIMaskEditor new openOnClass: self andSelector: #boldMask" <resource: #image> ^CachedImage on: (Image extent: 10@12 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[255 0 0 0 255 128 0 0 247 128 0 0 243 128 0 0 255 128 0 0 255 0 0 0 255 128 0 0 243 192 0 0 243 192 0 0 255 192 0 0 255 128 0 0 255 0 0 0])
colorImage "UIMaskEditor new openOnClass: self andSelector: #colorImage" <resource: #image> ^CachedImage on: (Image extent: 13@16 depth: 4 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 10) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 0 scaledGreen: 4915 scaledBlue: 6135); at: 3 put: (ColorValue scaledRed: 0 scaledGreen: 1638 scaledBlue: 4112); at: 4 put: (ColorValue scaledRed: 0 scaledGreen: 1638 scaledBlue: 2056); at: 5 put: (ColorValue scaledRed: 546 scaledGreen: 546 scaledBlue: 546); at: 6 put: (ColorValue scaledRed: 6553 scaledGreen: 6553 scaledBlue: 6553); at: 7 put: ColorValue white; at: 8 put: (ColorValue scaledRed: 1638 scaledGreen: 4915 scaledBlue: 6135); at: 9 put: (ColorValue scaledRed: 0 scaledGreen: 3276 scaledBlue: 4112); at: 10 put: (ColorValue scaledRed: 1092 scaledGreen: 1092 scaledBlue: 1092); yourself)) usingBits: #[102 102 102 102 96 85 0 0 102 102 102 102 96 85 0 0 102 102 102 102 5 80 96 0 102 102 102 102 5 80 96 0 102 102 102 96 85 6 96 0 102 102 102 96 85 6 96 0 102 102 102 5 80 102 96 0 102 102 102 5 80 102 96 0 102 102 96 64 6 102 96 0 102 102 1 116 6 102 96 0 102 96 17 112 6 102 96 0 102 104 23 48 6 102 96 0 102 7 19 0 102 102 96 0 102 151 32 6 102 102 96 0 96 121 0 102 102 102 96 0 0 144 102 102 102 102 96 0])
colorMask "UIMaskEditor new openOnClass: self andSelector: #colorMask" <resource: #image> ^CachedImage on: (Image extent: 13@16 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 120 0 0 0 120 0 0 0 240 0 0 0 240 0 0 1 224 0 0 1 224 0 0 3 192 0 0 3 192 0 0 7 128 0 0 15 128 0 0 31 128 0 0 31 128 0 0 63 0 0 0 62 0 0 0 124 0 0 0 240 0 0 0])
copyImage "UIMaskEditor new openOnClass: self andSelector: #copyImage" <resource: #image> ^CachedImage on: (Image extent: 15@13 depth: 1 bitsPerPixel: 1 palette: MonoMappedPalette blackWhite usingBits: #[3 254 0 0 121 254 0 0 122 254 0 0 72 14 0 0 125 230 0 0 65 234 0 0 125 32 0 0 65 252 0 0 125 4 0 0 1 252 0 0 253 4 0 0 253 252 0 0 252 0 0 0])
copyMask "UIMaskEditor new openOnClass: self andSelector: #copyMask" <resource: #image> ^CachedImage on: (Image extent: 15@13 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[252 0 0 0 254 0 0 0 255 0 0 0 255 240 0 0 255 248 0 0 255 252 0 0 255 254 0 0 255 254 0 0 255 254 0 0 255 254 0 0 3 254 0 0 3 254 0 0 3 254 0 0])
cutImage "UIMaskEditor new openOnClass: self andSelector: #cutImage" <resource: #image> ^CachedImage on: (Image extent: 15@16 depth: 4 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 10) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 3 put: (ColorValue scaledRed: 6167 scaledGreen: 6167 scaledBlue: 6167); at: 4 put: (ColorValue scaledRed: 4915 scaledGreen: 4915 scaledBlue: 4915); at: 5 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 6 put: ColorValue white; at: 7 put: (ColorValue scaledRed: 546 scaledGreen: 546 scaledBlue: 546); at: 8 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 2056); at: 9 put: ColorValue lightGray; at: 10 put: (ColorValue scaledRed: 7099 scaledGreen: 7099 scaledBlue: 7099); yourself)) usingBits: #[85 85 85 80 117 85 85 80 85 85 85 80 80 85 85 80 85 85 85 144 80 149 85 80 80 5 85 80 80 149 85 80 8 48 149 144 144 85 85 80 5 88 1 148 9 85 85 80 80 0 0 0 85 85 85 80 85 17 85 0 2 85 85 80 85 85 85 70 64 117 85 80 85 85 85 64 19 64 85 80 85 85 85 48 85 23 5 80 85 85 85 48 85 85 128 16 85 85 85 87 85 85 87 128 85 85 85 80 37 85 85 80 85 85 85 80 21 85 85 80 85 85 85 82 85 85 85 80])
cutMask "UIMaskEditor new openOnClass: self andSelector: #cutMask" <resource: #image> ^CachedImage on: (Image extent: 15@16 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[1 128 0 0 1 64 0 0 3 96 0 0 97 96 0 0 251 192 0 0 159 192 0 0 127 0 0 0 51 192 0 0 3 224 0 0 3 240 0 0 3 56 0 0 3 14 0 0 1 6 0 0 1 128 0 0 1 128 0 0 1 0 0 0])
findImage "UIMaskEditor new openOnClass: self andSelector: #findImage" <resource: #image> ^CachedImage on: (Image extent: 15@15 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 3) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6167 scaledGreen: 6167 scaledBlue: 6167); at: 3 put: ColorValue white; yourself)) usingBits: #[170 170 170 168 168 10 128 168 168 138 136 168 168 10 128 168 160 2 0 40 162 2 32 40 128 0 0 8 8 4 32 0 8 4 32 0 8 0 32 0 0 2 0 0 32 42 162 0 32 42 162 0 0 42 160 0 170 170 170 168])
findMask "UIMaskEditor new openOnClass: self andSelector: #findMask" <resource: #image> ^CachedImage on: (Image extent: 15@15 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 0 0 0 28 112 0 0 28 112 0 0 28 112 0 0 62 248 0 0 62 248 0 0 127 252 0 0 255 254 0 0 255 254 0 0 255 254 0 0 254 254 0 0 248 62 0 0 248 62 0 0 248 62 0 0 0 0 0 0])
indentImage "UIMaskEditor new openOnClass: self andSelector: #indentImage" <resource: #image> ^CachedImage on: (Image extent: 15@15 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 3) at: 1 put: ColorValue black; at: 2 put: ColorValue white; at: 3 put: (ColorValue scaledRed: 0 scaledGreen: 0 scaledBlue: 4112); yourself)) usingBits: #[85 84 85 84 85 85 85 84 80 4 0 0 85 85 85 84 89 84 0 0 90 84 0 0 170 149 85 84 90 84 0 20 89 84 0 20 85 85 85 84 80 4 0 0 85 85 85 84 80 4 21 84 85 85 85 84 85 84 85 84])
indentMask "UIMaskEditor new openOnClass: self andSelector: #indentMask" <resource: #image> ^CachedImage on: (Image extent: 15@15 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[1 0 0 0 0 0 0 0 61 254 0 0 0 0 0 0 33 254 0 0 49 254 0 0 248 0 0 0 49 248 0 0 33 248 0 0 0 0 0 0 61 254 0 0 0 0 0 0 61 128 0 0 0 0 0 0 1 0 0 0])
italicImage "UIMaskEditor new openOnClass: self andSelector: #italicImage" <resource: #image> ^CachedImage on: (Image extent: 6@14 depth: 4 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 13) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 3 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 4 put: ColorValue white; at: 5 put: (ColorValue scaledRed: 5139 scaledGreen: 5139 scaledBlue: 5268); at: 6 put: (ColorValue scaledRed: 4369 scaledGreen: 4369 scaledBlue: 4369); at: 7 put: (ColorValue scaledRed: 546 scaledGreen: 546 scaledBlue: 546); at: 8 put: (ColorValue scaledRed: 2730 scaledGreen: 2730 scaledBlue: 2730); at: 9 put: (ColorValue scaledRed: 4915 scaledGreen: 4915 scaledBlue: 4915); at: 10 put: (ColorValue scaledRed: 1092 scaledGreen: 1092 scaledBlue: 1092); at: 11 put: (ColorValue scaledRed: 3276 scaledGreen: 3276 scaledBlue: 3276); at: 12 put: ColorValue lightGray; at: 13 put: (ColorValue scaledRed: 3822 scaledGreen: 3822 scaledBlue: 3822); yourself)) usingBits: #[51 51 65 0 51 60 6 0 51 50 2 0 51 51 131 0 51 51 51 0 51 28 83 0 58 0 99 0 114 96 115 0 56 0 179 0 50 2 51 0 16 8 51 0 192 104 35 0 144 102 67 0 150 161 51 0])
italicMask "UIMaskEditor new openOnClass: self andSelector: #italicMask" <resource: #image> ^CachedImage on: (Image extent: 6@14 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[12 0 0 0 28 0 0 0 28 0 0 0 8 0 0 0 0 0 0 0 56 0 0 0 120 0 0 0 248 0 0 0 120 0 0 0 112 0 0 0 240 0 0 0 248 0 0 0 248 0 0 0 240 0 0 0])
largeImage "UIMaskEditor new openOnClass: self andSelector: #largeImage" <resource: #image> ^CachedImage on: (Image extent: 14@16 depth: 4 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 12) at: 1 put: (ColorValue scaledRed: 4369 scaledGreen: 4369 scaledBlue: 4369); at: 2 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 1638); at: 3 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 4 put: ColorValue black; at: 5 put: (ColorValue scaledRed: 3276 scaledGreen: 3276 scaledBlue: 3276); at: 6 put: (ColorValue scaledRed: 546 scaledGreen: 546 scaledBlue: 546); at: 7 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 8 put: ColorValue white; at: 9 put: (ColorValue scaledRed: 5139 scaledGreen: 5139 scaledBlue: 5268); at: 10 put: (ColorValue scaledRed: 4915 scaledGreen: 4915 scaledBlue: 4915); at: 11 put: ColorValue lightGray; at: 12 put: (ColorValue scaledRed: 2730 scaledGreen: 2730 scaledBlue: 2730); yourself)) usingBits: #[129 17 17 16 119 119 119 0 114 99 53 167 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 119 0 119 147 52 119 119 119 152 0 119 147 59 119 119 119 90 0 119 67 53 167 119 166 87 0 145 51 51 51 51 51 183 0])
largeMask "UIMaskEditor new openOnClass: self andSelector: #largeMask" <resource: #image> ^CachedImage on: (Image extent: 14@16 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[255 0 0 0 126 0 0 0 60 0 0 0 60 0 0 0 60 0 0 0 60 0 0 0 60 0 0 0 60 0 0 0 60 0 0 0 60 0 0 0 60 0 0 0 60 0 0 0 60 12 0 0 60 12 0 0 62 56 0 0 255 248 0 0])
outdentImage "UIMaskEditor new openOnClass: self andSelector: #outdentImage" <resource: #image> ^CachedImage on: (Image extent: 15@15 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 3) at: 1 put: ColorValue black; at: 2 put: ColorValue white; at: 3 put: (ColorValue scaledRed: 0 scaledGreen: 0 scaledBlue: 4112); yourself)) usingBits: #[85 84 85 84 85 85 85 84 80 4 0 0 85 85 85 84 89 84 0 0 105 84 0 0 170 149 85 84 105 84 0 20 89 84 0 20 85 85 85 84 80 4 0 0 85 85 85 84 80 4 21 84 85 85 85 84 85 84 85 84])
outdentMask "UIMaskEditor new openOnClass: self andSelector: #outdentMask" <resource: #image> ^CachedImage on: (Image extent: 15@15 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[1 0 0 0 0 0 0 0 61 254 0 0 0 0 0 0 33 254 0 0 97 254 0 0 248 0 0 0 97 248 0 0 33 248 0 0 0 0 0 0 61 254 0 0 0 0 0 0 61 128 0 0 0 0 0 0 1 0 0 0])
pasteImage "UIMaskEditor new openOnClass: self andSelector: #pasteImage" <resource: #image> ^CachedImage on: (Image extent: 16@14 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 4) at: 1 put: ColorValue black; at: 2 put: ColorValue white; at: 3 put: (ColorValue scaledRed: 6553 scaledGreen: 6553 scaledBlue: 6553); at: 4 put: (ColorValue scaledRed: 4369 scaledGreen: 4369 scaledBlue: 4369); yourself)) usingBits: #[85 64 21 85 64 5 0 21 42 16 74 133 44 85 83 133 44 0 3 133 42 170 170 133 42 160 0 5 42 161 85 5 42 161 85 17 42 161 1 0 42 161 85 84 42 161 0 4 64 1 85 84 85 80 0 0])
pasteMask "UIMaskEditor new openOnClass: self andSelector: #pasteMask" <resource: #image> ^CachedImage on: (Image extent: 16@14 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[7 128 0 0 127 248 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 254 0 0 255 255 0 0 255 255 0 0 255 255 0 0 127 255 0 0 3 255 0 0])
serifImage "UIMaskEditor new openOnClass: self andSelector: #serifImage" <resource: #image> ^CachedImage on: (Image extent: 14@13 depth: 4 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 15) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 3 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 4 put: ColorValue white; at: 5 put: (ColorValue scaledRed: 5139 scaledGreen: 5139 scaledBlue: 5268); at: 6 put: (ColorValue scaledRed: 4369 scaledGreen: 4369 scaledBlue: 4369); at: 7 put: (ColorValue scaledRed: 546 scaledGreen: 546 scaledBlue: 546); at: 8 put: (ColorValue scaledRed: 2730 scaledGreen: 2730 scaledBlue: 2730); at: 9 put: (ColorValue scaledRed: 4915 scaledGreen: 4915 scaledBlue: 4915); at: 10 put: (ColorValue scaledRed: 1092 scaledGreen: 1092 scaledBlue: 1092); at: 11 put: (ColorValue scaledRed: 7099 scaledGreen: 7099 scaledBlue: 7099); at: 12 put: (ColorValue scaledRed: 3276 scaledGreen: 3276 scaledBlue: 3276); at: 13 put: ColorValue lightGray; at: 14 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 1638); at: 15 put: (ColorValue scaledRed: 3822 scaledGreen: 3822 scaledBlue: 3822); yourself)) usingBits: #[51 51 51 51 51 52 19 0 51 135 215 195 49 38 108 0 53 100 25 227 50 179 227 0 57 211 56 179 16 179 51 0 54 108 51 51 224 40 51 0 50 6 227 60 32 219 51 0 49 32 13 19 128 179 51 0 51 62 96 115 128 179 51 0 51 51 64 99 128 179 51 0 139 51 61 99 128 179 51 0 198 67 54 115 128 179 51 0 57 103 34 19 208 110 51 0 51 24 170 51 51 51 51 0])
serifMask "UIMaskEditor new openOnClass: self andSelector: #serifMask" <resource: #image> ^CachedImage on: (Image extent: 14@13 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 24 0 0 62 124 0 0 126 104 0 0 102 224 0 0 112 240 0 0 121 240 0 0 126 224 0 0 30 224 0 0 14 224 0 0 198 224 0 0 230 224 0 0 126 240 0 0 60 0 0 0])
spellCheckImage "UIMaskEditor new openOnClass: self andSelector: #spellCheckImage" <resource: #image> ^CachedImage on: (Image extent: 14@14 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 3) at: 1 put: ColorValue black; at: 2 put: ColorValue white; at: 3 put: (ColorValue scaledRed: 0 scaledGreen: 0 scaledBlue: 4112); yourself)) usingBits: #[69 5 65 80 17 17 21 80 1 5 21 96 17 17 21 144 17 5 66 80 85 85 89 80 85 85 101 80 85 85 149 80 101 86 85 80 169 90 85 80 106 105 85 80 90 165 85 80 86 165 85 80 85 149 85 80])
spellCheckInactiveMask "UIMaskEditor new openOnClass: self andSelector: #spellCheckInactiveMask" <resource: #image> ^CachedImage on: (Image extent: 14@14 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[76 96 0 0 170 128 0 0 236 132 0 0 170 136 0 0 172 112 0 0 0 32 0 0 0 64 0 0 0 128 0 0 65 0 0 0 227 0 0 0 118 0 0 0 60 0 0 0 28 0 0 0 8 0 0 0])
spellCheckMask "UIMaskEditor new openOnClass: self andSelector: #spellCheckMask" <resource: #image> ^CachedImage on: (Image extent: 14@14 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[76 96 0 0 170 128 0 0 236 132 0 0 170 140 0 0 172 120 0 0 0 48 0 0 0 96 0 0 0 192 0 0 97 128 0 0 243 128 0 0 127 0 0 0 62 0 0 0 30 0 0 0 12 0 0 0])
underlineImage "UIMaskEditor new openOnClass: self andSelector: #underlineImage" <resource: #image> ^CachedImage on: (Image extent: 13@14 depth: 4 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 13) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 3 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 4 put: ColorValue white; at: 5 put: (ColorValue scaledRed: 5139 scaledGreen: 5139 scaledBlue: 5268); at: 6 put: (ColorValue scaledRed: 546 scaledGreen: 546 scaledBlue: 546); at: 7 put: (ColorValue scaledRed: 2730 scaledGreen: 2730 scaledBlue: 2730); at: 8 put: (ColorValue scaledRed: 4915 scaledGreen: 4915 scaledBlue: 4915); at: 9 put: (ColorValue scaledRed: 1092 scaledGreen: 1092 scaledBlue: 1092); at: 10 put: (ColorValue scaledRed: 3276 scaledGreen: 3276 scaledBlue: 3276); at: 11 put: ColorValue lightGray; at: 12 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 1638); at: 13 put: (ColorValue scaledRed: 3822 scaledGreen: 3822 scaledBlue: 3822); yourself)) usingBits: #[54 188 51 51 187 67 48 0 59 9 51 51 0 115 48 0 59 9 51 51 0 115 48 0 59 9 51 51 0 115 48 0 59 9 51 51 0 115 48 0 59 9 51 51 0 115 48 0 59 9 51 51 0 115 48 0 59 9 51 51 0 115 48 0 54 11 51 55 0 19 48 0 60 0 195 168 5 51 48 0 51 32 0 0 87 51 48 0 51 55 155 44 19 51 48 0 71 119 119 119 119 119 160 0 201 153 153 153 153 153 112 0])
underlineMask "UIMaskEditor new openOnClass: self andSelector: #underlineMask" <resource: #image> ^CachedImage on: (Image extent: 13@14 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[112 224 0 0 112 224 0 0 112 224 0 0 112 224 0 0 112 224 0 0 112 224 0 0 112 224 0 0 112 224 0 0 113 224 0 0 123 192 0 0 63 192 0 0 31 128 0 0 255 248 0 0 255 248 0 0])
</methods> <methods> VWHelp.AHSToolbarTextEditor class <category>interface specs</category>
subcanvasSpec "UIPainter new openOnClass: self andSelector: #subcanvasSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: 'Toolbar Text Editor Subcanvas' #bounds: #(#{Graphics.Rectangle} 313 301 711 468 ) ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.TextEditorSpec} #layout: #(#{Graphics.LayoutFrame} 0 0 29 0 0 1 0 1 ) #name: #text #model: #text #callbacksSpec: #(#{UI.UIEventCallbackSubSpec} #valueChangeSelector: #textChanged ) #menu: #textMenu #tabRequiresControl: true ) #(#{UI.ArbitraryComponentSpec} #layout: #(#{Graphics.LayoutFrame} -3 0 0 0 0 1 29 0 ) #name: #toolBar #flags: 0 #colors: #(#{UI.LookPreferences} #setBackgroundColor: #(#ColorValue #white ) ) #component: #toolBar ) ) ) )
</methods> <methods> VWHelp.ArborDragBarController class <category>resources</category>
horizontalDragImage "UIMaskEditor new openOnClass: self andSelector: #horizontalDragImage" <resource: #image> ^(Image extent: 16@16 depth: 1 bitsPerPixel: 1 palette: MonoMappedPalette whiteBlack usingBits: #[0 0 0 0 1 0 0 0 3 128 0 0 7 192 0 0 1 0 0 0 1 0 0 0 1 0 0 0 255 254 0 0 255 254 0 0 1 0 0 0 1 0 0 0 1 0 0 0 7 192 0 0 3 128 0 0 1 0 0 0 0 0 0 0])
horizontalDragMask "UIMaskEditor new openOnClass: self andSelector: #horizontalDragMask" <resource: #image> ^(Image extent: 16@16 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[1 0 0 0 3 128 0 0 7 192 0 0 15 224 0 0 15 224 0 0 3 128 0 0 255 254 0 0 255 254 0 0 255 254 0 0 255 254 0 0 3 128 0 0 15 224 0 0 15 224 0 0 7 192 0 0 3 128 0 0 1 0 0 0])
verticalDragImage "UIMaskEditor new openOnClass: self andSelector: #verticalDragImage" <resource: #image> ^(Image extent: 16@16 depth: 1 bitsPerPixel: 1 palette: MonoMappedPalette whiteBlack usingBits: #[0 0 0 0 1 128 0 0 1 128 0 0 1 128 0 0 1 128 0 0 1 128 0 0 17 136 0 0 49 140 0 0 127 254 0 0 49 140 0 0 17 136 0 0 1 128 0 0 1 128 0 0 1 128 0 0 1 128 0 0 1 128 0 0])
verticalDragMask "UIMaskEditor new openOnClass: self andSelector: #verticalDragMask" <resource: #image> ^(Image extent: 16@16 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 0 0 0 3 192 0 0 3 192 0 0 3 192 0 0 3 192 0 0 27 216 0 0 59 220 0 0 127 254 0 0 255 255 0 0 127 254 0 0 59 220 0 0 27 216 0 0 3 192 0 0 3 192 0 0 3 192 0 0 3 192 0 0])
</methods> <methods> VWHelp.AHSSearchDialog class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Search' #min: #(#Point 233 148 ) #max: #(#Point 233 148 ) #bounds: #(#Rectangle 460 376 693 524 ) ) #component: #(#SpecCollection #collection: #( #(#InputFieldSpec #layout: #(#Rectangle 18 28 205 50 ) #name: #searchString #model: #searchString ) #(#LabelSpec #layout: #(#Point 12 6 ) #name: #searchLabel #label: 'Search For:' ) #(#ActionButtonSpec #layout: #(#Rectangle 22 114 92 139 ) #name: #ok #model: #ok #label: 'OK' #isDefault: true #defaultable: true ) #(#ActionButtonSpec #layout: #(#Rectangle 136 114 206 139 ) #name: #cancel #model: #doCancel #label: 'Cancel' #defaultable: true ) #(#GroupBoxSpec #layout: #(#Rectangle 5 59 220 103 ) #name: #searchInBox #label: 'Search In' ) #(#RadioButtonSpec #layout: #(#Point 85 78 ) #name: #topics #model: #searchIn #label: 'Topics' #select: #topics ) #(#RadioButtonSpec #layout: #(#Point 20 78 ) #name: #text #model: #searchIn #label: 'Text' #select: #text ) #(#RadioButtonSpec #layout: #(#Point 161 78 ) #name: #both #model: #searchIn #label: 'Both' #select: #both ) ) ) )
</methods> <methods> VWHelp.ArborTextStyleDialog class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Text Style' #min: #(#Point 395 255 ) #max: #(#Point 395 255 ) #bounds: #(#Rectangle 123 113 518 368 ) ) #component: #(#SpecCollection #collection: #( #(#TextEditorSpec #layout: #(#Rectangle 166 67 370 136 ) #name: #sampleText #flags: 12 #model: #sampleText #isReadOnly: true ) #(#LabelSpec #layout: #(#Point 92 12 ) #colors: #(#LookPreferences #setForegroundColor: #(#ColorValue #blue ) ) #label: 'Set Style of Text Selection:' ) #(#LabelSpec #layout: #(#Point 180 36 ) #label: 'Sample:' ) #(#CheckBoxSpec #layout: #(#Point 56 37 ) #name: #underline #model: #underline #label: 'underline' ) #(#CheckBoxSpec #layout: #(#Point 56 63 ) #name: #serif #model: #serif #label: 'serif' ) #(#CheckBoxSpec #layout: #(#Point 56 89 ) #name: #bold #model: #bold #label: 'bold' ) #(#CheckBoxSpec #layout: #(#Point 56 115 ) #name: #italic #model: #italic #label: 'italic' ) #(#CheckBoxSpec #layout: #(#Point 56 141 ) #name: #large #model: #large #label: 'large' ) #(#CheckBoxSpec #layout: #(#Point 56 167 ) #name: #colorOn #model: #colorOn #label: 'color' ) #(#ActionButtonSpec #layout: #(#Rectangle 48 194 112 223 ) #name: #setColor #flags: 40 #model: #setColor #label: 'Set Color' #defaultable: true ) #(#ActionButtonSpec #layout: #(#Rectangle 221 194 285 223 ) #name: #accept #model: #accept #label: 'OK' #defaultable: true ) #(#ActionButtonSpec #layout: #(#Rectangle 297 194 361 223 ) #name: #cancel #model: #cancel #label: 'Cancel' #defaultable: true ) ) ) )
</methods> <methods> VWHelp.AHSHyperGraphicViewer class <category>interface specs</category>
paneSubSpec "UIPainter new openOnClass: self andSelector: #paneSubSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Unlabeled Canvas' #bounds: #(#Rectangle 520 220 1003 453 ) ) #component: #(#SpecCollection #collection: #( #(#SequenceViewSpec #layout: #(#LayoutFrame 4 0 30 0 0 0.438923 -4 1 ) #name: #availableGraphics #model: #availableGraphics #menu: #listMenu ) #(#ArbitraryComponentSpec #layout: #(#LayoutFrame 0 0.451346 30 0 -3 1 -4 1 ) #name: #graphic #flags: 11 #component: #graphic ) #(#LabelSpec #layout: #(#AlignmentOrigin 218 0 30 0 0 1 ) #label: #(#UserMessage #key: #graphic1 #defaultString: '(graphic)' #catalogID: #help ) ) #(#LabelSpec #layout: #(#AlignmentOrigin 4 0 30 0 0 1 ) #label: #(#UserMessage #key: #availableGraphics1 #defaultString: '(availableGraphics)' #catalogID: #help ) ) ) ) )
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Graphics Browser' #min: #(#Point 475 293 ) #bounds: #(#Rectangle 694 173 1169 466 ) ) #component: #(#SpecCollection #collection: #( #(#ActionButtonSpec #layout: #(#LayoutFrame -104 1 -34 1 -2 1 -6 1 ) #name: #ok #model: #closeRequest #label: #(#UserMessage #key: #ok1 #defaultString: '(ok)' #catalogID: #help ) #isDefault: true #defaultable: true ) #(#SubCanvasSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 -40 1 ) #name: #listPanes #flags: 0 #majorKey: #AHSHyperGraphicViewer #minorKey: #paneSubSpec ) ) ) )
</methods> <methods> VWHelp.AHSOHCPreferencesModel class <category>interface specs</category>
bookmarkSpec "UIPainter new openOnClass: self andSelector: #bookmarkSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Unlabeled Canvas' #bounds: #(#Rectangle 262 146 524 240 ) ) #component: #(#SpecCollection #collection: #( #(#GroupBoxSpec #layout: #(#LayoutFrame 3 0 1 0 -3 1 -3 1 ) #name: #bookmarkBox #label: 'Bookmark File Location' #style: #'Arbor-12-Squeeze' ) #(#RadioButtonSpec #layout: #(#AlignmentOrigin 18 0 4 0.25 0 0.5 ) #name: #currentDirectoryRB #model: #bookmarkDirectory #label: 'Current Directory' #style: #'Arbor-12-Squeeze' #select: #current ) #(#RadioButtonSpec #layout: #(#AlignmentOrigin 18 0 3 0.5 0 0.5 ) #name: #outlineDirectoryRB #model: #bookmarkDirectory #label: 'Outline Directory' #style: #'Arbor-12-Squeeze' #select: #outline ) #(#RadioButtonSpec #layout: #(#AlignmentOrigin 18 0 3 0.75 0 0.5 ) #name: #specifiedDirectoryRB #model: #bookmarkDirectory #style: #'Arbor-12-Squeeze' #select: #specified ) #(#InputFieldSpec #layout: #(#LayoutFrame 108 0 -11 0.75 -5 1 15 0.75 ) #name: #specifiedDirectory #flags: 0 #model: #specifiedDirectory #tabable: false #style: #'Arbor-12-Squeeze' #isReadOnly: true ) #(#ActionButtonSpec #layout: #(#LayoutFrame 37 0 -11 0.75 108 0 15 0.75 ) #name: #selectDirectory #model: #selectDirectory #label: 'Select...' #style: #'Arbor-12-Squeeze' ) ) ) )
outlinerSpec "UIPainter new openOnClass: self andSelector: #outlinerSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Unlabeled Canvas' #bounds: #(#Rectangle 385 497 680 592 ) ) #component: #(#SpecCollection #collection: #( #(#GroupBoxSpec #layout: #(#LayoutFrame 3 0 1 0 -3 1 -3 1 ) #name: #outlinerBox #label: 'Outliner Options' #style: #'Arbor-12-Squeeze' ) #(#CheckBoxSpec #layout: #(#AlignmentOrigin 20 0 33 0 0 0.5 ) #name: #expandOutlines #model: #expandOutlines #label: 'Expand Outlines when Opened' #style: #'Arbor-12-Squeeze' ) #(#RadioButtonSpec #layout: #(#Point 20 46 ) #name: #embedGraphicsRB #model: #outlineViewerStyle #label: 'Embed Graphics with Text' #style: #'Arbor-12-Squeeze' #select: #embedGraphics ) #(#RadioButtonSpec #layout: #(#Point 20 66 ) #name: #linkGraphicsRB #model: #outlineViewerStyle #label: 'Show Graphics as Links' #style: #'Arbor-12-Squeeze' #select: #linkGraphics ) ) ) )
</methods> <methods> VWHelp.ArborSearchAndReplace class <category>interface specs</category>
replaceWindowSpec "UIPainter new openOnClass: self andSelector: #replaceWindowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Search' #min: #(#Point 446 65 ) #max: #(#Point 446 65 ) #bounds: #(#Rectangle 362 387 808 452 ) ) #component: #(#SpecCollection #collection: #( #(#LabelSpec #layout: #(#AlignmentOrigin 91 0 7 0 1 0 ) #label: 'Replace With:' #style: #'Arbor-10' ) #(#InputFieldSpec #layout: #(#LayoutFrame 92 0 5 0 -91 1 28 0 ) #name: #replaceString #model: #replaceString #style: #'Arbor-10' ) #(#ActionButtonSpec #layout: #(#LayoutFrame -84 1 4 0 -5 1 30 0 ) #name: #replaceButton #flags: 40 #model: #doSearchAndReplace #label: 'Replace' #style: #'Arbor-10' ) #(#ActionButtonSpec #layout: #(#LayoutFrame -84 1 32 0 -5 1 58 0 ) #name: #replaceAllButton #flags: 40 #model: #doSearchAndReplaceAll #label: 'Replace All' #style: #'Arbor-10' ) ) ) )
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Find / Replace' #min: #(#Point 304 128 ) #max: #(#Point 992 128 ) #bounds: #(#Rectangle 282 291 730 419 ) #isEventDriven: true ) #component: #(#SpecCollection #collection: #( #(#LabelSpec #layout: #(#AlignmentOrigin 91 0 9 0 1 0 ) #name: #searchLabel #label: 'Find What:' #style: #'Arbor-10' ) #(#InputFieldSpec #layout: #(#LayoutFrame 92 0 9 0 -93 1 32 0 ) #name: #searchString #model: #searchString #style: #'Arbor-10' ) #(#CheckBoxSpec #layout: #(#Point 92 33 ) #name: #ignoreCaseCheckbox #model: #ignoreCase #label: 'Ignore Case' #style: #'Arbor-10' ) #(#SubCanvasSpec #layout: #(#LayoutFrame 0 0 64 0 0 1 0 1 ) #name: #replaceSubCanvas #flags: 0 #minorKey: #replaceWindowSpec ) #(#ActionButtonSpec #layout: #(#LayoutFrame -84 1 7 0 -5 1 33 0 ) #name: #findNextButton #flags: 40 #model: #doSearch #label: 'Find Next' #style: #'Arbor-10' #isDefault: true ) #(#ActionButtonSpec #layout: #(#LayoutFrame -84 1 35 0 -5 1 61 0 ) #name: #cancelButton #model: #closeRequest #label: 'Cancel' #style: #'Arbor-10' ) ) ) )
</methods> <methods> VWHelp.AHSToolbarHypertextEditor class <category>resources</category>
glossaryImage "UIMaskEditor new openOnClass: self andSelector: #glossaryImage" <resource: #image> ^CachedImage on: (Image extent: 14@17 depth: 5 bitsPerPixel: 8 palette: (MappedPalette withColors: ((Array new: 18) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6167 scaledGreen: 6167 scaledBlue: 6167); at: 3 put: (ColorValue scaledRed: 6007 scaledGreen: 6007 scaledBlue: 6007); at: 4 put: (ColorValue scaledRed: 2184 scaledGreen: 2184 scaledBlue: 2184); at: 5 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 2056); at: 6 put: ColorValue white; at: 7 put: (ColorValue scaledRed: 5139 scaledGreen: 5139 scaledBlue: 5268); at: 8 put: (ColorValue scaledRed: 4369 scaledGreen: 4369 scaledBlue: 4369); at: 9 put: (ColorValue scaledRed: 546 scaledGreen: 546 scaledBlue: 546); at: 10 put: (ColorValue scaledRed: 6553 scaledGreen: 6553 scaledBlue: 6553); at: 11 put: (ColorValue scaledRed: 4915 scaledGreen: 4915 scaledBlue: 4915); at: 12 put: (ColorValue scaledRed: 1092 scaledGreen: 1092 scaledBlue: 1092); at: 13 put: (ColorValue scaledRed: 7099 scaledGreen: 7099 scaledBlue: 7099); at: 14 put: (ColorValue scaledRed: 3276 scaledGreen: 3276 scaledBlue: 3276); at: 15 put: ColorValue lightGray; at: 16 put: (ColorValue scaledRed: 1638 scaledGreen: 1638 scaledBlue: 1638); at: 17 put: (ColorValue scaledRed: 7645 scaledGreen: 7645 scaledBlue: 7645); at: 18 put: (ColorValue scaledRed: 3822 scaledGreen: 3822 scaledBlue: 3822); yourself)) usingBits: (ByteArray fromPackedString: 'APTEAPTEAPTIB @EAPT@@@TEAPTEAP8CB@4@APTE@@@EAPTACP DB!@DDQDEAP@@AQDKB0PNC@HM@ TD@ T@@@@C@PTMA04B@!@B@@ H@@@HB@DM@ (HA@ HA@ JB@@@B@$@@@<H@ HLAPTEAP @@@ EBA@EAP@@@@@@APTH@@@HAP4PAP@@APT@@@TEB@@@B@TMD@@@APTEAPTEAP @@@ ECQ@@@@TE@@@@@@TH@@@HAP4P@@@EAPT@@@TEB@@@B@TMD@T@@@TE@@@EAP @@@ ECQ@EAP@@@@@EAPTH@@@@@P4PAPTEAPTIA @@B@@@B ,H@ (@@0,@C0@QAPT@@@TJ@@P@A0HBAPTEAPTE@@@b'))
glossaryMask "UIMaskEditor new openOnClass: self andSelector: #glossaryMask" <resource: #image> ^CachedImage on: (Image extent: 14@17 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 224 0 0 3 224 0 0 31 240 0 0 127 248 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 252 0 0 255 240 0 0 127 0 0 0])
graphicsImage "UIMaskEditor new openOnClass: self andSelector: #graphicsImage" <resource: #image> ^CachedImage on: (Image extent: 15@13 depth: 3 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 5) at: 1 put: ColorValue black; at: 2 put: ColorValue yellow; at: 3 put: ColorValue white; at: 4 put: (ColorValue scaledRed: 0 scaledGreen: 0 scaledBlue: 4112); at: 5 put: (ColorValue scaledRed: 0 scaledGreen: 4915 scaledBlue: 4112); yourself)) usingBits: #[34 34 34 32 0 0 0 0 34 34 34 32 18 18 18 0 34 34 34 32 33 33 33 0 34 34 34 32 18 18 18 0 34 34 32 32 33 33 33 0 34 34 3 0 0 0 18 0 34 32 51 48 68 68 1 0 34 3 51 4 68 68 64 0 32 51 51 4 68 68 64 32 0 0 0 4 68 68 64 32 34 34 34 4 68 68 64 32 34 34 34 32 68 68 2 32 34 34 34 34 0 0 34 32])
graphicsMask "UIMaskEditor new openOnClass: self andSelector: #graphicsMask" <resource: #image> ^CachedImage on: (Image extent: 15@13 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[1 254 0 0 1 254 0 0 1 254 0 0 1 254 0 0 5 254 0 0 15 254 0 0 31 254 0 0 63 254 0 0 127 252 0 0 255 252 0 0 3 252 0 0 1 248 0 0 0 240 0 0])
linkImage "UIMaskEditor new openOnClass: self andSelector: #linkImage" <resource: #image> ^CachedImage on: (Image extent: 16@7 depth: 1 bitsPerPixel: 1 palette: MonoMappedPalette blackWhite usingBits: #[193 131 0 0 190 125 0 0 96 6 0 0 87 234 0 0 96 6 0 0 190 125 0 0 193 131 0 0])
linkMask "UIMaskEditor new openOnClass: self andSelector: #linkMask" <resource: #image> ^CachedImage on: (Image extent: 16@7 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[62 124 0 0 127 254 0 0 255 255 0 0 239 247 0 0 255 255 0 0 127 254 0 0 62 124 0 0])
</methods> <methods> VWHelp.AHSGlossaryViewer class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Glossary Entry' #min: #(#Point 413 181 ) #max: #(#Point 640 480 ) #bounds: #(#Rectangle 504 462 917 661 ) ) #component: #(#SpecCollection #collection: #( #(#TextEditorSpec #layout: #(#LayoutFrame 3 0 26 0 -3 1 -44 1 ) #name: #text #isOpaque: true #model: #text #isReadOnly: true ) #(#InputFieldSpec #layout: #(#LayoutFrame 2 0 2 0 -150 1 24 0 ) #name: #selectedWord #flags: 0 #model: #selectedWord #isReadOnly: true #type: #text ) #(#ActionButtonSpec #layout: #(#LayoutFrame -33 0.5 -37 1 47 0.5 -7 1 ) #model: #closeRequest #label: #(#UserMessage #key: #OK #defaultString: 'OK' #catalogID: #help ) #isDefault: true #defaultable: true ) ) ) )
</methods> <methods> VWHelp.ArborHierarchicalSequenceView class <category>resources</category>
contractedMask "UIMaskEditor new openOnClass: self andSelector: #contractedMask" <resource: #image> ^Image extent: 7@13 depth: 1 palette: CoveragePalette monoMaskPalette bits: #[128 0 0 0 192 0 0 0 224 0 0 0 240 0 0 0 248 0 0 0 252 0 0 0 254 0 0 0 252 0 0 0 248 0 0 0 240 0 0 0 224 0 0 0 192 0 0 0 128 0 0 0 ] pad: 32
contractedTransitionImage "UIMaskEditor new openOnClass: self andSelector: #contractedTransitionImage" <resource: #image> ^Image extent: 7@13 depth: 1 palette: MappedPalette whiteBlack bits: #[128 0 0 0 192 0 0 0 224 0 0 0 240 0 0 0 248 0 0 0 252 0 0 0 254 0 0 0 252 0 0 0 248 0 0 0 240 0 0 0 224 0 0 0 192 0 0 0 128 0 0 0 ] pad: 32
expandedMask "UIMaskEditor new openOnClass: self andSelector: #expandedMask" <resource: #image> ^Image extent: 13@7 depth: 1 palette: CoveragePalette monoMaskPalette bits: #[255 248 0 0 127 240 0 0 63 224 0 0 31 192 0 0 15 128 0 0 7 0 0 0 2 0 0 0 ] pad: 32
expandedTransitionImage "UIMaskEditor new openOnClass: self andSelector: #expandedTransitionImage" <resource: #image> ^Image extent: 13@7 depth: 1 palette: MappedPalette whiteBlack bits: #[255 248 0 0 127 240 0 0 63 224 0 0 31 192 0 0 15 128 0 0 7 0 0 0 2 0 0 0 ] pad: 32
</methods> <methods> VWHelp.AHSOutlineTextGraphicMixViewer class <category>interface specs</category>
windowSubSpec "UIPainter new openOnClass: self andSelector: #windowSubSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Help Outline' #min: #(#Point 189 159 ) #bounds: #(#Rectangle 206 440 819 840 ) #flags: 4 #menu: #outlinerWindowMenu #isEventDriven: true ) #component: #(#SpecCollection #collection: #( #(#SubCanvasSpec #layout: #(#LayoutFrame 0 0 0 0 0 1 0 0.33 ) #name: #listOutlineBrowser #majorKey: #AHSOutlineViewerModel #minorKey: #verticalScrollingSpec #clientKey: #outliner ) #(#ArbitraryComponentSpec #layout: #(#LayoutFrame 3 0 2 0.33 -3 1 -2 1 ) #name: #textGraphicComposite #flags: 9 #component: #textGraphicComposite ) #(#SubCanvasSpec #layout: #(#LayoutFrame 50 0 50 0.33 -50 1 -50 1 ) #name: #textSubCanvas #flags: 24 #majorKey: #AHSToolbarHypertextEditor #minorKey: #subcanvasSpec #clientKey: #toolbarTextEditor ) #(#ArborDragBarSpec #layout: #(#LayoutFrame 0 0 -1 0.333333 0 1 1 0.333333 ) #name: #dragBar #lineWidth: 0 #widgetSet1: #(#listOutlineBrowser ) #widgetSet2: #(#textGraphicComposite ) #etched: false ) ) ) )
</methods> <methods> VWHelp.AHSGraphicScreen class <category>interface specs</category>
annotatedGraphicSpec "UIPainter new openOnClass: self andSelector: #annotatedGraphicSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: '' #bounds: #(#Rectangle 242 410 662 756 ) ) #component: #(#SpecCollection #collection: #( #(#LabelSpec #layout: #(#AlignmentOrigin 0 0.5 0 0.333333 0.5 0.5 ) #name: #image #label: #image #hasCharacterOrientedLabel: false ) #(#TextEditorSpec #layout: #(#LayoutFrame 0 0 0 0.666666 0 1 0 1 ) #name: #captionTextEditor #flags: 12 #isOpaque: true #model: #caption #isReadOnly: true ) ) ) )
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: '' #bounds: #(#Rectangle 158 369 578 715 ) ) #component: #(#SpecCollection #collection: #( #(#ActionButtonSpec #layout: #(#LayoutFrame -30 0.5 -33 1 30 0.5 -6 1 ) #name: #doneButton #model: #done #label: #(#UserMessage #key: #ok1 #defaultString: '(ok)' #catalogID: #help ) #defaultable: true ) #(#SubCanvasSpec #layout: #(#LayoutFrame 3 0 0 0 -3 1 -40 1 ) #name: #annotatedGraphicSubCanvas #flags: 0 #minorKey: #annotatedGraphicSpec ) ) ) )
</methods> <methods> VWHelp.ArborIconSet class <category>resources</category>
closedBookImage "UIMaskEditor new openOnClass: self andSelector: #closedBookImage" <resource: #image> ^CachedImage on: (Image extent: 16@15 depth: 3 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 5) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6167 scaledGreen: 6167 scaledBlue: 6167); at: 3 put: (ColorValue scaledRed: 4112 scaledGreen: 4112 scaledBlue: 4112); at: 4 put: ColorValue white; at: 5 put: (ColorValue scaledRed: 4112 scaledGreen: 0 scaledBlue: 4112); yourself)) usingBits: #[51 51 51 48 3 51 51 51 51 51 48 4 64 51 51 51 51 48 4 68 68 3 51 51 48 4 68 68 68 64 51 51 1 68 68 68 68 68 3 51 4 20 68 68 68 68 64 51 4 65 68 68 68 68 68 3 4 68 20 68 68 68 68 0 4 68 65 68 68 68 0 35 48 68 68 20 68 0 35 35 51 4 68 65 0 33 49 0 51 48 68 64 35 19 16 3 51 51 4 64 49 48 3 51 51 51 48 64 32 3 51 51 51 51 51 0 3 51 51 51])
closedBookMask "UIMaskEditor new openOnClass: self andSelector: #closedBookMask" <resource: #image> ^(Image extent: 16@15 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[1 128 0 0 7 192 0 0 31 224 0 0 127 240 0 0 255 248 0 0 255 252 0 0 255 254 0 0 255 255 0 0 255 254 0 0 127 254 0 0 63 255 0 0 31 254 0 0 15 248 0 0 7 224 0 0 3 128 0 0])
contractedImage "UIMaskEditor new openOnClass: self andSelector: #contractedImage" <resource: #image> ^(Image extent: 13@13 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 3) at: 1 put: ColorValue black; at: 2 put: ColorValue blue; at: 3 put: ColorValue white; yourself)) usingBits: #[168 170 170 128 168 42 170 128 168 74 170 128 168 146 170 128 168 100 170 128 168 153 42 128 168 102 74 128 168 153 42 128 168 100 170 128 168 146 170 128 168 74 170 128 168 42 170 128 168 170 170 128])
contractedMask "UIMaskEditor new openOnClass: self andSelector: #contractedMask" <resource: #image> ^(Image extent: 13@13 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[16 0 0 0 24 0 0 0 28 0 0 0 30 0 0 0 31 0 0 0 31 128 0 0 31 192 0 0 31 128 0 0 31 0 0 0 30 0 0 0 28 0 0 0 24 0 0 0 16 0 0 0])
contractedTransitionImage "UIMaskEditor new openOnClass: self andSelector: #contractedTransitionImage" <resource: #image> ^(Image extent: 13@13 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 3) at: 1 put: ColorValue black; at: 2 put: ColorValue blue; at: 3 put: ColorValue white; yourself)) usingBits: #[168 170 170 128 168 42 170 128 168 74 170 128 168 18 170 128 168 68 170 128 168 17 42 128 168 68 74 128 168 17 42 128 168 68 170 128 168 18 170 128 168 74 170 128 168 42 170 128 168 170 170 128])
emptyImage "UIMaskEditor new openOnClass: self andSelector: #emptyImage" <resource: #image> ^CachedImage on: (Image extent: 13@1 depth: 1 bitsPerPixel: 1 palette: (MappedPalette withColors: ((Array new: 2) at: 1 put: ColorValue black; at: 2 put: ColorValue red; yourself)) usingBits: #[85 80 0 0])
emptyMask "UIMaskEditor new openOnClass: self andSelector: #emptyMask" <resource: #image> ^CachedImage on: (Image extent: 13@1 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 0 0 0])
expandedImage <resource: #image> | palette | palette := MappedPalette with: ColorValue white with: ColorValue blue with: ColorValue black. ^Image extent: 13 @ 7 depth: 2 palette: palette bits: #[170 170 170 128 36 68 70 0 9 17 24 0 2 68 96 0 0 145 128 0 0 38 0 0 0 8 0 0 ]
expandedMask "UIMaskEditor new openOnClass: self andSelector: #expandedMask" <resource: #image> ^Image extent: 13@7 depth: 1 palette: CoveragePalette monoMaskPalette bits: #[255 248 0 0 127 240 0 0 63 224 0 0 31 192 0 0 15 128 0 0 7 0 0 0 2 0 0 0 ] pad: 32
expandedTransitionImage "UIMaskEditor new openOnClass: self andSelector: #expandedTransitionImage" <resource: #image> ^(Image extent: 13@7 depth: 2 bitsPerPixel: 2 palette: (MappedPalette withColors: ((Array new: 3) at: 1 put: ColorValue black; at: 2 put: ColorValue blue; at: 3 put: ColorValue white; yourself)) usingBits: #[0 0 0 0 132 68 68 128 161 17 18 128 168 68 74 128 170 17 42 128 170 132 170 128 170 162 170 128])
halfwayBookImage "UIMaskEditor new openOnClass: self andSelector: #halfwayBookImage" <resource: #image> ^CachedImage on: (Image extent: 16@15 depth: 3 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 6) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6167 scaledGreen: 6167 scaledBlue: 6167); at: 3 put: ColorValue white; at: 4 put: (ColorValue scaledRed: 4112 scaledGreen: 4112 scaledBlue: 4112); at: 5 put: ColorValue yellow; at: 6 put: (ColorValue scaledRed: 4112 scaledGreen: 0 scaledBlue: 4112); yourself)) usingBits: #[34 34 34 34 0 2 34 34 34 34 34 32 85 2 34 34 34 34 32 5 85 2 34 34 34 34 5 85 85 0 34 34 34 32 85 85 85 2 2 34 34 5 85 85 85 2 80 34 34 5 85 85 85 2 80 34 34 5 85 85 80 50 80 34 34 5 85 85 4 50 80 34 34 5 85 80 34 50 80 34 34 5 85 2 36 50 80 34 34 5 80 36 0 2 80 34 34 1 0 3 17 34 80 34 34 1 5 85 85 85 80 34 34 32 0 0 0 0 0 34])
halfwayBookMask "UIMaskEditor new openOnClass: self andSelector: #halfwayBookMask" <resource: #image> ^CachedImage on: (Image extent: 16@15 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[0 224 0 0 1 224 0 0 7 224 0 0 15 240 0 0 31 248 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 31 252 0 0])
openBookImage "UIMaskEditor new openOnClass: self andSelector: #openBookImage" <resource: #image> ^CachedImage on: (Image extent: 16@16 depth: 3 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 6) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6167 scaledGreen: 6167 scaledBlue: 6167); at: 3 put: ColorValue white; at: 4 put: (ColorValue scaledRed: 4112 scaledGreen: 4112 scaledBlue: 4112); at: 5 put: ColorValue yellow; at: 6 put: (ColorValue scaledRed: 4112 scaledGreen: 0 scaledBlue: 4112); yourself)) usingBits: #[34 50 34 34 34 34 34 34 35 19 34 34 34 34 34 34 5 33 50 34 35 51 34 34 5 34 50 35 50 35 34 34 5 34 19 50 34 67 0 34 5 34 32 18 66 35 37 2 5 34 32 18 34 67 37 2 5 34 32 18 66 35 37 2 5 34 32 18 34 67 37 2 5 34 32 18 66 35 37 2 5 82 32 18 34 67 37 2 32 85 32 18 48 0 37 2 34 5 32 0 49 18 37 2 34 5 0 85 85 85 85 2 34 5 85 0 0 0 0 2 34 32 0 34 34 34 34 34])
openBookMask "UIMaskEditor new openOnClass: self andSelector: #openBookMask" <resource: #image> ^(Image extent: 16@16 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[32 0 0 0 112 0 0 0 248 112 0 0 249 240 0 0 255 252 0 0 255 254 0 0 255 254 0 0 255 254 0 0 255 254 0 0 255 254 0 0 255 254 0 0 127 254 0 0 63 254 0 0 63 254 0 0 63 254 0 0 28 0 0 0])
pageImage "UIMaskEditor new openOnClass: self andSelector: #pageImage" <resource: #image> ^CachedImage on: (Image extent: 16@15 depth: 3 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 6) at: 1 put: ColorValue black; at: 2 put: (ColorValue scaledRed: 6167 scaledGreen: 6167 scaledBlue: 6167); at: 3 put: ColorValue white; at: 4 put: (ColorValue scaledRed: 4112 scaledGreen: 4112 scaledBlue: 4112); at: 5 put: ColorValue yellow; at: 6 put: ColorValue blue; yourself)) usingBits: #[34 51 51 51 51 51 34 34 34 50 34 66 34 67 50 34 34 50 66 34 66 32 0 34 34 50 34 66 34 66 16 34 34 50 85 85 85 82 16 34 34 50 34 66 34 66 16 34 34 50 85 85 85 82 16 34 34 50 34 66 34 66 16 34 34 50 85 85 85 82 16 34 34 50 34 66 34 66 16 34 34 50 85 85 85 82 16 34 34 50 34 66 34 66 16 34 34 50 85 85 85 82 16 34 34 49 17 17 17 17 16 34 34 0 0 0 0 0 0 34])
pageMask "UIMaskEditor new openOnClass: self andSelector: #pageMask" <resource: #image> ^CachedImage on: (Image extent: 16@15 depth: 1 bitsPerPixel: 1 palette: CoveragePalette monoMaskPalette usingBits: #[63 240 0 0 63 248 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0 63 252 0 0])
</methods> <methods> VWHelp.AHSFullGlossaryViewer class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'Glossary' #min: #(#Point 471 237 ) #bounds: #(#Rectangle 158 478 629 715 ) ) #component: #(#SpecCollection #collection: #( #(#SequenceViewSpec #layout: #(#LayoutFrame 4 0 26 0 -2 0.35 -38 1 ) #name: #fullGlossaryList #model: #fullGlossaryList ) #(#TextEditorSpec #layout: #(#LayoutFrame 2 0.35 26 0 -4 1 -38 1 ) #name: #fullGlossaryText #model: #fullGlossaryText #isReadOnly: true ) #(#LabelSpec #layout: #(#Rectangle 4 3 135 24 ) #label: #(#UserMessage #key: #glossaryWords #defaultString: 'Glossary Words' #catalogID: #help ) ) #(#LabelSpec #layout: #(#LayoutFrame 2 0.35 4 0 -4 1 25 0 ) #label: #(#UserMessage #key: #definition #defaultString: 'Definition' #catalogID: #help ) ) #(#ActionButtonSpec #layout: #(#LayoutFrame -71 1 -30 1 -4 1 -4 1 ) #name: #closeRequest #model: #closeRequest #label: #(#UserMessage #key: #OK #defaultString: 'OK' #catalogID: #help ) #isDefault: true #defaultable: true ) ) ) )
</methods> <initialize> VWHelp.AHSOHCPreferencesModel </initialize> <initialize> VWHelp.ArborIconSet </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>Controller</name> <environment>UI</environment> <super>Core.Object</super> <private>false</private> none model view sensor <imports></imports> <category>Interface-Framework</category> <attributes> <package>Interface-Framework</package> </attributes> </class> <class> <name>ControllerWithMenu</name> <environment>UI</environment> <super>UI.Controller</super> <private>false</private> none menuHolder performer <imports></imports> <category>Interface-Framework</category> <attributes> <package>Interface-Framework</package> </attributes> </class> <class> <name>ParagraphEditor</name> <environment>UI</environment> <super>UI.ControllerWithMenu</super> <private>false</private> none beginTypeInIndex anchorIndex emphasisHere dispatchTable charComposer textHasChanged feelPolicy supportCodeEditingFeels localMenuItems extendingDown <imports> private Graphics.TextConstants.* </imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class> <class> <name>VisualPart</name> <environment>Graphics</environment> <super>Graphics.VisualComponent</super> <private>false</private> none container eventHandlers properties <imports></imports> <category>Graphics-Visual Objects</category> <attributes> <package>Graphics-Visual Objects</package> </attributes> </class> <class> <name>View</name> <environment>UI</environment> <super>Graphics.DependentPart</super> <private>false</private> none controller <imports></imports> <category>Interface-Framework</category> <attributes> <package>Interface-Framework</package> </attributes> </class> <class> <name>OpaqueImage</name> <environment>Graphics</environment> <super>Graphics.VisualComponent</super> <private>false</private> none figure shape <imports></imports> <category>Graphics-Images</category> <attributes> <package>Graphics-Images</package> </attributes> </class> <class> <name>ScrollingTracker</name> <environment>UI</environment> <super>UI.SelectionTracker</super> <private>false</private> none process <imports></imports> <category>Interface-Events-Trackers</category> <attributes> <package>Interface-Events-Trackers</package> </attributes> </class> <class> <name>SequenceSelectionTracker</name> <environment>UI</environment> <super>UI.ScrollingTracker</super> <private>false</private> none wantsToDrag selectionDone startPoint <imports></imports> <category>Interface-Events-Trackers</category> <attributes> <package>Interface-Events-Trackers</package> </attributes> </class> <class> <name>CharacterBlock</name> <environment>Graphics</environment> <super>Graphics.Rectangle</super> <private>false</private> none stringIndex character <imports> private Graphics.TextConstants.* </imports> <category>Graphics-Text Support</category> <attributes> <package>Graphics-Text Support</package> </attributes> </class> <class> <name>Collection</name> <environment>Core</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>Collections-Abstract</category> <attributes> <package>Collections-Abstract</package> </attributes> </class> <class> <name>OrderedCollection</name> <environment>Core</environment> <super>Core.SequenceableCollection</super> <private>false</private> objects firstIndex lastIndex <imports></imports> <category>Collections-Sequenceable</category> <attributes> <package>Collections-Sequenceable</package> </attributes> </class> <class> <name>DividerSpec</name> <environment>UI</environment> <super>UI.NamedSpec</super> <private>false</private> none lineWidth orientation <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>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>ArborHypertextEditorController</name> <environment>VWHelp</environment> <super>UI.TextEditorController</super> <private>false</private> none <imports></imports> <category>Help-Arbor Hypertext</category> <attributes> <package>Arbor Hypertext</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>Set</name> <environment>Core</environment> <super>Core.Collection</super> <private>false</private> objects tally <imports></imports> <category>Collections-Unordered</category> <attributes> <package>Collections-Unordered</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>ArborHyperlink</name> <environment>VWHelp</environment> <super>Core.Object</super> <private>false</private> none linkObject color emphasis <imports></imports> <category>Help-Arbor Hypertext</category> <attributes> <package>Arbor Hypertext</package> </attributes> </class> <class> <name>UILookPolicy</name> <environment>UI</environment> <super>Core.Object</super> <private>false</private> none systemAttributes systemWidgetAttributes useSystemFontOnWidgets systemMenuAttributes <imports></imports> <category>UIBuilder-Support</category> <attributes> <package>UIBuilder-Support</package> </attributes> </class> <class> <name>VisualDivider</name> <environment>UI</environment> <super>UI.SimpleComponent</super> <private>false</private> none orientation lineWidth etched <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</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>WidgetWrapper</name> <environment>UI</environment> <super>Graphics.Wrapper</super> <private>false</private> none widget widgetState effectivelyVisible decorator dependents dropTarget <imports></imports> <category>UIBuilder-Support</category> <attributes> <package>UIBuilder-Support</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>ComposedText</name> <environment>Graphics</environment> <super>Graphics.TextLines</super> <private>false</private> none text compositionWidth compositionHeight wordWrap fontPolicy lineTable fitWidth <imports> private Graphics.TextConstants.* </imports> <category>Graphics-Text Support</category> <attributes> <package>Graphics-Text Support</package> </attributes> </class> <class> <name>SequenceView</name> <environment>UI</environment> <super>UI.SelectionView</super> <private>false</private> none visualBlock selectedVisualBlock measureWidth cachedWidth helpText <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>Image</name> <environment>Graphics</environment> <super>Graphics.PixelArray</super> <private>false</private> none bits width height depth bitsPerPixel palette maxPixelValue rowByteSize <imports></imports> <category>Graphics-Images</category> <attributes> <package>Graphics-Images</package> </attributes> </class> <class> <name>BoundedWrapper</name> <environment>Graphics</environment> <super>Graphics.LayoutWrapper</super> <private>false</private> none extent <imports></imports> <category>Graphics-Visual Objects</category> <attributes> <package>Graphics-Visual Objects</package> </attributes> </class> <class> <name>CompositeView</name> <environment>UI</environment> <super>Graphics.DependentComposite</super> <private>false</private> none controller <imports></imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class> <class> <name>Menu</name> <environment>UI</environment> <super>Core.Object</super> <private>false</private> none items groupSizes adornment selectionMemory <imports></imports> <category>Interface-Menus</category> <attributes> <package>Interface-Menus</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>ArborHypertext</name> <environment>VWHelp</environment> <super>Core.Text</super> <private>false</private> none <imports></imports> <category>Help-Arbor Hypertext</category> <attributes> <package>Arbor Hypertext</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>CachedImage</name> <environment>Graphics</environment> <super>Graphics.PixelArray</super> <private>false</private> none image retainedMedium conversionMessage <imports></imports> <category>Graphics-Images</category> <attributes> <package>Graphics-Images</package> </attributes> </class> <class> <name>VisualLauncher</name> <environment>Tools</environment> <super>UI.ApplicationModel</super> <private>false</private> none menuBar toolBar textCollector toolDock <imports></imports> <category>Tools-Misc</category> <attributes> <package>Tools-Misc</package> </attributes> </class> <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> <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>LabelAndIcon</name> <environment>UI</environment> <super>UI.Label</super> <private>false</private> none icon gap <imports></imports> <category>UIBasics-Support</category> <attributes> <package>UIBasics-Support</package> </attributes> </class>