Character Class Reference

Class representing a character and its associated sprites. More...

#include <character.h>

List of all members.

Public Types

enum  Gender { GENDER_MALE = 0, GENDER_FEMALE, GENDER_UNKNOWN }
 The character's gender.

Public Member Functions

 Character (const Glib::ustring &internal="", const Glib::ustring &name="", const Glib::ustring &caption="", const Glib::ustring &description="")
 Constructor.
void set_internal_name (const Glib::ustring &name)
 Set the internal character name.
Glib::ustring get_internal_name () const
 Get the internal character name.
void set_name (const Glib::ustring &name)
 Set the display name.
Glib::ustring get_name () const
 Get the display name.
void set_gender (const Gender &g)
 Set gender of this character.
Gender get_gender () const
 Get the gender of this character.
void set_caption (const Glib::ustring &cap)
 Set the caption for this character.
Glib::ustring get_caption () const
 Get the caption for this character.
void set_description (const Glib::ustring &desc)
 Set the description for this character.
Glib::ustring get_description () const
 Get the description for this character.
void set_sprite_name (const Glib::ustring &spr)
 Set the name of the sprite file to associate with this character.
Glib::ustring get_sprite_name () const
 Get sprite file name associated with this character.
void set_has_text_box_tag (bool b)
 Set if this character has a textbox tag.
bool has_text_box_tag () const
 Check if this character has a textbox tag.
void set_text_box_tag (const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
 Set the textbox tag image.
Glib::RefPtr
< Gdk::Pixbuf > 
get_text_box_tag () const
 Get the textbox tag image.
void set_has_headshot (bool b)
 Set if this character has a headshot image.
bool has_headshot () const
 Check if this character has a headshot image.
void set_headshot (const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
 Set the headshot image.
Glib::RefPtr
< Gdk::Pixbuf > 
get_headshot () const
 Get the headshot image.

Private Attributes

Glib::ustring m_InternalName
 Internal name.
Glib::ustring m_Name
 Displayed name.
Glib::ustring m_Caption
 Caption.
Glib::ustring m_Description
 Description.
Glib::ustring m_SpriteName
 Character's sprite name.
Gender m_Gender
 Character's gender.
bool m_HasTextBoxTag
 Flag if this character has a textbox tag.
Glib::RefPtr
< Gdk::Pixbuf > 
m_TextBoxTag
 The textbox tag image.
bool m_HasHeadshot
 Flag if this character has a headshot image.
Glib::RefPtr
< Gdk::Pixbuf > 
m_Headshot
 The headshot image.


Detailed Description

Class representing a character and its associated sprites.

Each character in the case has his or her own set of attributes, and an associated sprite. All of this data is condensed in this class.


Constructor & Destructor Documentation

Character::Character ( const Glib::ustring &  internal = "",
const Glib::ustring &  name = "",
const Glib::ustring &  caption = "",
const Glib::ustring &  description = "" 
)

Constructor.

Parameters:
internal The internal name
name The display name
caption The text displayed in the green box in the Court Record
description Text displayed below the caption in the Court Record


Member Function Documentation

void Character::set_internal_name ( const Glib::ustring &  name  )  [inline]

Set the internal character name.

Parameters:
name The new internal name

Glib::ustring Character::get_internal_name (  )  const [inline]

Get the internal character name.

Returns:
The internal name

void Character::set_name ( const Glib::ustring &  name  )  [inline]

Set the display name.

Parameters:
name The character's new display name

Glib::ustring Character::get_name (  )  const [inline]

Get the display name.

Returns:
The character's display name

void Character::set_gender ( const Gender g  )  [inline]

Set gender of this character.

Parameters:
g The new gender type

Gender Character::get_gender (  )  const [inline]

Get the gender of this character.

Returns:
The character's gender

void Character::set_caption ( const Glib::ustring &  cap  )  [inline]

Set the caption for this character.

Parameters:
cap The caption

Glib::ustring Character::get_caption (  )  const [inline]

Get the caption for this character.

Returns:
The character's caption

void Character::set_description ( const Glib::ustring &  desc  )  [inline]

Set the description for this character.

Parameters:
desc The description

Glib::ustring Character::get_description (  )  const [inline]

Get the description for this character.

Returns:
This character's description

void Character::set_sprite_name ( const Glib::ustring &  spr  )  [inline]

Set the name of the sprite file to associate with this character.

Parameters:
spr Path relative to case file for the sprite

Glib::ustring Character::get_sprite_name (  )  const [inline]

Get sprite file name associated with this character.

Returns:
The file path

void Character::set_has_text_box_tag ( bool  b  )  [inline]

Set if this character has a textbox tag.

Parameters:
b true if this character has a tag, false otherwise

bool Character::has_text_box_tag (  )  const [inline]

Check if this character has a textbox tag.

Returns:
true if yes, false otherwise

void Character::set_text_box_tag ( const Glib::RefPtr< Gdk::Pixbuf > &  pixbuf  )  [inline]

Set the textbox tag image.

Parameters:
pixbuf The Gdk::Pixbuf containing textbox tag image data

Glib::RefPtr<Gdk::Pixbuf> Character::get_text_box_tag (  )  const [inline]

Get the textbox tag image.

Returns:
The textbox tag image, if it exists

void Character::set_has_headshot ( bool  b  )  [inline]

Set if this character has a headshot image.

Parameters:
b true if yes, false otherwise

bool Character::has_headshot (  )  const [inline]

Check if this character has a headshot image.

Returns:
true if yes, false otherwise

void Character::set_headshot ( const Glib::RefPtr< Gdk::Pixbuf > &  pixbuf  )  [inline]

Set the headshot image.

Parameters:
pixbuf The Gdk::Pixbuf containing the image data

Glib::RefPtr<Gdk::Pixbuf> Character::get_headshot (  )  const [inline]

Get the headshot image.

Returns:
The headshot image, if it exists


The documentation for this class was generated from the following files:
Generated on Fri Feb 22 22:34:18 2008 for Phoenix Wright Case Editor API by  doxygen 1.5.3