boxed.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation version 2.1.                *
00008  *                                                                         *
00009  *   This program is distributed in the hope that it will be useful,       *
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012  *   GNU General Public License for more details.                          *
00013  *                                                                         *
00014  *   You should have received a copy of the GNU Lesser General Public      *
00015  *   License along with this library; if not, write to the                 *
00016  *   Free Software Foundation, Inc.,                                       *
00017  *   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA              *
00018  ***************************************************************************/
00019 #ifndef PAPYRUSBOXED_H
00020 #define PAPYRUSBOXED_H
00021 
00022 #include <papyrus/group.h>
00023 #include <papyrus/rectangle.h>
00024 
00043 namespace Papyrus {
00044 
00048   class Boxed : public Group {
00049     public:
00050       typedef PapyrusSmartPointer<Boxed> pointer;
00051 
00052       Boxed();
00053 
00054       static Boxed::pointer create();
00055 
00056       ~Boxed();
00057 
00058       Rectangle::pointer get_box();
00059 
00060       virtual bool add( Drawable::pointer item, int layer=0, bool drawing_only=true );
00061 
00062       PAPYRUS_CLASS_NAME("Boxed Group");
00063 
00064       PAPYRUS_CLONE_METHOD( Boxed );
00065 
00066     protected:
00067       Rectangle::pointer m_box;
00068 
00073       virtual void rebuild_extents();
00074 
00075       virtual void on_child_added( Drawable::pointer child );
00076 
00077       virtual void on_child_removed( Drawable::pointer child );
00078 
00079     private:
00080 
00081       virtual void on_child_added_proxy( Drawable::pointer child );
00082 
00083       virtual void on_child_removed_proxy( Drawable::pointer child );
00084 
00085   };
00086 
00087 }
00088 
00089 #endif

Generated on Sun Mar 11 10:01:27 2007 by  doxygen 1.5.1