Cleanup: fix more comments/guards (and add check script).
[libdcp.git] / src / subtitle_string.h
index 0ffa6ec5b5a612fad2668f0bcbda33b2f99694a8..1ef57ff22bf8d80ae693c4c727213a56e671657b 100644 (file)
@@ -41,9 +41,9 @@
 #define LIBDCP_SUBTITLE_STRING_H
 
 
-#include "types.h"
-#include "subtitle.h"
 #include "dcp_time.h"
+#include "ruby.h"
+#include "subtitle.h"
 #include <boost/optional.hpp>
 #include <string>
 
@@ -70,6 +70,8 @@ public:
         *  @param h_align Horizontal alignment point
         *  @param v_position Vertical position as a fraction of the screen height (between 0 and 1) from v_align
         *  @param v_align Vertical alignment point
+        *  @param z_position Z position as a proportion of the primary picture width between -1 and +1;
+        *  +ve moves the image away from the viewer, -ve moves it toward the viewer, 0 is in the plane of the screen.
         *  @param direction Direction of text
         *  @param text The text to display
         *  @param effect Effect to use
@@ -92,13 +94,15 @@ public:
                HAlign h_align,
                float v_position,
                VAlign v_align,
+               float z_position,
                Direction direction,
                std::string text,
                Effect effect,
                Colour effect_colour,
                Time fade_up_time,
                Time fade_down_time,
-               float space_before
+               float space_before,
+               std::vector<Ruby> rubies
                );
 
        /** @return font ID */
@@ -156,6 +160,10 @@ public:
                return _aspect_adjust;
        }
 
+       std::vector<Ruby> const& rubies() const {
+               return _rubies;
+       }
+
        void set_font (std::string id) {
                _font = id;
        }
@@ -188,7 +196,11 @@ public:
                _effect_colour = c;
        }
 
-       bool equals(std::shared_ptr<const dcp::Subtitle> other_sub, EqualityOptions options, NoteHandler node) const override;
+       void set_rubies(std::vector<Ruby> rubies) {
+               _rubies = std::move(rubies);
+       }
+
+       bool equals(std::shared_ptr<const dcp::Subtitle> other_sub, EqualityOptions const& options, NoteHandler node) const override;
 
 private:
        /** font ID */
@@ -211,6 +223,7 @@ private:
        Effect _effect;
        Colour _effect_colour;
        float _space_before;
+       std::vector<Ruby> _rubies;
 };
 
 bool operator== (SubtitleString const & a, SubtitleString const & b);
@@ -222,3 +235,4 @@ std::ostream& operator<< (std::ostream& s, SubtitleString const & sub);
 
 
 #endif
+