File: canvas_trlines.man

package info (click to toggle)
tklib 0.6%2B20190108-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 15,008 kB
  • sloc: tcl: 75,757; sh: 5,789; ansic: 792; pascal: 359; makefile: 70; sed: 53; exp: 21
file content (82 lines) | stat: -rw-r--r-- 2,642 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 0.1]
[manpage_begin canvas::track::lines n [vset VERSION]]
[keywords canvas]
[keywords crosshair]
[keywords rubberband]
[keywords tracking]
[moddesc   {Variations on a canvas}]
[titledesc {Manage a group of rubber band lines}]
[require Tcl 8.5]
[require Tk 8.5]
[require canvas::tag [opt [vset VERSION]]]
[description]

This package provides a utility class managing the drawing of set of semi-crosshair (rubberband) lines.

[section {Class API}]

[list_begin definitions]
[comment {= = == === ===== ======== ============= =====================}]
[call [cmd ::canvas::track] [method lines] [arg objectName] [arg canvas]]

This, the class command, creates and configures a new instance of the
tracker, named [arg objectName]. The instance will be
connected to the specified [arg canvas] widget.

[para] The result of the command is the fully qualified name of the
instance command.

[list_end]

[section {Instance API}]

Instances of this class provide the following API:

[list_begin definitions]
[comment {= = == === ===== ======== ============= =====================}]
[call [cmd objectName] [method destroy]]

This method destroys the instance and releases all its
internal resources.

[para] This operation does destroy the items representing the
tracked lines. It does not destroy the attached canvas.

[para] The result of the method is an empty string.

[comment {= = == === ===== ======== ============= =====================}]
[call [cmd objectName] [method start] [arg current] [arg p]...]

This method starts the tracking of a set of lines, one line per
point [arg p], which specifies the destination end-point of each
line. All lines will have [arg current] as a common end-point.

[para] Note that a previously tracked set of lines is removed.

[para] The result of the method is an empty string.

[para] Each point is specified through a 2-element list containing its
x- and y-coordinates, in this order.

[comment {= = == === ===== ======== ============= =====================}]
[call [cmd objectName] [method move] [arg current]]

This method updates the shared end-point of all rubberbands and redraws
them.

[para] The result of the method is an empty string.

[para] The point is specified through a 2-element list containing its
x- and y-coordinates, in this order.

[comment {= = == === ===== ======== ============= =====================}]
[call [cmd objectName] [method done]]

This method ends the tracking of the current set of lines and removes
them from the canvas.

[list_end]
[vset CATEGORY canvas]
[include ../../support/devel/doc/feedback.inc]
[manpage_end]