Re: [gtk-list] Re: ANNOUNCE: Experimental C++ Wrapper
- From: Havoc Pennington <hp redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: ANNOUNCE: Experimental C++ Wrapper
- Date: 02 Jan 2000 14:18:29 -0500
Anders Melchiorsen <and@kampsax.dtu.dk> writes:
>
> Interesting. Does Sugar work when I am generating my GUI using Glade?
>
> I use plain (Glade generated) GTK+ in a C++ program and the constant
> casting is getting annoying.
>
Anytime you have a C widget you can just "cast" it to a Sugar widget:
GtkWidget* c_entry;
c_entry = glade_xml_get_widget(xml, "entry1");
Entry entry(GTK_ENTRY(c_entry));
entry.set_text("blah");
if you aren't using libglade I guess you can do the same thing with
lookup_widget().
I have the .defs file for a GladeXML object wrapper, generating
a wrapper like this:
Glade::XML xml("xmlfile.glade");
Widget w = xml.get_widget("entry1");
however I'm not sure it's very useful since you don't want a Widget,
you want the specific subclass.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]