.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Gtk2::ImageView::Tool 3pm" .TH Gtk2::ImageView::Tool 3pm "2017-07-23" "perl v5.26.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gtk2::ImageView::Tool \- Interface for objects capable of being used as tools by Gtk2::ImageView .SH "DESCRIPTION" .IX Header "DESCRIPTION" Gtk2::ImageView::Tool is an interface that defines how Gtk2::ImageView interacts with objects that acts as tools. Gtk2::ImageView delegates many of its most important tasks (such as drawing) to its tool which carries out all the hard work. The Gtk2::ImageView package comes with two tools; Gtk2::ImageView::Tool::Dragger and Gtk2::ImageView::Tool::Selector, but by implementing your own tool it is possible to extend Gtk2::ImageView to do stuff its author didn't imagine. .PP Gtk2::ImageView uses Gtk2::ImageView::Tool::Dragger by default, as that tool is he most generally useful one. However, it is trivial to make it use another tool. .PP .Vb 3 \& my $view = Gtk2::ImageView\->new; \& my $tool = Gtk2::ImageView::Tool::Selector ($view); \& $view\->set_tool ($tool); .Ve .PP Using the above code makes the view use the selector tool instead of the default dragger tool. .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 2 \& Glib::Interface \& +\-\-\-\-Gtk2::ImageView::Tool .Ve .SH "METHODS" .IX Header "METHODS" .ie n .SS "boolean = $tool\->\fBbutton_press\fP ($ev)" .el .SS "boolean = \f(CW$tool\fP\->\fBbutton_press\fP ($ev)" .IX Subsection "boolean = $tool->button_press ($ev)" .IP "\(bu" 4 \&\f(CW$ev\fR (Gtk2::Gdk::Event) .ie n .SS "boolean = $tool\->\fBbutton_release\fP ($ev)" .el .SS "boolean = \f(CW$tool\fP\->\fBbutton_release\fP ($ev)" .IX Subsection "boolean = $tool->button_release ($ev)" .IP "\(bu" 4 \&\f(CW$ev\fR (Gtk2::Gdk::Event) .ie n .SS "cursor = $tool\->\fBcursor_at_point\fP ($x, $y)" .el .SS "cursor = \f(CW$tool\fP\->\fBcursor_at_point\fP ($x, \f(CW$y\fP)" .IX Subsection "cursor = $tool->cursor_at_point ($x, $y)" .IP "\(bu" 4 \&\f(CW$x\fR (integer) .IP "\(bu" 4 \&\f(CW$y\fR (integer) .PP Returns the cursor to display at the given coordinates. .ie n .SS "boolean = $tool\->\fBmotion_notify\fP ($ev)" .el .SS "boolean = \f(CW$tool\fP\->\fBmotion_notify\fP ($ev)" .IX Subsection "boolean = $tool->motion_notify ($ev)" .IP "\(bu" 4 \&\f(CW$ev\fR (Gtk2::Gdk::Event) .ie n .SS "$tool\->\fBpaint_image\fP ($opts, $drawable)" .el .SS "\f(CW$tool\fP\->\fBpaint_image\fP ($opts, \f(CW$drawable\fP)" .IX Subsection "$tool->paint_image ($opts, $drawable)" .IP "\(bu" 4 \&\f(CW$opts\fR (Gtk2::Gdk::Pixbuf::Draw::Opts) .IP "\(bu" 4 \&\f(CW$drawable\fR (Gtk2::Gdk::Drawable) .PP Called whenever the image view decides that any part of the image it shows needs to be redrawn. .ie n .SS "$tool\->\fBpixbuf_changed\fP ($reset_fit, $rect)" .el .SS "\f(CW$tool\fP\->\fBpixbuf_changed\fP ($reset_fit, \f(CW$rect\fP)" .IX Subsection "$tool->pixbuf_changed ($reset_fit, $rect)" .IP "\(bu" 4 \&\f(CW$reset_fit\fR (boolean) .IP "\(bu" 4 \&\f(CW$rect\fR (Gtk2::Gdk::Rectangle) .PP Indicate to the tool that either a part of, or the whole pixbuf that the image view shows has changed. This method is called by the view whenever its pixbuf or its tool changes. That is, when any of the following methods are used: .IP "\fIGtk2::ImageView::set_pixbuf()\fR" 4 .IX Item "Gtk2::ImageView::set_pixbuf()" .PD 0 .IP "\fIGtk2::ImageView::set_tool()\fR" 4 .IX Item "Gtk2::ImageView::set_tool()" .IP "\fIGtk2::ImageView::damage_pixels()\fR" 4 .IX Item "Gtk2::ImageView::damage_pixels()" .PD .PP If the reset_fit parameter is \s-1TRUE,\s0 it means that a new pixbuf has been loaded into the view. .IP "tool : the tool" 4 .IX Item "tool : the tool" .PD 0 .IP "reset_fit : whether the view is resetting its fit mode or not" 4 .IX Item "reset_fit : whether the view is resetting its fit mode or not" .IP "rect : rectangle containing the changed area or \s-1NULL\s0" 4 .IX Item "rect : rectangle containing the changed area or NULL" .PD .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2::ImageView, Glib::Interface .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2007 by Jeffrey Ratcliffe. .PP This software is licensed under the \s-1GPL\-3\s0; see Gtk2::ImageView for a full notice.