Squeak Class Documentation category index | class index  
 
CRAddFeatureMorph
  category: Genie-UI
  superclass: AlignmentMorph
  subclasses:

This class is used for the Genie UI. It allows to enter a new feature for a certain character.

instance methods
  accessing
  addFeatureAndUpdate:
defaultChar
defaultChar:
model

  buttons
  addToDefaultButton
addToXButton
basicButton
cancelButton
menuButton
resetButton

  genie-dispatching
  gesture:

  genie-processing
  allowsGestureEscape
allowsGesturePreprocessing
gestureDictionary
handlesGestureStart:
processEvent:using:

  initialize-release
  initializeModel:
layout

  model access
  addToActionAskUser:
addToDefaultAction
addToXAction
cancelAction
createMorphForFeature
objectToString:

  private
  addFeature:
avgFeature
bestStrokeFeature
featureMorph
featureMorph:
lastFeature
menuAction
model:
removeLastAction
resetAction
setHotspotAction:
shownFeature
strokeDistance:and:
switchShowLastAction

  updating
  update:
updateContents

class methods
  instance creation
  model:

instance methods
  accessing top  
 

addFeatureAndUpdate:


 

defaultChar


 

defaultChar:


 

model


  buttons top  
 

addToDefaultButton


 

addToXButton


 

basicButton


 

cancelButton


 

menuButton


 

resetButton


  genie-dispatching top  
 

gesture:

Special gesture handling: Just get the entered feature and add consider it as a new
master feature


  genie-processing top  
 

allowsGestureEscape

Is it allowed to escape from recognizing a gesture for this morph?


 

allowsGesturePreprocessing

Don't allow gesture preprocessing by the HandMorph.
This is important because we need here the originally entered feature!


 

gestureDictionary

This method is invoked to determine the gesture dictionary of the Morph.
Usually, gesture dictionaries are identified by (exported) names and so this method just
converts names to dictionaries if necessary


 

handlesGestureStart:

If true, the gesture handler is started when the morph gets a red button down
event


 

processEvent:using:

Use a special dispatcher instead of the default one.
This is necessary to make sure that all the red button downs are handled by
this morph and not by its submorphs.
Exception: The button-submorphs have to handle the events itself.


  initialize-release top  
 

initializeModel:


 

layout


  model access top  
 

addToActionAskUser:


 

addToDefaultAction


 

addToXAction


 

cancelAction


 

createMorphForFeature


 

objectToString:


  private top  
 

addFeature:


 

avgFeature

Calcualtes the avarage of all the entered features. The avarage is definied like this:
Take the point sequence of the feature that has the least stroke-distance to all the
other features. Then set all the secondary features (angle sum, aspect ratio, etc) to the
avarage of all the features


 

bestStrokeFeature

Return the feature that as the least stroke-distance to all the other features


 

featureMorph


 

featureMorph:


 

lastFeature


 

menuAction


 

model:


 

removeLastAction

Remove the last feature from the set of new features


 

resetAction

Reset: Remove all the new features


 

setHotspotAction:

Set hotspot for the new feature


 

shownFeature

Return the feature that should currently be displayed


 

strokeDistance:and:

Calculate the stroke-distance between the two features.
Use to determine which feature is most similar to all the others


 

switchShowLastAction

Switch between showing the last feature and showing the avarage feature


  updating top  
 

update:

Receive a change notice from an object of whom the receiver is a
dependent. The default behavior is to do nothing; a subclass might want
to change itself in some way.


 

updateContents


class methods
  instance creation top  
 

model: