]> git.lyx.org Git - lyx.git/blobdiff - src/Changes.h
typo
[lyx.git] / src / Changes.h
index e08221e338a8be7ca9727073c835e47442af2a9b..631419bc3065d71963d4ae9957c36c79aa934f68 100644 (file)
@@ -15,7 +15,9 @@
 #ifndef CHANGES_H
 #define CHANGES_H
 
-#include "support/docstream.h"
+#include "ColorCode.h"
+
+#include "support/strfwd.h"
 #include "support/types.h"
 #include "support/lyxtime.h"
 
@@ -35,17 +37,31 @@ public:
                DELETED // deleted text
        };
 
-       explicit Change(Type t, int a = 0, time_type ct = current_time())
+       explicit Change(Type t = UNCHANGED, int a = 0, time_t ct = current_time())
                : type(t), author(a), changetime(ct) {}
 
        /// is the change similar to the given change such that both can be merged?
-       bool isSimilarTo(Change const & change);
+       bool isSimilarTo(Change const & change) const;
+       /// The color of this change on screen
+       ColorCode color() const;
+       ///
+       bool changed() const { return type != UNCHANGED; }
+       ///
+       void setUnchanged() { type = UNCHANGED; }
+       ///
+       bool inserted() const { return type == INSERTED; }
+       ///
+       void setInserted() { type = INSERTED; }
+       ///
+       bool deleted() const { return type == DELETED; }
+       ///
+       void setDeleted() { type = DELETED; }
 
        Type type;
 
        int author;
 
-       time_type changetime;
+       time_t changetime;
 };
 
 bool operator==(Change const & l, Change const & r);