/* $Id: drawingarea.gen_h,v 1.27 2001/07/15 13:33:38 murrayc Exp $ */ /* drawingarea.h * * Copyright (C) 1998-1999 The Gtk-- Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <gtk--/widget.h> #include <gtk/gtkdrawingarea.h> namespace Gtk { //: A widget for custom user interface elements. //- The {\class 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 {\class 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". class DrawingArea : public Widget { public: typedef DrawingArea CppObjectType; typedef GtkDrawingArea BaseObjectType; public: //: Returns the underlaying gtk+ object. GtkDrawingArea* gtkobj(); const GtkDrawingArea* gtkobj() const; //: Returns true if object is this type. static bool isA(Gtk::Object *object); virtual ~DrawingArea(); private: public: DrawingArea(); //: Set the size that the drawing area will request in response to a "size_request" signal. //- 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. void size(gint width,gint height); protected: // impl functions }; //+ PROPERTIES(gtkdrawingarea) //. name: widget //. type: GtkWidget //. get: //. set: //. desc: //. name: draw_data //. type: gpointer //. get: //. set: //. desc: }