]> git.lyx.org Git - lyx.git/blob - src/dispatchresult.h
d96fb92651024d49213df418a9bab764b5c0a9fb
[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 namespace lyx {
17
18 /// Maybe this can go entirely
19 class DispatchResult {
20 public:
21         ///
22         DispatchResult() : dispatched_(false), update_(false) {}
23         ///
24         DispatchResult(bool disp, bool upd) : dispatched_(disp), update_(upd) {}
25         //
26         bool dispatched() const { return dispatched_; }
27         ///
28         void dispatched(bool disp) { dispatched_ = disp; }
29         ///
30         bool update() const { return update_; }
31         ///
32         void update(bool up) { update_ = up; }
33 private:
34         /// was the event fully dispatched?
35         bool dispatched_;
36         /// do we need to redraw the screen afterwards?
37         bool update_;
38 };
39
40
41 } // namespace lyx
42
43 #endif // DISPATCH_RESULT_H