Squeak Class Documentation category index | class index  
 
CRGesture
  category: Genie-Integration
  superclass: Object
  subclasses:

My instances describe a genie gesture. There are the following instance variables:

capturedFeature <CRFeature>
Features of the captured gesture
coordinates <CRRecognizerCoordinates>
Coordinates of the captured feature
dictionary <CRDictionary>
Dictionary for the feature lookup
lookupResult <CRLookupResult>
Result of the dictionary lookup for the captured feature
target <Moph>
The target morph
startEvent <MorphicEvent>
The event that started the capturing of this gesture

The lookupResult provides a wide variety of informations about the lookup process and th best
matches. (Usually it contains not only one match, but the best few matches). Amongst others,
it provides an iterator to walk through the matches.
A lot of methods in this class are just forwarded to the lookupResult. So, have a look at this
class (and CRlookupItem) to get more informations.

See the the class comment of AGenieDescription for more informations about the genie
events.


instance methods
  accessing
  buttons
capturedFeature
char
charType
coordinates
correspondingKeystrokeEvents
correspondingKeystrokeEventsAt:
cursorPoint
dictionary
distance
evaluateCode
feature
hand
keystrokeEventFor:
normalizedChar
position
startEvent
target
toggleCommandKey
toggleControlKey
toggleMacOptionKey
toggleShift

  copying
  veryDeepFixupWith:
veryDeepInner:

  initialize-release
  initializeCapturedFeature:at:dictionary:startEvent:target:

  lookup result accessing
  charAt:
charTypeAt:
correspondingKeystrokes
correspondingKeystrokesAt:
correspondingMouseEvents
correspondingMouseEventsAt:
correspondsToKeystrokes
correspondsToKeystrokesAt:
correspondsToMouseEvents
correspondsToMouseEventsAt:
distanceAt:
evaluateCodeAt:
featureAt:
isCodeAt:
isCommandAt:
isStrokesAt:
lookupIndex
lookupIndex:
lookupResult
nextDistinctCharMatch
nextDistinctCharMatchRollover:
nextMatch
nextMatchRollover:
normalizedCharAt:

  private
  lookupResult:

  testing
  anyModifierKeyPressed
commandKeyPressed
controlKeyPressed
isAlert
isCode
isCommand
isReject
isStrokes
macOptionKeyPressed
shiftPressed

class methods
  instance creation
  capturedFeature:at:dictionary:startEvent:target:

instance methods
  accessing top  
 

buttons

The buttons that have been pressed or simulated while capturing this gesture.


 

capturedFeature

Return the captured feature of this gesture


 

char

Return the resulting character at the current iterator position.
Usually, the lookup result (that is part of a morphic gesture event) contains not only the
best match. An iterator can be used to go through the matches. See the equally named
method in CRLookupResult or CRLookupItem for more informations.


 

charType

Return the character type at the current iterator position.
Basically there are 3 different character types: #strokes (for sequences of keystrokes),
#command (for special commands stored as symbols) and #code (for code that can be
executed with the morphic gesture event as a receiver).
Usually, the lookup result (that is part of a morphic gesture event) contains not only the
best match. An iterator can be used to go through the matches. See the equally named
method in CRLookupResult or CRLookupItem for more informations.


 

coordinates

Returns an instance of CRRecognizerCoordinates that stores a lot of informations about
the screen coordnates (pixel) where the gesture was captured.


 

correspondingKeystrokeEvents

Return the keystroke events corresponding to the character at the iterator position (if there
are any).
See the equally named method in CRLookupResult or CRLookupItem for more informations.


 

correspondingKeystrokeEventsAt:


 

cursorPoint

Backward compatibility


 

dictionary


 

distance

The distance from the captured feature to the result feature at the iterator position


 

evaluateCode

Eveluate the code at the iterator position of the result with THIS INSTANCE AS A
RECEIVER. (Only if the character at the iterator position is really code)


 

feature

The result feature at the iterator position.


 

hand


 

keystrokeEventFor:


 

normalizedChar

Return the normalized character at the iterator position.
See equally named method in CRLookupResult, CRLookupItem for more information


 

position

For every gesture there is a hotspot (#top, #left, #topLeft, ...) definied. This
method returns the coordinates of the hotspot in the captured feature


 

startEvent

The event that triggered the capturing of this gesture


 

target

Return the target morph of the gesture.
Using this method it is possible to access the target morph from within code that is directly
entered as the character. (The receiver of this code is the MorphicGestureEvent and so the
target morph can be access using 'self target')


 

toggleCommandKey


 

toggleControlKey


 

toggleMacOptionKey


 

toggleShift


  copying top  
 

veryDeepFixupWith:

If fields were weakly copied, fix them here. If they were in the tree being copied, fix them up, otherwise point to the originals.


 

veryDeepInner:

Copy all of my instance variables. Some need to be not copied at all, but shared.
Warning!! Every instance variable defined in this class must be handled.
We must also implement veryDeepFixupWith:. See DeepCopier class comment.


  initialize-release top  
 

initializeCapturedFeature:at:dictionary:startEvent:target:


  lookup result accessing top  
 

charAt:


 

charTypeAt:


 

correspondingKeystrokes

Return the keystrokes corresponding to the character at the iterator position (if there
are any).
See the equally named method in CRLookupResult or CRLookupItem for more information.


 

correspondingKeystrokesAt:


 

correspondingMouseEvents

Return the mouse events corresponding to the character at the terator position (if there
is one).
See the equally named method in CRLookupResult or CRLookupItem for more information.


 

correspondingMouseEventsAt:


 

correspondsToKeystrokes

Does the character at he iterator positon correspond to a keystroke?
See the equally named method in CRLookupResult or CRLookupItem for more information.


 

correspondsToKeystrokesAt:


 

correspondsToMouseEvents

Does the character at the iterator position corresponds to a mouse event?
See the equally named method in CRLookupResult or CRLookupItem for more information.


 

correspondsToMouseEventsAt:


 

distanceAt:


 

evaluateCodeAt:


 

featureAt:


 

isCodeAt:


 

isCommandAt:


 

isStrokesAt:


 

lookupIndex

The current iterator position within the lookup result


 

lookupIndex:

Set the current iterator position within the lookup result


 

lookupResult

The lookup result that was generated by looking up the newly captured feature in the
dictionary. Usually it contains more than one match. A lot of methods in this class are
just foreward methods to the lookup result. See class CRLookupResult (and CRLookupItem,
CRChar) for more information


 

nextDistinctCharMatch

Move the result iterator to the next match that has a distinct character associated to it


 

nextDistinctCharMatchRollover:

Move the result iterator to the next match that has a distinct character associated to it


 

nextMatch

Move the result iterator to the next match


 

nextMatchRollover:

Move the result iterator to the next match


 

normalizedCharAt:


  private top  
 

lookupResult:


  testing top  
 

anyModifierKeyPressed


 

commandKeyPressed


 

controlKeyPressed


 

isAlert

Returns whether an alert should inform the user about a ambigiuous match


 

isCode

Is the character at the iterator position code?


 

isCommand

Is the character at the iterator position a command?


 

isReject

Is the match so ambigious that it should be rejected?


 

isStrokes

Is the character at the iterator position a sequence of keystrokes (ascii characters)?


 

macOptionKeyPressed


 

shiftPressed


class methods
  instance creation top  
 

capturedFeature:at:dictionary:startEvent:target: