Ginga  0.13.6.1771-df200
The iTV middleware.
PlayerText.h
Go to the documentation of this file.
1 /* Copyright (C) 2006-2017 PUC-Rio/Laboratorio TeleMidia
2 
3 This file is part of Ginga (Ginga-NCL).
4 
5 Ginga is free software: you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9 
10 Ginga is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
13 License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with Ginga. If not, see <http://www.gnu.org/licenses/>. */
17 
18 #ifndef PLAYER_TEXT_H
19 #define PLAYER_TEXT_H
20 
21 #include "Player.h"
22 
24 
25 class PlayerText: public Player
26 {
27 public:
28  static cairo_surface_t *renderSurface (const string &,
29  const string &, const string &,
30  const string &, const string &,
31  Color, Color, Rect,
32  const string &, const string &,
33  bool, Rect *);
34 
35  PlayerText (Formatter *, const string &, const string &);
36  ~PlayerText ();
37  void reload () override;
38 
39 protected:
40  bool doSetProperty (PlayerProperty, const string &,
41  const string &) override;
42 private:
43  struct
44  {
47  string fontFamily;
48  string fontSize;
49  string fontStyle;
50  string fontVariant;
51  string fontWeight;
52  string horzAlign;
53  string vertAlign;
54  } _prop;
55 };
56 
58 
59 #endif // PLAYER_TEXT
GdkRGBA Color
Definition: aux-ginga.h:113
string fontWeight
Definition: PlayerText.h:51
bool doSetProperty(PlayerProperty, const string &, const string &) override
Definition: PlayerText.cpp:236
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.
Definition: PlayerText.cpp:45
Definition: PlayerText.h:25
string fontFamily
Definition: PlayerText.h:47
#define GINGA_NAMESPACE_END
Definition: aux-ginga.h:62
struct PlayerText::@1 _prop
Definition: Formatter.h:35
string fontStyle
Definition: PlayerText.h:49
string fontSize
Definition: PlayerText.h:48
string vertAlign
Definition: PlayerText.h:53
string fontVariant
Definition: PlayerText.h:50
#define GINGA_NAMESPACE_BEGIN
Definition: aux-ginga.h:61
Color fontBgColor
Definition: PlayerText.h:46
void reload() override
Definition: PlayerText.cpp:182
Color fontColor
Definition: PlayerText.h:45
Definition: Player.h:27
PlayerProperty
Definition: Player.h:37
GdkRectangle Rect
Definition: aux-ginga.h:114
string horzAlign
Definition: PlayerText.h:52
PlayerText(Formatter *, const string &, const string &)
Definition: PlayerText.cpp:158
~PlayerText()
Definition: PlayerText.cpp:177