Glimmr Canvas Editor

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Change highlighting

    Selecting highlight type is an action applying to nothing. Understand "highlight" or "select highlight" or "change highlight type" or "highlight type" or "change highlight" as selecting highlight type.

    Carry out selecting highlight type:
        say "Two types of highlighting can be used to identify selected elements within the editor:[paragraph break][bracket]1[close bracket][italic type] Image highlighting:[roman type] a semitransparent overlay colors the element[line break][bracket]2[close bracket] [italic type]Stroke highlighting:[roman type] a rectangle of a given color outlines the element[paragraph break]";
        now the current question is "Please select a highlighting type.";
        now the current prompt is "Type a number: >";
        now the current cancelation message is "[bracket]Highlight change canceled.[close bracket]";
        ask an open question, in number mode.
        
    A number question rule when the impelling action is selecting highlight type (this is the highlight selection rule):
        if the number understood is:
            -- 1: now image highlighting is true;
            -- 2: now image highlighting is false;
            -- otherwise:
                say "[bracket]Canceled.[close bracket][paragraph break]";
                exit;
        say "Highlighting is now by [if the number understood is 1]image[otherwise]stroke[end if].";
        update Highlight_radio using image highlighting;
        [follow the window-drawing rules for the control-window;]
        follow the window-drawing rules for the working window;
        exit;
        
    Interactively selecting highlight type is an action applying to nothing. Understand "toggle highlight" as interactively selecting highlight type.

    Carry out interactively selecting highlight type:
        if image highlighting is:
            -- true: now image highlighting is false;
            -- false: now image highlighting is true;
        say "Highlighting is now by [if image highlighting is true]image[otherwise]stroke[end if].";
        update Highlight_radio using image highlighting;
        [follow the window-drawing rules for the control-window;]
        follow the window-drawing rules for the working window.