Class Index Cross Index Namespace Index

Class Gtk::DrawingArea

A widget for custom user interface elements.
Contained in: Gtk
Derived from: Widget
Derived by: Gtk::Curve

#include <gtk--/drawingarea.h>


public function member index:

DrawingArea();
GtkDrawingArea* gtkobj();
const GtkDrawingArea* gtkobj() const;
static bool isA(Object* object);
void size(gint width, gint height);
virtual ~DrawingArea();
 

Description:

The Gtk::DrawingArea widget is used for creating custom user interface elements. After creating a drawing area, the application may want to connect to:

Mouse and button press signals to respond to input from the user.

The "realize" signal to take any necessary actions when the widget

The "size_allocate" signal to take any necessary actions when the widget changes size.

The "expose_event" signal to handle redrawing the contents of the widget.

As a convenience, the Gtk::DrawingArea widget synthesizes a "configure_event" when the widget is realized and any time the size of a widget changes when it is realized. It often suffices to connect to this signal instead of "realize" and "size_allocate".


Function Member Descriptions:

Gtk::DrawingArea::gtkobj - Returns the underlaying gtk+ object.

GtkDrawingArea* gtkobj();

Gtk::DrawingArea::isA - Returns true if object is this type.

static bool isA(Object* object);

Gtk::DrawingArea::size - Set the size that the drawing area will request in response to a "size_request" signal.

void size(gint width, gint height);
The drawing area may actually be allocated a size larger than this depending on how it is packed within the enclosing containers.

width: The width to request.

height: The height to request.