From 047e9fcf1a71e164ad204381f1df3d89d0a34a81 Mon Sep 17 00:00:00 2001 From: BST 1998 Tony Gale Date: Tue, 2 Jun 1998 12:08:14 +0000 Subject: [PATCH] minor changes to support auto extraction of example code Tue Jun 2 13:04:06 BST 1998 Tony Gale * docs/gtk_tut.sgml: minor changes to support auto extraction of example code --- ChangeLog | 5 ++++ ChangeLog.pre-2-0 | 5 ++++ ChangeLog.pre-2-10 | 5 ++++ ChangeLog.pre-2-2 | 5 ++++ ChangeLog.pre-2-4 | 5 ++++ ChangeLog.pre-2-6 | 5 ++++ ChangeLog.pre-2-8 | 5 ++++ docs/gtk_tut.sgml | 59 ++++++++++++++++++++------------------ docs/tutorial/gtk_tut.sgml | 59 ++++++++++++++++++++------------------ 9 files changed, 97 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcd235c631..4e5a959929 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jun 2 13:04:06 BST 1998 Tony Gale + + * docs/gtk_tut.sgml: minor changes to support auto + extraction of example code + Mon Jun 1 12:47:56 BST 1998 Tony Gale * docs/gtk_tut_it.sgml: Update of Italian Tutorial diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index dcd235c631..4e5a959929 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Tue Jun 2 13:04:06 BST 1998 Tony Gale + + * docs/gtk_tut.sgml: minor changes to support auto + extraction of example code + Mon Jun 1 12:47:56 BST 1998 Tony Gale * docs/gtk_tut_it.sgml: Update of Italian Tutorial diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index dcd235c631..4e5a959929 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Tue Jun 2 13:04:06 BST 1998 Tony Gale + + * docs/gtk_tut.sgml: minor changes to support auto + extraction of example code + Mon Jun 1 12:47:56 BST 1998 Tony Gale * docs/gtk_tut_it.sgml: Update of Italian Tutorial diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index dcd235c631..4e5a959929 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Tue Jun 2 13:04:06 BST 1998 Tony Gale + + * docs/gtk_tut.sgml: minor changes to support auto + extraction of example code + Mon Jun 1 12:47:56 BST 1998 Tony Gale * docs/gtk_tut_it.sgml: Update of Italian Tutorial diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index dcd235c631..4e5a959929 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Tue Jun 2 13:04:06 BST 1998 Tony Gale + + * docs/gtk_tut.sgml: minor changes to support auto + extraction of example code + Mon Jun 1 12:47:56 BST 1998 Tony Gale * docs/gtk_tut_it.sgml: Update of Italian Tutorial diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index dcd235c631..4e5a959929 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Tue Jun 2 13:04:06 BST 1998 Tony Gale + + * docs/gtk_tut.sgml: minor changes to support auto + extraction of example code + Mon Jun 1 12:47:56 BST 1998 Tony Gale * docs/gtk_tut_it.sgml: Update of Italian Tutorial diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index dcd235c631..4e5a959929 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Tue Jun 2 13:04:06 BST 1998 Tony Gale + + * docs/gtk_tut.sgml: minor changes to support auto + extraction of example code + Mon Jun 1 12:47:56 BST 1998 Tony Gale * docs/gtk_tut_it.sgml: Update of Italian Tutorial diff --git a/docs/gtk_tut.sgml b/docs/gtk_tut.sgml index a896d66f43..f5fbd5344e 100644 --- a/docs/gtk_tut.sgml +++ b/docs/gtk_tut.sgml @@ -10,7 +10,7 @@ name="<imain@gtk.org>">, Tony Gale -May 29th, 1998 +June 2nd, 1998 Introduction @@ -159,7 +159,7 @@ OK, now for a program with a widget (a button). It's the classic hello world ala GTK. -/* example-start helloworld/helloworld.c */ +/* example-start helloworld helloworld.c */ #include @@ -756,7 +756,7 @@ of callbacks. This will also introduce us to our next topic, packing widgets. -/* example-start helloworld2/helloworld2.c */ +/* example-start helloworld2 helloworld2.c */ #include @@ -983,7 +983,7 @@ yourself and play with it. Packing Demonstration Program

