Another minor change, but this should almost get us to the point that we
[lyx.git] / src / DispatchResult.h
blob5b209ff8f74923d1f87d81d7d81915c19e04e66d
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.
7 * \author none
8 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS.
13 #ifndef DISPATCH_RESULT_H
14 #define DISPATCH_RESULT_H
16 #include "update_flags.h"
18 #include "support/docstring.h"
20 namespace lyx {
22 /// Maybe this can go entirely
23 class DispatchResult {
24 public:
25 ///
26 DispatchResult() : dispatched_(false), update_(Update::None) {}
27 ///
28 DispatchResult(bool disp, Update::flags f) : dispatched_(disp), update_(f) {}
29 ///
30 bool dispatched() const { return dispatched_; }
31 ///
32 void dispatched(bool disp) { dispatched_ = disp; }
33 ///
34 bool error() const { return error_; }
35 ///
36 void setError(bool e) { error_ = e; }
37 ///
38 docstring message() { return message_; }
39 ///
40 void setMessage(docstring m) { message_ = m; }
41 ///
42 Update::flags update() const { return update_; }
43 ///
44 void update(Update::flags f) { update_ = f; }
45 private:
46 /// was the event fully dispatched?
47 bool dispatched_;
48 /// was there an error?
49 bool error_;
50 /// do we need to redraw the screen afterwards?
51 Update::flags update_;
52 ///
53 docstring message_;
57 } // namespace lyx
59 #endif // DISPATCH_RESULT_H