Glimmr Form Fields

version 1/101201 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Chapter: Defining the input stream

    Once a form field has been declared, we must also create its "input-stream", the rendered string element that will be associated with the field. This rendered string is the element that will actually draw text to the graphics window. It is declared like any other rendered string (see Glimmr Canvas-Based Drawing), and all of the standard options apply. Here is a simple, but complete, declaration:

        My text is a bitmap-rendered string. The origin is {8, 15}. The tint is g-black.

    After (and only after) we have declared both the field and the rendered string, we must define the relationship between them, by setting the input-stream property of the field:

        The input-stream of my form field is my text.