Squeak Class Documentation category index | class index  
 
MagnifierMorph
  category: Morphic-Demo
  superclass: BorderedMorph
  subclasses: FishEyeMorph

Provides a magnifying glass. Magnifies the morphs below (if grabbed) or the area around the mouse pointer.

instance methods
  drawing
  drawOn:
hasTranslucentColor

  events
  handlesMouseDown:
mouseDown:

  geometry
  borderWidth:
defaultExtent
extent:

  initialization
  initialize

  magnifying
  magnification:
magnifiedForm
sourcePoint
sourceRect
sourceRectFrom:

  menu
  addCustomMenuItems:hand:
chooseMagnification
chooseMagnification:
toggleTrackingPointer
trackingPointerString

  round view
  isRound
toggleRoundString
toggleRoundness

  stepping
  step
stepTime

class methods
  instance creation
  descriptionForPartsBin
newRound
supplementaryPartsDescriptions

instance methods
  drawing top  
 

drawOn:


 

hasTranslucentColor

I may show what's behind me, so tell the hand to don't cache


  events top  
 

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.


  geometry top  
 

borderWidth:

Grow outwards preserving innerBounds


 

defaultExtent


 

extent:

Round to multiples of magnification


  initialization top  
 

initialize


  magnifying top  
 

magnification:


 

magnifiedForm

Answer the magnified form


 

sourcePoint

If we are being dragged use our center, otherwise use pointer position


 

sourceRect


 

sourceRectFrom:


  menu top  
 

addCustomMenuItems:hand:

Add morph-specific items to the given menu which was invoked by the given hand. This method provides is invoked both from the halo-menu and from the control-menu regimes.


 

chooseMagnification


 

chooseMagnification:


 

toggleTrackingPointer


 

trackingPointerString


  round view top  
 

isRound


 

toggleRoundString


 

toggleRoundness


  stepping top  
 

step

Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message. The generic version dispatches control to the player, if any. The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph. In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.


 

stepTime

Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.


class methods
  instance creation 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!


 

newRound

Answer a round Magnifier


 

supplementaryPartsDescriptions

Answer a list of DescriptionForPartsBin objects that characterize objects that this class wishes to contribute to Stationery bins *other* than by the standard default #newStandAlone protocol