[Xfc-dev] xfc Widget class

Jeff Franks jcfranks at tpg.com.au
Tue Apr 5 03:55:23 CEST 2005


Xavier Otazu wrote:

>	Hi:
>
>	This weekend I was trying to include the C code generated by
>glade into xfc code in order to visually design GUI with glade.
>
>	I found the Widget(Widget* p, bool) protected
>explicit constructor.
>
>	My question is: why is this constructor protected? This way I
>cannot define something like
>
>Widget *my_glade_widget=glade_func_that_creates_and_returns_widget(); 
>Xfc::Gtk::Widget my_xfc_widget(my_glade_widget);
>
>
>	Why is this constructor protected? There is some member
>function to contruct a Gtk::Widget object from a Widget object pointer?
>
>  
>
This constructor is protected because it is used in XFC's memory 
management implementation and should only be used by dervied classes.

I will have a look at writing an XFC binding for libglade. I wouldn't 
use generated C code because the Glade docs say this is deprecated and 
will possibly be removed in Glade 3. The recommended usage is to use XML 
files and libglade.

Jeff



More information about the Xfc-dev mailing list