Ginga  0.13.6.1771-df200
The iTV middleware.
PlayerText Class Reference

#include <PlayerText.h>

Inheritance diagram for PlayerText:
Collaboration diagram for PlayerText:

Public Types

enum  PlayerState { SLEEPING = 1, OCCURRING, PAUSED }
 
enum  PlayerProperty {
  PROP_UNKNOWN = 0, PROP_BACKGROUND, PROP_BALANCE, PROP_BASS,
  PROP_BOTTOM, PROP_BOUNDS, PROP_DEBUG, PROP_DURATION,
  PROP_EXPLICIT_DUR, PROP_FOCUS_INDEX, PROP_FONT_BG_COLOR, PROP_FONT_COLOR,
  PROP_FONT_FAMILY, PROP_FONT_SIZE, PROP_FONT_STYLE, PROP_FONT_VARIANT,
  PROP_FONT_WEIGHT, PROP_FREEZE, PROP_HEIGHT, PROP_HORZ_ALIGN,
  PROP_LEFT, PROP_LOCATION, PROP_MUTE, PROP_RIGHT,
  PROP_SIZE, PROP_TOP, PROP_TRANSPARENCY, PROP_TREBLE,
  PROP_VERT_ALIGN, PROP_VISIBLE, PROP_VOLUME, PROP_WIDTH,
  PROP_Z_INDEX
}
 

Public Member Functions

 PlayerText (Formatter *, const string &, const string &)
 
 ~PlayerText ()
 
void reload () override
 
PlayerState getState ()
 
bool isFocused ()
 
Time getTime ()
 
void incTime (Time)
 
Time getDuration ()
 
void setDuration (Time)
 
bool getEOS ()
 
void setEOS (bool)
 
void getZ (int *, int *)
 
void setZ (int, int)
 
virtual void start ()
 
virtual void stop ()
 
virtual void pause ()
 
virtual void resume ()
 
virtual string getProperty (const string &)
 
virtual void setProperty (const string &, const string &)
 
void resetProperties ()
 
void resetProperties (set< string > *)
 
void schedulePropertyAnimation (const string &, const string &, const string &, Time)
 
virtual void redraw (cairo_t *)
 
virtual void sendKeyEvent (const string &, bool)
 

Static Public Member Functions

static cairo_surface_t * renderSurface (const string &, const string &, const string &, const string &, const string &, Color, Color, Rect, const string &, const string &, bool, Rect *)
 Creates surface from text. More...
 
static string getCurrentFocus ()
 
static void setCurrentFocus (const string &)
 
static PlayerProperty getPlayerProperty (const string &, string *)
 
static PlayercreatePlayer (Formatter *, const string &, const string &, const string &)
 

Protected Member Functions

bool doSetProperty (PlayerProperty, const string &, const string &) override
 

Protected Attributes

Formatter_formatter
 
bool _opengl
 
string _id
 
string _uri
 
PlayerState _state
 
Time _time
 
bool _eos
 
cairo_surface_t * _surface
 
guint _gltexture
 
bool _dirty
 
PlayerAnimator_animator
 
map< string, string > _properties
 

Private Attributes

struct {
   Color   fontColor
 
   Color   fontBgColor
 
   string   fontFamily
 
   string   fontSize
 
   string   fontStyle
 
   string   fontVariant
 
   string   fontWeight
 
   string   horzAlign
 
