Next
Previous Contents
GTK v1.2 Tutorial
Tony Gale
<gale@gtk.org>
, Ian Main
<imain@gtk.org>
February 23rd, 2000
This is a tutorial on how to use GTK (the GIMP Toolkit) through its C interface.
1.
Introduction
2.
Getting Started
2.1 Hello World in GTK
2.2 Compiling Hello World
2.3 Theory of Signals and Callbacks
2.4 Events
2.5 Stepping Through Hello World
3.
Moving On
3.1 Data Types
3.2 More on Signal Handlers
3.3 An Upgraded Hello World
4.
Packing Widgets
4.1 Theory of Packing Boxes
4.2 Details of Boxes
4.3 Packing Demonstration Program
4.4 Packing Using Tables
4.5 Table Packing Example
5.
Widget Overview
5.1 Casting
5.2 Widget Hierarchy
5.3 Widgets Without Windows
6.
The Button Widget
6.1 Normal Buttons
6.2 Toggle Buttons
6.3 Check Buttons
6.4 Radio Buttons
7.
Adjustments
7.1 Creating an Adjustment
7.2 Using Adjustments the Easy Way
7.3 Adjustment Internals
8.
Range Widgets
8.1 Scrollbar Widgets
8.2 Scale Widgets
8.3 Common Range Functions
8.4 Key and Mouse bindings
8.5 Example
9.
Miscellaneous Widgets
9.1 Labels
9.2 Arrows
9.3 The Tooltips Object
9.4 Progress Bars
9.5 Dialogs
9.6 Pixmaps
9.7 Rulers
9.8 Statusbars
9.9 Text Entries
9.10 Spin Buttons
9.11 Combo Box
9.12 Calendar
9.13 Color Selection
9.14 File Selections
10.
Container Widgets
10.1 The EventBox
10.2 The Alignment widget
10.3 Fixed Container
10.4 Layout Container
10.5 Frames
10.6 Aspect Frames
10.7 Paned Window Widgets
10.8 Viewports
10.9 Scrolled Windows
10.10 Button Boxes
10.11 Toolbar
10.12 Notebooks
11.
CList Widget
11.1 Creating a CList widget
11.2 Modes of operation
11.3 Working with titles
11.4 Manipulating the list itself
11.5 Adding rows to the list
11.6 Setting text and pixmaps in the cells
11.7 Storing data pointers
11.8 Working with selections
11.9 The signals that bring it together
11.10 A CList example
12.
Tree Widget
12.1 Creating a Tree
12.2 Adding a Subtree
12.3 Handling the Selection List
12.4 Tree Widget Internals
12.5 Tree Item Widget
12.6 Tree Example
13.
Menu Widget
13.1 Manual Menu Creation
13.2 Manual Menu Example
13.3 Using ItemFactory
13.4 Item Factory Example
14.
Text Widget
14.1 Creating and Configuring a Text box
14.2 Text Manipulation
14.3 Keyboard Shortcuts
14.4 A GtkText Example
15.
Undocumented Widgets
15.1 CTree
15.2 Curves
15.3 Drawing Area
15.4 Font Selection Dialog
15.5 Gamma Curve
15.6 Image
15.7 Packer
15.8 Plugs and Sockets
15.9 Preview
16.
Setting Widget Attributes
17.
Timeouts, IO and Idle Functions
17.1 Timeouts
17.2 Monitoring IO
17.3 Idle Functions
18.
Advanced Event and Signal Handling
18.1 Signal Functions
18.2 Signal Emission and Propagation
19.
Managing Selections
19.1 Overview
19.2 Retrieving the selection
19.3 Supplying the selection
20.
GLib
20.1 Definitions
20.2 Doubly Linked Lists
20.3 Singly Linked Lists
20.4 Memory Management
20.5 Timers
20.6 String Handling
20.7 Utility and Error Functions
21.
GTK's rc Files
21.1 Functions For rc Files
21.2 GTK's rc File Format
21.3 Example rc file
22.
Writing Your Own Widgets
22.1 Overview
22.2 The Anatomy Of A Widget
22.3 Creating a Composite widget
22.4 Creating a widget from scratch.
22.5 Learning More
23.
Scribble, A Simple Example Drawing Program
23.1 Overview
23.2 Event Handling
23.3 The DrawingArea Widget, And Drawing
23.4 Adding XInput support
24.
Tips For Writing GTK Applications
25.
Contributing
26.
Credits
27.
Tutorial Copyright and Permissions Notice
Appendix
28.
GTK Signals
28.1 GtkObject
28.2 GtkWidget
28.3 GtkData
28.4 GtkContainer
28.5 GtkCalendar
28.6 GtkEditable
28.7 GtkTipsQuery
28.8 GtkCList
28.9 GtkNotebook
28.10 GtkList
28.11 GtkMenuShell
28.12 GtkToolbar
28.13 GtkTree
28.14 GtkButton
28.15 GtkItem
28.16 GtkWindow
28.17 GtkHandleBox
28.18 GtkToggleButton
28.19 GtkMenuItem
28.20 GtkListItem
28.21 GtkTreeItem
28.22 GtkCheckMenuItem
28.23 GtkInputDialog
28.24 GtkColorSelection
28.25 GtkStatusBar
28.26 GtkCTree
28.27 GtkCurve
28.28 GtkAdjustment
29.
GDK Event Types
30.
Code Examples
30.1 Tictactoe
30.2 GtkDial
30.3 Scribble
31.
List Widget
31.1 Signals
31.2 Functions
31.3 Example
31.4 List Item Widget
31.5 Signals
31.6 Functions
31.7 Example
Next
Previous Contents