{"id":6718,"date":"2022-12-20T19:33:30","date_gmt":"2022-12-20T22:33:30","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/manatoolssharedguiextwidget-man3\/"},"modified":"2022-12-20T19:33:30","modified_gmt":"2022-12-20T22:33:30","slug":"manatoolssharedguiextwidget-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/manatoolssharedguiextwidget-man3\/","title":{"rendered":"ManaTools::Shared::GUI::ExtWidget (man3)"},"content":{"rendered":"<h1 align=\"center\">ManaTools::Shared::GUI::ExtWidget<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SUPPORT\">SUPPORT<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#COPYRIGHT and LICENSE\">COPYRIGHT and LICENSE<\/a><br \/> <a href=\"#FUNCTIONS\">FUNCTIONS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ManaTools::Shared::GUI::ExtWidget \u2212 Class to manage a selection widget which has different controls<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use ManaTools::Shared::GUI::ExtWidget;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">my $extwidget = ManaTools::Shared::GUI::ExtWidget\u2212>new(name => &#8220;Selection1&#8221;, eventHandler => $dialog, parentWidget => $widget, callback => { my $self = shift; my $yevent = shift; my $backenditem = $_; &#8230; });<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$extwidget\u2212>addSelectorItem(&#8220;Label 1&#8221;, $backenditem1, sub { <br \/> my ($self, $parent, $backendItem) = @_; <br \/> my $dialog = $self\u2212><b>parentDialog()<\/b>; <br \/> my $factory = $dialog\u2212><b>factory()<\/b>; <br \/> my $vbox = $factory\u2212>createVBox($parent); <br \/> my $button1 = $self\u2212>addWidget($backendItem\u2212><b>label()<\/b> .\u2019_button1\u2019, $factory\u2212>createPushButton(\u2019Button 1\u2019, $vbox), sub { <br \/> my $self = shift; <br \/> my $yevent = shift; <br \/> my $backendItem = shift; <br \/> my $selectorWidget = $self\u2212><b>eventHandler()<\/b>; <br \/> &#8230; <br \/> }, $backendItem); <br \/> my $button2 = $self\u2212>addWidget($backendItem\u2212><b>label()<\/b> .\u2019_button2\u2019, $factory\u2212>createPushButton(\u2019Button 2\u2019, $vbox), sub {&#8230;}, $backendItem); <br \/> &#8230; }); $extwidget\u2212>addSelectorItem(&#8220;Label 2&#8221;, $backenditem2, sub { my ($self, $parent, $backendItem) = @_; my $factory = $self\u2212><b>parentDialog()<\/b>\u2212><b>factory()<\/b>; my $vbox = $factory\u2212>createVBox($parent); &#8230; } ); $extwidget\u2212>addSelectorItem(&#8220;Label 3&#8221;, $backenditem3, sub { my ($self, $parent, $backendItem) = @_; my $factory = $self\u2212><b>parentDialog()<\/b>\u2212><b>factory()<\/b>; my $vbox = $factory\u2212>createVBox($parent); &#8230; } ); $extwidget\u2212>addSelectorItem(&#8220;Label 4&#8221;, $backenditem4, sub { my ($self, $parent, $backendItem) = @_; my $factory = $self\u2212><b>parentDialog()<\/b>\u2212><b>factory()<\/b>; my $vbox = $factory\u2212>createVBox($parent); &#8230; } ); $extwidget\u2212><b>finishedSelectorItems()<\/b>;<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This class wraps a selector Widget with backend items to handle<\/p>\n<h2>SUPPORT <a name=\"SUPPORT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">You can find documentation for this module with the perldoc command:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">perldoc ManaTools::Shared::GUI::ExtWidget<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">yui::YSelectionWidget<\/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.<\/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>FUNCTIONS <a name=\"FUNCTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>new<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">hash ref containing <br \/> name: a name for the widget to add event to the eventHandler <br \/> eventHandler: the parent that does eventHandlerRole <br \/> parentWidget: the parent widget <br \/> callback: optional parameter to execute a callback when an item has changed<\/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\">new is inherited from Moose, to create a ExtWidget object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_buildSelectorWidget<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $parentWidget: yui:YWidget as parent<\/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\">($selector, $parent): $selector is the YSelectionWidget; $parent is the replacepoint&#8217;s parent<\/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\">builds the selection widget, needs to be overridden in subclasses<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_finishSelectorWidget<\/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\">finalizes the selection widget, needs to be overridden in subclasses<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>buildSelectionWidget<\/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\">builds the selection widget<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>_selectorItem<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $yevent: 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\">YItem: the selected 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\">returns the items that is selected when an event fires<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>processEvent<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $yevent: yui::YEvent<\/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\">handles the SelectorWidget events and executes callback if necessary<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>addSelectorItem<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $label: a label for the YItem <br \/> $backendItem: a backendItem needed to identify and\/or handle the event <br \/> $buildWidget: a CodeRef to rebuild the widget when required<\/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\">the created ManaTools::Shared::GUI::ExtWidget::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\">Creates an item and adds it to the ExtWidget. Internally, it creates a <br \/> yui::YItem and adds it to the YItemCollection. If it&#8217;s the first item, <br \/> mark it as the lastitem.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>findSelectorItem<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $yitem: the 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::ExtWidget::Item that has the YItem<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>buildSelectorItem<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $item: the item to be built (child widgets from this SelectorWidget will be recreated inside the associated replacepoint)<\/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\">builds an item on the internal replace point<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>clearSelectorItems<\/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 the selectorWidget of items to prepare for re\u2212adding new items, call finishedSelectorItems() afterwards<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>finishedSelectorItems<\/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\">finalizes the items on the ExtWidget<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ManaTools::Shared::GUI::ExtWidget \u2212 Class to manage a selection widget which has different controls <\/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,3093],"class_list":["post-6718","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-manatoolssharedguiextwidget"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6718","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=6718"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6718\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}