PG*, Direct* and the future

Hi everybody,

I’ve been studying and experimenting with Panda’s GUI system and I’m a little confused.

The API page for PGTop declares it to be The “top” node of the new Panda GUI system. However, a small search in the forum reveals that PGItems were discussed already in 2005, which clearly means they are not that new and I just didn’t notice the whole PG* family in Panda 1.5.4.

On the other hand the DirectGUI system seems to be built on top of PGItems. So much in fact that the DirectGUI items disappear unless a reference is explicitly kept pointing to them (see this thread). What are these DirectGUI thingies then? Factory-like objects doing their job and simply moving on into oblivion?

My point is that there seem to be a lot of overlap/redundancy between the two families of classes but at the same time neither seem to be a subset or a superset of the other. The DirectGUI* family “seems” to be a simpler more modern version of PG* and the PG* family seems to be the one to use when wanting to subclass, at least because its documentation has less gaps (have a look the API page for DirectGuiBase). However PGItem is inheriting from PandaNode and comes with a lot of functionality that might or might not be useful for GUI programming.

So, I’m a bit confused. Sorry I’m not quite asking clear questions, but can anybody fill the gaps in the evolution of Panda’s GUI system and its direction for the future?

Also, it seems to me that the work done by the Mozilla team on XUL and that of the WC3 on the DOM+CSS/Schema is architecturally brilliant. Resources aside, would it be unreasonable to set the foundations of the GUI system on those standards? Are there aspects in the GUI framework for a game/simulation that would not quite carry over? Is that architecture too bloated for the kind of high-performance required in a game/simulation?

I do realise it’s a broad and potentially controversial issue, but even some negative comments would be useful. :smiley:

Just to make you happy: I replied.

Say wohoo because your post makes no sense for me.

what are you trying to say? in short please.

Thank you! :smiley:

Ok, I’ll try. :wink:

DirectGUI: API pages somewhat deficient (little or no introductions, missing documentation for methods)
PGItems: seemingly legacy functionality now masked by DirectGUI?

DOM and DOM Events: enlist and standardize a wide variety of GUI needs and patterns
XUL: is a (Mozilla) standard built on top of DOM to describes GUIs

Is DOM+XUL inappropriate for GUIs for games? Could Panda (hypothetically) be made to support both DOM and XUL ? Would it be an unreasonable thing to do?

I would argue that DirectGUI is worse then pgGUI which its build on top of. But pgGUI has way more of a c++ feal to it. Passing wrong params or forgetting to call init causes stuff to crash.

PGui is the low-level implementation of the gui widgets. DirectGui is a higher-level, supposedly friendlier, interface layered on top of PGui. As treeform points out, there are differences of opinion as to whether DirectGui is an improvement or not.

There have been several different proposals to integrate a different GUI system with Panda, including DOM+XUL. Try a forum search.

David