Re: [glade--] Learning to use glademm-generated code

Christof Petig <[email protected]> Wed, 08 Dec 2004 15:32:28 +0100
Newsgroups gmane.comp.gnome.glademm
Organization Adolf Petig GmbH & Co. KG
Message-ID <[email protected]>
Baltasarq schrieb:
> 	I've posted a couple of messages before. I'm just trying to compile a simple 
> example made in glade, generating C++ code. In this example, a sole window 
> contains tow editboxes (named op1 and op2), and a label (res), and the 
> intended behaviour is the label res to change its contents to reflect the 
> addition of the numbers present in the two editboxes.

(assuming a clean directory, put foo.glade and foo.gladep into it, call 
glademm foo.glade then ./autogen.sh and make) That should lead you 
further. [once you add new signals to an existing project _you_ have to 
put the corresponding methods to _your_ class, glademm will not touch 
your files, take the _new files as an example]

> 
> 	I swear I browsed all documentation before posting this message. Perhaps this 
> is not the more appropriate list, then please tell me. 
> 
> 	I've just been browsing the documentation of Gtk+ but I'm lost inside it. All 
> examples are clear, but are not applyable to the glademm's generated code. I 
> do have, in window1 these methods:

you should better look for gtkmm examples.

> 	I don't know how to get to my widgets from here (op1, op2, and res), and 
> there is no hint in the header file (the class window1 is empty, apart from 
> these two methods).

The widgets are part of the base class (foo_glade) and visible to your 
methods once they are marked as protected in glade-2.

> 	Any help will be welcomed.

Look for gtkmm (prefer version 2.4.x) and it's dependencies. Gtkmm is a 
total different world when compared to gtk+ (only the names of the 
functions are shared).

If you want to use gnome widgets I recommend the use of libglademm, it's 
far more complete when it comes to gnome widgets.
    Christof

_______________________________________________
glademm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/glademm-list
signature.asc (application/pgp-signature, 251 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFBtxCBng+R+0ucfO0RAn6/AKCbE/vCHuvFF9chb3t3NIIRGIeWmACgquBT
5XUC0LvCoGMqzB7lQ/Ve+tw=
=Cmzm
-----END PGP SIGNATURE-----