Gtk2Hs Tutorial

Hans van Thiel

An Adaptation of the GTK+ 2.0 Tutorial by

Tony Gale

Ian Main


The GTK Team

Versión en español

Table of Contents

  1. 1. Introduction
  2. 2. Getting Started
  3. 3. Packing
    1. 3.1 Packing Widgets
    2. 3.2 Packing Demonstration Program
    3. 3.3 Packing Using Tables
  4. 4. Miscellaneous Widgets
    1. 4.1 The Button Widget
    2. 4.2 Adjustments, Scale and Range
    3. 4.3 Labels
    4. 4.4 Arrows and Tooltips
    5. 4.5 Dialogs, Stock Items and Progress Bars
    6. 4.6 Text Entries and Status Bars
    7. 4.7 Spin Buttons
  5. 5. Aggregated Widgets
    1. 5.1 Calendar
    2. 5.2 File Selection
    3. 5.3 Font and Color Selection
    4. 5.4 Notebook
  6. 6. Supporting Widgets
    1. 6.1 Scrolled Windows
    2. 6.2 Event Boxes and Button Boxes
    3. 6.3 The Layout Container
    4. 6.4 Paned Windows and Aspect Frames
  7. 7. Action Based Widgets
    1. 7.1 Menus and Toolbars
    2. 7.2 Popup Menus, Radio Actions and Toggle Actions
  8. Appendix
    1. Drawing with Cairo: Getting Started

Tutorial Copyright and Permissions Notice

The GTK Tutorial is Copyright © 1997 Ian Main.

© 1998-2002 Tony Gale.

© 2007, 2008 Hans van Thiel and Alex Tarkovsky.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that this copyright notice is included exactly as in the original, and that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions.

If you are intending to incorporate this document into a published work, please contact the maintainer, and we will make an effort to ensure that you have the most up to date information available.

There is no guarantee that this document lives up to its intended purpose. This is simply provided as a free resource. As such, the authors and maintainers of the information provided within can not make any guarantee that the information is even accurate.

Further Acknowledgments

We've also made thankful use of 'Programming with gtkmm' by Murray Cumming et al. and the Inti (Integrated Foundation Classes) tutorial by the Inti team.

Chapter 7 is largely based on Chapter 11 of 'Programming with gktmm' and the demo included in the Gtk2Hs distribution.