A new Gtk2::Ex module

Here is a request for a new namespace under Gtk2::Ex::  The story is as follows.

Typically in business applications, people view data in a spreadsheet kinda display. (Columns
represent timeline(typically) and rows represent measures like sales/inventory/blah/blah).

The data itself is typically stored internally as relational records. For example, here is some
sales info (stored internally in a relational database)
   Region, City, Product, Date, Quantity
   Texas, Dallas, Fruits, Dec-2003, 300
   Texas, Dallas, Veggies, Jan-2004, 120
   Texas, Austin, Fruits, Nov-2003, 310
   Texas, Austin, Veggies, Feb-2004, 20

The user will typically want to view the same data in a hierarchical(/spreadsheet) kinda display.
   Prod / Date   Nov-2003  Dec-2003  Jan-2004  Feb-2004 
        Fruits                  300             
        Veggies                           120 
        Veggies       310                            20

With web-based business apps, similar views are created in the browser using lots of html/jsp

I believe that Gtk2::TreeView is an excellent widget to display a similar presentation of data in
a desktop app. But creating a (hierarchical) TreeView from flat relational data can require some
recursive function calls. I thought it'll be great if all this recursive code could be abstracted
out and packaged separately.

So I wrote up a module that will accept a relational feed of records and automatically convert it
into a hierarchical treeview using the Gtk2::TreeView. Basically involves some recursive functions
to build a TreeModel and populate it. Also, since the spreadsheet itself can be rather long
horizontally, I added a FreezePane kinda capability.

If no one has objections, I would like to use the name Gtk2::Ex::TreeMaker for this module.
(Naming suggestions are welcome). Also, if Ross has no objections, I would like to upload this
into the sourceforge gtk2-perl-ex. If there is prior art related to this, pointers to that will be
wonderful too.

Note that, unlike Gtk2::Ex::Simple::Tree which has lot of general use, this is a rather
specialised widget.

[The code in its current form may be too large to send as an attachment.]



Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]