crosshair(3tk) | Crosshairs | crosshair(3tk) |
crosshair - Crosshairs for Tk canvas
package require Tcl ?8.4?
package require Tk ?8.4?
package require crosshair ?1.1?
crosshair::crosshair w ?arg...?
crosshair::off w
crosshair::configure w ?arg...?
crosshair::track on w cmdprefix
crosshair::track off w
crosshair::bbox_add w bbox
crosshair::bbox_remove token
The crosshair package provides commands to (de)activate and track crosshairs on canvas widgets.
The following commands are exported to the public:
All arguments after the widget w are treated as options as for a canvas line item in w. Of particular interest are -fill and -dash.
All arguments after the widget w are treated as options as for a canvas line item in w. Of particular interest are -fill and -dash.
The result of the command are the current configuration settings.
After the invokation of this command the specified command prefix cmdprefix will be called whenever the mouse moves within the canvas, with 7 arguments. These are, in order:
The result of the command is a token with which the bounding box can be removed again, see crosshair::bbox_remove below.
The bounding box bbox is specified thorugh a list of 4 values, the lower left and upper right corners of the box. The order of values in the list is:
llx lly urx ury
Note that this command can be used multiple times, each call adding one more bounding box. In such a case the visible area is the union of all the specified bounding boxes.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category tklib :: crosshair of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category crosshair of the Tklib Trackers [http://core.tcl.tk/tklib/reportlist]. Please also report any ideas for enhancements you may have for either package and/or documentation.
canvas, cross-hairs, location, tracking, viewport
Copyright (c) 2003 Kevin Kenny Copyright (c) 2008 (docs) Andreas Kupries <andreas_kupries@users.sourceforge.net> Copyright (c) 2013 Frank Gover, Andreas Kupries
1.1 | crosshair |