[squeak-dev] The Inbox: Morphic-kfr.2001.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jun 4 18:18:03 UTC 2022
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-kfr.2001.mcz
==================== Summary ====================
Name: Morphic-kfr.2001
Author: kfr
Time: 4 June 2022, 8:17:55.548458 pm
UUID: a69ddb4a-4949-e248-a87d-f503f56582df
Ancestors: Morphic-kfr.2000, Morphic-mt.1999
Open a HelpBrowser with TextLink.
Example:
TerseGuideHelp Help
Select text, press Alt+5 (CMD on Mac) and select 'Link to help on class'
(A link of this format: 'My Link<TerseGuideHelp Help>' will hide the part between < & > )
Dependent on Collections-kfr.1011 and Tools-kfr.1161
=============== Diff against Morphic-kfr.2000 ===============
Item was changed:
----- Method: SmalltalkEditor>>emphasisExtras (in category 'editing keys') -----
emphasisExtras
^#(
'Do it'
'Print it'
'Style it'
'Link to comment of class'
'Link to definition of class'
'Link to hierarchy of class'
+ 'Link to help on class'
'Link to method'
'URL Link...'
'Custom attribute...'
).!
Item was changed:
----- Method: SmalltalkEditor>>handleEmphasisExtra:with: (in category 'editing keys') -----
handleEmphasisExtra: index with: aKeyboardEvent
"Handle an extra emphasis menu item"
| action attribute thisSel |
action := {
[attribute := TextDoIt new.
thisSel := attribute analyze: self selection].
[attribute := TextPrintIt new.
thisSel := attribute analyze: self selection].
[thisSel := self styleSelection].
[attribute := TextLink new.
thisSel := attribute analyze: self selection asString with: 'Comment'].
[attribute := TextLink new.
thisSel := attribute analyze: self selection asString with: 'Definition'].
[attribute := TextLink new.
thisSel := attribute analyze: self selection asString with: 'Hierarchy'].
[attribute := TextLink new.
+ thisSel := attribute analyze: self selection asString with: 'Help'].
+ [attribute := TextLink new.
thisSel := attribute analyze: self selection asString].
[attribute := TextURL new.
thisSel := attribute analyze: self selection asString].
[thisSel := self selection.
attribute := self requestAttribute].
["Edit hidden info"
thisSel := self hiddenInfo. "includes selection"
attribute := TextEmphasis normal].
["Copy hidden info"
self copyHiddenInfo.
^true]. "no other action"
} at: index.
action value.
+
-
thisSel ifNil: [^ true]. "Could not figure out what to link to"
(thisSel isEmpty and: [attribute notNil])
ifTrue: [
| oldAttributes |
"only change emphasisHere while typing"
oldAttributes := paragraph text attributesAt: self pointIndex.
emphasisHere := Text addAttribute: attribute toArray: oldAttributes]
ifFalse: [
self replaceSelectionWith: (attribute ifNil: [thisSel] ifNotNil: [thisSel asText addAttribute: attribute]) ].
^ true!
More information about the Squeak-dev
mailing list
|