2 Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
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.
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.
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.
20 #ifndef LIBSUB_RAW_SUBTITLE_H
21 #define LIBSUB_RAW_SUBTITLE_H
25 #include "vertical_reference.h"
27 #include "font_size.h"
28 #include "vertical_position.h"
29 #include "horizontal_position.h"
30 #include <boost/optional.hpp>
36 /** @class RawSubtitle
37 * @brief A bit of a subtitle, created with no regard for any nearby bits.
49 /** Subtitle text in UTF-8 */
51 boost::optional<std::string> font;
56 boost::optional<Effect> effect;
57 boost::optional<Colour> effect_colour;
60 bool bold; ///< true to use a bold version of font
61 bool italic; ///< true to use an italic version of font
62 bool underline; ///< true to underline
64 HorizontalPosition horizontal_position;
66 /** vertical position of the baseline of the text */
67 VerticalPosition vertical_position;
74 boost::optional<Time> fade_up;
75 boost::optional<Time> fade_down;
78 bool operator< (RawSubtitle const &, RawSubtitle const &);