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



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

Attachment: signature.asc
Description: OpenPGP digital signature



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