{"id":7322,"date":"2022-12-20T19:37:42","date_gmt":"2022-12-20T22:37:42","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/manatoolssharedguieventhandlerrole-man3\/"},"modified":"2022-12-20T19:37:42","modified_gmt":"2022-12-20T22:37:42","slug":"manatoolssharedguieventhandlerrole-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/manatoolssharedguieventhandlerrole-man3\/","title":{"rendered":"ManaTools::Shared::GUI::EventHandlerRole (man3)"},"content":{"rendered":"<h1 align=\"center\">ManaTools::Shared::GUI::EventHandlerRole<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS package Foo;\">SYNOPSIS package Foo;<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SUPPORT\">SUPPORT<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#COPYRIGHT and LICENSE\">COPYRIGHT and LICENSE<\/a><br \/> <a href=\"#METHODS\">METHODS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ManaTools::Shared::GUI::EventHandlerRole \u2212 a Properties Moose::Role<\/p>\n<h2>SYNOPSIS package Foo; <a name=\"SYNOPSIS package Foo;\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">with &#8216;ManaTools::Shared::GUI::EventHandlerRole&#8217;; <br \/> 1; <br \/> &#8230; <br \/> my $f = Foo\u2212>new(&#8230;); <br \/> $f\u2212>addEvent($event); <br \/> &#8230; <br \/> while(1) { <br \/> &#8230; <br \/> last if (!$f\u2212>processEvents($yevent)); <br \/> } <br \/> &#8230; <br \/> $f\u2212>clearEvents();<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This Role is to specify an EventHandler Role, specifically, to handle multiple sub\u2212Events<\/p>\n<h2>SUPPORT <a name=\"SUPPORT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">You can find documentation for this Role with the perldoc command: <br \/> perldoc ManaTools::Shared::GUI::EventHandlerRole<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Maarten Vanraes <alien@rmail.be><\/p>\n<h2>COPYRIGHT and LICENSE <a name=\"COPYRIGHT and LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright (c) 2015\u22122017 Maarten Vanraes <alien@rmail.be><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is free software; you can redistribute it and\/or modify it under the terms of the <small>GNU<\/small> General Public License version 2, as published by the Free Software Foundation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is distributed in the hope that it will be useful, but <small>WITHOUT ANY WARRANTY<\/small> ; without even the implied warranty of <small>MERCHANTABILITY<\/small> or <small>FITNESS FOR A PARTICULAR PURPOSE.<\/small> See the <small>GNU<\/small> General Public License for more details.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You should have received a copy of the <small>GNU<\/small> General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place \u2212 Suite 330, Boston, <small>MA 02111\u22121307, USA.<\/small><\/p>\n<h2>METHODS <a name=\"METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>addEventHandler<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $eventHandler: an EventHandlerRole to be added<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">add an EventHandler to the events list<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>delEventHandler<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $eventHandler: an EventHandlerRole to be removed<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">del an eventHandler from the events list<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>addEvent<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $name: a name to identify the event <br \/> $event: an EventRole to be added <br \/> @args: extra optional arguments<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">add an Event to the events list<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>delEvent<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $name: a name to identify the event<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">del an event from the events list<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>hasEvent<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $name: the event identified by $name<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">1 if the event exists, 0 otherwise<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>getEvent<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $name: the event identified by $name<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">an ManaTools::Shared::GUI::EventRole<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">returns an event, depending on the name<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>clearEvents<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">clears all events<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>findEvent<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $callback: CodeRef to be executed for each event <br \/> @args: extra arguments for the callback<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">an event if it&#8217;s found, or undef otherwise<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">returns an Event from the list, according to a callback function, or undef<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>addWidget<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $name: a name to identify the widget <br \/> $widget: a yui widget <br \/> $event: an optional CodeRef that will be executed when an Event triggers <br \/> $backend: an optional backend object that will be present in the event handler<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">add a widget event handler to the events list<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>delWidget<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $widget: a yui widget<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">del a widget event handler from the events list<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>widget<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $name: the widget identified by $name<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">returns a yui::YWidget<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>findWidget<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $widget: the yui::YWidget to be found<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">returns a ManaTools::Shared::GUI::Dialog::Event that has the widget<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>addItem<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $name: a name to identify the item <br \/> $item: a yui item <br \/> $event: an optional CodeRef that will be executed when an Event triggers <br \/> $backend: an optional backend object that will be present in the event handler<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">add a item event handler to the events list<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>delItem<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $item: a yui item<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">del a item event handler from the events list<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>item<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $name: the item identified by $name<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">returns a yui::YItem<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>findItem<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $item: the yui::YItem to be found<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">returns a ManaTools::Shared::GUI::Dialog::Event that has the item<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>processEvents<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $yevent: the yui::YEvent<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">0 if the loop should end, positive if handled, negative otherwise<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">returns an Event from the list, according to a callback function, or undef<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>parentDialog<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><small>DESCRIPTION<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">finds the parent Dialog<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ManaTools::Shared::GUI::EventHandlerRole \u2212 a Properties Moose::Role <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3641],"class_list":["post-7322","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-manatoolssharedguieventhandlerrole"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7322"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7322\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}