Squeak Class Documentation category index | class index  
 
ReferenceMorph
  category: Morphic-Palettes
  superclass: BorderedMorph
  subclasses: FlapTab

Serves as a reference to any arbitrary morph; used, for example, as the tab in a tabbed palette The wrapper intercepts mouse events and fields them, passing them on to their referent morph.

instance methods
  accessing
  allNonSubmorphMorphs
isCurrentlyGraphical
morphToInstall
referent
referent:

  events
  doButtonAction
handlesMouseDown:
mouseDown:
mouseMove:
mouseUp:
tabSelected

  menu
  addCustomMenuItems:hand:
changeTabGraphic
changeTabText
existingWording
graphicalMorphForTab
isCurrentlyTextual
preserveDetails
setLabelFontTo:
useGraphicalTab
useTextualTab

  misc
  borderWidth:
fitContents
highlight
initialize
isHighlighted
isInTabSorter
layoutChanged
morphToInstall:
morphToInstall:font:
setNameTo:
sorterToken
unHighlight

class methods
  instance creation
  forMorph:
forMorph:font:

  scripting
  additionsToViewerCategories
defaultNameStemForInstances

instance methods
  accessing top  
 

allNonSubmorphMorphs

we hold extra morphs


 

isCurrentlyGraphical

Answer whether the receiver is currently showing a graphical face


 

morphToInstall


 

referent


 

referent:


  events top  
 

doButtonAction

If the receiver has a button-action defined, do it now. The default button action of any morph is, well, to do nothing. Note that there are several ways -- too many ways -- for morphs to have button-like actions. This one refers not to the #mouseUpCodeToRun feature, nor does it refer to the Player-scripting mechanism. Instead it is intended for morph classes whose very nature is to be buttons -- this method provides glue so that arbitrary buttons on the UI can be 'fired' programatticaly from user scripts


 

handlesMouseDown:

Do I want to receive mouseDown events (mouseDown:, mouseMove:, mouseUp:)?


 

mouseDown:

Handle a mouse down event. The default response is to let my eventHandler, if any, handle it.


 

mouseMove:

The mouse moved while the butten was down in the receiver


 

mouseUp:

The mouse came up in the receiver; If the mouse is still within the receiver at this point, do the corresponding action


 

tabSelected

Called when the receiver is hit. First, bulletproof against someone having taken the structure apart. My own action basically requires that my grand-owner be a TabbedPalette. Note that the 'opening' script concept has been left behind here.


  menu top  
 

addCustomMenuItems:hand:

Add morph-specific items to the menu for the hand


 

changeTabGraphic


 

changeTabText


 

existingWording


 

graphicalMorphForTab


 

isCurrentlyTextual


 

preserveDetails

The receiver is being switched to use a different format. Preserve the existing details (e.g. wording if textual, grapheme if graphical) so that if the user reverts back to the current format, the details will be right


 

setLabelFontTo:

Change the receiver's label font to be as indicated


 

useGraphicalTab


 

useTextualTab

Use a textually-emblazoned tab


  misc top  
 

borderWidth:

Set the receiver's border width as indicated, and trigger a fresh layout


 

fitContents


 

highlight

The receiver is being asked to appear in a highlighted state. Mostly used for textual morphs


 

initialize


 

isHighlighted


 

isInTabSorter

Answer whether the receiver is currently inside a tab sorter


 

layoutChanged


 

morphToInstall:

Create a new tab consisting of a string holding the morph's name


 

morphToInstall:font:

Create a new tab consisting of a string holding the morph's name


 

setNameTo:


 

sorterToken


 

unHighlight


class methods
  instance creation top  
 

forMorph:

Create a new tab consisting of a string holding the morph's name


 

forMorph:font:

Create a new tab consisting of a string holding the morph's name


  scripting top  
 

additionsToViewerCategories

Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories.


 

defaultNameStemForInstances

Answer a basis for external names for default instances of the receiver. For classees, the class-name itself is a good one.