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, bool drawing_only=true ) {
00061         return Group::add(item, drawing_only);
00062       }
00063 
00064       PAPYRUS_CLASS_NAME("Boxed Group");
00065 
00066       PAPYRUS_CLONE_METHOD( Boxed );
00067 
00068     protected:
00069       Rectangle::pointer m_box;
00070 
00075       virtual void draw( Cairo::RefPtr<Cairo::Context> cairo );
00076 
00081       virtual void update_extents();
00082 
00083   };
00084 
00085 }
00086 
00087 #endif

Generated on Sun Jan 7 22:53:57 2007 by  doxygen 1.5.1