Snapper - XML Application SourceForge.net Logo  


NAME

SharkAPI::Handler.pm -- Handler Module


DESCRIPTION

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.


SYNOPSIS

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.


OBJECT INTERFACE

window_close_on_delete ($w, $d)

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.

clist_select ($w, $d)

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).

clist_select_data ($w, $d)

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).

clist_double_click ($w, $d)

This handler is the same as the clist_select handler but it will activate on a ``double click'' on a list row.

clist_double_click_data ($w, $d)

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).

ctree_select ($w, $d)

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).

ctree_select ($w, $d)

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).

ctree_right_click ($w, $d)

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).

ctree_right_menu ($w, $d)

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];


SEE ALSO

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/


AUTHOR

Bill Walz, bill@landsharklinux.com


COPYRIGHT

The SharkAPI::Handler module is Copyright (c) 2002 Albacore Technology, LLC The SharkAPI::Handler module is commercial licensed software


Valid HTML 4.01!
Content owned by Albacore Technology is copyright 1999-2000 Albacore Technology, LLC All rights reserved.