english
version "1.0"
identify "wxyz"
# Copyright (c) 1998-1999 by Wayne C. Gramlich.
# All rights reserved.
#
# Permission to use, copy, modify, distribute, and sell this software
# for any purpose is hereby granted without fee provided that the above
# copyright notice and this permission are retained. The author makes
# no representations about the suitability of this software for any purpose.
# It is provided "as is" without express or implied warranty.
module swit_rectangle
#: This module supports rectangles in a SWIT canvas.
#: {swit_rectangle} procedures:
procedure clone@item_rectangle
takes
master_rectangle item_rectangle
clone_parent item_group
uid unsigned
returns item_rectangle
#: This procedure will create and return a clone of {master_rectangle}
#, as a parent of {clone_parent} and with a unique identifier of {uid}.
procedure coordinates_append@item_rectangle
takes
rectangle item_rectangle
tcl_command tcl_command
returns_nothing
#: This procedure will append the coordinates of {rectangle} to
#, {tcl_command}.
procedure create@item_rectangle
takes
parent item_group
uid unsigned
x integer
y integer
x2 integer
y2 integer
returns item_rectangle
#: This procedure will create and return a {item_rectangle} object
#, in {parent} with intial values of {x}, {y}, {x2}, {y2} and
#, a unique identifier of {uid}. This procedure is for internal
#, use only. Use {rectangle_create}@{item_group} to create a
#, rectangle.
procedure delete@item_rectangle
takes
rectangle item_rectangle
returns_nothing
#: This procedure will delete {rectangle}.
procedure fill_color_get@item_rectangle
takes
rectangle item_rectangle
returns color
#: This procedure will return the fill color for {rectangle}.
procedure fill_color_set@item_rectangle
takes
rectangle item_rectangle
fill_color color
returns_nothing
#: This procedure will set the fill color for {rectangle} to {fill_color}.
procedure height_get@item_rectangle
takes
rectangle item_rectangle
returns unsigned
#: This procedure will return the height of {rectangle}.
procedure height_set@item_rectangle
takes
rectangle item_rectangle
height unsigned
returns_nothing
#: This procedure will set the height of {rectangle} to {height}.
procedure increment@item_rectangle
takes
rectangle item_rectangle
returns_nothing
#: Increment the modification count for {rectangle}.
procedure level_get@item_rectangle
takes
rectangle item_rectangle
returns unsigned
#: Returns the relative level of {rectangle} in its {item_group}.
procedure level_set@item_rectangle
takes
rectangle item_rectangle
new_level unsigned
returns_nothing
#: This procedure will set the level of {rectangle} to {new_level}.
procedure line_width_get@item_rectangle
takes
rectangle item_rectangle
returns unsigned
#: This procedure will return the outline line width for {rectangle}.
procedure line_width_set@item_rectangle
takes
rectangle item_rectangle
line_width unsigned
returns_nothing
#: This procedure will set the outline line width for {rectangle}.
procedure outline_color_get@item_rectangle
takes
rectangle item_rectangle
returns color
#: This procedure will return the outline color for {rectangle}.
procedure outline_color_set@item_rectangle
takes
rectangle item_rectangle
outline_color color
returns_nothing
#: This procedure will set the outline color for {rectangle}
#, to {outline_color}.
procedure parent_get@item_rectangle
takes
rectangle item_rectangle
returns item_group
#: This procedure will return the parent of {rectangle}.
procedure tag_append@item_rectangle
takes
rectangle item_rectangle
tag string
returns_nothing
#: This procedure will append {tag} to the tag list in {rectangle}.
procedure tags_get@item_rectangle
takes
rectangle item_rectangle
returns vector[string]
#: This procedure will return the tags for {rectangle}.
procedure update@item_rectangle
takes
master_rectangle item_rectangle
clone_rectangle item_rectangle
returns_nothing
#: This procedure will will generate the appropriate TCL
#, commands to cause {clone_rectangle} to match {master_rectangle}.
procedure width_get@item_rectangle
takes
rectangle item_rectangle
returns unsigned
#: This procedure will return the width of {rectangle}.
procedure width_set@item_rectangle
takes
rectangle item_rectangle
width unsigned
returns_nothing
#: This procedure will set the width of {rectangle} to {width}.
procedure x_get@item_rectangle
takes
rectangle item_rectangle
returns integer
#: This procedure will return the x coordinate of {rectangle}
#, to the group origin.
procedure x_set@item_rectangle
takes
rectangle item_rectangle
x integer
returns_nothing
#: This procedure will set the x coordinate of {rectangle} (relative
#, to the group origin) to {x}.
procedure y_get@item_rectangle
takes
rectangle item_rectangle
returns integer
#: This procedure will return the y coordinate of {rectangle} relative
#, to the group origin.
procedure y_set@item_rectangle
takes
rectangle item_rectangle
y integer
returns_nothing
#: This procedure will set the y coordinate of {rectangle} (relative
#, to the group origin) to {y}.