papyrus logo

drawablecontroller.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the papyrus library.                             *
00006  *                                                                         *
00007  *   papyrus is free software; you can redistribute it and/or modify       *
00008  *   it under the terms of the GNU Lesser General Public License           *
00009  *   version 3.0 as published by the Free Software Foundation.             *
00010  *                                                                         *
00011  *   papyrus is distributed in the hope that it will be useful,            *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Lesser General Public License version 3.0 for more details.       *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Lesser General Public      *
00017  *   License along with the papyrus library. If not, see                   *
00018  *   <http://www.gnu.org/licenses/>.                                       *
00019  ***************************************************************************/
00020 #ifndef PAPYRUSDRAWABLECONTROLLER_H
00021 #define PAPYRUSDRAWABLECONTROLLER_H
00022 
00023 #include <papyrus/enums.h>
00024 #include <papyrus/pointer.h>
00025 #include <papyrus/drawableset.h>
00026 #include <papyrus/controller.h>
00027 
00028 namespace Papyrus
00029 {
00030 
00037   class DrawableController : public Controller, public DrawableSet
00038   {
00039     protected:
00040       
00041       DrawableController( const Glib::ustring& id, DrawableSet::pointer drawables );
00042 
00043     public:
00044 
00045       typedef PapyrusPointer<DrawableController> pointer;
00046 
00047       static pointer create( const Glib::ustring& id=Glib::ustring(), DrawableSet::pointer drawables=DrawableSet::pointer() );
00048 
00049       static pointer create( DrawableSet::pointer drawables );
00050 
00051       virtual ~DrawableController();
00052 
00053     protected:
00054 
00055       virtual void on_drawable_added( Drawable::pointer d );
00056 
00057       virtual void on_drawable_removed( Drawable::pointer d );
00058 
00059       virtual void on_drawables_cleared( );
00060 
00061     private:
00062 
00063       void on_drawable_added_proxy( Drawable::pointer d );
00064 
00065       void on_drawable_removed_proxy( Drawable::pointer d );
00066 
00067       void on_drawables_cleared_proxy( );
00068 
00069   };
00070 
00071 }
00072 
00073 #endif

Generated on Fri Apr 16 12:40:10 2010 for papyrus by doxygen 1.6.1