Cleanup: extract HAlign to its own files.
[libdcp.git] / src / subtitle.h
index e0132dbe8a99152792a4d5fd739b14cd6dc45559..1ca3f9d449d02c556412e9d6d588a4f2cee7706e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of libdcp.
 
 
 
 #include "dcp_time.h"
+#include "h_align.h"
+#include "v_align.h"
 
 
 namespace dcp {
 
 
+class EqualityOptions;
+
+
 class Subtitle
 {
 public:
@@ -82,6 +87,10 @@ public:
                return _v_align;
        }
 
+       float z_position() const {
+               return _z_position;
+       }
+
        Time fade_up_time () const {
                return _fade_up_time;
        }
@@ -109,6 +118,10 @@ public:
                _v_position = p;
        }
 
+       void set_z_position(float z) {
+               _z_position = z;
+       }
+
        void set_fade_up_time (Time t) {
                _fade_up_time = t;
        }
@@ -117,6 +130,7 @@ public:
                _fade_down_time = t;
        }
 
+       virtual bool equals(std::shared_ptr<const dcp::Subtitle> other, EqualityOptions const& options, NoteHandler note) const;
 
 protected:
 
@@ -127,6 +141,7 @@ protected:
                HAlign h_align,
                float v_position,
                VAlign v_align,
+               float z_position,
                Time fade_up_time,
                Time fade_down_time
                );
@@ -143,6 +158,7 @@ protected:
         */
        float _v_position = 0;
        VAlign _v_align = VAlign::CENTER;
+       float _z_position = 0;
        Time _fade_up_time;
        Time _fade_down_time;
 };