From a2dafdfc88dbaaaf67c3971372da4a5b8b63ec2b Mon Sep 17 00:00:00 2001 From: GMT 1999 Tony Gale Date: Thu, 28 Jan 1999 10:35:40 +0000 Subject: [PATCH] - Replace all uses of deprecated functions. - Replace menufactory example Thu Jan 28 10:16:28 GMT 1999 Tony Gale * docs/gtk_tut.sgml: - Replace all uses of deprecated functions. - Replace menufactory example with itemfactory example from Nick Scott - Minor bug fixes in the examples. --- ChangeLog | 8 + ChangeLog.pre-2-0 | 8 + ChangeLog.pre-2-10 | 8 + ChangeLog.pre-2-2 | 8 + ChangeLog.pre-2-4 | 8 + ChangeLog.pre-2-6 | 8 + ChangeLog.pre-2-8 | 8 + docs/gtk_tut.sgml | 1181 +++++++++++++------------- docs/tutorial/gtk_tut.sgml | 1181 +++++++++++++------------- examples/aspectframe/aspectframe.c | 2 +- examples/buttons/buttons.c | 4 +- examples/clist/clist.c | 2 +- examples/entry/entry.c | 4 +- examples/eventbox/eventbox.c | 4 +- examples/helloworld/helloworld.c | 2 +- examples/helloworld2/helloworld2.c | 2 +- examples/list/list.c | 4 +- examples/menu/Makefile | 14 +- examples/menu/menufactory.c | 54 -- examples/menu/menufactory.h | 18 - examples/menu/mfmain.c | 48 -- examples/menu/mfmain.h | 19 - examples/notebook/notebook.c | 22 +- examples/packbox/packbox.c | 2 +- examples/paned/paned.c | 2 +- examples/pixmap/pixmap.c | 2 +- examples/radiobuttons/radiobuttons.c | 8 +- examples/rangewidgets/rangewidgets.c | 16 +- examples/rulers/rulers.c | 2 +- examples/scrolledwin/scrolledwin.c | 4 +- examples/selection/gettargets.c | 2 +- examples/selection/setselection.c | 6 +- examples/statusbar/statusbar.c | 10 +- examples/table/table.c | 2 +- examples/text/text.c | 12 +- examples/tictactoe/tictactoe.c | 2 +- examples/tictactoe/ttt_test.c | 2 +- examples/tree/tree.c | 2 +- 38 files changed, 1324 insertions(+), 1367 deletions(-) delete mode 100644 examples/menu/menufactory.c delete mode 100644 examples/menu/menufactory.h delete mode 100644 examples/menu/mfmain.c delete mode 100644 examples/menu/mfmain.h diff --git a/ChangeLog b/ChangeLog index 91ee5a5475..d2d624c6b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Jan 28 10:16:28 GMT 1999 Tony Gale + + * docs/gtk_tut.sgml: + - Replace all uses of deprecated functions. + - Replace menufactory example with itemfactory example + from Nick Scott + - Minor bug fixes in the examples. + 1999-01-28 Sebastian Wilhelmi * gdk/gdkim.c: diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 91ee5a5475..d2d624c6b2 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Thu Jan 28 10:16:28 GMT 1999 Tony Gale + + * docs/gtk_tut.sgml: + - Replace all uses of deprecated functions. + - Replace menufactory example with itemfactory example + from Nick Scott + - Minor bug fixes in the examples. + 1999-01-28 Sebastian Wilhelmi * gdk/gdkim.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 91ee5a5475..d2d624c6b2 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Thu Jan 28 10:16:28 GMT 1999 Tony Gale + + * docs/gtk_tut.sgml: + - Replace all uses of deprecated functions. + - Replace menufactory example with itemfactory example + from Nick Scott + - Minor bug fixes in the examples. + 1999-01-28 Sebastian Wilhelmi * gdk/gdkim.c: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 91ee5a5475..d2d624c6b2 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Thu Jan 28 10:16:28 GMT 1999 Tony Gale + + * docs/gtk_tut.sgml: + - Replace all uses of deprecated functions. + - Replace menufactory example with itemfactory example + from Nick Scott + - Minor bug fixes in the examples. + 1999-01-28 Sebastian Wilhelmi * gdk/gdkim.c: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 91ee5a5475..d2d624c6b2 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Thu Jan 28 10:16:28 GMT 1999 Tony Gale + + * docs/gtk_tut.sgml: + - Replace all uses of deprecated functions. + - Replace menufactory example with itemfactory example + from Nick Scott + - Minor bug fixes in the examples. + 1999-01-28 Sebastian Wilhelmi * gdk/gdkim.c: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 91ee5a5475..d2d624c6b2 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Thu Jan 28 10:16:28 GMT 1999 Tony Gale + + * docs/gtk_tut.sgml: + - Replace all uses of deprecated functions. + - Replace menufactory example with itemfactory example + from Nick Scott + - Minor bug fixes in the examples. + 1999-01-28 Sebastian Wilhelmi * gdk/gdkim.c: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 91ee5a5475..d2d624c6b2 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Thu Jan 28 10:16:28 GMT 1999 Tony Gale + + * docs/gtk_tut.sgml: + - Replace all uses of deprecated functions. + - Replace menufactory example with itemfactory example + from Nick Scott + - Minor bug fixes in the examples. + 1999-01-28 Sebastian Wilhelmi * gdk/gdkim.c: diff --git a/docs/gtk_tut.sgml b/docs/gtk_tut.sgml index 480a19756f..c85e11796d 100644 --- a/docs/gtk_tut.sgml +++ b/docs/gtk_tut.sgml @@ -11,7 +11,7 @@ Tony Gale Ian Main , -December 13th, 1998 +January 27th, 1999 Introduction @@ -53,8 +53,8 @@ necessary. If you are learning GTK as your first widget set, please comment on how you found this tutorial, and what you had trouble with. Note that there is also a C++ API for GTK (GTK--) in the works, so if you prefer to use C++, you should look into this -instead. There's also an Objective C wrapper, and Guile bindings -available, but I don't follow these. +instead. There are also Objective C, ADA, Guile and other language +bindings available, but I don't follow these. This document is a 'work in progress'. Please look for updates on http://www.gtk.org/ - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); This call creates a new button. It allocates space for a new GtkWidget @@ -859,7 +859,7 @@ int main( int argc, GTK_SIGNAL_FUNC (delete_event), NULL); /* Sets the border width of the window. */ - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); /* We create a box to pack widgets into. This is described in detail * in the "packing" section. The box is not really visible, it @@ -1145,7 +1145,7 @@ int main( int argc, * behavior */ gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (delete_event), NULL); - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); /* We create a vertical box (vbox) to pack the horizontal boxes into. * This allows us to stack the horizontal boxes filled with buttons one @@ -1541,7 +1541,7 @@ int main( int argc, GTK_SIGNAL_FUNC (delete_event), NULL); /* Sets the border width of the window. */ - gtk_container_border_width (GTK_CONTAINER (window), 20); + gtk_container_set_border_width (GTK_CONTAINER (window), 20); /* Create a 2x2 table */ table = gtk_table_new (2, 2, TRUE); @@ -1849,7 +1849,7 @@ GtkWidget *xpm_label_box( GtkWidget *parent, /* Create box for xpm and label */ box1 = gtk_hbox_new (FALSE, 0); - gtk_container_border_width (GTK_CONTAINER (box1), 2); + gtk_container_set_border_width (GTK_CONTAINER (box1), 2); /* Get the style of the button to get the * background color. */ @@ -1908,7 +1908,7 @@ int main( int argc, /* Sets the border width of the window. */ - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); gtk_widget_realize(window); /* Create a new button */ @@ -2001,7 +2001,7 @@ void toggle_button_callback (GtkWidget *widget, gpointer data) -void gtk_toggle_button_set_state( GtkToggleButton *toggle_button, +void gtk_toggle_button_set_active( GtkToggleButton *toggle_button, gint state ); @@ -2011,7 +2011,7 @@ button as the first argument, and a TRUE or FALSE for the second state argument to specify whether it should be down (depressed) or up (released). Default is up, or FALSE. -Note that when you use the gtk_toggle_button_set_state() function, and +Note that when you use the gtk_toggle_button_set_active() function, and the state is actually changed, it causes the "clicked" signal to be emitted from the button. @@ -2091,7 +2091,7 @@ It is also a good idea to explicitly set which button should be the default depressed button with: -void gtk_toggle_button_set_state( GtkToggleButton *toggle_button, +void gtk_toggle_button_set_active( GtkToggleButton *toggle_button, gint state ); @@ -2132,14 +2132,14 @@ int main( int argc, NULL); gtk_window_set_title (GTK_WINDOW (window), "radio buttons"); - gtk_container_border_width (GTK_CONTAINER (window), 0); + gtk_container_set_border_width (GTK_CONTAINER (window), 0); box1 = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), box1); gtk_widget_show (box1); box2 = gtk_vbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); @@ -2149,7 +2149,7 @@ int main( int argc, group = gtk_radio_button_group (GTK_RADIO_BUTTON (button)); button = gtk_radio_button_new_with_label(group, "button2"); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); gtk_widget_show (button); @@ -2164,7 +2164,7 @@ int main( int argc, gtk_widget_show (separator); box2 = gtk_vbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0); gtk_widget_show (box2); @@ -2787,7 +2787,7 @@ void create_range_controls( void ) gtk_widget_show (box1); box2 = gtk_hbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); @@ -2823,20 +2823,20 @@ void create_range_controls( void ) gtk_widget_show (scrollbar); box2 = gtk_hbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0); gtk_widget_show (box2); /* A checkbutton to control whether the value is displayed or not */ button = gtk_check_button_new_with_label("Display value on scale widgets"); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); gtk_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC(cb_draw_value), NULL); gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); gtk_widget_show (button); box2 = gtk_hbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); /* An option menu to change the position of the value */ label = gtk_label_new ("Scale Value Position:"); @@ -2871,7 +2871,7 @@ void create_range_controls( void ) gtk_widget_show (box2); box2 = gtk_hbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); /* Yet another option menu, this time for the update policy of the * scale widgets */ @@ -2905,7 +2905,7 @@ void create_range_controls( void ) gtk_widget_show (box2); box2 = gtk_hbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); /* A GtkHScale widget for adjusting the number of digits on the * sample scales. */ @@ -2925,7 +2925,7 @@ void create_range_controls( void ) gtk_widget_show (box2); box2 = gtk_hbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); /* And, one last GtkHScale widget for adjusting the page size of the * scrollbar. */ @@ -2949,7 +2949,7 @@ void create_range_controls( void ) gtk_widget_show (separator); box2 = gtk_vbox_new (FALSE, 10); - gtk_container_border_width (GTK_CONTAINER (box2), 10); + gtk_container_set_border_width (GTK_CONTAINER (box2), 10); gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0); gtk_widget_show (box2); @@ -3005,8 +3005,8 @@ Where the sole argument is the string you wish the label to display. To change the label's text after creation, use the function: -void gtk_label_set( GtkLabel *label, - char *str ); +void gtk_label_set_text( GtkLabel *label, + char *str ); Where the first argument is the label you created previously (cast @@ -3716,7 +3716,7 @@ int main( int argc, char *argv[] ) window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_signal_connect( GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (close_application), NULL ); - gtk_container_border_width( GTK_CONTAINER (window), 10 ); + gtk_container_set_border_width( GTK_CONTAINER (window), 10 ); gtk_widget_show( window ); /* now for the pixmap from gdk */ @@ -4069,7 +4069,7 @@ int main( int argc, char *argv[] ) { window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC( close_application ), NULL); - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); /* Create a table for placing the ruler and the drawing area */ table = gtk_table_new( 3, 2, FALSE ); @@ -4187,14 +4187,14 @@ void push_item (GtkWidget *widget, gpointer data) char buff[20]; g_snprintf(buff, 20, "Item %d", count++); - gtk_statusbar_push( GTK_STATUSBAR(status_bar), (guint) &data, buff); + gtk_statusbar_push( GTK_STATUSBAR(status_bar), GPOINTER_TO_INT(data), buff); return; } void pop_item (GtkWidget *widget, gpointer data) { - gtk_statusbar_pop( GTK_STATUSBAR(status_bar), (guint) &data ); + gtk_statusbar_pop( GTK_STATUSBAR(status_bar), GPOINTER_TO_INT(data) ); return; } @@ -4205,7 +4205,7 @@ int main (int argc, char *argv[]) GtkWidget *vbox; GtkWidget *button; - int context_id; + gint context_id; gtk_init (&argc, &argv); @@ -4228,13 +4228,13 @@ int main (int argc, char *argv[]) button = gtk_button_new_with_label("push item"); gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC (push_item), &context_id); + GTK_SIGNAL_FUNC (push_item), GINT_TO_POINTER(context_id) ); gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, TRUE, 2); gtk_widget_show(button); button = gtk_button_new_with_label("pop last item"); gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC (pop_item), &context_id); + GTK_SIGNAL_FUNC (pop_item), GINT_TO_POINTER(context_id) ); gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, TRUE, 2); gtk_widget_show(button); @@ -4406,14 +4406,14 @@ int main (int argc, char *argv[]) gtk_box_pack_start (GTK_BOX (hbox), check, TRUE, TRUE, 0); gtk_signal_connect (GTK_OBJECT(check), "toggled", GTK_SIGNAL_FUNC(entry_toggle_editable), entry); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(check), TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), TRUE); gtk_widget_show (check); check = gtk_check_button_new_with_label("Visible"); gtk_box_pack_start (GTK_BOX (hbox), check, TRUE, TRUE, 0); gtk_signal_connect (GTK_OBJECT(check), "toggled", GTK_SIGNAL_FUNC(entry_toggle_visibility), entry); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(check), TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), TRUE); gtk_widget_show (check); button = gtk_button_new_with_label ("Close"); @@ -4989,7 +4989,7 @@ int main (int argc, char *argv[]) gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (delete), NULL); - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); table = gtk_table_new(3,6,FALSE); gtk_container_add (GTK_CONTAINER (window), table); @@ -5006,7 +5006,7 @@ int main (int argc, char *argv[]) sprintf(bufferl, "Page %d", i+1); frame = gtk_frame_new (bufferf); - gtk_container_border_width (GTK_CONTAINER (frame), 10); + gtk_container_set_border_width (GTK_CONTAINER (frame), 10); gtk_widget_set_usize (frame, 100, 75); gtk_widget_show (frame); @@ -5032,7 +5032,7 @@ int main (int argc, char *argv[]) sprintf(bufferl, "PPage %d", i+1); frame = gtk_frame_new (bufferf); - gtk_container_border_width (GTK_CONTAINER (frame), 10); + gtk_container_set_border_width (GTK_CONTAINER (frame), 10); gtk_widget_set_usize (frame, 100, 75); gtk_widget_show (frame); @@ -5069,22 +5069,22 @@ int main (int argc, char *argv[]) gtk_widget_show(button); button = gtk_button_new_with_label ("tab position"); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) rotate_book, GTK_OBJECT(notebook)); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc) rotate_book, GTK_OBJECT(notebook)); gtk_table_attach_defaults(GTK_TABLE(table), button, 3,4,1,2); gtk_widget_show(button); button = gtk_button_new_with_label ("tabs/border on/off"); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) tabsborder_book, - GTK_OBJECT (notebook)); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc) tabsborder_book, + GTK_OBJECT (notebook)); gtk_table_attach_defaults(GTK_TABLE(table), button, 4,5,1,2); gtk_widget_show(button); button = gtk_button_new_with_label ("remove page"); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", - (GtkSignalFunc) remove_book, - GTK_OBJECT(notebook)); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + (GtkSignalFunc) remove_book, + GTK_OBJECT(notebook)); gtk_table_attach_defaults(GTK_TABLE(table), button, 5,6,1,2); gtk_widget_show(button); @@ -5175,13 +5175,13 @@ int main (int argc, char *argv[]) gtk_signal_connect (GTK_OBJECT (window), "destroy", (GtkSignalFunc) destroy, NULL); gtk_window_set_title (GTK_WINDOW (window), "GtkScrolledWindow example"); - gtk_container_border_width (GTK_CONTAINER (window), 0); + gtk_container_set_border_width (GTK_CONTAINER (window), 0); gtk_widget_set_usize(window, 300, 300); /* create a new scrolled window. */ scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_container_border_width (GTK_CONTAINER (scrolled_window), 10); + gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 10); /* the policy is one of GTK_POLICY AUTOMATIC, or GTK_POLICY_ALWAYS. * GTK_POLICY_AUTOMATIC will automatically decide whether you need @@ -5422,7 +5422,7 @@ main (int argc, char *argv[]) gtk_window_set_title (GTK_WINDOW (window), "Paned Windows"); gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); gtk_widget_set_usize (GTK_WIDGET(window), 450, 400); /* create a vpaned widget and add it to our toplevel window */ @@ -5684,7 +5684,7 @@ together quite often. * we'll also put it into our handlebox */ toolbar = gtk_toolbar_new ( GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH ); - gtk_container_border_width ( GTK_CONTAINER ( toolbar ) , 5 ); + gtk_container_set_border_width ( GTK_CONTAINER ( toolbar ) , 5 ); gtk_toolbar_set_space_size ( GTK_TOOLBAR ( toolbar ), 5 ); gtk_container_add ( GTK_CONTAINER ( handlebox ) , toolbar ); @@ -5775,7 +5775,7 @@ tutorial). GTK_SIGNAL_FUNC (radio_event), toolbar); gtk_toolbar_append_space ( GTK_TOOLBAR ( toolbar ) ); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(both_button),TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(both_button),TRUE); In the end we have set the state of one of the buttons manually (otherwise @@ -5795,7 +5795,7 @@ they all stay in active state, preventing us from switching between them). GTK_SIGNAL_FUNC (toggle_event), toolbar); gtk_toolbar_append_space ( GTK_TOOLBAR ( toolbar ) ); - gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(tooltips_button),TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tooltips_button),TRUE); A toggle button can be created in the obvious way (if one knows how to create @@ -5941,7 +5941,7 @@ main (int argc, char *argv[]) gtk_window_set_title (GTK_WINDOW (window), "Aspect Frame"); gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); - gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); /* Create an aspect_frame and add it to our toplevel window */ @@ -5971,6 +5971,100 @@ main (int argc, char *argv[]) /* example-end */ + +The EventBox