[Glade-users] Parsing glade xml files



Hi,

We are writing an application which needs to read Glade xml files to
know how the interface is. 

We have started to use Libglade SAX Parser but we have found some
problems about getting all info from Glade xml files. Let me explain it:

First of all, we call to glade_xml_parse_file:

GladeInterface* glade_parser_parse_file ("test.glade", NULL);

This returns a GladeInterface which holds several values. We started to
use "toplevels" attribute to get info about windows holded by glade
file. Until here everything is ok.

But now, suposing the first GladeWidgetInfo is a GtkWindow, and I want
to get its properties already set, we found that there are only one
pointer to GladeProperty, called properties. 

This is the same for signals, we can only get one signal reference
(GladeSignalInfo) knowing that it could be several of those. In fact,
this problem applies to all elements inside the GladeWidgetInfo
structure that have an attribute with a "n_" preffix.

Questions I have are: 

How could we read all widgets, properties, signal, childs, etc, from
glade files?

Are we using the right library to read glade xml files or should I write
a xml parser to read glade files?

Could you direct me to some tutorial or project already reading glade
xml files.

Many thinks for your attention,
Best regards,



-- 
Francis Brosnan Blazquez <francis aspl es>
Advanced Software Production Line, S.L.




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