Chapter 23. Scribble, A Simple Example Drawing Program

Table of Contents
25.1. Overview
25.2. Event Handling
25.3. The DrawingArea Widget, And Drawing
25.4. Adding XInput support

23.1. Overview

In this section, we will build a simple drawing program. In the process, we will examine how to handle mouse events, how to draw in a window, and how to do drawing better by using a backing pixmap. After creating the simple drawing program, we will extend it by adding support for XInput devices, such as drawing tablets. GTK provides support routines which makes getting extended information, such as pressure and tilt, from such devices quite easy.