-/* example-start packbox/packbox.c */ +/* example-start packbox packbox.c */ #include "gtk/gtk.h" @@ -1427,7 +1427,8 @@ ALT="Table Packing Example Image" WIDTH="180" HEIGHT="120"> Here's the source code: -/* example-start table/table.c */ +/* example-start table table.c */ + #include /* our callback. @@ -1736,7 +1737,7 @@ picture and a label in it. I've broken the code to create a box up from the rest so you can use it in your programs. -/* example-start buttons/buttons.c */ +/* example-start buttons buttons.c */ #include @@ -1989,7 +1990,7 @@ same way. The following example creates a radio button group with three buttons. -/* example-start radiobuttons/radiobuttons.c */ +/* example-start radiobuttons radiobuttons.c */ #include #include @@ -2063,6 +2064,7 @@ main(int argc,char *argv[]) gtk_main(); return(0); } +/* example-end */ You can shorten this slightly by using the following syntax, which @@ -2233,7 +2235,7 @@ Here is an example of the progress bar, updated using timeouts. This code also shows you how to reset the Progress Bar. -/* example-start progressbar/progressbar.c */ +/* example-start progressbar progressbar.c */ #include @@ -2543,7 +2545,7 @@ managing. Val is the pixmap created using GDK. The following is an example of using a pixmap in a button. -/* example-start pixmap/pixmap.c */ +/* example-start pixmap pixmap.c */ #include @@ -2655,7 +2657,7 @@ icon. The following example displays a full wheelbarrow image on the desktop. -/* example-start wheelbarrow/wheelbarrow.c */ +/* example-start wheelbarrow wheelbarrow.c */ #include @@ -2826,6 +2828,7 @@ int main (int argc, char *argv[]) return 0; } +/* example-end */ To make the wheelbarrow image sensitive, we could attach the button press @@ -2927,7 +2930,7 @@ vertical ruler spans from 0 to 400 with a mark every 100 pixels. Placement of the drawing area and the rulers are done using a table. -/* example-start rulers/rulers.c */ +/* example-start rulers rulers.c */ #include @@ -3057,7 +3060,7 @@ The following example creates a statusbar and two buttons, one for pushing items onto the statusbar, and one for popping the last item back off. -/* example-start statusbar/statusbar.c */ +/* example-start statusbar statusbar.c */ #include #include @@ -3221,7 +3224,7 @@ changes at all, e.g. for every character entered or removed. The following code is an example of using an Entry widget. -/* example-start entry/entry.c */ +/* example-start entry entry.c */ #include @@ -3413,7 +3416,7 @@ a color selection dialog, and changing the color in the color selection dialog changes the background color. -/* example-start colorsel/colorsel.c */ +/* example-start colorsel colorsel.c */ #include #include @@ -3604,7 +3607,7 @@ selection widget. While in this example the Help button appears on the screen, it does nothing as there is not a signal attached to it. -/* example-start filesel/filesel.c */ +/* example-start filesel filesel.c */ #include @@ -3787,7 +3790,7 @@ and border, remove a page, change pages in both a forward and backward manner, and exit the program. -/* example-start notebooknotebook.c */ +/* example-start notebook notebook.c */ #include @@ -4003,7 +4006,7 @@ Here is a simple example that packs 100 toggle buttons into a scrolled window. I've only commented on the parts that may be new to you. -/* example-start scrolledwin/scrolledwin.c */ +/* example-start scrolledwin scrolledwin.c */ #include @@ -4146,7 +4149,7 @@ that when the bottom portion is made smaller, the correct portions shrink instead of being pushed off the bottom of the window. -/* example-start paned/paned.c */ +/* example-start paned paned.c */ #include @@ -4326,7 +4329,7 @@ present a drawing area whose aspect ratio will always be 2:1, no matter how the user resizes the top-level window. -/* example-start aspectframe/aspectframe.c */ +/* example-start aspectframe aspectframe.c */ #include @@ -4608,7 +4611,7 @@ of the selection of a GtkList, and lets you "arrest" list items into a prison by selecting them with the rightmost mouse button. -/* example-start list/list.c */ +/* example-start list list.c */ /* include the gtk+ header files * include stdio.h, we need that for the printf() function @@ -5196,7 +5199,7 @@ as shown in the sample code. That should about do it. Let's take a look at an example to help clarify. -/* example-start menu/menu.c */ +/* example-start menu menu.c */ #include @@ -5346,7 +5349,7 @@ menufactory.h. We keep a separate menufactory.c and mfmain.c because of the global variables used in the menufactory.c file. -/* example-start menu/menufactory.h */ +/* example-start menu menufactory.h */ #ifndef __MENUFACTORY_H__ #define __MENUFACTORY_H__ @@ -5369,7 +5372,7 @@ void menus_create(GtkMenuEntry *entries, int nmenu_entries); And here is the menufactory.c file. -/* example-start menu/menufactory.c */ +/* example-start menu menufactory.c */ #include #include @@ -5524,7 +5527,7 @@ void menus_set_sensitive(char *path, int sensitive) And here's the mfmain.h -/* example-start menu/mfmain.h */ +/* example-start menu mfmain.h */ #ifndef __MFMAIN_H__ #define __MFMAIN_H__ @@ -5547,7 +5550,7 @@ void file_quit_cmd_callback(GtkWidget *widget, gpointer data); And mfmain.c -/* example-start menu/mfmain.c */ +/* example-start menu mfmain.c */ #include @@ -6365,7 +6368,7 @@ is created that is clipped to a small box, and set up so that a mouse-click on the label causes the program to exit. -/* example-start eventbox/eventbox.c */ +/* example-start eventbox eventbox.c */ #include @@ -6677,7 +6680,7 @@ which is a list of all targets into which the selection can be converted. -/* example-start selection/gettargets.c */ +/* example-start selection gettargets.c */ #include @@ -6847,7 +6850,7 @@ itself), is the "STRING" target. When this target is requested, a string representation of the time is returned. -/* example-start selection/setselection.c */ +/* example-start selection setselection.c */ #include #include diff --git a/docs/tutorial/gtk_tut.sgml b/docs/tutorial/gtk_tut.sgml index a896d66f43..f5fbd5344e 100644 --- a/docs/tutorial/gtk_tut.sgml +++ b/docs/tutorial/gtk_tut.sgml @@ -10,7 +10,7 @@ name="<imain@gtk.org>">, Tony Gale -May 29th, 1998 +June 2nd, 1998 Introduction @@ -159,7 +159,7 @@ OK, now for a program with a widget (a button). It's the classic hello world ala GTK. -/* example-start helloworld/helloworld.c */ +/* example-start helloworld helloworld.c */ #include @@ -756,7 +756,7 @@ of callbacks. This will also introduce us to our next topic, packing widgets. -/* example-start helloworld2/helloworld2.c */ +/* example-start helloworld2 helloworld2.c */ #include @@ -983,7 +983,7 @@ yourself and play with it. Packing Demonstration Program

