Switch some list -> vector for consistency.
[dcpomatic.git] / src / lib / content_text.h
index 0c0df1ee63bdce15f3c5d9905af302c31a10c43d..cd9d34bf90bce7de028a930b63d15e5316b6d830 100644 (file)
 
 */
 
+
 #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 <dcp/subtitle_string.h>
-#include <list>
+#include <vector>
+
 
 class Image;
 
+
 class ContentText
 {
 public:
@@ -45,18 +49,24 @@ private:
        dcpomatic::ContentTime _from;
 };
 
+
 class ContentBitmapText : public ContentText
 {
 public:
-       ContentBitmapText (dcpomatic::ContentTime f, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
+       ContentBitmapText (dcpomatic::ContentTime from)
+               : ContentText(from)
+       {}
+
+       ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr<const Image> im, dcpomatic::Rect<double> r)
                : ContentText (f)
-               , sub (im, r)
+               , subs{ {im, r} }
        {}
 
-       /* Our text, with its rectangle unmodified by any offsets or scales that the content specifies */
-       BitmapText sub;
+       /* Our texts, with their rectangles unmodified by any offsets or scales that the content specifies */
+       std::vector<BitmapText> 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<dcp::SubtitleString> s)
+       ContentStringText (dcpomatic::ContentTime f, std::vector<dcp::SubtitleString> s)
                : ContentText (f)
                , subs (s)
        {}
 
-       std::list<dcp::SubtitleString> subs;
+       std::vector<dcp::SubtitleString> subs;
 };
 
+
 #endif