Re: Custom widgets with glade



You set a creation function which will be used to create that type of
widget.  If you are using glade's source code generation, you should find
a function by that name in the callbacks file.  It should have a prototype
something like:
  GtkWidget *creation_func(gchar *name, gchar *string1, gchar *string2,
                           gint int1, gint int2);

Fill in the the creation function with code to create the widget.  You can
use the string and integer arguments to set some properties on the widget
(useful if you want to use the same creation function to create widgets in
different parts of the interface).

If you are using libglade, just write the creation function and make sure
it is not static.  If you compile the program with all the flags from
gtk-config or gnome-config, libglade should automatically find the
function and use it (take a look at the libglade source code if you want
to know how it does this).

James.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On Wed, 6 Oct 1999, Jens Finke wrote:

> Hello!
> 
> How can I include a selfmade Widget within my application using glade? I
> found the "Custom Widget" button, but what does the "Creation
> Function", "String1", "String2", ... fields in the properties dialog mean?
> 
> I am using glade 0.5.3. Thanks for your help.
> 
>        Jens  
> 
> 
> -- 
> To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> as the Subject.
> 



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