Help! glademm



Hello: 
   I'm new to GTK+ programming. I'm using gtkmm with glademm. I have a
window with two checkboxes and a togglebutton. I want the checkboxes to
hide/show another
window that I created in glademm. I want also want to check the status
of the togglebutton (get_active()).

With the Glade code output, these widgets are declared in the toplevel
window constructor, and are local to the constructor and not accessible
anywhere else. How can I access these widgets from the callback
functions/methods?

   I tried copying the constructor code from the glade base class into
the derived class, and then modifying it to use member widgets, which
are initialized in the constructor rather than declared. Now I can get
rid of the glade base class completely.

   However I get an error saying the constructor or destructor has
multiple definitions! The compiler says that it is first defined in
/usr/include/sigc++/object_slot.h and also mentions (.text+0x0). Is this
some kind of 
template thing? Is the constructor declared through the manage()
function call? 

  Anyways, what is the simplest way to be able to access member
functions of these
widgets? I'd prefer to keep using the glade generated code. I suppose I
could modify a class inherited from the base class, then inherit from
this class again. Seems like
a nasty hack though...

  I remember reading somewhere that there is a function that can locate
widgets and return a pointer to you. Or maybe it was return a GList
object.

  Maybe I am better off without Glademm? This seems like kind of basic
functionality
however, ie being able to access the widgets that you create in glademm.
You can't do everything with isolated callbacks... Someone please
enlighten me!

Thanks in advance,
David



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