Commit fc4a6b95 authored by Matthias Clasen's avatar Matthias Clasen

Markup fixes.


        * gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.

        * gdk-pixbuf-io.c: Markup fixes.

        * gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
        gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
        gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
        gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
        gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
        gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
        gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
        gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
        gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
        gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
        gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
        gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
        gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
        gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
        gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
        gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
        gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
parent fe655f39
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
......
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
......
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
......
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
......
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
......
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
......
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
......
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-12 Matthias Clasen <matthiasc@poet.de>
* gtk/tmpl/gtklist.sgml: Markup fixes.
......
......@@ -34,6 +34,8 @@ Scaling pixbufs and scaling and compositing pixbufs
as calling gdk_pixbuf_scale().
</para>
<example>
<title>Handling an expose event.</title>
<programlisting>
gboolean
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
......@@ -62,10 +64,11 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
return TRUE;
}
</programlisting>
</example>
<!-- ##### SECTION See_Also ##### -->
<para>
GdkRGB
<link linkend="gdk-GdkRGB">GdkRGB</link>.
</para>
<!-- ##### ENUM GdkInterpType ##### -->
......
......@@ -22,10 +22,9 @@ X reference documentation. A X Logical Font Description (XLFD)
consists of a sequence of fields separated (and surrounded by) '-'
characters. For example, Adobe Helvetica Bold 12 pt, has the
full description:
<programlisting>
<informalexample><programlisting>
"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"
</programlisting>
</programlisting></informalexample>
</para>
<para>
......@@ -122,10 +121,9 @@ When specifying a font via a X logical Font Description,
'*' can be used as a wildcard to match any portion of
the XLFD. For instance, the above example could
also be specified as
<programlisting>
<informalexample><programlisting>
"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
</programlisting>
</programlisting></informalexample>
It is generally a good idea to use wildcards for any
portion of the XLFD that your program does not care
......
......@@ -92,7 +92,7 @@ set on all X windows created by the application to point to the leader window.
See the X Session Management Library documentation for more information on
session management and the Inter-Client Communication Conventions Manual
(ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property.
(Both documents are part of the X Windows distribution.)
(Both documents are part of the X Window System distribution.)
</para>
@sm_client_id: the client id assigned by the session manager when the
......@@ -104,7 +104,7 @@ connection was opened, or %NULL to remove the property.
Exits the application using the <function>exit()</function> system call.
</para>
<para>
This routine is provided mainly for backwards compatability, since it used to
This routine is provided mainly for backwards compatibility, since it used to
perform tasks necessary to exit the application cleanly. Those tasks are now
performed in a function which is automatically called on exit (via the use
of g_atexit()).
......@@ -346,14 +346,14 @@ avoid the X error in any other way.
<example>
<title>Trapping an X error.</title>
<programlisting>
gdk_error_trap_push ();
gdk_error_trap_push (<!>);
/* ... Call the X function which may cause an error here ... */
/* Flush the X queue to catch errors now. */
gdk_flush ();
gdk_flush (<!>);
if (gdk_error_trap_pop ())
if (gdk_error_trap_pop (<!>))
{
/* ... Handle the error here ... */
}
......
......@@ -59,7 +59,7 @@ Calculates the intersection of two rectangles.
@src1: a #GdkRectangle.
@src2: a #GdkRectangle.
@dest: the intersection of @src1 and @src2.
@Returns: TRUE if the rectangles intersect.
@Returns: %TRUE if the rectangles intersect.
<!-- ##### FUNCTION gdk_rectangle_union ##### -->
......@@ -161,32 +161,32 @@ Returns the smallest rectangle which includes the entire #GdkRegion.
<!-- ##### FUNCTION gdk_region_empty ##### -->
<para>
Returns TRUE if the #GdkRegion is empty.
Returns %TRUE if the #GdkRegion is empty.
</para>
@region: a #GdkRegion.
@Returns: TRUE if @region is empty.
@Returns: %TRUE if @region is empty.
<!-- ##### FUNCTION gdk_region_equal ##### -->
<para>
Returns TRUE if the two regions are the same.
Returns %TRUE if the two regions are the same.
</para>
@region1: a #GdkRegion.
@region2: a #GdkRegion.
@Returns: TRUE if @region1 and @region2 are equal.
@Returns: %TRUE if @region1 and @region2 are equal.
<!-- ##### FUNCTION gdk_region_point_in ##### -->
<para>
Returns TRUE if a point is in a region.
Returns %TRUE if a point is in a region.
</para>
@region: a #GdkRegion.
@x: the x coordinate of a point.
@y: the y coordinate of a point.
@Returns: TRUE if the point is in @region.
@Returns: %TRUE if the point is in @region.
<!-- ##### FUNCTION gdk_region_rect_in ##### -->
......@@ -196,8 +196,8 @@ Tests whether a rectangle is within a region.
@region: a #GdkRegion.
@rect: a #GdkRectangle.
@Returns: GDK_OVERLAP_RECTANGLE_IN, GDK_OVERLAP_RECTANGLE_OUT, or
GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
@Returns: %GDK_OVERLAP_RECTANGLE_IN, %GDK_OVERLAP_RECTANGLE_OUT, or
%GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
outside, or partly inside the #GdkRegion, respectively.
......
......@@ -7,7 +7,7 @@ renders RGB, grayscale, or indexed image data to a #GdkDrawable
<!-- ##### SECTION Long_Description ##### -->
<para>
GdkRgb is a low-level module which renders RGB, grayscale, and indexed
GdkRGB is a low-level module which renders RGB, grayscale, and indexed
colormap images to a #GdkDrawable. It does this as efficiently as
possible, handling issues such as colormaps, visuals, dithering,
temporary buffers, and so on. Most code should use the higher-level
......@@ -20,14 +20,15 @@ GdkRGB allocates a color cube to use when rendering images. You can
set the threshold for installing colormaps with
gdk_rgb_set_min_colors(). The default is 5x5x5 (125). If a colorcube
of this size or larger can be allocated in the default colormap, then
that's done. Otherwise, GdkRgb creates its own private colormap.
that's done. Otherwise, GdkRGB creates its own private colormap.
Setting it to 0 means that it always tries to use the default
colormap, and setting it to 216 means that it always creates a private
one if it cannot allocate the 6x6x6 colormap in the default. If you
always want a private colormap (to avoid consuming too many colormap
entries for other apps, say), you can use gdk_rgb_set_install(TRUE).
entries for other apps, say), you can use
<literal>gdk_rgb_set_install(TRUE)</literal>.
Setting the value greater than 216 exercises a bug in older versions
of GdkRgb. Note, however, that setting it to 0 doesn't let you get
of GdkRGB. Note, however, that setting it to 0 doesn't let you get
away with ignoring the colormap and visual - a colormap is always
created in grayscale and direct color modes, and the visual is changed
in cases where a "better" visual than the default is available.
......@@ -57,7 +58,7 @@ main (int argc, char *argv[])
gtk_init (&amp;argc, &amp;argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
darea = gtk_drawing_area_new ();
darea = gtk_drawing_area_new (<!>);
gtk_widget_set_size_request (darea, IMAGE_WIDTH, IMAGE_HEIGHT);
gtk_container_add (GTK_CONTAINER (window), darea);
gtk_signal_connect (GTK_OBJECT (darea), "expose-event",
......@@ -76,7 +77,7 @@ main (int argc, char *argv[])
}
}
gtk_main ();
gtk_main (<!>);
return 0;
}
......@@ -99,7 +100,7 @@ on_darea_expose (GtkWidget *widget,
<varlistentry>
<term>#GdkColor</term>
<listitem><para>The underlying Gdk mechanism for allocating
<listitem><para>The underlying GDK mechanism for allocating
colors.</para></listitem>
</varlistentry>
......@@ -122,7 +123,7 @@ This function no longer does anything at all. It's completely useless
<!-- ##### FUNCTION gdk_draw_rgb_image ##### -->
<para>
Draws an RGB image in the drawable. This is the core GdkRgb
Draws an RGB image in the drawable. This is the core GdkRGB
function, and likely the only one you will need to use.
</para>
......@@ -143,7 +144,7 @@ the pixel (x + i, y + j) is colored with red value @rgb_buf[@j *
</para>
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
@gc: The graphics context (all Gdk drawing operations require one; its
@gc: The graphics context (all GDK drawing operations require one; its
contents are ignored).
@x: The x coordinate of the top-left corner in the drawable.
@y: The y coordinate of the top-left corner in the drawable.
......@@ -271,8 +272,7 @@ start of the next.
<!-- ##### ENUM GdkRgbDither ##### -->
<para>
Selects whether or not GdkRgb applies dithering
Selects whether or not GdkRGB applies dithering
to the image on display. There are three values:
</para>
......@@ -300,7 +300,7 @@ only.
</itemizedlist>
<para>
Since GdkRgb currently only handles images with 8 bits per component,
Since GdkRGB currently only handles images with 8 bits per component,
dithering on 24 bit per pixel displays is a moot point.
</para>
......@@ -380,9 +380,9 @@ a #GdkColor struct.
<!-- ##### FUNCTION gdk_rgb_set_install ##### -->
<para>
If @install is TRUE, directs GdkRgb to always install a new "private"
If @install is %TRUE, directs GdkRGB to always install a new "private"
colormap rather than trying to find a best fit with the colors already
allocated. Ordinarily, GdkRgb will install a colormap only if a
allocated. Ordinarily, GdkRGB will install a colormap only if a
sufficient cube cannot be allocated.
</para>
......@@ -391,13 +391,13 @@ A private colormap has more colors, leading to better quality display,
but also leads to the dreaded "colormap flashing" effect.
</para>
@install: TRUE to set install mode.
@install: %TRUE to set install mode.
<!-- ##### FUNCTION gdk_rgb_set_min_colors ##### -->
<para>
Sets the minimum number of colors for the color cube. Generally,
GdkRgb tries to allocate the largest color cube it can. If it can't
GdkRGB tries to allocate the largest color cube it can. If it can't
allocate a color cube at least as large as @min_colors, it installs a
private colormap.
</para>
......@@ -407,14 +407,14 @@ private colormap.
<!-- ##### FUNCTION gdk_rgb_get_visual ##### -->
<para>
Gets a "preferred visual" chosen by GdkRgb. In previous versions of
GDK, this was the only visual GdkRgb could use for rendering. In
current versions, it's simply the visual GdkRgb would have chosen as
the optimal one in those previous versions. GdkRgb can now render to
Gets a "preferred visual" chosen by GdkRGB. In previous versions of
GDK, this was the only visual GdkRGB could use for rendering. In
current versions, it's simply the visual GdkRGB would have chosen as
the optimal one in those previous versions. GdkRGB can now render to
drawables with any visual.
</para>
@Returns: The #GdkVisual chosen by GdkRgb.
@Returns: The #GdkVisual chosen by GdkRGB.
<!-- ##### FUNCTION gdk_rgb_get_colormap ##### -->
......@@ -427,22 +427,22 @@ drawables with any visual.
<!-- ##### MACRO gdk_rgb_get_cmap ##### -->
<para>
Gets the colormap set by GdkRgb. This colormap and the corresponding
visual should be used when creating windows that will be drawn in by GdkRgb.
Gets the colormap set by GdkRGB. This colormap and the corresponding
visual should be used when creating windows that will be drawn in by GdkRGB.
</para>
@Returns: The #GdkColormap set by GdkRgb.
@Returns: The #GdkColormap set by GdkRGB.
<!-- ##### FUNCTION gdk_rgb_ditherable ##### -->
<para>
Determine whether the visual is ditherable. This function may be
Determines whether the visual is ditherable. This function may be
useful for presenting a user interface choice to the user about which
dither mode is desired; if the display is not ditherable, it may make
sense to gray out or hide the corresponding UI widget.
</para>
@Returns: TRUE if the visual is ditherable.
@Returns: %TRUE if the visual is ditherable.
<!-- ##### FUNCTION gdk_rgb_set_verbose ##### -->
......@@ -450,6 +450,6 @@ sense to gray out or hide the corresponding UI widget.
Sets the "verbose" flag. This is generally only useful for debugging.
</para>
@verbose: TRUE if verbose messages are desired.
@verbose: %TRUE if verbose messages are desired.
......@@ -57,7 +57,7 @@ The <type>GdkVisual</type> structure contains information about
a particular visual.
</para>
<figure float="1" id="rgbmask">
<example id="rgbmask">
<title>Constructing a pixel value from components</title>
<programlisting>
guint
......@@ -69,7 +69,7 @@ pixel_from_rgb (GdkVisual *visual,
((r >> (16 - visual->blue_prec)) << visual->blue_shift);
}
</programlisting>
</figure>
</example>
@parent_instance: inherited portion from #GObject
@type: The type of this visual.
......
......@@ -111,7 +111,7 @@ the "character grid" will be allowed.
<para>
Here's an example of how the terminal example would be implemented, assuming
a terminal area widget called "terminal" and a toplevel window "toplevel":
<programlisting>
<informalexample><programlisting>
GdkGeometry hints;
hints.base_width = terminal->char_width;
......@@ -127,7 +127,7 @@ a terminal area widget called "terminal" and a toplevel window "toplevel":
GDK_HINT_RESIZE_INC |
GDK_HINT_MIN_SIZE |
GDK_HINT_BASE_SIZE);
</programlisting>
</programlisting></informalexample>
</para>
<para>
......
......@@ -3,7 +3,6 @@
<!entity % local.notation.class "| PNG">
<!entity hash "#">
<!entity empty "">
<!entity GtkAccelLabel SYSTEM "sgml/gtkaccellabel.sgml">
<!entity GtkAdjustment SYSTEM "sgml/gtkadjustment.sgml">
<!entity GtkAlignment SYSTEM "sgml/gtkalignment.sgml">
......
......@@ -43,7 +43,7 @@ though it is almost always used to display just one accelerator key.
GtkAccelGroup *accel_group;
/* Create a #GtkAccelGroup and add it to the window. */
accel_group = gtk_accel_group_new ();
accel_group = gtk_accel_group_new (<!>);
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
/* Create the menu item using the convenience function. */
......@@ -51,9 +51,9 @@ though it is almost always used to display just one accelerator key.
gtk_widget_show (save_item);
gtk_container_add (GTK_CONTAINER (menu), save_item);
/* Now add the accelerator to the #GtkMenuItem. Note that since we called
gtk_menu_item_new_with_label() to create the #GtkMenuItem the
#GtkAccelLabel is automatically set up to display the #GtkMenuItem
/* Now add the accelerator to the GtkMenuItem. Note that since we called
gtk_menu_item_new_with_label(<!>) to create the GtkMenuItem the
GtkAccelLabel is automatically set up to display the GtkMenuItem
accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. */
gtk_widget_add_accelerator (save_item, "activate", accel_group,
GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
......
......@@ -34,7 +34,8 @@ the entry field to the last or first item in the list, respectively.
</para>
<example id="gtkcombo-simple-example">
<title>Creating a #GtkCombo widget with simple text items.</title>
<title>Creating a <structname>GtkCombo</structname> widget with simple text
items.</title>
<programlisting>
GtkWidget *combo;
GList *items = NULL;
......@@ -45,19 +46,19 @@ the entry field to the last or first item in the list, respectively.
items = g_list_append (items, "Fourth Item");
items = g_list_append (items, "Fifth Item");
combo = gtk_combo_new ();
combo = gtk_combo_new (<!>);
gtk_combo_set_popdown_strings (GTK_COMBO (combo), items);
</programlisting>
</example>
<example>
<title>Creating a #GtkCombo widget with a complex item.</title>
<title>Creating a <structname>GtkCombo</structname> widget with a complex item.</title>
<programlisting>
GtkWidget *combo, *item, *hbox, *arrow, *label;
combo = gtk_combo_new ();
combo = gtk_combo_new (<!>);
item = gtk_list_item_new ();
item = gtk_list_item_new (<!>);
gtk_widget_show (item);
/* You can put almost anything into the GtkListItem widget. Here we will use
......
......@@ -14,7 +14,7 @@ require extensive effort on the user's part.
</para>
<para>
Gtk+ treats a dialog as a window split vertically. The top section is a
GTK+ treats a dialog as a window split vertically. The top section is a
#GtkVBox, and is where widgets such as a #GtkLabel or a #GtkEntry should
be packed. The bottom area is known as the
<structfield>action_area</structfield>. This is generally used for
......@@ -31,7 +31,8 @@ buttons.
<para>
If 'dialog' is a newly created dialog, the two primary areas of the window
can be accessed as GTK_DIALOG(dialog)->vbox and GTK_DIALOG(dialog)->action_area,
can be accessed as <literal>GTK_DIALOG(dialog)->vbox</literal> and
<literal>GTK_DIALOG(dialog)->action_area</literal>,
as can be seen from the example, below.
</para>
......@@ -40,7 +41,7 @@ A 'modal' dialog (that is, one which freezes the rest of the application from
user input), can be created by calling gtk_window_set_modal() on the dialog. Use
the GTK_WINDOW() macro to cast the widget returned from gtk_dialog_new() into a
#GtkWindow. When using gtk_dialog_new_with_buttons() you can also pass the
GTK_DIALOG_MODAL flag to make a dialog modal.
#GTK_DIALOG_MODAL flag to make a dialog modal.
</para>
<para>
......@@ -51,7 +52,7 @@ gtk_dialog_add_action_widget(), clicking the button will emit a signal called
meaning to positive response IDs; these are entirely user-defined. But for
convenience, you can use the response IDs in the #GtkResponseType enumeration
(these all have values less than zero). If a dialog receives a delete event, the
"response" signal will be emitted with a response ID of GTK_RESPONSE_NONE.
"response" signal will be emitted with a response ID of #GTK_RESPONSE_NONE.
</para>
......@@ -67,14 +68,14 @@ For the simple dialog in the following example, in reality you'd probably use
#GtkMessageDialog to save yourself some effort. But you'd need to create the
dialog contents manually if you had more than a simple message in the dialog.
<example>
<title>Simple #GtkDialog usage.</title>
<title>Simple <structname>GtkDialog</structname> usage.</title>
<programlisting>
/* Function to open a dialog box displaying the message provided. */
void quick_message(#gchar *message) {
void quick_message (gchar *message) {
#GtkWidget *dialog, *label;
GtkWidget *dialog, *label;
/* Create the widgets */
......@@ -166,7 +167,7 @@ gtk_window_set_title(). See the #GtkWindow section for more).
<!-- ##### FUNCTION gtk_dialog_new ##### -->
<para>
Creates a new dialog box. Widgets should not be packed into this #GtkWindow
directly, but into the vbox and action_area, as described above.
directly, but into the @vbox and @action_area, as described above.
</para>
@Returns: a new #GtkDialog.
......@@ -284,7 +285,7 @@ directly, but into the vbox and action_area, as described above.
<para>
Emitted when an action widget is clicked, the dialog receives a delete event, or
the application programmer calls gtk_dialog_response(). On a delete event, the
response ID is GTK_RESPONSE_NONE. Otherwise, it depends on which action widget
response ID is #GTK_RESPONSE_NONE. Otherwise, it depends on which action widget
was clicked.
</para>
......
......@@ -48,6 +48,8 @@ As this example demonstrates, an expose handler should
draw only the pixels within the requested area and
should draw or clear all these pixels.
</para>
<example>
<title>Simple <structname>GtkDrawingArea</structname> usage.</title>
<programlisting>
gboolean
expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
......@@ -68,11 +70,12 @@ expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
return TRUE;
}
[...]
GtkWidget *drawing_area = gtk_drawing_area_new ();
GtkWidget *drawing_area = gtk_drawing_area_new (<!>);
gtk_drawing_area_size (GTK_DRAWING_AREA (drawing_area),
100, 100);
gtk_signal_connect (GTK_OBJECT (drawing_area),
</programlisting>
</example>
<!-- ##### SECTION See_Also ##### -->
<para>
......@@ -81,14 +84,14 @@ expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
<!-- ##### STRUCT GtkDrawingArea ##### -->
<para>
The #GtkDrawingArea-struct struct contains private data only, and
The #GtkDrawingArea struct contains private data only, and
should be accessed using the functions below.
</para>
<!-- ##### FUNCTION gtk_drawing_area_new ##### -->
<para>
Create a new drawing area.
Creates a new drawing area.
</para>
@Returns: a new #GtkDrawingArea
......@@ -96,7 +99,7 @@ Create a new drawing area.
<!-- ##### FUNCTION gtk_drawing_area_size ##### -->
<para>
Set the size that the drawing area will request
Sets the size that the drawing area will request
in response to a "size_request" signal. The
drawing area may actually be allocated a size
larger than this depending on how it is packed
......
......@@ -22,7 +22,7 @@ the following handler to "insert_text", an application
can convert all entry into a widget into uppercase.
<example>
<title> Forcing entry to uppercase </title>
<title>Forcing entry to uppercase.</title>
<programlisting>
#include &lt;ctype.h&gt;
......@@ -36,8 +36,8 @@ insert_text_handler (GtkEditable *editable,
int i;
gchar *result = g_new (gchar, length);
for (i=0; i&lt;length; i++)
result[i] = islower(text[i]) ? toupper(text[i]) : text[i];
for (i = 0; i &lt; length; i++)
result[i] = islower (text[i]) ? toupper (text[i]) : text[i];
gtk_signal_handler_block_by_func (GTK_OBJECT (editable),
GTK_SIGNAL_FUNC (insert_text_handler),
......@@ -120,7 +120,7 @@ Gets the current selection bounds, if there is a selection.
<!-- ##### FUNCTION gtk_editable_insert_text ##### -->
<para>
Insert text at a given position.
Inserts text at a given position.
</para>
@editable: a #GtkEditable widget.
......@@ -134,7 +134,7 @@ Insert text at a given position.
<!-- ##### FUNCTION gtk_editable_delete_text ##### -->
<para>
Delete a sequence of characters. The characters that
Deletes a sequence of characters. The characters that
are deleted are those characters at positions from
@start_pos up to, but not including @end_pos. If
@end_pos is negative, then the the characters deleted
......
......@@ -6,7 +6,12 @@ prompt the user for a file or directory name.
<!-- ##### SECTION Long_Description ##### -->
<para>
GtkFileSelection should be used to retrieve file or directory names from the user. It will create a new dialog window containing a directory list, and a file list corresponding to the current working directory. The filesystem can be navigated using the directory list or the drop-down history menu. Alternatively, the TAB key can be used to navigate using filename completion - common in text based editors such as emacs and jed.
#GtkFileSelection should be used to retrieve file or directory names from
the user. It will create a new dialog window containing a directory list,
and a file list corresponding to the current working directory. The filesystem
can be navigated using the directory list or the drop-down history menu.
Alternatively, the TAB key can be used to navigate using filename
completion - common in text based editors such as emacs and jed.
</para>
<para>
File selection dialogs are created with a call to gtk_file_selection_new().
......@@ -24,7 +29,7 @@ Simple file operations; create directory, delete file, and rename file, are avai
</para>
<para>
<example>
<title>Getting a filename from the user</title>
<title>Getting a filename from the user.</title>
<programlisting>
/* The file selection widget and the string to store the chosen filename */
......@@ -32,26 +37,26 @@ Simple file operations; create directory, delete file, and rename file, are avai
GtkWidget *file_selector;
gchar *selected_filename;
void store_filename(GtkFileSelection *selector, gpointer user_data) {
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector));
void store_filename (GtkFileSelection *selector, gpointer user_data) {
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
}
void create_file_selection(void) {
void create_file_selection (void) {
/* Create the selector */
file_selector = gtk_file_selection_new("Please select a file for editing.");
file_selector = gtk_file_selection_new ("Please select a file for editing.");
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button),
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
"clicked", GTK_SIGNAL_FUNC (store_filename), NULL);
/* Ensure that the dialog box is destroyed when the user clicks a button. */
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button),
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
"clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
(gpointer) file_selector);
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button),
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->cancel_button),
"clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
(gpointer) file_selector);
......
......@@ -85,7 +85,7 @@ Sets the currently-selected font.
@fontsel: a #GtkFontSelection.
@fontname: a fontname.
@Returns: TRUE if the font was found.
@Returns: %TRUE if the font was found.
<!-- ##### FUNCTION gtk_font_selection_get_preview_text ##### -->
......
......@@ -87,7 +87,7 @@ Gets the currently-selected font.
</para>
@fsd: a #GtkFontSelectionDialog.
@Returns: the currently-selected font, or NULL if no font is selected.
@Returns: the currently-selected font, or %NULL if no font is selected.
<!-- ##### FUNCTION gtk_font_selection_dialog_get_font_name ##### -->
......@@ -96,7 +96,7 @@ Gets the currently-selected font name.
</para>
@fsd: a #GtkFontSelectionDialog.
@Returns: the currently-selected font name, or NULL if no font is selected.
@Returns: the currently-selected font name, or %NULL if no font is selected.
<!-- ##### FUNCTION gtk_font_selection_dialog_set_font_name ##### -->
......@@ -106,7 +106,7 @@ Sets the currently-selected font.
@fsd: a #GtkFontSelectionDialog.
@fontname: a fontname.
@Returns: TRUE if the font was found.
@Returns: %TRUE if the font was found.