GtkDrawingArea

GtkDrawingArea

Widget for custom user interface elements.

Object Hierarchy

GtkObject
`-- GtkWidget
       `-- GtkDrawingArea

Direct subclasses

Description

A GtkDrawingArea is a widget whose GdkWindow can be drawn to. You could use it to create a new user interface element, or an updateable graph, or pretty much anything, using the GDK and GTK draw and paint functions.

Because it is in itself so featureless, everything has to be added to a GtkDrawingArea. It will not respond to key or button press events, unless you give it the ability to do so using set_events() or add_events() . It cannot have keyboard focus, unless you set the GTK_CAN_FOCUS flag. It does not regard what is drawn upon it as a clue to sizing, so you have to size it. If you want it to react to resizing, you will need to connect it to an appropriate callback via the "configure-event" signal in order to do so. It has no defining behaviour, beyond the ability to manufacture configure events when it is allocated a new size. It's basically a completely empty widget.

Redraws should be created through an "expose-event" handler.

Constructor

-- Constructs a blank, drawable widget.

Methods

size()
  Sets the size of the drawing area.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.