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