The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GuiBuilder - To create GUI wrapper for any script...

VERSION

Version 0.02

SYNOPSIS use strict;

  use Tk;
  
  require Tk::MsgBox;
  
  require Tk::Pane;
  
  use GuiBuilder;
  
  my $gui_builder = GuiBuilder::new();
  
  $gui_builder->generate_gui();

DESCRIPTION

GuiBuilder generates the PERL GUI wrapper (as per options selected by user) compatible to Tk for any script/utility. Invoking generate_gui method opens one GUI window where user need to select/specify options needed to create GUI wrapper for any script/utility. It provides most commonly used GUI fields like Checkbutton, Button, Text Field, Label, Radiobutton, Listbox, etc. GUI invoked using generate_gui method call is self explanatory. However, some useful information is provided below to understand it better.

#----------------------- Example Description Starts----------------------------

For example, if user need to create GUI as depicted below within dotted box, then he need to select/specify following in GUI windows invoked by generate_gui method.

  => 3 Radio Button named Radio_Button_1, Radio_Button_2 and Radio_Button_3 at Frame/Row/Column = 1/1/1, 1/1/2 and 1/1/3 respectively.

  => 2 Check Boxes named Check_Box_1 and Check_Box_2 at Frame/Row/Column = 1/2/1 and 1/2/2 respectively.

  => 1 Label named 'Label Enter Text Here:' at Frame/Row/Column = 1/3/1

  => 1 Text Field (with any name) at Frame/Row/Column = 1/3/2

  => 2 Buttons named Button_OK and Button_Cancel at Frame/Row/Column 2/1/1 and 2/1/2 respectively.

                     |<------ Column 1 ------->|<---Column 2-------->|<-----Column 3----------->|
                     |--------------------------------------------------------------------------|
    Frame 1   Row 1  |   (.) Radio_Button_1      (.) Radio_Button_2     (.) Radio_Button_3      |
    Frame 1   Row 2  |   [+] Check_Box_1         [+] Check_Box_2                                |
    Frame 1   Row 3  |   Label Enter Text Here:  <Text_Field_1>                                 |
    Frame 2   Row 1  |   [Button_OK]             [Button_Cancel]                                |
                     |--------------------------------------------------------------------------|

    Above example explains the concept of Frame, Row and Column used here and How the fields are supposed to be entered. 
    
    User can have everything into single frame or can have as many frames as number of rows. 
    
    Mostly group of related fields should be having same frame number from GUI geometry point of view so that they can be positioned/controlled as a group.

    After selecting/specify all these details into GUI window, user can click on 'Generate Gui' Command Button which will generate one perl script named 'autogenerated_gui.pl'. 

    About 'autogenerated_gui.pl': 
      => This auto generated script is nothing but Perl GUI Wrapper for the GUI as explained above in the example. 
      => Running it, will open GUI as depicted above in dotted box. 
      => User need to edit it to add Actions based on options selected (e.g. Radio_Button_2 selected or Check_Box_2 selected).
      => It is having one subroutine named 'get_gui_options' which returns values of all the Options selcted by user in the form of list. 
         Using values provided by this subroutine user can invoke its command line version of the script/utility.

#----------------------- Example Description Ends -----------------------------

GuiBuilder also provides options for loading, saving and deleting of the options entered through GUI window. This options are useful

  => To enter GUI configuration details in the form of text file instead of entering each details in GUI window (loading feature)

  => To delete wrong entries entered by mistake (deleting feature)

  => Saving entries which can be restored later (saving feature)

GuiBuilder will invoke GUI Error prompts on illegal/invalid user options.

SUBROUTINES/METHODS

new()

  Creates a new GuiBuilder object.

generate_gui()

  Invokes GUI window to select various GUI fields required to generate GUI wrapper for script/utility.

AUTHOR

Sandeep Vaniya, <sandeep.vaniya at gmail.com>

BUGS

Please report any bugs or feature requests to bug-guibuilder at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=GuiBuilder. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc GuiBuilder

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2014 Sandeep Vaniya.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0

Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.