Glimmr Canvas Editor

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Part - The Status Line

    Glulx arranging rule:
        update the status line.

    Glulx redrawing rule:
        update the status line.

    Rule for constructing the status line:
        fill status bar with Table of Status.
        
    To decide which text is the selected component:
        if the element-selection set is empty:
            decide on "[roman type][bracket]No element selected[close bracket]"; [the switch to roman type is required by a bug in either Inform or Basic Screen Effects that causes the first element in a table-filled status bar to print in italics]
        if the number of entries of the element-selection set is 1:
            decide on "[element-name of entry 1 of element-selection set]";
        decide on "[roman type][bracket][number of entries of the element-selection set] elements selected[close bracket]";

    To decide which indexed text is the coordinates of the selected component:
        if the element-selection set is empty:
            let percentage be indexed text;
            let percentage be "[scaling factor of the working window real times 100]";
            replace the regular expression "0+$" in percentage with "";
            replace the regular expression "\.+$" in percentage with "";
            decide on "Scale: [percentage]%";
        if the number of entries of the element-selection set is 1:
            decide on "[origin of entry 1 of element-selection set in brace notation]";
        otherwise:
            decide on "".

    To decide which text is the g-kind of the selected component:
        if the element-selection set is empty:
            decide on "Canvas: [canvas-width of working canvas] x [canvas-height of working canvas]";
        if the number of entries of the element-selection set is 1:
            if the of-kind of entry 1 of the element-selection set is "":
                decide on "([kind-flag of entry 1 of element-selection set])";
            otherwise:
                decide on "([kind-flag of entry 1 of element-selection set]->[of-kind of entry 1 of element-selection set])";
        otherwise:
            decide on "multiple elements selected";
        
    The current status message is indexed text that varies. The current status message is "".


    Table of Status
    left  central  right  
    "[selected component]"  "[g-kind of the selected component]"  "[coordinates of the selected component]"