-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
-<!-- =============Document Header ============================= -->
-<book id="gtk-tut" lang="en">
+<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
+<!notation PNG system "PNG">
+<!entity % local.notation.class "| PNG">
+]>
+<book id="gtk-tut">
<bookinfo>
<date>January 24th, 2003</date>
<surname>Main</surname>
</author>
<author>
- <firstname>& the GTK team</firstname>
+ <firstname>& the GTK team</firstname>
</author>
</authorgroup>
- <abstract role="description">
+ <abstract>
<para>This is a tutorial on how to use GTK (the GIMP Toolkit) through its C
interface.</para>
</abstract>
</bookinfo>
+<toc></toc>
<!-- ***************************************************************** -->
<chapter id="ch-TutorialDownload">
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/base.png" format="PNG"/>
+<imagedata fileref="images/base.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
checks the arguments passed to your application on the command line, looking for
one of the following:</para>
-<itemizedlist spacing="compact">
+<itemizedlist spacing=Compact>
<listitem><simpara> <literal>--gtk-module</literal></simpara>
</listitem>
<listitem><simpara> <literal>--g-fatal-warnings</literal></simpara>
(such as button or key presses), timeouts, or file IO notifications to
occur. In our simple example, however, events are ignored.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-HelloWorld">
<title>Hello World in GTK</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/helloworld.png" format="PNG"/>
+<imagedata fileref="images/helloworld.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Compiling">
<title>Compiling Hello World</title>
<listitem><simpara>The GLib library (<literal>-lglib</literal>), containing miscellaneous
functions; only g_print() is used in this particular example. GTK is built on top
of GLib so you will always require this library. See the section on
-<link linkend="ch-GLib">GLib</link> for details.</simpara>
+<link linkend="ch-glib">GLib</link> for details.</simpara>
</listitem>
<listitem><simpara>The Xlib library (<literal>-lX11</literal>) which is used by GDK.</simpara>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TheoryOfSignalsAndCallbacks">
<title>Theory of Signals and Callbacks</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Events">
<title>Events</title>
of <emphasis>events</emphasis> that reflect the X event mechanism. Callbacks may
also be attached to these events. These events are:</para>
-<itemizedlist spacing="compact">
+<itemizedlist spacing=Compact>
<listitem><simpara> event</simpara>
</listitem>
<listitem><simpara> button_press_event</simpara>
linkend="sec-SignalsOnDestWidgets">Signals on the destination widget</link>
for details on the signatures of the callback functions for these signals:</para>
-<itemizedlist spacing="compact">
+<itemizedlist spacing=Compact>
<listitem><simpara> selection_received</simpara>
</listitem>
<listitem><simpara> selection_get</simpara>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-SteppingThroughHelloWorld">
<title>Stepping Through Hello World</title>
<chapter id="ch-MovingOn">
<title>Moving On</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-DataTypes">
<title>Data Types</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-MoreOnSignalHandlers">
<title>More on Signal Handlers</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-AnUpgradedHelloWorld">
<title>An Upgraded Hello World</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/helloworld2.png" format="PNG"/>
+<imagedata fileref="images/helloworld2.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
into a window, how do you control where that widget is positioned?
This is where packing comes in.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TheoryOfPackingBoxes">
<title>Theory of Packing Boxes</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-DetailsOfBoxes">
<title>Details of Boxes</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/packbox1.png" format="PNG"/>
+<imagedata fileref="images/packbox1.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/packbox2.png" format="PNG"/>
+<imagedata fileref="images/packbox2.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-PackingDemonstrationProgram">
<title>Packing Demonstration Program</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-PackingUsingTables">
<title>Packing Using Tables</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TablePackingExamples">
<title>Table Packing Example</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/table.png" format="PNG"/>
+<imagedata fileref="images/table.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
children of a widget (a window is a widget too) will not be displayed
until the window itself is shown using the gtk_widget_show() function.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Casting">
<title>Casting</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-WidgetHierarchy">
<title>Widget Hierarchy</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-WidgetsWithoutWindows">
<title>Widgets Without Windows</title>
<chapter id="ch-ButtonWidget">
<title>The Button Widget</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-NormalButtons">
<title>Normal Buttons</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/buttons.png" format="PNG"/>
+<imagedata fileref="images/buttons.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ToggleButtons">
<title>Toggle Buttons</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-CheckButtons">
<title>Check Buttons</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-RadioButtons">
<title>Radio Buttons</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/radiobuttons.png" format="PNG"/>
+<imagedata fileref="images/radiobuttons.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
<link linkend="sec-Viewports">Viewports</link>,
<link linkend="sec-ScrolledWindows">Scrolled Windows</link>, and others.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-CreatingAnAdjustment">
<title>Creating an Adjustment</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-UsingAdjustments">
<title>Using Adjustments the Easy Way</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-AdjustmentInternals">
<title>Adjustment Internals</title>
trough. When the user manipulates the slider, the range widget will
change the value of the adjustment.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ScrollbarWidgets">
<title>Scrollbar Widgets</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ScaleWidgets">
<title>Scale Widgets</title>
or to specify the number of minutes of inactivity before a screensaver
takes over the screen.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Creating a Scale Widget</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Functions and Signals (well, functions, at least)</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-CommonRangeFunctions">
<title>Common Range Functions</title>
defined in <literal><gtk/gtkrange.h></literal> and will work on all range
widgets.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Setting the Update Policy</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Getting and Setting Adjustments</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-KeyAndMouseBindings">
<title>Key and Mouse bindings</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-RangeWidgetsExample">
<title>Example</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/rangewidgets.png" format="PNG"/>
+<imagedata fileref="images/rangewidgets.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
<chapter id="ch-MiscWidgets">
<title>Miscellaneous Widgets</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Labels">
<title>Labels</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/label.png" format="PNG"/>
+<imagedata fileref="images/label.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Arrows">
<title>Arrows</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/arrow.png" format="PNG"/>
+<imagedata fileref="images/arrow.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TheTooltipsObject">
<title>The Tooltips Object</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ProgressBars">
<title>Progress Bars</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/progressbar.png" format="PNG"/>
+<imagedata fileref="images/progressbar.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Dialogs">
<title>Dialogs</title>
</variablelist>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Rulers">
<title>Rulers</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/rulers.png" format="PNG"/>
+<imagedata fileref="images/rulers.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Statusbars">
<title>Statusbars</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/statusbar.png" format="PNG"/>
+<imagedata fileref="images/statusbar.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TextEntries">
<title>Text Entries</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/entry.png" format="PNG"/>
+<imagedata fileref="images/entry.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-SpinButtons">
<title>Spin Buttons</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/spinbutton.png" format="PNG"/>
+<imagedata fileref="images/spinbutton.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ComboBox">
<title>Combo Box</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Calendar">
<title>Calendar</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/calendar.png" format="PNG"/>
+<imagedata fileref="images/calendar.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ColorSelection">
<title>Color Selection</title>
<para><!-- Need to do a whole section on DnD - TRG
Drag and drop
-***********</para>
+-------------</para>
<para>The color sample areas (right under the hue-saturation wheel) supports
drag and drop. The type of drag and drop is "application/x-color". The
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/colorsel.png" format="PNG"/>
+<imagedata fileref="images/colorsel.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-FileSelections">
<title>File Selections</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/filesel.png" format="PNG"/>
+<imagedata fileref="images/filesel.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
<chapter id="ch-ContainerWidgets">
<title>Container Widgets</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-EventBox">
<title>The EventBox</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/eventbox.png" format="PNG"/>
+<imagedata fileref="images/eventbox.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TheAlignmentWidget">
<title>The Alignment widget</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-FixedContainer">
<title>Fixed Container</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/fixed.png" format="PNG"/>
+<imagedata fileref="images/fixed.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-LayoutContainer">
<title>Layout Container</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Frames">
<title>Frames</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/frame.png" format="PNG"/>
+<imagedata fileref="images/frame.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</programlisting>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-AspectFrames">
<title>Aspect Frames</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/aspectframe.png" format="PNG"/>
+<imagedata fileref="images/aspectframe.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-PanedWindowWidgets">
<title>Paned Window Widgets</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/paned.png" format="PNG"/>
+<imagedata fileref="images/paned.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Viewports">
<title>Viewports</title>
</sect1>
-<!-- ***************************************************************** -->
-<sect1 id="sec-ScrolledWindows">
+<!-- ----------------------------------------------------------------- -->
+<sect1 id="sec-ScrolledWindows"
<title>Scrolled Windows</title>
<para>Scrolled windows are used to create a scrollable area with another
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/scrolledwin.png" format="PNG"/>
+<imagedata fileref="images/scrolledwin.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ButtonBoxes">
<title>Button Boxes</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/buttonbox.png" format="PNG"/>
+<imagedata fileref="images/buttonbox.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Toolbar">
<title>Toolbar</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Notebooks">
<title>Notebooks</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/notebook.png" format="PNG"/>
+<imagedata fileref="images/notebook.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
Itemfactory, it is not possible to add images or the character '/' to
the menus.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ManualMenuCreation">
<title>Manual Menu Creation</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ManualMenuExample">
<title>Manual Menu Example</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/menu.png" format="PNG"/>
+<imagedata fileref="images/menu.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-UsingItemFactory">
<title>Using ItemFactory</title>
means you can define your menu in its simplest form and then create the
menu/menubar widgets with a minimum of function calls.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2 id="sec-ItemFactoryEntries">
<title>ItemFactory entries</title>
<para>Note that <LastBranch> is only useful for one submenu of
a menubar.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect3 id="sec-ItemFactoryCallback">
<title>Callback Description</title>
</para>
</sect3>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect3 id="sec-ItemFactoryEntryExamples">
<title>ItemFactory entry examples</title>
equal to "/View/Low Resolution".</para>
</sect3>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect3 id="sec-ItemFactoryEntryArrays">
<title>ItemFactoryEntry Arrays</title>
</sect3>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2 id="sec-ItemFactoryCreation">
<title>Creating an ItemFactory</title>
</programlisting>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2 id="sec-UsingMenuandItems">
<title>Making use of the menu and its menu items</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ItemFactoryExample">
<title>Item Factory Example</title>
widget, please consider writing a tutorial on it so others may benefit
from your time.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-AccelLabel">
<title>Accel Label</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-OptionMenu">
<title>Option Menu</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-MenuItems">
<title>Menu Items</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Curves">
<title>Curves</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-DrawingArea">
<title>Drawing Area</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-FontSelectionDialog">
<title>Font Selection Dialog</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-MessageDialog">
<title>Message Dialog</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GammaCurve">
<title>Gamma Curve</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Image">
<title>Image</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-PlugsAndSockets">
<title>Plugs and Sockets</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TreeView">
<title>Tree View</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TextView">
<title>Text View</title>
<chapter id="ch-Timeouts">
<title>Timeouts, IO and Idle Functions</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Timeouts">
<title>Timeouts</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-MonitoringIO">
<title>Monitoring IO</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-IdleFunctions">
<title>Idle Functions</title>
<chapter id="ch-AdvancedEventsAndSignals">
<title>Advanced Event and Signal Handling</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-SignalFunctions">
<title>Signal Functions</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Connecting and Disconnecting Signal Handlers</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Blocking and Unblocking Signal Handlers</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Emitting and Stopping Signals</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-SignalEmissionAndPropagation">
<title>Signal Emission and Propagation</title>
<chapter id="ch-ManagingSelections">
<title>Managing Selections</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-SelectionsOverview">
<title>Overview</title>
selections and targets are identified by atoms.</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-RetrievingTheSelection">
<title>Retrieving the selection</title>
</programlisting>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-SupplyingTheSelection">
<title>Supplying the selection</title>
drag-and-drop on top of the low level Xdnd and Motif drag-and-drop
protocols.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-DragAndDropOverview">
<title>Overview</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-DragAndDropProperties">
<title>Properties</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-DragAndDropFunctions">
<title>Functions</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2 id="sec-DNDSourceWidgets">
<title>Setting up the source widget</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2 id="sec-SignalsOnSourceWidgets">
<title>Signals on the source widget:</title>
<table pgwide="1">
<title>Source widget signals</title>
<tgroup cols="2">
-<colspec colname="Name" colwidth="150"/>
-<colspec colname="Prototype"/>
+<colspec colname="Name" colwidth="150">
+<colspec colname="Prototype">
<tbody>
<row>
<entry align="left" valign="middle">drag_begin</entry>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2 id="sec-DNDDestWidgets">
<title>Setting up a destination widget:</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2 id="sec-SignalsOnDestWidgets">
<title>Signals on the destination widget:</title>
<table pgwide="1">
<title>Destination widget signals</title>
<tgroup cols="2">
-<colspec colname="Name" colwidth="150"/>
-<colspec colname="Prototype"/>
+<colspec colname="Name" colwidth="150">
+<colspec colname="Prototype">
<tbody>
<row>
<entry align="left" valign="middle">drag_data_received</entry>
have equivalent functionality built-in, while in other cases it may
not.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Definitions">
<title>Definitions</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-DoublyLinkedLists">
<title>Doubly Linked Lists</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-SinglyLinkedLists">
<title>Singly Linked Lists</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-MemoryManagement">
<title>Memory Management</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Timers">
<title>Timers</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-StringHandling">
<title>String Handling</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-UtilityAndErrorFunctions">
<title>Utility and Error Functions</title>
files. These can be used to set the colors of just about any widget, and
can also be used to tile pixmaps onto the background of some widgets. </para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-FunctionsForRCFiles">
<title>Functions For rc Files</title>
</programlisting>
<para>Then this button is given the name "special button" and may be addressed by
-name in the rc file as "special button.GtkButton". <!-- Verify ME --></para>
+name in the rc file as "special button.GtkButton". [<--- Verify ME!]</para>
<para>The example rc file below, sets the properties of the main window, and lets
all children of that main window inherit the style described by the "main
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GTKsRCFileFormat">
<title>GTK's rc File Format</title>
entire widget class. I urge you to document any of these special widgets so
users may customize them.</para>
-<para>When the keyword <literal>parent</literal> is used as an attribute, the widget will take on
+<para>When the keyword <literal>parent</> is used as an attribute, the widget will take on
the attributes of its parent in the application.</para>
<para>When defining a style, you may assign the attributes of a previously defined
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ExampleRCFile">
<title>Example rc file</title>
<chapter id="ch-WritingYourOwnWidgets">
<title>Writing Your Own Widgets</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-WidgetsOverview">
<title>Overview</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TheAnatomyOfAWidget">
<title>The Anatomy Of A Widget</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-CreatingACompositeWidget">
<title>Creating a Composite widget</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Introduction</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/tictactoe.png" format="PNG"/>
+<imagedata fileref="images/tictactoe.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Choosing a parent class</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>The header file</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>The <literal>_get_type()</literal> function</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>The <literal>_class_init()</literal> function</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>The <literal>_init()</literal> function</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>And the rest...</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-CreatingAWidgetFromScratch">
<title>Creating a widget from scratch</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Introduction</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/gtkdial.png" format="PNG"/>
+<imagedata fileref="images/gtkdial.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Displaying a widget on the screen</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>The origins of the Dial Widget</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>The Basics</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title><literal>gtk_dial_realize()</literal></title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Size negotiation</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title><literal>gtk_dial_expose()</literal></title>
/* Draw ticks */
- for (i=0; i<25; i++)
+ for (i=0; i<25; i++)
{
theta = (i*M_PI/18. - M_PI/6.);
s = sin(theta);
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Event handling</title>
d_parallel = s*dy + c*dx;
d_perpendicular = fabs(s*dx - c*dy);
- if (!dial->button &&
- (d_perpendicular < dial->pointer_width/2) &&
+ if (!dial->button &&
+ (d_perpendicular < dial->pointer_width/2) &&
(d_parallel > - dial->pointer_width))
{
gtk_grab_add (widget);
if (dial->policy == GTK_UPDATE_DELAYED)
g_source_remove (dial->timer);
- if ((dial->policy != GTK_UPDATE_CONTINUOUS) &&
+ if ((dial->policy != GTK_UPDATE_CONTINUOUS) &&
(dial->old_value != dial->adjustment->value))
gtk_signal_emit_by_name (GTK_OBJECT (dial->adjustment), "value_changed");
}
break;
}
- if (mods & mask)
+ if (mods & mask)
gtk_dial_update_mouse (dial, x,y);
}
old_value = dial->adjustment->value;
dial->angle = atan2(yc-y, x-xc);
- if (dial->angle < -M_PI/2.)
+ if (dial->angle < -M_PI/2.)
dial->angle += 2*M_PI;
- if (dial->angle < -M_PI/6)
+ if (dial->angle < -M_PI/6)
dial->angle = -M_PI/6;
if (dial->angle > 7.*M_PI/6.)
new_value = dial->adjustment->value;
- if (new_value < dial->adjustment->lower)
+ if (new_value < dial->adjustment->lower)
new_value = dial->adjustment->lower;
if (new_value > dial->adjustment->upper)
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Possible Enhancements</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-LearningMore">
<title>Learning More</title>
<chapter id="ch-Scribble">
<title>Scribble, A Simple Example Drawing Program</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-ScribbleOverview">
<title>Overview</title>
<para>
<inlinemediaobject>
<imageobject>
-<imagedata fileref="images/scribble.png" format="PNG"/>
+<imagedata fileref="images/scribble.png" format="png">
</imageobject>
</inlinemediaobject>
</para>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-EventHandling">
<title>Event Handling</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-TheDrawingAreaWidget">
<title>The DrawingArea Widget, And Drawing</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-AddingXInputSupport">
<title>Adding XInput support</title>
<literal>GDK_CORE_POINTER</literal> is used for the core pointer device. (Usually
the mouse.)</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Enabling extended device information</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Using extended device information</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>Finding out more about a device</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2 id="sec-FurtherSophistications">
<title>Further sophistications</title>
signals. Therefore, you should refer to the widget hierarchy tree when
using the signals listed in this section.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkObject">
<title>GtkObject</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkWidget">
<title>GtkWidget</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkData">
<title>GtkData</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkContainer">
<title>GtkContainer</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkCalendar">
<title>GtkCalendar</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkEditable">
<title>GtkEditable</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkNotebook">
<title>GtkNotebook</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkList">
<title>GtkList</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkMenuShell">
<title>GtkMenuShell</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkToolbar">
<title>GtkToolbar</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkButton">
<title>GtkButton</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkItem">
<title>GtkItem</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkWindow">
<title>GtkWindow</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkHandleBox">
<title>GtkHandleBox</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkToggleButton">
<title>GtkToggleButton</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkMenuItem">
<title>GtkMenuItem</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkCheckMenuItem">
<title>GtkCheckMenuItem</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkInputDialog">
<title>GtkInputDialog</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkColorSelection">
<title>GtkColorSelection</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkStatusBar">
<title>GtkStatusBar</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkCurve">
<title>GtkCurve</title>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkAdjustment">
<title>GtkAdjustment</title>
</itemizedlist>
</listitem>
-<listitem><simpara> GdkEventType</simpara>
+<listitem><simpara> GdkEventType<</simpara>
</listitem>
<listitem><simpara> GdkEventAny</simpara>
<para>Below are the code examples that are used in the above text
which are not included in complete form elsewhere.</para>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Tictactoe">
<title>Tictactoe</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>tictactoe.h</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>tictactoe.c</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>ttt_test.c</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-GtkDial">
<title>GtkDial</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>gtkdial.h</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>gtkdial.c</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>dial_test.c</title>
</sect2>
</sect1>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect1 id="sec-Scribble">
<title>Scribble</title>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>scribble-simple.c</title>
</sect2>
-<!-- ***************************************************************** -->
+<!-- ----------------------------------------------------------------- -->
<sect2>
<title>scribble-xinput.c</title>