Squeak Class Documentation category index | class index  
 
TextMorphEditor
  category: Morphic-Text Support
  superclass: ParagraphEditor
  subclasses:

This is the ParagraphEditor for TextMorphs.



-----
In the past, BookMorphs had the ability to have each page be on the server as a .sp SqueakPage file. The index of the book was a .bo file. In text, Cmd-6 had a LinkTo option that linked to a page by its name, or created a new page of that name. It assumed the book was on a server with a file per page. Ted removed that code, and kept a copy on his disk in 'TME-ChngEmphasis.st for .bo .sp'

instance methods
  accessing
  morph
morph:
setSearch:
transformFrom:

  as yet unclassified
  totalTextHeight
visibleHeight

  attributes
  changeEmphasisOrAlignment
changeStyle
chooseColor
offerFontMenu

  binding
  bindingOf:

  command keys
  inspectIt:

  events
  mouseDown:
mouseMove:
mouseUp:
readKeyboard
recognizeCharacters
recognizeCharactersWhileMouseIn:

  menu commands
  accept
cancel
find
offerMenuFromEsc:
raiseContextMenu:
tempCommand:

  mvc compatibility
  againOrSame:
align
controlInitialize
controlTerminate
flash
mvcRedisplay
scrollBy:
select
selectAndScroll
selectAndScrollToTop
selectForTopFrom:to:
selectFrom:to:
storeSelectionInParagraph
updateMarker
userHasEdited
userHasNotEdited
zapSelectionWith:

class methods
  as yet unclassified
  new

instance methods
  accessing top  
 

morph


 

morph:

Install a link back to the morph being edited (esp for text links)


 

setSearch:

Set the FindText and ChangeText to seek aString; except if already seeking aString, leave ChangeText alone so again will repeat last replacement.


 

transformFrom:


  as yet unclassified top  
 

totalTextHeight


 

visibleHeight


  attributes top  
 

changeEmphasisOrAlignment


 

changeStyle

Let user change styles for the current text pane.


 

chooseColor

Make a new Text Color Attribute, let the user pick a color, and return the attribute


 

offerFontMenu

Present a menu of available fonts, and if one is chosen, apply it to the current selection.
Use only names of Fonts of this paragraph


  binding top  
 

bindingOf:


  command keys top  
 

inspectIt:

Inspect the selection -- invoked via cmd-i. If there is no current selection, use the current line.


  events top  
 

mouseDown:

An attempt to break up the old processRedButton code into threee phases


 

mouseMove:

Change the selection in response to moue-down drag


 

mouseUp:

An attempt to break up the old processRedButton code into threee phases


 

readKeyboard

Key struck on the keyboard. Find out which one and, if special, carry
out the associated special action. Otherwise, add the character to the
stream of characters. Undoer & Redoer: see closeTypeIn.


 

recognizeCharacters

Recognize hand-written characters and put them into the receiving pane. Invokes Alan's character recognizer.


 

recognizeCharactersWhileMouseIn:

Recognize hand-written characters and put them into the receiving TextMorph. Invokes Alan's character recognizer. box is in world coordinates.


  menu commands top  
 

accept

Save the current text of the text being edited as the current acceptable version for purposes of canceling. Allow my morph to take appropriate action


 

cancel

Cancel the changes made so far to this text


 

find

Prompt the user for a string to search for, and search the receiver from the current selection onward for it. 1/26/96 sw


 

offerMenuFromEsc:

The escape key was hit while the receiver has the keyboard focus; take action


 

raiseContextMenu:

AFAIK, this is never called in morphic, because a subclass overrides it. Which is good, because a ParagraphEditor doesn't know about Morphic and thus duplicates the text-editing actions that really belong in the specific application, not the controller. So the context menu this would raise is likely to be out of date.


 

tempCommand:

Experimental. Triggered by Cmd-t; put trial cmd-key commands here to see how they work, before hanging them on their own cmd accelerators.


  mvc compatibility top  
 

againOrSame:

Subroutine of search: and again. If useOldKeys, use same FindText and ChangeText as before.
1/26/96 sw: real worked moved to againOrSame:many:


 

align

Align text according to the next greater alignment value,
cycling among leftFlush, rightFlush, center, and justified.


 

controlInitialize

No-op for MVC ParagraphEditor compatibility


 

controlTerminate

No-op for MVC ParagraphEditor compatibility


 

flash

Causes the view of the paragraph to complement twice in succession.


 

mvcRedisplay

Ignore mvcRedisplay requests.


 

scrollBy:

Ignore scroll requests.


 

select

Ignore selection redraw requests.


 

selectAndScroll

Ignore scroll requests.


 

selectAndScrollToTop

Scroll until the selection is in the view and then highlight it.


 

selectForTopFrom:to:


 

selectFrom:to:

Select the specified characters inclusive.


 

storeSelectionInParagraph


 

updateMarker

Ignore scrollbar redraw requests.


 

userHasEdited

Note that my text is free of user edits.


 

userHasNotEdited

Note that my text is free of user edits.


 

zapSelectionWith:

**overridden to inhibit old-style display


class methods
  as yet unclassified top  
 

new

Answer a new instance of me with a null Paragraph to be edited.