X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent_text.h;h=cd9d34bf90bce7de028a930b63d15e5316b6d830;hb=2975fa5cd5dcfaa806b07ef39c8900e07f417658;hp=fb86bc78637b599b7ff820b583583c0b324c7e2f;hpb=a1d11f2e9cc3678bd68b95c0e444c8245ef776b5;p=dcpomatic.git diff --git a/src/lib/content_text.h b/src/lib/content_text.h index fb86bc786..cd9d34bf9 100644 --- a/src/lib/content_text.h +++ b/src/lib/content_text.h @@ -18,18 +18,22 @@ */ + #ifndef DCPOMATIC_CONTENT_TEXT_H #define DCPOMATIC_CONTENT_TEXT_H + +#include "bitmap_text.h" #include "dcpomatic_time.h" #include "rect.h" #include "types.h" -#include "bitmap_text.h" #include -#include +#include + class Image; + class ContentText { public: @@ -45,9 +49,14 @@ private: dcpomatic::ContentTime _from; }; + class ContentBitmapText : public ContentText { public: + ContentBitmapText (dcpomatic::ContentTime from) + : ContentText(from) + {} + ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr im, dcpomatic::Rect r) : ContentText (f) , subs{ {im, r} } @@ -57,6 +66,7 @@ public: std::vector subs; }; + /** 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. @@ -64,12 +74,13 @@ public: class ContentStringText : public ContentText { public: - ContentStringText (dcpomatic::ContentTime f, std::list s) + ContentStringText (dcpomatic::ContentTime f, std::vector s) : ContentText (f) , subs (s) {} - std::list subs; + std::vector subs; }; + #endif