]> git.lyx.org Git - lyx.git/blob - src/DispatchResult.h
Update of documentation in the source related to bug 4135 and the function callback...
[lyx.git] / src / DispatchResult.h
1 // -*- C++ -*-
2 /**
3  * \file DispatchResult.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author none
8  * \author Lars Gullik Bjønnes
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef DISPATCH_RESULT_H
14 #define DISPATCH_RESULT_H
15
16 #include "update_flags.h"
17
18 namespace lyx {
19
20 /// Maybe this can go entirely
21 class DispatchResult {
22 public:
23         ///
24         DispatchResult() : dispatched_(false), update_(Update::None) {}
25         ///
26         DispatchResult(bool disp, Update::flags f) : dispatched_(disp), update_(f) {}
27         //
28         bool dispatched() const { return dispatched_; }
29         ///
30         void dispatched(bool disp) { dispatched_ = disp; }
31         ///
32         Update::flags update() const { return update_; }
33         ///
34         void update(Update::flags f) { update_ = f; }
35 private:
36         /// was the event fully dispatched?
37         bool dispatched_;
38         /// do we need to redraw the screen afterwards?
39         Update::flags update_;
40 };
41
42
43 } // namespace lyx
44
45 #endif // DISPATCH_RESULT_H