{"id":6732,"date":"2022-12-20T19:33:32","date_gmt":"2022-12-20T22:33:32","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/manatoolssharedguidialog-man3\/"},"modified":"2022-12-20T19:33:32","modified_gmt":"2022-12-20T22:33:32","slug":"manatoolssharedguidialog-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/manatoolssharedguidialog-man3\/","title":{"rendered":"ManaTools::Shared::GUI::Dialog (man3)"},"content":{"rendered":"<h1 align=\"center\">ManaTools::Shared::GUI::Dialog<\/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=\"#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::Dialog \u2212 Class to manage a yui YDumbTab properly<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use ManaTools::Shared::GUI::Dialog;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">my $dlg = ManaTools::Shared::GUI::Dialog\u2212>new( <br \/> dialogType => ManaTools::Shared::GUI::Dialog\u2212>mainDialog, ## or popupDialog <br \/> title => &#8220;New Title&#8221;, <br \/> icon => $icon, <br \/> optFields => [ <br \/> ManaTools::Shared::GUI::Dialog\u2212>TimeField, <br \/> ManaTools::Shared::GUI::Dialog\u2212>DateField, <br \/> ManaTools::Shared::GUI::Dialog\u2212>TabField, <br \/> ], <br \/> buttons => [ <br \/> ManaTools::Shared::GUI::Dialog\u2212>cancelButton, <br \/> ManaTools::Shared::GUI::Dialog\u2212>okButton, <br \/> ], <br \/> event_timeout => 0, # event timeout in msec during the <b>waitForEvent()<\/b> <br \/> layout => sub { my $self = shift; my $layoutstart = shift; my $dlg = $self\u2212><b>dialog()<\/b>; my $info = $self\u2212><b>info()<\/b>; &#8230; $self\u2212>addWidget(\u2019button1\u2019, $button, sub{&#8230;}, $backendItem1); }, <br \/> restoreValues => sub { my $self = shift; $info = {}; &#8230;; return $info }, <br \/> result => sub { my $self = shift; &#8230; }, );<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">my $result = $dlg\u2212><b>call()<\/b>;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">## you should call this from the Module, and not directly from here&#8230;<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This class wraps the most common dialog functionality<\/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::Dialog<\/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 \/> module: the parent ManaTools::Module <br \/> dialogType: ManaTools::Shared::GUI::Dialog\u2212>mainDialog, or popupDialog <br \/> title: a title <br \/> icon: an icon <br \/> layout: a callback that builds the layout of the dialog <br \/> restoreValues: an optional callback that restore the values to an $info HashRef <br \/> event_timeout: an optional and rw timeout in msec during the waitForEvent() <br \/> needs a ManaTools::Shared::GUI::Event to manage the $yui::YEvent::TimeoutEvent <br \/> buttons: an optional hashref containing <br \/> ManaTools::Shared::GUI::Dialog\u2212>cancelButton and\/or <br \/> ManaTools::Shared::GUI::Dialog\u2212>okButton <br \/> result: an optional callback for returning a result (mostly for popupDialogs)<\/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 Dialog object<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>checkFields<\/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>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">returns true or false depending on success<\/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\">helper function to check if the optional factory has the optFields<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>getButton<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $buttonType: a buttonType<\/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\">returns the CodeRef associated with the buttonType, or undef<\/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\">gets the CodeRef associated with a buttontype<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>addButtons<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $ylayout: a layout widget to base the buttons on<\/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 buttons to the layout according to $self\u2212>buttons()<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>multipleChanges<\/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\">Start multiple changes (if required)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>recalcLayout<\/b> <i><small><br \/> INPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">$self: this object <br \/> $force: bool<\/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\">Recalculates the layout and ends multiple changes (if required or if forced)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>call<\/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>OUTPUT<\/small><\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">the result from the dialog<\/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 a dialog (either popup or main) and handles it&#8217;s events and resturns the proper result.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ManaTools::Shared::GUI::Dialog \u2212 Class to manage a yui YDumbTab properly <\/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,3106],"class_list":["post-6732","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-manatoolssharedguidialog"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6732","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=6732"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6732\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}