Hyperlink Interface

version 9/140814 by Leonardo Boselli

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Hyperlink Types
    A hyperlink type is a kind of thing. object-word is a hyperlink type. direction-word is a hyperlink type. topic-word is a hyperlink type. parser-word is a hyperlink type.
    A hyperlink emphasis is a kind of value. The plural of hyperlink emphasis is hyperlink emphases.
    A hyperlink type has a hyperlink emphasis called style.
    The active style is a hyperlink emphasis that varies.
    we-are-parser-speaking is initially false. [It's possible to have, say, an emphasized object hyperlink within a parser error message; this variable keeps track of whether we need to return to the parser style after switching off another hyperlink style.]
    Capturing-depth is a number that varies. Capturing-depth is initially 0.
    To say o:
        increment capturing-depth;
        if capturing-depth is 1 and object hyperlink highlighting is true:
            set the text style for the style of object-word;
            now the active style is the style of object-word;
            start HI hyperlink capture.
        
    To say t:
        increment capturing-depth;
        if capturing-depth is 1 and topic hyperlink highlighting is true:
            set the text style for the style of topic-word;
            now the active style is the style of topic-word;
            start HI hyperlink capture;

    To say d:
        increment capturing-depth;
        if capturing-depth is 1 and direction hyperlink highlighting is true:
            set the text style for the style of direction-word;
            now the active style is the style of direction-word;
            start HI hyperlink capture.
        
    To say x:
        decrement capturing-depth;
        if capturing-depth is 0:
            end HI hyperlink capture;
            reset styles with active style;
    txtlink is an indexed text that varies.
    To say setlink:
        increment capturing-depth;
        if capturing-depth is 1:
            increment HI-hyperlinks-counter;
            if HI-hyperlinks-counter is greater than HI-max-hyperlinks:
                now HI-hyperlinks-counter is HI-min-hyperlinks;
            now txtlink is "";
            start capturing text;
    To say aslink:
        if capturing-depth is 1:
            stop capturing text;
            let cap-text be "[captured text]";
            now txtlink is "[cap-text]";
            start capturing text;
    To say endlink:
        decrement capturing-depth;
        if capturing-depth is 0:
            stop capturing text;
            let cap-text be "[captured text]";
            if txtlink is "":
                now txtlink is "[cap-text]";
            say "[set link HI-hyperlinks-counter][txtlink][end link]";
            choose row ( HI-hyperlinks-counter ) in the Table of Hyperlink Commands;
            now replacement entry is "[cap-text]";