=head1  gdraw.pm   Copyright 2005 boley.

        see documentation in file gdraw.pl

=cut

package gdraw;
use warnings;
use strict;

require Exporter;
our @ISA=qw/Exporter/;

our @EXPORT= (
'$gdraw_canvasroot',  # Tk root window object 
'$gdraw_canvas',      # Tk canvas object
'stall',          # @msgs # update display. If msgs given, then print it,
                  # and wait for user commands 
'draw_line',      # ($x1,$y1,$x2,$y2) # draws a line from (x1,y1) to (x2,y2) 
'draw_text',      # ($string,$x,$y,@options) # draws text at (x,y) 
'draw_oval',      # ($x1,$y1,$x2,$y2) # draws an oval from (x1,y1) to (x2,y2) 
'fill_oval',      # ($x1,$y1,$x2,$y2,$color) # fills an oval from (x1,y1)
                  # to (x2,y2) 
'draw_rectangle', # ($x1,$y1,$x2,$y2) # draws an rectangle from (x1,y1)
                  # to (x2,y2) 
'fill_rectangle', # ($x1,$y1,$x2,$y2,$color) # fills an rectangle from (x1,y1)
                  # to (x2,y2) 
'clear_canvas',   # () # Clears the canvas (synonym: clear_graphics). 
'clear_graphics', # { clear_canvas; }
'print_canvas',   # ($filename,%options) # save a postscript image of canvas
'get_color',      # ($ID) # get color for item. 
'set_color',      # ($ID,$color) # set color for item. 
'get_text',       # ($ID) # get text for item. 
'set_text',       # ($ID,$new_text) # set text for item. 
'get_width',      # ($ID) # get width for item. For $ID=0, gets window size. 
'set_width',      # ($ID,$new_hgt,$new_width) # set width for item.
'get_font_info',  # ($ID) # retrieve font info for a text object. 
'get_font_size',  # ($ID) # retrieve font size (a number) for a text object. 
'set_font_size',  # ($ID,$fontsize) # set font size (a number) for $ID,
                  # which should be a text object. 
'get_coords',     # ($ID) # get X-Y coordinates of item, [left,top,right,bottom]
'set_coords',     # ($ID,@coords) # set X-Y coordinates of item,
                  # [left,top,right,bottom].
'raise',          # ($ID) # raise object on top of all other objects. 
'lower',          # ($ID) # lower object, hiding behind other objects. 
'get_binding',    # ($ID,$button) # get binding associated with object (from
                  # in a home-grown array) 
'set_binding',    # ($ID,$thunk,$button) # set procedure binding for item. 
'get_type',       # ($ID) # get type of object (e.g. oval, rectangle, text,...) 
'get_IDs',        # ($arg) # get all $IDs: a list of all objects on canvas. 
'tkdelete',       # ($ID) # delete is a reserved word # delete an item on
                  # the canvas.  $ID can be 'all' or 0.  
'get_motion_binding',  # ($ID) # get motion binding for object $ID. 
'set_motion_binding',  # ($ID,$thunk) # set procedure motion binding for item. 
'get_mouse_coords',    # () # get mouse coordinates 
'get_release_binding', # ($ID) # get procedure binding for releasing a button
                       # for item. (not in orig gdraw) 
'set_release_binding', # ($ID,$thunk) # set procedure binding for releasing
                       # a button for item. (not in orig gdraw) 
'endow_with_drag',     # ($ID,$drag,$clear,$button) # endow $ID with the
                       # ability to be dragged (uses drag_obj & clear_drag_obj)
'drag_obj',            # ($ID,$m0x,$m0y,@c0_flags) # default dragging fcn
                       # init coords are in m0 (mouse) and c0 (figure).
                       # flags can be ('corner')
'clear_drag_obj',      # ($ID) # fcn called when mouse released. This clears
                       # the motion binding (dragging). 
'after',               # ($n,$p) # after delay of n msec, do thunk p. 
'gdraw_errmsg',        # (@msgs) # generate an error message
'gdraw_init_canvas',   # () #  initialize canvas
'gdraw_init_graphics', # () { gdraw_init_canvas() }
'MainLoop',            # () # Tk::MainLoop : start Tk's main loop.
);

# print "@EXPORT\n";
require 'gdraw.pl';
1

