beautypg.com

Apple Newton Programmer’s Newton 2.0 (for Newton 2.0) User Manual

Page 427

background image

C H A P T E R 1 0

Recognition: Advanced Topics

Summary of Advanced Topics in Recognition

10-51

// height of cells in pixels

cellHeight:

int

, // system-provided default is 50

// recConfig frame specifying this view’s recog behavior

recConfig:

frame

, // system provides default

// specifies appearance & behavior of formatted comb view

template:

frame

, // optional protoCharEdit template

// string displayed when view opens; arg to SetupString method

text:

string

, // optional

// index of leftmost non-space character in comb view

wordLeft:

int

, // system-provided value

// index of cell to the right of rightmost non-space character

wordRight:

int

, // system-provided value

// index into text slot of character occupying leftmost cell

dispLeft:

int

, // system-provided value; changes after scrolling

// offset in pixels from leftmost edge of comb view

// to leftmost edge of first cell displayed

dispIndent:

int

,

// return word from comb view w/out leading/trailing spaces

CurrentWord:

function

,

// return cleaned-up version of word suitable for ext display

GetWordForDisplay:

function

, // calls CleanupString if provided

// deletes specified text from comb view

DeleteText:

function

,

// scrolls contents of comb view left or right as specified

Scroll:

function

,

// makes comb view use current values of text & template slots

UseTextAndTemplate:

function

,

// Sets the string displayed by the comb view

SetNewWord:

function

,

// performs internal initialization using current values of

// text and template slot; call after calling SetNewWord

UseNewWord:

function

,

// Returns true when template’s format slot is non-nil

FixedWord:

function

,

// Returns number of chars residing in templates format slot

FixedWordLength:

function

,

// optional app-defined methods

// you supply optional fn to update external display

DisplayExternal:

function

, // message sent when comb view changes

// you supply optional fn to save your undo info

SaveUndoState:

function

, // message sent when comb view changes

// you supply optional fn to do app-specific tasks for undo

RestoreUndoState:

function

, // msg sent to undo comb view changes

…}