Inline Hyperlinks

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Event handling

    A glulx hyperlink rule (this is the default inline hyperlink handling rule):
        now the current hyperlink ID is the link number of the selected hyperlink;
        unless the current hyperlink ID is 0:
            cancel glulx hyperlink request in main window;[just to be safe]
            cancel glulx hyperlink request in status window;[just to be safe]
            follow the hyperlink processing rules;
        if the status window is the hyperlink source:
            request glulx hyperlink event in status window;
        otherwise:
            request glulx hyperlink event in main window.

    To request glulx hyperlink event in the/-- main window:
        (- if (glk_gestalt(gestalt_Hyperlinks, 0)) glk_request_hyperlink_event(gg_mainwin); -)

    To cancel glulx hyperlink request in the/-- main window:
        (- if (glk_gestalt(gestalt_Hyperlinks, 0)) glk_cancel_hyperlink_event(gg_mainwin); -)

    To request glulx hyperlink event in the/-- status window:
        (- if (glk_gestalt(gestalt_Hyperlinks, 0) && gg_statuswin) glk_request_hyperlink_event(gg_statuswin); -)
        
    To cancel glulx hyperlink request in the/-- status window:
        (- if (glk_gestalt(gestalt_Hyperlinks, 0) && gg_statuswin) glk_cancel_hyperlink_event(gg_statuswin); -)

    To decide whether the status window is the hyperlink source:
        (- (gg_event-->1==gg_statuswin) -)

    To decide which number is the link/-- number of the/-- selected/clicked hyperlink:
        (- (gg_event-->2) -)