Glimmr Graphic Hyperlinks

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Using GGH with Glimmr Canvas-Based Drawing

    When used with Glimmr Canvas-Based Drawing, GGH becomes almost fully automatic. The only time we will manually need to set graphlinks is when we are creating a new type of element, or writing a custom window-drawing rule. (Only if we are seriously hacking the extension will ever need to clear a graphlink.) When we do set graphlinks, it is important to be aware that, when Glimmr Canvas-Based Drawing is included, the link identifier is an *object* (usually this will be a g-element) rather than a text as it is in the absence of GCBD. Here are the three graphlink-setting phrases mentioned above as they might be entered in the Canvas-Based Drawing context:

        set a graphlink in the graphics-window identified as the undo-button from 0 by 0 to 10 by 10 as "Undo".

        set a graphlink in the graphics-window identified as the undo-button from {10, 10} to {40, 25} as 2.

        set a graphlink in the graphics-window identified as the jump-button from {10, 10} to {40, 25} as the action of jumping.

    The other major change is that, under Canvas-Based Drawing, the graphlink processing rules are an object-based rulebook are an object-based rulebook. This rule header, for example, will allow us to treat the undo-button g-element differently from the others:

        A graphlink processing rule for the undo-button:
            (etc.)

    Without GCBD, we would need to write this as "A graphlink processing rule when the current graphlink is 'undo button'".