| |||||||||||||
| |||||||||||||
| |||||||||||||
Description | |||||||||||||
A widget for custom user interface elements | |||||||||||||
Synopsis | |||||||||||||
| |||||||||||||
Detail | |||||||||||||
The DrawingArea widget is used for creating custom user interface elements. It's essentially a blank widget; you can draw on the Drawable returned by drawingAreaGetWindow. After creating a drawing area, the application may want to connect to:
Expose events are normally delivered when a drawing area first comes onscreen, or when it's covered by another window and then uncovered (exposed). You can also force an expose event by adding to the "damage region" of the drawing area's window; widgetQueueDrawArea and windowInvalidateRect are equally good ways to do this. You'll then get an expose event for the invalid region. The available routines for drawing are documented on the GDK Drawing Primitives page. See also pixbufRenderToDrawable for drawing a Pixbuf. To receive mouse events on a drawing area, you will need to enable them with widgetAddEvents. To receive keyboard events, you will need to set the CanFocus flag on the drawing area, and should probably draw some user-visible indication that the drawing area is focused. | |||||||||||||
Class Hierarchy | |||||||||||||
| GObject | +----Object | +----Widget | +----DrawingArea | |||||||||||||
Types | |||||||||||||
data DrawingArea | |||||||||||||
class WidgetClass o => DrawingAreaClass o | |||||||||||||
castToDrawingArea :: GObjectClass obj => obj -> DrawingArea | |||||||||||||
toDrawingArea :: DrawingAreaClass o => o -> DrawingArea | |||||||||||||
Constructors | |||||||||||||
drawingAreaNew :: IO DrawingArea | |||||||||||||
Creates a new drawing area. | |||||||||||||
Methods | |||||||||||||
drawingAreaGetDrawWindow :: DrawingArea -> IO DrawWindow | |||||||||||||
See widgetGetDrawWindow | |||||||||||||
drawingAreaGetSize :: DrawingArea -> IO (Int, Int) | |||||||||||||
See widgetGetSize | |||||||||||||
Produced by Haddock version 2.6.0 |