#ifndef LIBSUB_RAW_SUBTITLE_H
#define LIBSUB_RAW_SUBTITLE_H
-#include "frame_time.h"
-#include "metric_time.h"
+#include "sub_time.h"
#include "colour.h"
#include "vertical_reference.h"
#include "effect.h"
-#include "time_pair.h"
#include "font_size.h"
#include "vertical_position.h"
+#include "horizontal_position.h"
#include <boost/optional.hpp>
#include <string>
-#include <list>
+#include <vector>
namespace sub {
+/** @class RawSubtitle
+ * @brief A bit of a subtitle, created with no regard for any nearby bits.
+ */
class RawSubtitle
{
public:
/** Subtitle text in UTF-8 */
std::string text;
- std::string font;
+ boost::optional<std::string> font;
/** font size */
FontSize font_size;
boost::optional<Effect> effect;
boost::optional<Colour> effect_colour;
-
+
Colour colour;
bool bold; ///< true to use a bold version of font
bool italic; ///< true to use an italic version of font
bool underline; ///< true to underline
+ HorizontalPosition horizontal_position;
+
/** vertical position of the baseline of the text */
VerticalPosition vertical_position;
/** from time */
- TimePair from;
+ Time from;
/** to time */
- TimePair to;
-
- boost::optional<MetricTime> fade_up;
- boost::optional<MetricTime> fade_down;
+ Time to;
+
+ boost::optional<Time> fade_up;
+ boost::optional<Time> fade_down;
};
-bool operator< (RawSubtitle const &, RawSubtitle const &);
+bool operator< (RawSubtitle const &, RawSubtitle const &);
}