]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlChanges.h
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlChanges.h
1 // -*- C++ -*-
2 /**
3  * \file ControlChanges.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef CONTROLCHANGES_H
13 #define CONTROLCHANGES_H
14
15 #include "Dialog.h"
16
17 namespace lyx {
18 namespace frontend {
19
20 /**
21  * A controller for the merge changes dialog.
22  */
23 class ControlChanges : public Dialog::Controller {
24 public:
25         ///
26         ControlChanges(Dialog &);
27         /// Nothing to initialise in this case.
28         virtual bool initialiseParams(std::string const &) { return true; }
29         ///
30         virtual void clearParams() {}
31         ///
32         virtual void dispatchParams() {}
33         ///
34         virtual bool isBufferDependent() const { return true; }
35         /// always true since dispatchParams() is empty
36         virtual bool canApply() const { return true; }
37
38         /// find the next merge chunk and highlight it
39         bool find();
40
41         /// return date of change
42         std::string const getChangeDate();
43
44         /// return author of change
45         std::string const getChangeAuthor();
46
47         /// accept the current merge
48         bool accept();
49
50         /// reject the current merge
51         bool reject();
52 };
53
54 } // namespace frontend
55 } // namespace lyx
56
57 #endif // CONTROLCHANGES_H