papyrus logo

reference.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 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 PAPYRUSREFERENCE_H
00021 #define PAPYRUSREFERENCE_H
00022 
00023 #include <papyrus/drawable.h>
00024 
00025 namespace Papyrus
00026 {
00027 
00047   class Reference : public Drawable
00048   {
00049     protected:
00050       Reference ( const Glib::ustring& id, Drawable::pointer ref );
00051 
00052     public:
00053       typedef PapyrusPointer<Reference> pointer;
00054 
00056       static pointer create ( Drawable::pointer ref = Drawable::pointer() );
00057 
00062       static pointer create ( const Glib::ustring& id, Drawable::pointer ref = Drawable::pointer() );
00063 
00065       ~Reference();
00066 
00068       PAPYRUS_CLASS_NAME ( "Reference" );
00069 
00071       PAPYRUS_CLONE_METHOD ( Reference );
00072 
00074       virtual void draw ( Cairo::RefPtr<Cairo::Context> cairo ) const;
00075 
00080       Drawable::pointer referenced();
00081 
00086       void set_referenced ( Drawable::pointer d );
00087 
00091       virtual Region extents(const Matrix& m = Matrix::Identity, ExtentsPerformance ep=EXTENTS_QUICK) const;
00092       
00094       virtual Matrix global_matrix() const;
00095 
00096       virtual Glib::ustring svg(unsigned depth=0);
00097 
00098     protected:
00100       Drawable::pointer m_referenced;
00101 
00103       virtual void update_extents() { }
00104   };
00105 
00106 }
00107 
00108 #endif

Generated on Wed Mar 18 12:34:04 2009 for papyrus by doxygen 1.5.7.1