00001 /*************************************************************************** 00002 * Copyright (C) 2007 by Mike Polan * 00003 * kanadakid@gmail.com * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 // character.h: the Character class 00021 00022 #ifndef CHARACTER_H 00023 #define CHARACTER_H 00024 00025 #include <gdkmm/pixbuf.h> 00026 #include <glibmm/ustring.h> 00027 00032 class Character { 00033 public: 00035 enum Gender { GENDER_MALE=0, GENDER_FEMALE, GENDER_UNKNOWN }; 00036 00043 Character(const Glib::ustring &internal="", const Glib::ustring &name="", 00044 const Glib::ustring &caption="", const Glib::ustring &description=""); 00045 00049 void set_internal_name(const Glib::ustring &name) { m_InternalName=name; } 00050 00054 Glib::ustring get_internal_name() const { return m_InternalName; } 00055 00059 void set_name(const Glib::ustring &name) { m_Name=name; } 00060 00064 Glib::ustring get_name() const { return m_Name; } 00065 00069 void set_gender(const Gender &g) { m_Gender=g; } 00070 00074 Gender get_gender() const { return m_Gender; } 00075 00079 void set_caption(const Glib::ustring &cap) { m_Caption=cap; } 00080 00084 Glib::ustring get_caption() const { return m_Caption; } 00085 00089 void set_description(const Glib::ustring &desc) { m_Description=desc; } 00090 00094 Glib::ustring get_description() const { return m_Description; } 00095 00099 void set_sprite_name(const Glib::ustring &spr) { m_SpriteName=spr; } 00100 00104 Glib::ustring get_sprite_name() const { return m_SpriteName; } 00105 00109 void set_has_text_box_tag(bool b) { m_HasTextBoxTag=b; } 00110 00114 bool has_text_box_tag() const { return m_HasTextBoxTag; } 00115 00119 void set_text_box_tag(const Glib::RefPtr<Gdk::Pixbuf> &pixbuf) { m_TextBoxTag=pixbuf; } 00120 00124 Glib::RefPtr<Gdk::Pixbuf> get_text_box_tag() const { return m_TextBoxTag; } 00125 00129 void set_has_headshot(bool b) { m_HasHeadshot=b; } 00130 00134 bool has_headshot() const { return m_HasHeadshot; } 00135 00139 void set_headshot(const Glib::RefPtr<Gdk::Pixbuf> &pixbuf) { m_Headshot=pixbuf; } 00140 00144 Glib::RefPtr<Gdk::Pixbuf> get_headshot() const { return m_Headshot; } 00145 00146 private: 00148 Glib::ustring m_InternalName; 00149 00151 Glib::ustring m_Name; 00152 00154 Glib::ustring m_Caption; 00155 00157 Glib::ustring m_Description; 00158 00160 Glib::ustring m_SpriteName; 00161 00163 Gender m_Gender; 00164 00166 bool m_HasTextBoxTag; 00167 00169 Glib::RefPtr<Gdk::Pixbuf> m_TextBoxTag; 00170 00172 bool m_HasHeadshot; 00173 00175 Glib::RefPtr<Gdk::Pixbuf> m_Headshot; 00176 }; 00177 00178 #endif