SharkAPI::Handler.pm -- Handler Module
The handler package provides common handler functions that simplify the
gathering of common arguments needed during handler execution. These
functions are wrappers that then call the specified handler.
Another reason for this package is that the autoconnect function of
GladeXML does not supply all of the arguments to each signal handler.
This module adds the code needed to grab the extra args.
The handler functions should be entered in the handler section of the
glade Signal tab. The function to call should then be entered in the data
section. Each handler function maps to a particular event type.
This handler will close the window for which it is attached to via the
GtkWidget::delete_event signal. The x/y position is saved and the window
is hidden, if the data value is specified it will be executed as a function
name and passed the widget value.
This handler is used as the handler value on the signal
GtkClist::select_row. It will call the function specified by the data
portion of the signal and pass the following arguments in order:
(widget, row, column).
This handler is the same as the clist_select handler but instead of
returning the row and column it will return the row data assigned to
the selected row: (widget, data).
This handler is the same as the clist_select handler but it will activate
on a ``double click'' on a list row.
This handler is the same as the clist_select handler but it will activate
on a ``double click'' on a list row. Instead of returning the row and column
it will return the row data assigned to the clicked row: (widget, data).
This handler is used as the handler value on the signal
GtkClist::select_row on a GtkWidget::Ctree. It will call the function
specified by the data portion of the signal and pass the following arguments
in order: (widget, node, row, column).
This handler is used as the handler value on the signal
GtkClist::select_row on a GtkWidget::Ctree. It is activated on a double
click of a tree item. It will call the function specified by the data portion
of the signal and pass the following arguments in order: (widget, node,
row, column).
This handler will fire when the right most mouse button is clicked in a
GtkWidget::Ctree. It should be connected to the
GtkWidget::button_press_event signal of the GtkWidget::Ctree.
It will call the function specified by the data portion of the signal
and pass the following arguments in order: (widget, node, button, time,
row, column).
This handler is the same as ctree_right_click, except it will build the
popup menu from an array returned by the function specified by the data
portion of the signal handler.
The array should be a list of lists with items ``label'', and ``function
pointers'' as the pairs. If a third value is specified it will be added
as the data argument passed to the specified function.
For example:
push @menu, ["Add Company", \&add_company], ["-"],
["Add Contact", \&add_contact];
perl(1).
Snapper(3).
SharkAPI(3).
Gtk http://www.gtkperl.org/
Gtk::GladeXML.
GTK http://www.gtk.org/
Glade http://glade.pn.org/
LibGlade http://www.daa.com.au/~james/gnome/
Bill Walz, bill@landsharklinux.com
The SharkAPI::Handler module is Copyright (c) 2002 Albacore Technology, LLC
The SharkAPI::Handler module is commercial licensed software
|