1Gtk2::ImageView::Tool(3U)ser Contributed Perl DocumentatiGotnk2::ImageView::Tool(3)
2
3
4

NAME

6       Gtk2::ImageView::Tool -  Interface for objects capable of being used as
7       tools by Gtk2::ImageView
8

DESCRIPTION

10       Gtk2::ImageView::Tool is an interface that defines how Gtk2::ImageView
11       interacts with objects that acts as tools. Gtk2::ImageView delegates
12       many of its most important tasks (such as drawing) to its tool which
13       carries out all the hard work. The Gtk2::ImageView package comes with
14       two tools; Gtk2::ImageView::Tool::Dragger and
15       Gtk2::ImageView::Tool::Selector, but by implementing your own tool it
16       is possible to extend Gtk2::ImageView to do stuff its author didn't
17       imagine.
18
19       Gtk2::ImageView uses Gtk2::ImageView::Tool::Dragger by default, as that
20       tool is he most generally useful one. However, it is trivial to make it
21       use another tool.
22
23        my $view = Gtk2::ImageView->new;
24        my $tool = Gtk2::ImageView::Tool::Selector ($view);
25        $view->set_tool ($tool);
26
27       Using the above code makes the view use the selector tool instead of
28       the default dragger tool.
29

HIERARCHY

31         Glib::Interface
32         +----Gtk2::ImageView::Tool
33

METHODS

35   boolean = $tool->button_press ($ev)
36       ·   $ev (Gtk2::Gdk::Event)
37
38   boolean = $tool->button_release ($ev)
39       ·   $ev (Gtk2::Gdk::Event)
40
41   cursor = $tool->cursor_at_point ($x, $y)
42       ·   $x (integer)
43
44       ·   $y (integer)
45
46       Returns the cursor to display at the given coordinates.
47
48   boolean = $tool->motion_notify ($ev)
49       ·   $ev (Gtk2::Gdk::Event)
50
51   $tool->paint_image ($opts, $drawable)
52       ·   $opts (Gtk2::Gdk::Pixbuf::Draw::Opts)
53
54       ·   $drawable (Gtk2::Gdk::Drawable)
55
56       Called whenever the image view decides that any part of the image it
57       shows needs to be redrawn.
58
59   $tool->pixbuf_changed ($reset_fit, $rect)
60       ·   $reset_fit (boolean)
61
62       ·   $rect (Gtk2::Gdk::Rectangle)
63
64       Indicate to the tool that either a part of, or the whole pixbuf that
65       the image view shows has changed. This method is called by the view
66       whenever its pixbuf or its tool changes. That is, when any of the
67       following methods are used:
68
69       Gtk2::ImageView::set_pixbuf()
70       Gtk2::ImageView::set_tool()
71       Gtk2::ImageView::damage_pixels()
72
73       If the reset_fit parameter is TRUE, it means that a new pixbuf has been
74       loaded into the view.
75
76       tool : the tool
77       reset_fit : whether the view is resetting its fit mode or not
78       rect : rectangle containing the changed area or NULL
79

SEE ALSO

81       Gtk2::ImageView, Glib::Interface
82
84       Copyright (C) 2007 by Jeffrey Ratcliffe.
85
86       This software is licensed under the GPL-3; see Gtk2::ImageView for a
87       full notice.
88
89
90
91perl v5.30.0                      2019-07-26          Gtk2::ImageView::Tool(3)
Impressum