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_canvas
#: This module implments a SWIT canvas of items.
#: {canvas
} procedures:
procedure background_get@canvas
takes
canvas canvas
returns color
#: This procedure will return the background color of {canvas
}.
procedure background_set@canvas
takes
canvas canvas
color color
returns_nothing
#: This procedure will set the backgound color of {canvas
} to {color
}.
procedure canvas_binding_create@canvas
routine_types
procedure call_back
takes item, string, integer, integer
returns_nothing
takes
canvas canvas
tag string
event_name event_name
call_back call_back
returns canvas_binding
#: This procedure will create and return a {canvas_binding
} object
#, that binds {call_back
} to {event_name
} and {tag
} name pair for {canvas
}.
procedure border_width_get@canvas
takes
canvas canvas
returns unsigned
#: This procedure will return the desired border_width of {canvas
}.
procedure border_width_set@canvas
takes
canvas canvas
border_width unsigned
returns_nothing
#: This procedure will set the desired border_width of {canvas
}
#, to {border_width
}.
procedure canvas_binding_insert@canvas
takes
canvas canvas
canvas_binding canvas_binding
returns_nothing
#: This procedure will insert {canvas_binding
} into the binding
#, list in {canvas
}.
procedure clone@canvas
takes
master_canvas canvas
frame frame
returns canvas
procedure clone_get@canvas
takes
canvas canvas
returns clone
#: This procedure will return the parent {clone
} object associated
procedure create@canvas
takes
parent frame
uid unsigned
group_uid unsigned
returns canvas
#: This procedure will create and return a {canvas
} widget with a
#, unique identifier of {uid
}, with a parent frame of {parent
}.
#, {group_uid
} is the unique identifier to be assigned to the
#, {group_item
} in the returned {canvas
} object.
procedure destroy@canvas
takes
canvas canvas
returns_nothing
#: This procedure will destroy {canvas
}.
procedure drop@canvas
takes
canvas canvas
returns_nothing
#: This procedure will cause {canvas
} to go away.
procedure event@canvas
takes
canvas canvas
line string
index unsigned
returns_nothing
#: This process will process an event sent to {canvas
} with
#, remaining the data remaining in {line
} starting at {index
}.
procedure foreground_get@canvas
takes
canvas canvas
returns color
#: This procedure will return the foreground color of {canvas
}.
procedure foreground_set@canvas
takes
canvas canvas
color color
returns_nothing
#: This procedure will set the foregound color of {canvas
} to {color
}.
procedure height_get@canvas
takes
canvas canvas
returns unsigned
#: This procedure will return the desired height of {canvas
}.
procedure height_set@canvas
takes
canvas canvas
height unsigned
returns_nothing
#: This procedure will set the desired height of {canvas
} to {height
}.
procedure image_grab@canvas
takes
canvas canvas
returns string
#: This procedure will cause the first slave canvas associated
#, with {canvas
} to return a bitmap of the canvas.
procedure image_grab_call_back@canvas
takes
item item
tag string
x integer
y integer
returns_nothing
#: This procedure is called when a image grab event occurs:
procedure increment@canvas
takes
canvas canvas
returns_nothing
#: This procedure will increment the modification count for {canvas
}.
procedure is_master_get@canvas
takes
canvas canvas
returns logical
#: This procedure will create and return {true
} if {canvas
} is
#, a member of the master clone tree and {false
} otherwise.
procedure parent_get@canvas
takes
canvas canvas
returns frame
#: This procedure will return the parent {frame
} for {canvas
}.
procedure restore@canvas
takes
restore restore
frame frame
returns canvas
#: This procedure will restore the canvas from {restore
} into {frame
}.
procedure save@canvas
takes
canvas canvas
save_stream out_stream
returns_nothing
#: This procedure will save {canvas
} to {save_stream
}.
procedure uid_next@canvas
takes
canvas canvas
returns unsigned
#: This procedure will return a unique identifier for use
#, in identifying items in {canvas
}.
procedure update@canvas
takes
master_canvas canvas
clone_canvas canvas
returns_nothing
#: This procedure will update {clone_canvas
} with the contents
#, {master_canvas
}.
procedure width_get@canvas
takes
canvas canvas
returns unsigned
#: This procedure will return the desired width of {canvas
}.
procedure width_set@canvas
takes
canvas canvas
width unsigned
returns_nothing
#: This procedure will set the desired width of {canvas
} to {width
}.
procedure window_path_append@canvas
takes
canvas canvas
tcl_command tcl_command
returns_nothing
#: This procedure will append the window path for {canvas
}
#, to {tcl_command
}.
#: {canvas_binding
} procedures:
procedure clone@canvas_binding
takes
master_binding canvas_binding
clone_canvas canvas
uid unsigned
returns canvas_binding
#: This procedure will clone a copy of {master_binding
} for {canvas
}
#, with a unique identifier of {uid
}.
procedure create@canvas_binding
routine_types
procedure call_back
takes item, string, integer, integer
returns_nothing
takes
canvas canvas
tag string
event_handler event_handler
event_name event_name
call_back call_back
uid unsigned
returns canvas_binding
#: This procedure will create and return a {canvas_binding
} object
#, consisting of {canvas
}, {tag
}, {event_handler
}, {event_name
},
#, {call_back
}, and {uid
}.
procedure destroy@canvas_binding
takes
canvas_binding canvas_binding
returns_nothing
#: This procedure will destroy {canvas_binding
}.
procedure increment@canvas_binding
takes
canvas_binding canvas_binding
returns_nothing
#: This procedure will increment the modification count for
#, {canvas_binding
}.
procedure update@canvas_binding
takes
master_binding canvas_binding
clone_binding canvas_binding
returns_nothing
#: This procedure will update the contents of {clone_binding
} to
#, be the same as {master_binding
}.