Glimmr Canvas Editor

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Opening the drawing window

    Toggling the drawing window is an action applying to nothing. Understand "open drawing tools" or "close drawing tools" or "drawing tools" or "drawing window" or "open drawing window" or "close drawing window" as toggling the drawing window.

    Carry out toggling the drawing window:
        if drawing-window is g-present:
            shut down the drawing-window;
            follow the window-drawing rules for the working window;
            say "Drawing tools closed.";
        otherwise:
            update drawing window buttons;
            open up the drawing-window;
            follow the window-drawing rules for the working window;
            say "Drawing tools opened.";

    Understand "open drawing tools" or "open drawing window" as a mistake ("The drawing tools are already open.") when the drawing-window is g-present.
    Understand "close drawing tools" or "close drawing window" as a mistake ("The drawing tools are already closed.") when the drawing-window is g-unpresent.
        
    To update drawing window buttons:
        if drawing mode is false:
            repeat with item running through display-active modal drawing buttons:
                now the image-ID of item is the inactive-state of item;
        make inactive left_align_modal;
        make inactive center_align_modal;
        make inactive right_align_modal;
        if the current text alignment is:
            -- left-jambed: make active left_align_modal;
            -- centered: make active center_align_modal;
            -- right-jambed: make active right_align_modal;
        
    To make active (M - a modal button):
        now the image-ID of M is the active-state of M.
        
    To make inactive (M - a modal button):
        now the image-ID of M is the inactive-state of M.