summaryrefslogtreecommitdiff
path: root/src/lib/content_text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/content_text.h')
-rw-r--r--src/lib/content_text.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/content_text.h b/src/lib/content_text.h
index 17ec579df..eaba64ecf 100644
--- a/src/lib/content_text.h
+++ b/src/lib/content_text.h
@@ -23,6 +23,7 @@
#include "dcpomatic_time.h"
#include "rect.h"
+#include "types.h"
#include "bitmap_text.h"
#include <dcp/subtitle_string.h>
#include <list>
@@ -32,23 +33,29 @@ class Image;
class ContentText
{
public:
- explicit ContentText (ContentTime f)
+ explicit ContentText (ContentTime f, TextType t)
: _from (f)
+ , _type (t)
{}
ContentTime from () const {
return _from;
}
+ TextType type () const {
+ return _type;
+ }
+
private:
ContentTime _from;
+ TextType _type;
};
class ContentBitmapText : public ContentText
{
public:
- ContentBitmapText (ContentTime f, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
- : ContentText (f)
+ ContentBitmapText (ContentTime f, TextType type, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
+ : ContentText (f, type)
, sub (im, r)
{}
@@ -56,15 +63,15 @@ public:
BitmapText sub;
};
-/** A text subtitle. We store the time period separately (as well as in the dcp::SubtitleStrings)
+/** A text caption. We store the time period separately (as well as in the dcp::SubtitleStrings)
* as the dcp::SubtitleString timings are sometimes quite heavily quantised and this causes problems
* when we want to compare the quantised periods to the unquantised ones.
*/
class ContentPlainText : public ContentText
{
public:
- ContentPlainText (ContentTime f, std::list<dcp::SubtitleString> s)
- : ContentText (f)
+ ContentPlainText (ContentTime f, TextType type, std::list<dcp::SubtitleString> s)
+ : ContentText (f, type)
, subs (s)
{}