ionflux.org | Impressum

GtkCairoArea.hpp

Go to the documentation of this file.
00001 #ifndef IONFLUX_TOOLS_GTKCAIROAREA
00002 #define IONFLUX_TOOLS_GTKCAIROAREA
00003 /* ==========================================================================
00004  * Ionflux Tools
00005  * Copyright (c) 2005 Joern P. Meier
00006  * mail@ionflux.org
00007  * --------------------------------------------------------------------------
00008  * GtkCairoArea.hpp                  GTK+/Cairo drawing area.
00009  * ==========================================================================
00010  * 
00011  * This file is part of Ionflux Tools.
00012  * 
00013  * Ionflux Tools is free software; you can redistribute it and/or modify it
00014  * under the terms of the GNU General Public License as published by the 
00015  * Free Software Foundation; either version 2 of the License, or (at your 
00016  * option) any later version.
00017  * 
00018  * Ionflux Tools is distributed in the hope that it will be useful, but 
00019  * WITHOUT ANY WARRANTY; without even the implied warranty of 
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00021  * General Public License for more details.
00022  * 
00023  * You should have received a copy of the GNU General Public License along 
00024  * with Ionflux Tools; if not, write to the Free Software Foundation, Inc.,
00025  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00026  * 
00027  * ========================================================================== */
00028 
00029 #include "gtkmm/drawingarea.h"
00030 #include "gdk/gdkx.h"
00031 #include "ionflux/ObjectPool.hpp"
00032 #include "ionflux/CairoCanvas.hpp"
00033 
00034 namespace Ionflux
00035 {
00036 
00037 namespace Tools
00038 {
00039 
00045 class GtkCairoArea
00046 : public Gtk::DrawingArea
00047 {
00048     private:
00049         
00050     protected:
00052         ObjectPool pool;
00054         Glib::RefPtr<Gdk::GC> theGC;
00056         Gdk::Color black;
00058         Ionflux::Tools::CairoCanvas* cairoCanvas;
00059         
00064         virtual void on_realize();
00065         
00072         virtual bool on_expose_event(GdkEventExpose* event);
00073         
00078         virtual bool paint();
00079         
00080     public:
00085         GtkCairoArea();
00086         
00093         GtkCairoArea(CairoCanvas* initCairoCanvas);
00094         
00099         virtual ~GtkCairoArea();
00100         
00107         virtual void setCairoCanvas(Ionflux::Tools::CairoCanvas* newCairoCanvas);
00108         
00113         virtual Ionflux::Tools::CairoCanvas* getCairoCanvas() const;
00114 };
00115 
00116 }
00117 
00118 }
00119 
00123 #endif

Generated on Tue Mar 14 20:58:29 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6