Glimmr Graphic Hyperlinks

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Part 6b - Link Management (for use with Glimmr Canvas-Based Drawing by Erik Temple)

    To set a graphlink in (g - a g-window) identified as (newlinkid - an object) from (gleft - a number) by (gtop - a number) to (gright - a number) by (gbottom - a number) as (linkaction - some text), ignoring redundant links:
        if not ignoring redundant links and there is a linkid of newlinkid in the Table of Graphlink Glulx Replacement Commands:
            choose row with linkid of newlinkid in the Table of Graphlink Glulx Replacement Commands;
            now g-win entry is g;
            now p-top entry is gtop;
            now p-bottom entry is gbottom;
            now p-left entry is gleft;
            now p-right entry is gright;
            now replacement entry is linkaction;
        otherwise if the number of blank rows in the Table of Graphlink Glulx Replacement Commands is greater than 0:
            choose a blank row in the Table of Graphlink Glulx Replacement Commands;
            now linkid entry is newlinkid;
            now g-win entry is g;
            now p-top entry is gtop;
            now p-bottom entry is gbottom;
            now p-left entry is gleft;
            now p-right entry is gright;
            now replacement entry is linkaction.

    To set a graphlink in (g - a g-window) identified as (newlinkid - an object) from (gleft - a number) by (gtop - a number) to (gright - a number) by (gbottom - a number) as (linkref - a number), ignoring redundant links:
        if not ignoring redundant links and there is a linkid of newlinkid in the Table of Graphlink Glulx Replacement Commands:
            choose row with linkid of newlinkid in the Table of Graphlink Glulx Replacement Commands;
            now g-win entry is g;
            now p-top entry is gtop;
            now p-bottom entry is gbottom;
            now p-left entry is gleft;
            now p-right entry is gright;
            now alt entry is linkref;
        otherwise if the number of blank rows in the Table of Graphlink Glulx Replacement Commands is greater than 0:
            choose a blank row in the Table of Graphlink Glulx Replacement Commands;
            now linkid entry is newlinkid;
            now g-win entry is g;
            now p-top entry is gtop;
            now p-bottom entry is gbottom;
            now p-left entry is gleft;
            now p-right entry is gright;
            now alt entry is linkref.

    To set a graphlink in (g - a g-window) identified as (newlinkid - an object) from (gleft - a number) by (gtop - a number) to (gright - a number) by (gbottom - a number) as (linkref - a stored action), ignoring redundant links:
        if not ignoring redundant links and there is a linkid of newlinkid in the Table of Graphlink Glulx Replacement Commands:
            choose row with linkid of newlinkid in the Table of Graphlink Glulx Replacement Commands;
            now g-win entry is g;
            now p-top entry is gtop;
            now p-bottom entry is gbottom;
            now p-left entry is gleft;
            now p-right entry is gright;
            now action entry is linkref;
        otherwise if the number of blank rows in the Table of Graphlink Glulx Replacement Commands is greater than 0:
            choose a blank row in the Table of Graphlink Glulx Replacement Commands;
            now linkid entry is newlinkid;
            now g-win entry is g;
            now p-top entry is gtop;
            now p-bottom entry is gbottom;
            now p-left entry is gleft;
            now p-right entry is gright;
            now action entry is linkref.

    To clear the graphlink identified as (dellinkid - an object):
        if there is a linkid of dellinkid in the Table of Graphlink Glulx Replacement Commands:
            choose row with linkid of dellinkid in the Table of Graphlink Glulx Replacement Commands;
            blank out the whole row.

    To zero the/-- link-table:
        repeat through the Table of Graphlink Glulx Replacement Commands:
            blank out the whole row.

        
    Table of Graphlink Glulx Replacement Commands
    linkid  g-win  p-top  p-bottom  p-left  p-right  replacement  alt  action  
    an object  a g-window  a number  a number  a number  a number  some text  number  stored action  
    with 120 blank rows