projects
/
libsub.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump libdcp.
[libsub.git]
/
src
/
subtitle.h
diff --git
a/src/subtitle.h
b/src/subtitle.h
index 795b11e65a983cc065b46d161744601a205cfda5..390631449b811105e245d4fd370338f3ab624400 100644
(file)
--- a/
src/subtitle.h
+++ b/
src/subtitle.h
@@
-20,12
+20,9
@@
#ifndef LIBSUB_SUBTITLE_H
#define LIBSUB_SUBTITLE_H
#ifndef LIBSUB_SUBTITLE_H
#define LIBSUB_SUBTITLE_H
-#include "frame_time.h"
-#include "metric_time.h"
#include "colour.h"
#include "vertical_reference.h"
#include "effect.h"
#include "colour.h"
#include "vertical_reference.h"
#include "effect.h"
-#include "time_pair.h"
#include "font_size.h"
#include "vertical_position.h"
#include "raw_subtitle.h"
#include "font_size.h"
#include "vertical_position.h"
#include "raw_subtitle.h"
@@
-35,7
+32,11
@@
namespace sub {
namespace sub {
-/** A piece of text with a single font, style, size etc. */
+/** @class Block
+ * @brief A block of text within a subtitle's line
+ *
+ * This represents a block of text which has a particular style (font, size, effect, colour etc.)
+ */
class Block
{
public:
class Block
{
public:
@@
-51,7
+52,7
@@
public:
/** Subtitle text in UTF-8 */
std::string text;
/** Subtitle text in UTF-8 */
std::string text;
-
std::string
font;
+
boost::optional<std::string>
font;
/** font size */
FontSize font_size;
/** font size */
FontSize font_size;
@@
-65,7
+66,11
@@
public:
bool underline; ///< true to underline
};
bool underline; ///< true to underline
};
-/** A line of text */
+/** @class Line
+ * @brief A line of text within a subtitle.
+ *
+ * This represents a line of text which has a particular vertical position.
+ */
class Line
{
public:
class Line
{
public:
@@
-82,6
+87,12
@@
public:
bool same_metadata (RawSubtitle) const;
};
bool same_metadata (RawSubtitle) const;
};
+/** @class Subtitle
+ * @brief A subtitle which has been collected into lines and blocks.
+ *
+ * This represents a chunk of text which appears and disappears at some particular
+ * times.
+ */
class Subtitle
{
public:
class Subtitle
{
public:
@@
-92,12
+103,12
@@
public:
Subtitle (RawSubtitle s);
/** from time */
Subtitle (RawSubtitle s);
/** from time */
- Time
Pair
from;
+ Time from;
/** to time */
/** to time */
- Time
Pair
to;
+ Time to;
- boost::optional<
Metric
Time> fade_up;
- boost::optional<
Metric
Time> fade_down;
+ boost::optional<Time> fade_up;
+ boost::optional<Time> fade_down;
std::list<Line> lines;
std::list<Line> lines;