Commit 21ac424e authored by Matthias Clasen's avatar Matthias Clasen
Browse files

rearrange rules to not emit the example start and end markers.

	* examples/extract.awk: rearrange rules to not emit the example
	start and end markers.

	* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
	SGML comments, so they don't clutter the formatted tutorial.
parent e07fabae
2002-02-16 Matthias Clasen <matthias@YAST_ASK>
* examples/extract.awk: rearrange rules to not emit the example
start and end markers.
* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
SGML comments, so they don't clutter the formatted tutorial.
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
......
2002-02-16 Matthias Clasen <matthias@YAST_ASK>
* examples/extract.awk: rearrange rules to not emit the example
start and end markers.
* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
SGML comments, so they don't clutter the formatted tutorial.
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
......
2002-02-16 Matthias Clasen <matthias@YAST_ASK>
* examples/extract.awk: rearrange rules to not emit the example
start and end markers.
* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
SGML comments, so they don't clutter the formatted tutorial.
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
......
2002-02-16 Matthias Clasen <matthias@YAST_ASK>
* examples/extract.awk: rearrange rules to not emit the example
start and end markers.
* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
SGML comments, so they don't clutter the formatted tutorial.
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
......
2002-02-16 Matthias Clasen <matthias@YAST_ASK>
* examples/extract.awk: rearrange rules to not emit the example
start and end markers.
* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
SGML comments, so they don't clutter the formatted tutorial.
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
......
2002-02-16 Matthias Clasen <matthias@YAST_ASK>
* examples/extract.awk: rearrange rules to not emit the example
start and end markers.
* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
SGML comments, so they don't clutter the formatted tutorial.
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
......
2002-02-16 Matthias Clasen <matthias@YAST_ASK>
* examples/extract.awk: rearrange rules to not emit the example
start and end markers.
* docs/tutorial/gtk-tut.sgml: turn the start and end markers into
SGML comments, so they don't clutter the formatted tutorial.
2002-02-16 Havoc Pennington <hp@pobox.com>
* gtk/gtkwindow.c (gtk_window_parse_geometry): take
......
......@@ -130,7 +130,7 @@ program possible. This program will create a 200x200 pixel window and
has no way of exiting except to be killed by using the shell.</para>
<programlisting role="C">
/* example-start base base.c */
<!-- example-start base base.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -148,7 +148,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>You can compile the above program with gcc using:</para>
......@@ -240,7 +240,7 @@ occur. In our simple example, however, events are ignored.</para>
hello world a la GTK.</para>
<programlisting role="C">
/* example-start helloworld helloworld.c */
<!-- example-start helloworld helloworld.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -340,7 +340,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -955,7 +955,7 @@ better examples of callbacks. This will also introduce us to our next
topic, packing widgets.</para>
<programlisting role="C">
/* example-start helloworld2 helloworld2.c */
<!-- example-start helloworld2 helloworld2.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -1050,7 +1050,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>Compile this program using the same linking arguments as our first
......@@ -1201,7 +1201,7 @@ it. Compile it yourself and play with it.</para>
<title>Packing Demonstration Program</title>
<programlisting role="C">
/* example-start packbox packbox.c */
<!-- example-start packbox packbox.c -->
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
......@@ -1493,7 +1493,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -1668,7 +1668,7 @@ Which means it should look something like this:</para>
<para>Here's the source code:</para>
<programlisting role="C">
/* example-start table table.c */
<!-- example-start table table.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -1766,7 +1766,7 @@ int main( int argc,
return 0;
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -2017,7 +2017,7 @@ from the rest so you can use it in your programs. There are further
examples of using pixmaps later in the tutorial.</para>
<programlisting role="C">
/* example-start buttons buttons.c */
<!-- example-start buttons buttons.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -2123,7 +2123,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>The xpm_label_box function could be used to pack xpm's and labels into
......@@ -2332,7 +2332,7 @@ the second will emit its "toggled" signal (to report becoming active).</para>
<para>The following example creates a radio button group with three buttons.</para>
<programlisting role="C">
/* example-start radiobuttons radiobuttons.c */
<!-- example-start radiobuttons radiobuttons.c -->
#include &lt;gtk/gtk.h&gt;
#include &lt;glib.h&gt;
......@@ -2414,7 +2414,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<!-- TODO: check out gtk_radio_button_new_from_widget function - TRG -->
......@@ -2959,7 +2959,7 @@ the section on adjustments, so you can see how they affect the way
these widgets work for the user.</para>
<programlisting role="C">
/* example-start rangewidgets rangewidgets.c */
<!-- example-start rangewidgets rangewidgets.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -3249,7 +3249,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>You will notice that the program does not call <literal>gtk_signal_connect</literal>
......@@ -3351,7 +3351,7 @@ makes use of the Frame widget to better demonstrate the label
styles. You can ignore this for now as the <link linkend="sec-Frames">Frame</link> widget is explained later on.</para>
<programlisting role="C">
/* example-start label label.c */
<!-- example-start label label.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -3452,7 +3452,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -3502,7 +3502,7 @@ point. The <literal>shadow_type</literal> argument may take one of these values:
<para>Here's a brief example to illustrate their use.</para>
<programlisting role="C">
/* example-start arrow arrow.c */
<!-- example-start arrow arrow.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -3575,7 +3575,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -3889,7 +3889,7 @@ gtk_progress_bar_update function in the same manner.</para>
code also shows you how to reset the Progress Bar.</para>
<programlisting role="C">
/* example-start progressbar progressbar.c */
<!-- example-start progressbar progressbar.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -4109,7 +4109,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -4329,7 +4329,7 @@ managing. Val is the pixmap created using GDK.</para>
<para>The following is an example of using a pixmap in a button.</para>
<programlisting role="C">
/* example-start pixmap pixmap.c */
<!-- example-start pixmap pixmap.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -4418,7 +4418,7 @@ int main( int argc,
return 0;
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>To load a file from an XPM data file called icon0.xpm in the current
......@@ -4447,7 +4447,7 @@ icon. The following example displays a full wheelbarrow image on the
desktop.</para>
<programlisting role="C">
/* example-start wheelbarrow wheelbarrow.c */
<!-- example-start wheelbarrow wheelbarrow.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -4622,7 +4622,7 @@ int main (int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>To make the wheelbarrow image sensitive, we could attach the button
......@@ -4728,7 +4728,7 @@ vertical ruler spans from 0 to 400 with a mark every 100 pixels.
Placement of the drawing area and the rulers is done using a table.</para>
<programlisting role="C">
/* example-start rulers rulers.c */
<!-- example-start rulers rulers.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -4806,7 +4806,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -4868,7 +4868,7 @@ pushing items onto the statusbar, and one for popping the last item
back off.</para>
<programlisting role="C">
/* example-start statusbar statusbar.c */
<!-- example-start statusbar statusbar.c -->
#include &lt;gtk/gtk.h&gt;
#include &lt;glib.h&gt;
......@@ -4944,7 +4944,7 @@ int main( int argc,
return 0;
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -5044,7 +5044,7 @@ removed.</para>
<para>The following code is an example of using an Entry widget.</para>
<programlisting role="C">
/* example-start entry entry.c */
<!-- example-start entry entry.c -->
#include &lt;stdio.h&gt;
#include &lt;gtk/gtk.h&gt;
......@@ -5137,7 +5137,7 @@ int main( int argc,
gtk_main();
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -5382,7 +5382,7 @@ void gtk_spin_button_update( GtkSpinButton *spin_button );
<para>It's example time again.</para>
<programlisting role="C">
/* example-start spinbutton spinbutton.c */
<!-- example-start spinbutton spinbutton.c -->
#include &lt;stdio.h&gt;
#include &lt;gtk/gtk.h&gt;
......@@ -5602,7 +5602,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -5941,7 +5941,7 @@ and are:</para>
example code.</para>
<programlisting role="C">
/* example-start calendar calendar.c */
<!-- example-start calendar calendar.c -->
/*
* Copyright (C) 1998 Cesar Miquel, Shawn T. Amundson, Mattias Grönlund
* Copyright (C) 2000 Tony Gale
......@@ -6362,7 +6362,7 @@ int main(int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -6475,7 +6475,7 @@ changing the color in the color selection dialog changes the
background color.</para>
<programlisting role="C">
/* example-start colorsel colorsel.c */
<!-- example-start colorsel colorsel.c -->
#include &lt;glib.h&gt;
#include &lt;gdk/gdk.h&gt;
......@@ -6618,7 +6618,7 @@ gint main( gint argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -6675,7 +6675,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.</para>
<programlisting role="C">
/* example-start filesel filesel.c */
<!-- example-start filesel filesel.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -6723,7 +6723,7 @@ int main( int argc,
gtk_main ();
return 0;
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -6772,7 +6772,7 @@ mouse-click on the label causes the program to exit. Resizing the
window reveals varying amounts of the label.</para>
<programlisting role="C">
/* example-start eventbox eventbox.c */
<!-- example-start eventbox eventbox.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -6825,7 +6825,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -6911,7 +6911,7 @@ position.</para>
<para>The following example illustrates how to use the Fixed Container.</para>
<programlisting role="C">
/* example-start fixed fixed.c */
<!-- example-start fixed fixed.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -6984,7 +6984,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -7124,7 +7124,7 @@ void gtk_frame_set_shadow_type( GtkFrame *frame,
<para>The following code example illustrates the use of the Frame widget.</para>
<programlisting role="C">
/* example-start frame frame.c */
<!-- example-start frame frame.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -7175,7 +7175,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -7222,7 +7222,7 @@ drawing area whose aspect ratio will always be 2:1, no matter how the
user resizes the top-level window.</para>
<programlisting role="C">
/* example-start aspectframe aspectframe.c */
<!-- example-start aspectframe aspectframe.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -7265,7 +7265,7 @@ int main( int argc,
gtk_main ();
return 0;
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -7316,7 +7316,7 @@ correct portions shrink instead of being pushed off the bottom of the
window.</para>
<programlisting role="C">
/* example-start paned paned.c */
<!-- example-start paned paned.c -->
#define GTK_ENABLE_BROKEN
#include &lt;stdio.h&gt;
......@@ -7454,7 +7454,7 @@ int main( int argc,
gtk_main ();
return 0;
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -7566,7 +7566,7 @@ into a scrolled window. I've only commented on the parts that may be
new to you.</para>
<programlisting role="C">
/* example-start scrolledwin scrolledwin.c */
<!-- example-start scrolledwin scrolledwin.c -->
#include &lt;stdio.h&gt;
#include &lt;gtk/gtk.h&gt;
......@@ -7660,7 +7660,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>Try playing with resizing the window. You'll notice how the scrollbars
......@@ -7738,7 +7738,7 @@ GtkButtonBoxStyle gtk_vbutton_box_get_layout_default( void );
for Button Boxes.</para>
<programlisting role="C">
/* example-start buttonbox buttonbox.c */
<!-- example-start buttonbox buttonbox.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -7859,7 +7859,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -8454,7 +8454,7 @@ the tabs and border, remove a page, change pages in both a forward and
backward manner, and exit the program.</para>
<programlisting role="C">
/* example-start notebook notebook.c */
<!-- example-start notebook notebook.c -->
#include &lt;stdio.h&gt;
#include &lt;gtk/gtk.h&gt;
......@@ -8630,7 +8630,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>I hope this helps you on your way with creating notebooks for your
......@@ -9214,7 +9214,7 @@ gtk_signal_connect(GTK_OBJECT( clist),
<title>A CList example</title>
<programlisting role="C">
/* example-start clist clist.c */
<!-- example-start clist clist.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -9387,7 +9387,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -10298,7 +10298,7 @@ tree, and connects all the signals for the relevant objects, so you
can see when they are emitted.</para>
<programlisting role="C">
/* example-start tree tree.c */
<!-- example-start tree tree.c -->
#define GTK_ENABLE_BROKEN
#include &lt;gtk/gtk.h&gt;
......@@ -10480,7 +10480,7 @@ int main( int argc,
gtk_main();
return 0;
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -10732,7 +10732,7 @@ by a menu bar, as shown in the sample code.</simpara>
<para>That should about do it. Let's take a look at an example to help clarify.</para>
<programlisting role="C">
/* example-start menu menu.c */
<!-- example-start menu menu.c -->
#include &lt;stdio.h&gt;
#include &lt;gtk/gtk.h&gt;
......@@ -10865,7 +10865,7 @@ static void menuitem_response( gchar *string )
{
printf ("%s\n", string);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>You may also set a menu item to be insensitive and, using an accelerator
......@@ -10889,7 +10889,7 @@ gtk_item_factory calls.</para>
<para>Here is an example using the GTK item factory.</para>
<programlisting role="C">
/* example-start menu itemfactory.c */
<!-- example-start menu itemfactory.c -->
#include &lt;gtk/gtk.h&gt;
#include &lt;strings.h&gt;
......@@ -11002,7 +11002,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
<para>For now, there's only this example. An explanation and lots 'o' comments
......@@ -11284,7 +11284,7 @@ extend the selection.</para>
<title>A GtkText Example</title>
<programlisting role="C">
/* example-start text text.c */
<!-- example-start text text.c -->
/* text.c */
......@@ -11468,7 +11468,7 @@ int main( int argc,
return(0);
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -12462,7 +12462,7 @@ which is a list of all targets into which the selection can be
converted.</para>
<programlisting role="C">
/* example-start selection gettargets.c */
<!-- example-start selection gettargets.c -->
#include &lt;gtk/gtk.h&gt;
......@@ -12558,7 +12558,7 @@ int main( int argc,
return 0;
}
/* example-end */
<!-- example-end -->
</programlisting>
</sect1>
......@@ -12631,7 +12631,7 @@ itself), is the "STRING" target. When this target is requested, a
string representation of the time is returned.</para>
<programlisting role="C">
/* example-start selection setselection.c */
<!-- example-start selection setselection.c -->
#include &lt;gtk/gtk.h&gt;
#include &lt;time.h&gt;
......<