Glimmr Canvas Editor

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Chapter - Right-aligning a string

    Right-aligning a string is an action applying to nothing. Understand "align string right" or "align text right" as right-aligning a string.

    Carry out right-aligning a string:
        now the current text alignment is right-jambed;
        if the number of entries of the element-selection set > 0:
            let count be 0;
            repeat with item running through the element-selection set:
                if item is a rendered string:
                    increase count by 1;
                    now the item is right-aligned;
            if count is 0:
                say "New text strings will be right-aligned. [bracket]Selected items are not text strings and were not affected.[close bracket][line break]";
                rule fails;
                say "Text alignment changed[if count > 1] for [count] items[end if].";
            say "New text strings will be right-aligned.";
        update drawing window buttons;
        follow the window-drawing rules for the working window;
        follow the window-drawing rules for the drawing-window.