Hi,
I'm using Anjuta an IDE for Glade and using
makefiles etc...What this does it allows you to build your GUI
(visually) using Glade and all you have to do is write the callback
functions behind the objects. The files that are automatically generated
are:
callbacks.c
callbacks.h
interface.c
interface.h
main.c
support.c
support.h
All I'm wanting to do is have a list box where
strings are simply put into it...Since Anjuta creates the code to generate your
chosen GUI it generated the following for the List object:
(in the interface.c, but only relevant code is
shown)
GtkWidget*
create_window_main (void)
{
...
...
GtkWidget
*list_shopping_list; <- As I called the
item "list_shopping_list" minus quotes, from inside the GUI editor
...
...
list_shopping_list =
gtk_list_new();
gtk_widget_ref
(list_shopping_list);
gtk_object_set_data_full
(GTK_OBJECT (window_main), "list_shopping_list", list_shopping_list,
(GtkDestroyNotify) gtk_widget_unref);
gk_widget_show
(list_shopping_list);
gtk_box_pack_start (GTK_BOX
(hbox3), list_shopping_list, TRUE, TRUE, 0);
}
And that's it as far as anything to do with the
list box is concerned. Right...That was in the interface.c. I have then created
my own file called "list_handler.c". In "list_handler.c" (minus quotes) I'm
wanting a function that simply adds items to this list box that was set up in
the interface.c file. If I can get that I'd be ecstatic. Please if you could
help I'd be very grateful...
Thanks for your time,
Uni |