X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fhorizontal_position.h;h=76d09e6abe52ffeb19c7751cb03635a81b00ea09;hb=80eb14cdc36b038ce37af899c42f1b31f9eb7679;hp=df592d9a46c6b8bb90176ae36d54424b619b8ac2;hpb=efb00e9649aa03a2c12bb6a63c5e7efdfd99506a;p=libsub.git diff --git a/src/horizontal_position.h b/src/horizontal_position.h index df592d9..76d09e6 100644 --- a/src/horizontal_position.h +++ b/src/horizontal_position.h @@ -20,15 +20,25 @@ #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