/usr/lib/perl5/Gtk2/Editable.pod is in libgtk2-perl-doc 2:1.249-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | =head1 NAME
Gtk2::Editable - wrapper for GtkEditable
=cut
=head1 HIERARCHY
Glib::Interface
+----Gtk2::Editable
=cut
=head1 METHODS
=head2 string = $editable-E<gt>B<get_chars> ($start_pos, $end_pos)
=over
=item * $start_pos (integer)
=item * $end_pos (integer)
=back
=head2 $editable-E<gt>B<copy_clipboard>
=head2 $editable-E<gt>B<cut_clipboard>
=head2 $editable-E<gt>B<delete_selection>
=head2 $editable-E<gt>B<delete_text> ($start_pos, $end_pos)
=over
=item * $start_pos (integer)
=item * $end_pos (integer)
=back
=head2 boolean = $editable-E<gt>B<get_editable>
=head2 $editable-E<gt>B<set_editable> ($is_editable)
=over
=item * $is_editable (boolean)
=back
=head2 new_position = $editable->B<insert_text> (new_text, position)
=over
=item * $new_text (string)
=item * ... (list)
=back
=head2 $editable-E<gt>B<paste_clipboard>
=head2 integer = $editable-E<gt>B<get_position>
=head2 $editable-E<gt>B<set_position> ($position)
=over
=item * $position (integer)
=back
=head2 $editable-E<gt>B<select_region> ($start, $end)
=over
=item * $start (integer)
=item * $end (integer)
=back
=head2 (start, end) = $editable->B<get_selection_bounds>
Returns integers, start and end.
=cut
=head1 SIGNALS
=over
=item B<changed> (Gtk2::Editable)
=item B<insert-text> (Gtk2::Editable, string, integer, gpointer)
=item B<delete-text> (Gtk2::Editable, integer, integer)
=back
=cut
=for position post_signals
The C<insert-text> signal handler can optionally alter the text to be
inserted. It may
=over 4
=item
Return no values for no change. Be sure to end with an empty
C<return>.
sub my_insert_text_handler {
my ($widget, $text, $len, $pos, $userdata) = @_;
print "inserting '$text' at char position '$pos'\n";
return; # no values
}
=item
Return two values C<($text, $pos)> which are the new text and
character position.
sub my_insert_text_handler {
my ($widget, $text, $len, $pos, $userdata) = @_;
return (uc($text), $pos); # force to upper case
}
=item
Return no values and modify the text in C<$_[1]> and/or position in
C<$_[3]>. For example,
sub my_insert_text_handler {
$_[1] = uc($_[1]); # force to upper case
$_[3] = 0; # force position to the start
return; # no values
}
=back
Note that currently in a Perl subclass of a C<Gtk2::Editable> widget,
a class closure (ie. class default signal handler) for C<insert-text>
does not work this way. It instead sees the C level C<($text, $len,
$pos_pointer)>, where C<$pos_pointer> is a machine address and cannot
be used easily. Hopefully this will change in the future.
A C<signal_chain_from_overridden> with the args as passed works, but
for anything else the suggestion is to use a C<signal_connect>
instead.
=cut
=head1 SEE ALSO
L<Gtk2>, L<Glib::Interface>
=cut
=head1 COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See L<Gtk2> for a full notice.
=cut
|