libsub
 All Classes Files Functions Variables
raw_subtitle.h
1 /*
2  Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 
18 */
19 
20 #ifndef LIBSUB_RAW_SUBTITLE_H
21 #define LIBSUB_RAW_SUBTITLE_H
22 
23 #include "sub_time.h"
24 #include "colour.h"
25 #include "vertical_reference.h"
26 #include "effect.h"
27 #include "font_size.h"
28 #include "vertical_position.h"
29 #include <boost/optional.hpp>
30 #include <string>
31 #include <list>
32 
33 namespace sub {
34 
39 {
40 public:
41  RawSubtitle ()
42  : colour (1, 1, 1)
43  , bold (false)
44  , italic (false)
45  , underline (false)
46  {}
47 
49  std::string text;
50  boost::optional<std::string> font;
51 
54 
55  boost::optional<Effect> effect;
56  boost::optional<Colour> effect_colour;
57 
58  Colour colour;
59  bool bold;
60  bool italic;
61  bool underline;
62 
65 
70 
71  boost::optional<Time> fade_up;
72  boost::optional<Time> fade_down;
73 };
74 
75 bool operator< (RawSubtitle const &, RawSubtitle const &);
76 
77 }
78 
79 #endif
VerticalPosition vertical_position
Definition: raw_subtitle.h:64
std::string text
Definition: raw_subtitle.h:49
An RGB colour.
Definition: colour.h:30
Time from
Definition: raw_subtitle.h:67
Definition: collect.h:26
Vertical position of the baseline of some text, expressed in one of a number of ways.
Definition: vertical_position.h:31
Time to
Definition: raw_subtitle.h:69
bool italic
true to use an italic version of font
Definition: raw_subtitle.h:60
Definition: sub_time.h:43
A bit of a subtitle, created with no regard for any nearby bits.
Definition: raw_subtitle.h:38
A description of a font's size in one of a number of ways.
Definition: font_size.h:33
bool underline
true to underline
Definition: raw_subtitle.h:61
FontSize font_size
Definition: raw_subtitle.h:53
bool bold
true to use a bold version of font
Definition: raw_subtitle.h:59