PHP-GTK
Wednesday, July 30, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkDialog::vbox
GtkDrawingArea Constructornext

Last updated: Sun, 12 May 2013
view this page in English

GtkDrawingArea

A widget for creating custom user interface elements.

Object Hierarchy

Direct Subclasses

Description

This widget is essentially a blank widget, on which you can draw by accessing its window field, which is a GdkWindow. You may use the widget to paint custom patterns or for interactive programs like scribble.

There are three important signals of GtkWindow that are especially useful for this widget. The realize signal is used to take neccessary actions when the widget is instantiated on a particular display. Use the configure-event signal to define what happens when the widget is changes size, and finally, the expose-event signal will allow you to handle redrawing the contents of the drawing area.

An expose event also occurs when the drawing area first appears on the screen, and also when the widget is covered by another window and subsequently uncovered. You will most probably use GdkWindow's drawing methods to paint the drawing area.

To receive mouse events on a drawing area, you have to enable them by using add_events() .

Avoid using the drawing area unless you really need the flexibility and thereby the complexity that it brings along. You'll be working on the Gdk layer rather than the Gtk layer when using this widget. Most of the time, clever use of the GtkImage widget can prove to be an easier alternative to using a GtkDrawingArea.

Constructors

-- Creates a new GtkDrawingArea widget.

Methods

size()
  DEPRECATED. Sets the size of the drawing area.


User Contributed Notes
gtk.gtkdrawingarea.php
add a note about notes
There are no user contributed notes for this page.


previousGtkDialog::vbox
GtkDrawingArea Constructornext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:50:57 2013 CEST