]> git.lyx.org Git - lyx.git/blobdiff - src/changes.h
Fix event loop to no longer eat CPU
[lyx.git] / src / changes.h
index 00429d94a1e6c661f9e9b18cdc02efc635a9b612..1103bd2012fe204f962369d6fbb651c4c28513fa 100644 (file)
@@ -1,11 +1,14 @@
+// -*- C++ -*-
 /**
  * \file changes.h
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * Record changes in a paragraph.
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
  *
- * \author John Levon <levon@movementarian.org>
+ * Record changes in a paragraph.
  */
 
 #ifndef CHANGES_H
 
 #include <vector>
 #include <iosfwd>
-#include <ctime>
 
-struct Change {
+
+class Change {
+public:
        /// the type of change
        enum Type {
                UNCHANGED, // no change
@@ -85,14 +89,16 @@ public:
 
        /// output latex to mark a transition between two changetypes
        /// returns length of text outputted
-       static int latexMarkChange(std::ostream & os, Change::Type old, Change::Type change);
+       static int latexMarkChange(std::ostream & os, Change::Type old,
+               Change::Type change, bool const & output);
 
        /// output .lyx file format for transitions between changes
        static void lyxMarkChange(std::ostream & os, int & column,
                lyx::time_type curtime, Change const & old, Change const & change);
 
 private:
-       struct Range {
+       class Range {
+       public:
                Range(lyx::pos_type s, lyx::pos_type e)
                        : start(s), end(e) {}
 
@@ -118,7 +124,8 @@ private:
        friend bool operator==(Range const & r1, Range const & r2);
        friend bool operator!=(Range const & r1, Range const & r2);
 
-       struct ChangeRange {
+       class ChangeRange {
+       public:
                ChangeRange(lyx::pos_type s, lyx::pos_type e, Change c)
                        : range(Range(s, e)), change(c) {}
                Range range;