00001 /*************************************************************************** 00002 * Copyright (C) 2004,2009 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 PAPYRUSFACE_H 00021 #define PAPYRUSFACE_H 00022 00023 #include <papyrus/drawable.h> 00024 00025 namespace Papyrus 00026 { 00027 00034 class Face : public Drawable 00035 { 00036 public: 00037 typedef enum TYPE { 00038 SMILEY, 00039 } TYPE; 00040 00041 protected: 00042 00043 Face ( const Glib::ustring& id, double size=20.0, TYPE type = SMILEY ); 00044 00045 public: 00046 PAPYRUS_DRAWABLE(Face); 00047 00048 static pointer create ( double size=20.0, TYPE type = SMILEY ); 00049 00050 static pointer create ( const Glib::ustring& id, double size=20.0, TYPE type = SMILEY ); 00051 00052 virtual ~Face(); 00053 00054 virtual void draw ( Context& cairo ) const; 00055 00056 TYPE type(); 00057 void set_type ( TYPE type ); 00058 00059 double size(); 00060 void set_size ( double size ); 00061 00062 void set_size_type ( double size, TYPE type ); 00063 00064 protected: 00065 TYPE m_type; 00066 double m_size; 00067 00068 }; 00069 00070 } 00071 00072 #endif