-/* example-start packbox/packbox.c */ +/* example-start packbox packbox.c */ #include "gtk/gtk.h" @@ -1427,7 +1427,8 @@ ALT="Table Packing Example Image" WIDTH="180" HEIGHT="120"> Here's the source code: -/* example-start table/table.c */ +/* example-start table table.c */ + #include /* our callback. @@ -1736,7 +1737,7 @@ picture and a label in it. I've broken the code to create a box up from the rest so you can use it in your programs. -/* example-start buttons/buttons.c */ +/* example-start buttons buttons.c */ #include @@ -1989,7 +1990,7 @@ same way. The following example creates a radio button group with three buttons. -/* example-start radiobuttons/radiobuttons.c */ +/* example-start radiobuttons radiobuttons.c */ #include #include @@ -2063,6 +2064,7 @@ main(int argc,char *argv[]) gtk_main(); return(0); } +/* example-end */ You can shorten this slightly by using the following syntax, which @@ -2233,7 +2235,7 @@ Here is an example of the progress bar, updated using timeouts. This code also shows you how to reset the Progress Bar. -/* example-start progressbar/progressbar.c */ +/* example-start progressbar progressbar.c */ #include @@ -2543,7 +2545,7 @@ managing. Val is the pixmap created using GDK. The following is an example of using a pixmap in a button. -/* example-start pixmap/pixmap.c */ +/* example-start pixmap pixmap.c */ #include @@ -2655,7 +2657,7 @@ icon. The following example displays a full wheelbarrow image on the desktop. -/* example-start wheelbarrow/wheelbarrow.c */ +/* example-start wheelbarrow wheelbarrow.c */ #include @@ -2826,6 +2828,7 @@ int main (int argc, char *argv[]) return 0; } +/* example-end */ To make the wheelbarrow image sensitive, we could attach the button press @@ -2927,7 +2930,7 @@ vertical ruler spans from 0 to 400 with a mark every 100 pixels. Placement of the drawing area and the rulers are done using a table. -/* example-start rulers/rulers.c */ +/* example-start rulers rulers.c */ #include @@ -3057,7 +3060,7 @@ The following example creates a statusbar and two buttons, one for pushing items onto the statusbar, and one for popping the last item back off. -/* example-start statusbar/statusbar.c */ +/* example-start statusbar statusbar.c */ #include #include @@ -3221,7 +3224,7 @@ changes at all, e.g. for every character entered or removed. The following code is an example of using an Entry widget. -/* example-start entry/entry.c */ +/* example-start entry entry.c */ #include @@ -3413,7 +3416,7 @@ a color selection dialog, and changing the color in the color selection dialog changes the background color. -/* example-start colorsel/colorsel.c */ +/* example-start colorsel colorsel.c */ #include #include @@ -3604,7 +3607,7 @@ selection widget. While in this example the Help button appears on the screen, it does nothing as there is not a signal attached to it. -/* example-start filesel/filesel.c */ +/* example-start filesel filesel.c */ #include @@ -3787,7 +3790,7 @@ and border, remove a page, change pages in both a forward and backward manner, and exit the program. -/* example-start notebooknotebook.c */ +/* example-start notebook notebook.c */ #include @@ -4003,7 +4006,7 @@ Here is a simple example that packs 100 toggle buttons into a scrolled window. I've only commented on the parts that may be new to you. -/* example-start scrolledwin/scrolledwin.c */ +/* example-start scrolledwin scrolledwin.c */ #include @@ -4146,7 +4149,7 @@ that when the bottom portion is made smaller, the correct portions shrink instead of being pushed off the bottom of the window. -/* example-start paned/paned.c */ +/* example-start paned paned.c */ #include @@ -4326,7 +4329,7 @@ present a drawing area whose aspect ratio will always be 2:1, no matter how the user resizes the top-level window. -/* example-start aspectframe/aspectframe.c */ +/* example-start aspectframe aspectframe.c */ #include @@ -4608,7 +4611,7 @@ of the selection of a GtkList, and lets you "arrest" list items into a prison by selecting them with the rightmost mouse button. -/* example-start list/list.c */ +/* example-start list list.c */ /* include the gtk+ header files * include stdio.h, we need that for the printf() function @@ -5196,7 +5199,7 @@ as shown in the sample code. That should about do it. Let's take a look at an example to help clarify. -/* example-start menu/menu.c */ +/* example-start menu menu.c */ #include @@ -5346,7 +5349,7 @@ menufactory.h. We keep a separate menufactory.c and mfmain.c because of the global variables used in the menufactory.c file. -/* example-start menu/menufactory.h */ +/* example-start menu menufactory.h */ #ifndef __MENUFACTORY_H__ #define __MENUFACTORY_H__ @@ -5369,7 +5372,7 @@ void menus_create(GtkMenuEntry *entries, int nmenu_entries); And here is the menufactory.c file. -/* example-start menu/menufactory.c */ +/* example-start menu menufactory.c */ #include #include @@ -5524,7 +5527,7 @@ void menus_set_sensitive(char *path, int sensitive) And here's the mfmain.h -/* example-start menu/mfmain.h */ +/* example-start menu mfmain.h */ #ifndef __MFMAIN_H__ #define __MFMAIN_H__ @@ -5547,7 +5550,7 @@ void file_quit_cmd_callback(GtkWidget *widget, gpointer data); And mfmain.c -/* example-start menu/mfmain.c */ +/* example-start menu mfmain.c */ #include @@ -6365,7 +6368,7 @@ is created that is clipped to a small box, and set up so that a mouse-click on the label causes the program to exit. -/* example-start eventbox/eventbox.c */ +/* example-start eventbox eventbox.c */ #include @@ -6677,7 +6680,7 @@ which is a list of all targets into which the selection can be converted. -/* example-start selection/gettargets.c */ +/* example-start selection gettargets.c */ #include @@ -6847,7 +6850,7 @@ itself), is the "STRING" target. When this target is requested, a string representation of the time is returned. -/* example-start selection/setselection.c */ +/* example-start selection setselection.c */ #include #include