Squeak Class Documentation category index | class index  
 
ObjectsTool
  category: Morphic-PartsBin
  superclass: AlignmentMorph
  subclasses:

I am a Master Parts Bin that allows the user to drag out a new Morph from a voluminous iconic list.

Choose "objects" from the world menu, or type Alt-o (Cmd-o on the Mac).

To add a new kinds of Morphs:
In the class of the Morph, implement the message:

descriptionForPartsBin
^ self partName: 'Rectangle'
categories: #('Graphics' ' Basic 1 ')
documentation: 'A rectangular shape, with border and fill style'

The partName is the title that will show in the lower pane of the Object Tool.
When is categories mode, an object can be seen in more than one category. The list above tells which ones.
Documentation is what will show in the balloon help for each object thumbnail.
The message #initializeToStandAlone creates the actual instance.

To make a second variant object prototype coming from the same class, implement #supplementaryPartsDescriptions. In it, you get to specify the nativitySelector. It is sent to the class to get the variant objects. Often it is #authoringPrototype. (A class may supply supplementaryPartsDescriptions without implementing descriptionForPartsBin. This gives you better control.)

instance methods
  alphabetic
  alphabeticTabs
installQuads:fromButton:
showAlphabeticCategory:fromButton:
showAlphabeticTabs

  categories
  showCategories
showCategory:fromButton:
tabsForCategories

  initialization
  initializeForFlap
initializeToStandAlone
tweakAppearanceAfterModeShift

  major modes
  modeSymbol
modeSymbol:
modeTabs

  menu
  addCustomMenuItems:hand:
resetThumbnails

  miscellaneous
  setExtentFromHalo:

  search
  newSearchPane
searchPane
searchPaneCharacter:
setSearchStringFromSearchPane
showMorphsMatchingSearchString
showSearchPane

  tabs
  initializeWithTabs:
paneForTabs:
prepareInitialAppearanceForTabs:
presentHelp
tabsPane

class methods
  parts bin
  descriptionForPartsBin

instance methods
  alphabetic top  
 

alphabeticTabs

Answer a list of buttons which, when hit, will trigger the choice of a morphic category


 

installQuads:fromButton:

Install items in the bottom pane that correspond to the given set of quads, as triggered from the given button


 

showAlphabeticCategory:fromButton:

Blast items beginning with a given letter into my lower pane


 

showAlphabeticTabs

Switch to the mode of showing alphabetic tabs


  categories top  
 

showCategories

Set the receiver up so that it shows tabs for each of the standard categories


 

showCategory:fromButton:

Project items from the given category into my lower pane


 

tabsForCategories

Answer a list of buttons which, when hit, will trigger the choice of a category


  initialization top  
 

initializeForFlap

Initialize the receiver to operate in a flap at the top of the screen. This worked in the past, but is not currently in the released UI and is not likely to work without some fixup.


 

initializeToStandAlone

Initialize the receiver so that it can live as a stand-alone morph


 

tweakAppearanceAfterModeShift

After the receiver has been put into a given mode, make an initial selection of category, if appropriate, and try to overcome persistent and annoying layout problems associated with initial state. This method contains a mish-mash of measures, sometimes obviously desparate, some likely overkill, some no longer required. Pax!


  major modes top  
 

modeSymbol

Answer the modeSymbol


 

modeSymbol:

Set the receiver's modeSymbol as indicated


 

modeTabs

Answer a list of buttons which, when hit, will trigger the choice of mode of the receiver


  menu top  
 

addCustomMenuItems:hand:

Add items to the given halo-menu, given a hand


 

resetThumbnails

Reset the thumbnail cache


  miscellaneous top  
 

setExtentFromHalo:

The user has dragged the grow box such that the receiver's extent would be anExtent. Do what's needed


  search top  
 

newSearchPane

Answer a type-in pane for searches


 

searchPane

Answer the receiver's search pane, nil if none


 

searchPaneCharacter:

A character represented by the event handed in was typed in the search pane by the user


 

setSearchStringFromSearchPane

Set the search string by obtaining its contents from the search pane, and doing a certain amount of munging


 

showMorphsMatchingSearchString

Project items matching the search string into my lower pane


 

showSearchPane

Set the receiver up so that it shows the search pane


  tabs top  
 

initializeWithTabs:

Initialize the receiver to have the given tabs


 

paneForTabs:

Answer a pane bearing tabs for the given list


 

prepareInitialAppearanceForTabs:

Prepare the initial appearance for a list of tabs


 

presentHelp

Sent when a Help button is hit; provide the user with some form of help for the tool at hand


 

tabsPane

Answer the pane that holds the tabs


class methods
  parts bin top  
 

descriptionForPartsBin

If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help. When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result. The parameters used in the implementation below are for documentation purposes only!