   string   vertAlign
 
_prop
 

Member Enumeration Documentation

enum Player::PlayerProperty
inherited
Enumerator
PROP_UNKNOWN 
PROP_BACKGROUND 
PROP_BALANCE 
PROP_BASS 
PROP_BOTTOM 
PROP_BOUNDS 
PROP_DEBUG 
PROP_DURATION 
PROP_EXPLICIT_DUR 
PROP_FOCUS_INDEX 
PROP_FONT_BG_COLOR 
PROP_FONT_COLOR 
PROP_FONT_FAMILY 
PROP_FONT_SIZE 
PROP_FONT_STYLE 
PROP_FONT_VARIANT 
PROP_FONT_WEIGHT 
PROP_FREEZE 
PROP_HEIGHT 
PROP_HORZ_ALIGN 
PROP_LEFT 
PROP_LOCATION 
PROP_MUTE 
PROP_RIGHT 
PROP_SIZE 
PROP_TOP 
PROP_TRANSPARENCY 
PROP_TREBLE 
PROP_VERT_ALIGN 
PROP_VISIBLE 
PROP_VOLUME 
PROP_WIDTH 
PROP_Z_INDEX 
enum Player::PlayerState
inherited
Enumerator
SLEEPING 
OCCURRING 
PAUSED 

Constructor & Destructor Documentation

PlayerText::PlayerText ( Formatter formatter,
const string &  id,
const string &  uri 
)
PlayerText::~PlayerText ( )

Member Function Documentation

Player * Player::createPlayer ( Formatter formatter,
const string &  id,
const string &  uri,
const string &  mime 
)
staticinherited
string Player::getCurrentFocus ( )
staticinherited
Time Player::getDuration ( )
inherited

Referenced by Media::sendTickEvent().

bool Player::getEOS ( )
inherited
Player::PlayerProperty Player::getPlayerProperty ( const string &  name,
string *  defval 
)
staticinherited
string Player::getProperty ( const string &  name)
virtualinherited

Referenced by Media::sendKeyEvent().

Player::PlayerState Player::getState ( )
inherited

Referenced by Media::doStop().

Time Player::getTime ( )
inherited
void Player::getZ ( int *  z,
int *  zorder 
)
inherited

References tryset.

Referenced by Media::getZ().

void Player::incTime ( Time  inc)
inherited

Referenced by Media::sendTickEvent().

bool Player::isFocused ( )
inherited
void Player::pause ( )
virtualinherited

Reimplemented in PlayerLua, and PlayerVideo.

References g_assert(), and TRACE.

Referenced by PlayerVideo::pause().

void Player::redraw ( cairo_t *  cr)
virtualinherited

Reimplemented in PlayerLua, and PlayerVideo.

References GL::draw_quad(), and g_assert().

Referenced by PlayerVideo::redraw(), PlayerLua::redraw(), and Media::redraw().

GINGA_NAMESPACE_BEGIN cairo_surface_t * PlayerText::renderSurface ( const string &  text,
const string &  family,
const string &  weight,
const string &  style,
const string &  size,
Color  fg,
Color  bg,
Rect  rect,
const string &  halign,
const string &  valign,
bool  antialias,
Rect ink 
)
static

Creates surface from text.

Parameters
textText to be rendered.
familyFont family.
weightFont weight ("normal" or "bold").
styleFont style ("normal" or "italic").
sizeFont size
fgText color.
bgBackground color.
rectDimensions of the resulting surface.
halignHorizontal alignment ("left", "center", "right", or "justified").
valignVertical alignment ("bottom", "middle", or "top").
antialiasWhether to use antialias.
inkVariable to store the inked rectangle.
Returns
The resulting surface.

References ERROR, g_assert_nonnull(), and xstrbuild().

Referenced by Formatter::redraw(), Player::redrawDebuggingInfo(), and reload().

void Player::resetProperties ( )
inherited
void Player::resetProperties ( set< string > *  props)
inherited
void Player::resume ( )
virtualinherited

Reimplemented in PlayerLua, and PlayerVideo.

References g_assert(), and TRACE.

Referenced by PlayerVideo::resume().

void Player::schedulePropertyAnimation ( const string &  name,
const string &  from,
const string &  to,
Time  dur 
)
inherited

Referenced by Media::setProperty().

void Player::sendKeyEvent ( const string &  ,
bool   
)
virtualinherited

Reimplemented in PlayerLua.

References Player::_currentFocus.

Referenced by Media::sendKeyEvent().

void Player::setCurrentFocus ( const string &  index)
staticinherited

References TRACE.

Referenced by MediaSettings::setProperty().

void Player::setDuration ( Time  duration)
inherited
void Player::setEOS ( bool  eos)
inherited
void Player::setProperty ( const string &  name,
const string &  value 
)
virtualinherited
void Player::setZ ( int  z,
int  zorder 
)
inherited
void Player::start ( )
virtualinherited

Reimplemented in PlayerLua, and PlayerVideo.

References g_assert(), and TRACE.

Referenced by PlayerVideo::start(), PlayerLua::start(), and Media::startTransition().

void Player::stop ( )
virtualinherited

Reimplemented in PlayerHTML, PlayerLua, and PlayerVideo.

References g_assert(), and TRACE.

Referenced by Media::doStop(), PlayerVideo::stop(), and PlayerLua::stop().

Member Data Documentation

PlayerAnimator* Player::_animator
protectedinherited
bool Player::_dirty
protectedinherited

Referenced by doSetProperty().

bool Player::_eos
protectedinherited
Formatter* Player::_formatter
protectedinherited
guint Player::_gltexture
protectedinherited
string Player::_id
protectedinherited
bool Player::_opengl
protectedinherited
struct { ... } PlayerText::_prop

Referenced by doSetProperty(), and reload().

map<string, string> Player::_properties
protectedinherited
cairo_surface_t* Player::_surface
protectedinherited
Time Player::_time
protectedinherited
string Player::_uri
protectedinherited
guint8 Player::alpha
inherited
Color Player::bgColor
inherited
bool Player::debug
inherited
Time Player::duration
inherited
string Player::focusIndex
inherited
Color PlayerText::fontBgColor
Color PlayerText::fontColor
string PlayerText::fontFamily
string PlayerText::fontSize
string PlayerText::fontStyle
string PlayerText::fontVariant
string PlayerText::fontWeight
string PlayerText::horzAlign
Rect Player::rect
inherited
string PlayerText::vertAlign
bool Player::visible
inherited
int Player::z
inherited
int Player::zorder
inherited

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