1Gtk2::Ex::Utils(3)    User Contributed Perl Documentation   Gtk2::Ex::Utils(3)
2
3
4

NAME

6       Gtk2::Ex::Utils - Extra Gtk2 Utilities for working with Gnome2/Gtk2 in
7       Perl.
8

SYNOPSIS

10        use Gtk2::Ex::Utils qw( :main );
11
12        # do stuff
13        ...
14
15        # Update the UI and react to pending events
16        process_pending_events();
17
18        # do more stuff
19        ...
20
21        # Exit the program with a value of 255 for some reason
22        process_main_exit( 255 );
23

DESCRIPTION

25       This module provides simple utility functions useful for Gnome2/Gtk2
26       Perl programming.
27

EXPORT TAGS

29           :all :main :alter :create
30

FUNCTIONS BY TAG

32       :main
33
34       process_pending_events ( )
35              For all pending events, run through the main loop once. Useful
36              for long processes to update the user interface.
37
38       process_main_exit ( [ EXIT_VALUE ] )
39              This will quit the main event loop after all pending events have
40              been given a run through the main loop one last time. Once the
41              UI work is done, exit with the value given or zero. Should the
42              exit value passed be the string 'no-exit', the function will
43              return TRUE instead of exiting.
44
45       :alter
46
47       DOUBLE = force_progress_bounds ( DOUBLE )
48              Used with Gtk2 progress bars to ensure a given value is within
49              the 0.00 to 1.00 bounds for valid percentages. This function
50              will modify invalid values appropriately to either 0.00 or 1.00
51              should the value be out of bounds.
52
53       Gtk2::Label = make_label_wrap_left_centred ( Gtk2::Label )
54              Given a Gtk2::Label will center the alignment, left justify the
55              text, make the label selectable and make the label wrap lines.
56
57       :create
58
59       Gtk2::Button = create_mnemonic_icon_button ( ICON, STRING )
60              This will create a new Gtk2::Button, a Gtk2::Image and a label
61              then pack the image and label into an hbox inside the button.
62              The label is new_with_mnemonic and the ICON given can be one of
63              the following types: a stock-id string, the path to an image
64              file, a Gtk2::Image object or a Gtk2::Gdk::Pixbuf object. The
65              button has references to the three components as follows: $but‐
66              ton->{HBOX}, $button->{LABEL} and $button->{IMAGE}.
67

BUGS

69        Please report all bugs to the mailing list.
70

CONTRIBUTE

72       If you've got a utility function that is related to Gnome2/Gtk2 Perl,
73       that is not already implemented in here and feel that others may bene‐
74       fit from it's inclusion here, please do not hesitate to send it to the
75       mailing list.
76

MAILING LIST

78        http://opendoorsoftware.com/lists/gtk2-ex-list
79        gtk2-ex-list@opendoorsoftware.com
80

AUTHORS

82        Kevin C. Krinke, <kckrinke@opendoorsoftware.com>
83        James Greenhalgh, <jgreenhalgh@opendoorsoftware.com>
84
86        Gtk2::Ex::Utils - Useful utility functions for working with Gnome2/Gtk2 Perl.
87        Copyright (C) 2005 Open Door Software Inc. <ods@opendoorsoftware.com>
88
89        This library is free software; you can redistribute it and/or
90        modify it under the terms of the GNU Lesser General Public
91        License as published by the Free Software Foundation; either
92        version 2.1 of the License, or (at your option) any later version.
93
94        This library is distributed in the hope that it will be useful,
95        but WITHOUT ANY WARRANTY; without even the implied warranty of
96        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
97        Lesser General Public License for more details.
98
99        You should have received a copy of the GNU Lesser General Public
100        License along with this library; if not, write to the Free Software
101        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
102
103
104
105perl v5.8.8                       2005-02-04                Gtk2::Ex::Utils(3)
Impressum