my $event = ManaTools::Shared::GUI::Event->new(
name => ``Event1'',
parentDialog => $dialog,
eventType => $yui::YEvent::YWidgetEvent,
widget => $widget,
backend => $backend,
event => sub {
my $self = shift;
my $yevent = shift;
my $backend = shift;
my $dialog = $self->parentDialog();
my $ydialog = $dialog->dialog();
...
return 1;
}
);
perldoc ManaTools::Shared::GUI::Event
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
hash ref containing name: a name to identify it parentDialog: the parent Dialog eventType: a yui::YEventType widget: an optional widget item: an optional item event: an optional CodeRef that returns 0 if event is not correctly processed backend: an optional backend to be used in the event handler
DESCRIPTION
new is inherited from Moose, to create an Event object