[Glade-users] Using gtkglextmm with glade3
- From: schussman at slac.stanford.edu (Greg Schussman)
- Subject: [Glade-users] Using gtkglextmm with glade3
- Date: Fri, 06 Oct 2006 14:44:46 -0700
Hi.
Glade-3 looks beautiful.
I need gtkglextmm for the things I do. I really like glade. My
understanding is that glade is now language independent, and that one
should use libglade for whichever language you use. For me, that's C++,
so I'm using libglademm. I've tried and been able to reproduce the
simple and derived examples that came with glade3. I'm having
difficulty adding a Gtk::GL:DrawingArea, however.
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":
<glade-catalog name="gtkglextmm" library="gladegtkglextmm">
<init-function>Gtk::GL::init</init-function>
<glade-widget-classes>
<glade-widget-class name="GtkDrawingArea"
generic-name="drawingarea" title="Drawing Area"></glade-widget-class>
</glade-widget-classes>
<glade-widget-group name="gtk-control-display" title="Control and
Display">
<glade-widget-class-ref name="GtkGlDrawingArea"/>
</glade-widget-group>
</glade-catalog>
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?
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?
3) when I try to run
xmllint --dtdvalid glade-catalog.dtd --noout gtkglextmm.xml
I am told
Could not parse DTD glade-catalog.dtd
On searching my system, there appears to be no file called
"glade-catalog.dtd".
I am using glade3-3.0.2.tar.bz2 from
http://ftp.gnome.org/pub/GNOME/sources/glade3/3.0/
but on unpacking it, and configuring, compiling, and installing it,
there is no file ending in ".dtd" anywhere in that tarball. Am I doing
something silly? Is there a problem in the documenation at
"http://glade.gnome.org/docs/catalogintro.html"? Is the glade3-3.2.2
tarball missing the "glade-catalog.dtd" file by accident? My guess is
that I'm not doing something right, but I'm stumped.
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.
Any help would be tremendously appreciated!
Thanks!
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20061006/998eb9b8/attachment.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]