xoreos  0.0.5
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Aurora::GFXCharacter Class Reference

Element placeable in the current scene. More...

#include <gfxfile.h>

Classes

struct  Bitmap
 An image. More...
 
struct  EditText
 An edit text character, mostly used as static, but sometimes also used as editable text. More...
 
struct  EditTextLayout
 Optional layout for edit texts. More...
 
struct  ExternalImage
 An external image character, which loads an image resource from the guis texture atlas files. More...
 
struct  Fill
 A simple one-color fill. More...
 
struct  FillStyle
 A style for filling. More...
 
struct  Font
 A Scaleform GFx font, usable for rendering letters in the ui. More...
 
struct  Glyph
 A character glyph for a font. More...
 
struct  Gradient
 A Gradient. More...
 
struct  GradientRecord
 Part of a gradient. More...
 
struct  KerningCode
 A kerning code, which determines the adjustment of specific characters to another. More...
 
struct  LineStyle
 A style for the border. More...
 
struct  Shape
 A shape character, which is a static image shape with bounds. More...
 
struct  ShapeRecord
 A record for a shape. More...
 
struct  Sprite
 A sprite character, which is basically a container with control statements and other characters. More...
 

Public Types

enum  CharacterType {
  kSprite, kShape, kEditText, kFont,
  kExternalImage
}
 The possible element types, used in the scene. More...
 
enum  TextAlignment { kLeft = 0, kRight = 1, kCenter = 2, kJustify = 3 }
 The alignment of text. More...
 

Public Member Functions

CharacterType getType () const
 Get the type of this character. More...
 
uint16 getId () const
 Get the character id of this character. More...
 
void getSprite (Sprite &sprite) const
 Get the sprite character. More...
 
void getShape (Shape &shape) const
 Get the shape character. More...
 
void getFont (Font &font) const
 Get the font character. More...
 
void getEditText (EditText &editText) const
 Get the edit text character. More...
 
void getExternalImage (ExternalImage &externalImage) const
 Get the external image character. More...
 

Static Public Member Functions

static GFXCharacter createSprite (uint16 id, Sprite sprite)
 Create a sprite character. More...
 
static GFXCharacter createShape (uint16 id, Shape shape)
 Create a shape character. More...
 
static GFXCharacter createEditText (uint16 id, EditText editText)
 Create an edit text character. More...
 
static GFXCharacter createFont (uint16 id, Font font)
 Create a font character. More...
 
static GFXCharacter createExternalImage (uint16 id, ExternalImage externalImage)
 Create an external image character. More...
 

Private Member Functions

 GFXCharacter (uint16 id, CharacterType type)
 

Private Attributes

boost::variant< Sprite, Shape, EditText, Font, ExternalImage_value
 
uint16 _id
 
CharacterType _type
 

Detailed Description

Element placeable in the current scene.

Definition at line 49 of file gfxfile.h.

Member Enumeration Documentation

◆ CharacterType

The possible element types, used in the scene.

Enumerator
kSprite 
kShape 
kEditText 
kFont 
kExternalImage 

Definition at line 54 of file gfxfile.h.

◆ TextAlignment

The alignment of text.

Enumerator
kLeft 
kRight 
kCenter 
kJustify 

Definition at line 156 of file gfxfile.h.

Constructor & Destructor Documentation

◆ GFXCharacter()

Aurora::GFXCharacter::GFXCharacter ( uint16  id,
CharacterType  type 
)
private

Definition at line 115 of file gfxfile.cpp.

Member Function Documentation

◆ createEditText()

GFXCharacter Aurora::GFXCharacter::createEditText ( uint16  id,
EditText  editText 
)
static

Create an edit text character.

Definition at line 99 of file gfxfile.cpp.

References _value, and kEditText.

Referenced by Aurora::GFXFile::readDefineEditText().

Here is the caller graph for this function:

◆ createExternalImage()

GFXCharacter Aurora::GFXCharacter::createExternalImage ( uint16  id,
ExternalImage  externalImage 
)
static

Create an external image character.

Definition at line 107 of file gfxfile.cpp.

References _value, and kExternalImage.

Referenced by Aurora::GFXFile::readGFXDefineExternalImage().

Here is the caller graph for this function:

◆ createFont()

GFXCharacter Aurora::GFXCharacter::createFont ( uint16  id,
Font  font 
)
static

Create a font character.

Definition at line 91 of file gfxfile.cpp.

References _value, and kFont.

Referenced by Aurora::GFXFile::readDefineFont().

Here is the caller graph for this function:

◆ createShape()

GFXCharacter Aurora::GFXCharacter::createShape ( uint16  id,
Shape  shape 
)
static

Create a shape character.

Definition at line 83 of file gfxfile.cpp.

References _value, and kShape.

Referenced by Aurora::GFXFile::readDefineShape().

Here is the caller graph for this function:

◆ createSprite()

GFXCharacter Aurora::GFXCharacter::createSprite ( uint16  id,
Sprite  sprite 
)
static

Create a sprite character.

Definition at line 75 of file gfxfile.cpp.

References _value, and kSprite.

Referenced by Aurora::GFXFile::readDefineSprite().

Here is the caller graph for this function:

◆ getEditText()

void Aurora::GFXCharacter::getEditText ( EditText editText) const

Get the edit text character.

Definition at line 147 of file gfxfile.cpp.

References _type, _value, and kEditText.

◆ getExternalImage()

void Aurora::GFXCharacter::getExternalImage ( ExternalImage externalImage) const

Get the external image character.

Definition at line 154 of file gfxfile.cpp.

References _type, _value, and kExternalImage.

◆ getFont()

void Aurora::GFXCharacter::getFont ( Font font) const

Get the font character.

Definition at line 140 of file gfxfile.cpp.

References _type, _value, and kFont.

◆ getId()

uint16 Aurora::GFXCharacter::getId ( ) const

Get the character id of this character.

Definition at line 122 of file gfxfile.cpp.

References _id.

◆ getShape()

void Aurora::GFXCharacter::getShape ( Shape shape) const

Get the shape character.

Definition at line 133 of file gfxfile.cpp.

References _type, _value, and kShape.

◆ getSprite()

void Aurora::GFXCharacter::getSprite ( Sprite sprite) const

Get the sprite character.

Definition at line 126 of file gfxfile.cpp.

References _type, _value, and kSprite.

◆ getType()

GFXCharacter::CharacterType Aurora::GFXCharacter::getType ( ) const

Get the type of this character.

Definition at line 118 of file gfxfile.cpp.

References _type.

Member Data Documentation

◆ _id

uint16 Aurora::GFXCharacter::_id
private

Definition at line 268 of file gfxfile.h.

Referenced by getId().

◆ _type

CharacterType Aurora::GFXCharacter::_type
private

Definition at line 269 of file gfxfile.h.

Referenced by getEditText(), getExternalImage(), getFont(), getShape(), getSprite(), and getType().

◆ _value

boost::variant< Sprite, Shape, EditText, Font, ExternalImage > Aurora::GFXCharacter::_value
private

The documentation for this class was generated from the following files: