Re: [gtkmm] Glade-2, libgtkmm, Xml::create, callbacks



On Wed, 2003-09-03 at 17:34, Douglas Roberts wrote:
> I am talking about the generic need to get handles to the gui
> components, irrespective of what RAD, or suite of RAD tools is used to
> produce the gui code.  Callback functionality is such that gui
> components often interact.  For example, clicking a button will cause
> a file browser to pop up when the button's functionality is "Load
> File".

Do you want the RAD tool to write the code to popup the dialog in
response to the button press? That seems like a different discussion.

As for specifying signal handlers in the RAD:
In theory the RAD could do some of this. I think you'd need to:
- give each widget a name in Glade (Already possible)
  This will allow you to find the instance that will emit the signal, at
run time.
  You might need to consider the parent-child relationship of the
widgets too. For instance, you might have 2 instances of your mywindow
window, but you don't want the 2nd one to handle signals from the button
in the first one. 
- specify the name of the widget whose class will handle the signal, as
well as the name of the signal handler method.
- deal with C++ name-mangling to find a pointer to the method that will
handle the signal.

I don't think the RAD could do everything you want, because some of your
intent can not be expressed without code.

Some of this might already be possible with the new glademm --libglade
feature. Whatever that can do, we should be able to do in libglademm
itself, if we can deal with C++ name-mangling and patching Glade to
allow the user to specify enough information.

libglademm 1 has some stuff to deal with C++ name mangling. For a long
time I have been asking for someone to take a look at that. 
 
-- 
Murray Cumming
murrayc usa net
www.murrayc.com





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