gnash-dev
[Top][All Lists]
Advanced

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

[Gnash-dev] Generic tree structure for passing info to GUIs ?


From: strk
Subject: [Gnash-dev] Generic tree structure for passing info to GUIs ?
Date: Sat, 11 Aug 2007 22:22:46 +0200

Is there a best practice to pass hierarchical sets of parameters
around ? I'd need this for a new View->MovieInfo menu itam.

The idea is that the VM would implement an:

         InfoObject VM::getMovieInfo() const;

Where InfoObject is the hierarchical thing.
An initial layout for the InfoObject for movie information would be:

        VM Version : SWF#
        Loaded Movies:
                _level0
                        URL : <url>
                        Type : SWF
                        Version : <number>
                _level1
                        URL : <url>
                        Type : SWF
                        Version : SWF#
                ...
                _level0.mc4.image
                        URL : <url>
                        Type : bitmap
                ...

The point is I don't want to define the whole structure right now, but
rather have the liberty of changing it arbitrarely w/out touching the
code in the GUI everytime. So the GUI would have a function like:

        void Gui::showInfo(InfoObject& o);

Which would show whatever it gets passed (initially for movie information,
but eventually for every kind of thing, like we may add DisplayList info).

So, back to the question : is there a best practice for this kind of extendible
structure (XML-like) or should we forge one ourselves ?

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]