Store a name with text content.
[dcpomatic.git] / src / lib / text_content.h
index e5981acafe90edda62f7aa389dbc1fd6f16efc13..0327d4a97bbbad9ab7beac32be84a2af65486314 100644 (file)
@@ -37,6 +37,7 @@ public:
        static int const Y_SCALE;
        static int const USE;
        static int const BURN;
+       static int const NAME;
        static int const LANGUAGE;
        static int const FONTS;
        static int const COLOUR;
@@ -73,6 +74,7 @@ public:
        void set_y_offset (double);
        void set_x_scale (double);
        void set_y_scale (double);
+       void set_name (std::string name);
        void set_language (std::string language);
        void set_colour (dcp::Colour);
        void unset_colour ();
@@ -123,6 +125,11 @@ public:
                return _fonts;
        }
 
+       std::string name () const {
+               boost::mutex::scoped_lock lm (_mutex);
+               return _name;
+       }
+
        std::string language () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _language;
@@ -176,6 +183,8 @@ public:
        static std::list<boost::shared_ptr<TextContent> > from_xml (Content* parent, cxml::ConstNodePtr, int version);
 
 protected:
+       /** Name (annotation text) for this subtitle */
+       std::string _name;
        /** subtitle language (e.g. "German") or empty if it is not known */
        std::string _language;