Apple Newton Programmer’s Newton 2.0 (for Newton 2.0) Manual de usuario Pagina 419

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 942
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 418
CHAPTER 10
Recognition: Advanced Topics
Using Advanced Topics in Recognition 10-43
GetKeyView().viewInkWordScript := func(strokeBundle) begin
// convert the stroke bundle into an ink word
local inkPoly := CompressStrokes(strokeBundle);
local inkWord := inkPoly.ink;
local textSlot := "\uF701";
local stylesSlot := [1, inkWord];
local root := GetRoot();
// create a rich string with the ink word in it
local appendString := MakeRichString(textSlot,
stylesSlot);
// append the rich string to myRichString
if root.myRichString then
root.myRichString := root.myRichString && appendString;
else
root.myRichString := appendString;
// return nil so default handling still happens
nil;
end;
This implementation converts the stroke bundle into an ink word, creates a rich
string that includes the ink word, and appends that rich string to a rich string that is
stored in the root (
myRichString). The method then returns nil, which allows
the built-in handling of the stroke bundle to occur.
Vista de pagina 418
1 2 ... 414 415 416 417 418 419 420 421 422 423 424 ... 941 942

Comentarios a estos manuales

Sin comentarios