Add exception missing from previous commit.
[libsub.git] / src / horizontal_position.h
index df592d9a46c6b8bb90176ae36d54424b619b8ac2..76d09e6abe52ffeb19c7751cb03635a81b00ea09 100644 (file)
 #ifndef LIBSUB_HORIZONTAL_POSITION_H
 #define LIBSUB_HORIZONTAL_POSITION_H
 
+#include "horizontal_reference.h"
+
 namespace sub {
 
-enum HorizontalPosition
+class HorizontalPosition
 {
-       LEFT,
-       CENTRE,
-       RIGHT
+public:
+       HorizontalPosition ()
+               : reference(HORIZONTAL_CENTRE_OF_SCREEN)
+               , proportional(0)
+       {}
+
+       HorizontalReference reference;
+       /** proportion of screen width offset from reference */
+       float proportional;
+
+       bool operator== (HorizontalPosition const & other) const;
 };
-       
+
 }
 
 #endif