Squeak Class Documentation category index | class index  
 
TransitionMorph
  category: Morphic-Widgets
  superclass: Morph
  subclasses:

A transitionMorph inserts itself in the morphic object structure during a visual transition. It has a stepNumber that runs from 1 to nSteps. This class handles a large family of wipe-like transitions by itself. Subclasses may implement other transitions such as dissolves and zooms.

instance methods
  change reporting
  changed
invalidate:areasOutside:

  drawing
  areasRemainingToFill:
drawDissolveOn:
drawFrenchDoorOn:
drawOn:
drawPageBackOn:
drawPageForwardOn:
drawSlideAwayOn:
drawSlideBorderOn:
drawSlideBothOn:
drawSlideOverOn:
drawZoomFrameOn:
drawZoomOn:

  initialization
  completeReplacement
initiateReplacement
nSteps:stepTime:
showTransitionFrom:to:in:whenStart:whenDone:
startMorph:endMorph:startBlock:completionBlock:

  private
  effect:direction:
prevStepFrom:to:
stepFrom:to:

  stepping
  step
stepTime

class methods
  available effects
  allEffects
directionsForEffect:

  initialization
  effect:direction:
effect:direction:inverse:
includeInNewMorphMenu

instance methods
  change reporting top  
 

changed

The default (super) method is, generally much slower than need be, since many transitions only change part of the screen on any given step of the animation. The purpose of this method is to effect some of those savings.


 

invalidate:areasOutside:


  drawing top  
 

areasRemainingToFill:

May be overridden by any subclasses with opaque regions


 

drawDissolveOn:

startForm and endFrom are both fixed, but the dissolve ration changes.


 

drawFrenchDoorOn:

startForm and endFrom are both fixed, but a border expands out from a vertical (or H) slit, revealing endForm.
It's like opening a pair of doors.


 

drawOn:

During the transition process, the reveal and obscure areas will be invalidated,
so we should be drawing on a canvas that clips to only the changing region.


 

drawPageBackOn:

endForm grows in the given direction, overlaying endForm.


 

drawPageForwardOn:

startForm shrinks in the given direction, revealing endForm.


 

drawSlideAwayOn:

startMorph slides away in the given direction, revealing up the endMorph.


 

drawSlideBorderOn:

startForm and endFrom are both fixed, but a border slides in the given direction, revealing endForm. (It's like opening a can of sardines ;-).


 

drawSlideBothOn:

endMorph slides in the given direction, as startMorph slides out of its way.


 

drawSlideOverOn:

endMorph slides in the given direction, covering up the startMorph.


 

drawZoomFrameOn:

startForm and endFrom are both fixed, but a square border expands out from the center (or back), revealing endForm.
It's like passing through a portal.


 

drawZoomOn:

Zoom in: endForm expands overlaying startForm.
Zoom out: startForm contracts revealing endForm.


  initialization top  
 

completeReplacement


 

initiateReplacement


 

nSteps:stepTime:


 

showTransitionFrom:to:in:whenStart:whenDone:


 

startMorph:endMorph:startBlock:completionBlock:


  private top  
 

effect:direction:


 

prevStepFrom:to:

Used for recalling dimensions from previous step.


 

stepFrom:to:

This gives p1 for stepCount = 0, moving to p2 for stepCount = nSteps


  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
  available effects top  
 

allEffects


 

directionsForEffect:

All these arrays are ordered so inverse is atWrap: size//2.


  initialization top  
 

effect:direction:


 

effect:direction:inverse:


 

includeInNewMorphMenu

Transitions aren't meaningful without initializations