Home
Name Modified Size InfoDownloads / Week
Examples 2010-02-28
DynGraph_035.tar.gz 2010-02-28 172.8 kB
Manual.odt 2010-02-28 41.1 kB
manual.txt 2010-02-28 20.1 kB
readme.txt 2010-02-28 4.2 kB
changelog.txt 2010-02-28 1.6 kB
usage.txt 2010-02-28 336 Bytes
DynGraph_03.tar.gz 2010-02-25 159.8 kB
DynGraph_022.tar.gz 2010-02-15 156.3 kB
DynGraph_021.tar.gz 2009-12-31 154.6 kB
DynGraph_02.tar.gz 2009-12-26 154.5 kB
DynGraph_01.tar.gz 2009-12-12 132.8 kB
Totals: 12 Items   998.2 kB 0
Dynamic gui generation in Perl (Version 0.35)

The main update in this release is the support of JSON syntax for gui definition.

History

28.02.2010 Version 0.35
25.02.2010 Version 0.3
14.02.2010 Version 0.22
31.12.2009 Version 0.21
26.12.2009 Version 0.2
11.12.2009 Version 0.1


Description

This project aims to add the ability to create a graphical user interface (gui) dinamically
for Perl programs.
This readme.txt is a brief description of the project, see manual.txt or manual.odt for a 
more detailed description.

Main features

1. Specify gui of programs on external files 
2. Use a simple script language to define navigation and callback between gui components
3. Specify entry points to call program subs directly from navigation script 

The goal of the project is to totally disjoint gui from main program script.

Brief module description

Project constists of 4 modules to maintain completely disjoint different sections (I mean that GuiLib.pm does
not depend on Template.pm and viceversa, and these module can be changed without affecting other module operation).

1. DynGui.pm

This module contains the implementation of the dynamic gui itself; it is gui library indipendent and relies
on an internal data structure.

2. GuiLib.pm

The gui library wrapper.
It uses an proprietary API to interface the DynGui module with the graphic library choosen.
The project came with a default implementation for Wxwidgets via WxPerl.

User can modify this module to work with different graphic library, for example it contains some hints
for usage with FLTK.

3. Template.pm

The file/string parser.
This module read a gui definition from file or string and converts it in the data structure suitable for 
DynGui usage. The project came with a simplified XML syntax parser.

User can modify this module to change parser syntax recognition and/or grammar
(for example this module can be modified to recognize json style interface definition).

4. Consts.pm

The constants export module; contains all the constants used by more than one module of the project.

These modules must be called by the main script, a sample main.pl is provided.

Workflow

Dg:DynGui module passed the gui definition (on external file or defined in a string) to the parser 
(Dg::Template module) where is analyzed and converted in a array of hashes structure that is 
indipendent from the file/string syntax and graphics library format. 
This conversion is useful to completely disjoint the file format and the graphic library API so 
programmer can change one without affecting the other.
The data structure is passed back to Dg::DynGui that calls Dg:GuiLib to render the gui and do
application cycle; at the end (typically main window close) the gui is destroyed and the application
completes.

Main program (main.pl or whatever you want) calls Dg:DynGui only; the rest of the work is done in
background by this module.

License

This program is free software; you can redistribute it and/or modify it under the 
same terms as Perl itself

Todo

    This is only an early release of this project. So lot of work not yet done.

- Docs

    Write a wider documentation on template and action script syntax and how to 
    change/expand both of them.

- Examples

    Write a number of example to show module features not yet covered. 

- GuiLib

    Altough the base structure is almost complete, the implementation of the graphic wrapper 
    supports only basic widgets. 
    At the moment it supports windows (obviously), groups of widgets, tiles (panels),
    tabbed windows (notebook in Wxwidgets),  buttons, check buttons, radio buttons, label (static text),
    textfields, bitmaps, sliders, progress bars, listboxes, comboboxes, spin controls and naturally 
    dropdown and popup menus.

    Basic support for tables and tree views.

    It also supports layout in form of packs (implemented as Wxwidgets boxsizer).

- Template

    Make the parser more robust, for the sake of simplicity I have not used any parsing toolkit,
    instead extended pattern matching is used to parse the interface template and action script.
    The parser code must be more resistant to errors and malformed xml in gui definition. 


Source: readme.txt, updated 2010-02-28