[Glade-users] Using gtkglextmm with glade3



Greg Schussman wrote:
[...]

It looks to me like Gtk::GL::DrawingArea is not in the glade3 
collection of widgets available by default.  It looks like one should 
be able to add widgets by making a catalog.  So I think I need to 
create a catalog file (Has anyone else already done this?).  I'm 
reading through

 http://glade.gnome.org/docs/index.html

Here's my first crack at it (I'm calling the file gtkglextmm.xml":

[...]

First of all - you cant currently use "any language" for the glade 
plugin module, we've
been discussing ways of doing that - it will probably involve writing a 
binding to the
libgladeui.so interface that will serve as a bridge between the glade 
core and the plugin
... anyway - currently glade plugins must be written in C.


But I have some questions.
1) For the init-function, how does glade know what arguments that 
function expects?  Gtk::GL::init wants an argc and argv; does glade 
assume all init functions will use those same arguments?

The init function is supplied by the plugin - if the plugin specifies an 
init function
then it must export the function to be called (in that function you can 
go ahead
and initialize any subsystems you need to use for that library).

2) If I want it to appear that glade did include gtkglext, can I use 
the name of an existing widget group name, as shown in my file?  Or do 
I have to create a new widget group name?

Catalogs must have thier own widget groups.


3) when I try to run

The dtd should be in glade3/widgets/glade-catalog.dtd - but it hasnt 
been very well
maintained unfortunately - I dont know how usefull it will be.

4) Am I even trying to go about this the right way?  If glade3 is 
language neutral, should I by trying to add gtkglext instead of 
gtkglextmm, and worry about the correct type when using libglademm?  
Should I not try the catalog approach and instead use glade-3 to place 
a DrawingArea place holder at the right location in my GUI, and then 
try to somehow replace that DrawingArea with an instance of my own 
gldrawingarea at runtime after libglademm has loaded the user interface?

Sorry if these questions are silly.  I have put in many hours of 
searching and reading, but I'm just plain stuck.  Too many new things 
all at once.

To use gtkglext, then a gtkglext plugin to glade should be written in C, 
and a module
must be written for libglade - glade3 will include the dependancy on 
that module
in the glade file itself - and libglade upon reading the gtkglext 
requirement will load
that module.

Another way (I'm not sure what libglademm bindings provide) would be to 
call the
bindings for glade_xml_register_widget() and glade_provides() from your 
C++ app
(this will avoid the need to write a libglade module).

Cheers,
                          -Tristan





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