Created
September 18, 2018 11:49
-
-
Save krono/d7e1796664020fd256afd7e22e429141 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'From Squeak5.2beta of 12 September 2018 [latest update: #18193] on 18 September 2018 at 1:48:53 pm'! | |
Model subclass: #Moep | |
instanceVariableNames: '' | |
classVariableNames: '' | |
poolDictionaries: '' | |
category: 'Moep'! | |
!Moep methodsFor: 'toolbuilder' stamp: 'topa 9/18/2018 13:48'! | |
buildContentsWith: builder | |
^ builder pluggableTextSpec new | |
model: self; | |
indicateUnacceptedChanges: false; | |
getText: #contents; | |
font: Preferences standardFixedFont; | |
readOnly: true; | |
softLineWrap: false; | |
menu: #menu:shifted:; | |
frame: ([email protected] corner: 1@1); | |
yourself! ! | |
!Moep methodsFor: 'toolbuilder' stamp: 'topa 9/18/2018 13:37'! | |
buildWith: builder | |
"Create the ui for the browser" | |
"ToolBuilder open: self" | |
| windowSpec | | |
windowSpec := self buildWindowWith: builder specs: { | |
(0 @ 0 corner: 1 @ 1) -> [self buildContentsWith: builder]. | |
}. | |
^ builder build: windowSpec! ! | |
!Moep methodsFor: 'accessing' stamp: 'topa 9/18/2018 13:46'! | |
contents | |
^ 'The help browser usually operates on a hierarchy of help topics with one help topic at the root level. Evaluate the following expression in a workspace to contruct a simple help topic and open it as a root topic in the help browser, or simply click on the underlined text below | |
|root| | |
root := HelpTopic | |
title: ''My first topic'' | |
contents: ''A simple topic of interest''. | |
HelpBrowser openOn: root | |
Note that the help browser displays the contents of our topic in the right page and uses the topics title as the title for the help browser window. | |
!! | |
]style[(283 132 158),d|root| | |
root := HelpTopic | |
title: ''My first topic'' | |
contents: ''A simple topic of interest''. | |
HelpBrowser openOn: root;;,!!' readStream nextChunkText! ! | |
!Moep methodsFor: 'menu' stamp: 'topa 9/18/2018 13:47'! | |
menu: aMenu shifted: aBoolean | |
self halt. | |
"not yet"! ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment