Overview
This widget tutorial guides you through creating a small program that displays a selected image in a resizable window. This simple program illustrates some common concepts of widget programming, including:
- Designing a Simple Widget — how to define and arrange the widget elements you need
- Creating Event Handlers — how to communicate events to the widgets to perform the desired action
- State Structures — how to modify and save variable values when events happen
- Creating the Cleanup Procedure — how to clean up pointers when you close the program
Note
The program uses example data taken from magnetic resonance images (MRIs) of a human patient's thorax, head, and side view of the head and neck.
View the video demonstrationvideo demonstration of this widget example program.
For more information on the technical aspects of widget programming, see Creating Widget Applications.