2003-10-29 10:47:21 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
2007-04-26 04:41:58 +00:00
|
|
|
|
* \file DispatchResult.h
|
2003-10-29 10:47:21 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author none
|
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef DISPATCH_RESULT_H
|
|
|
|
|
#define DISPATCH_RESULT_H
|
|
|
|
|
|
2007-04-28 20:44:46 +00:00
|
|
|
|
#include "update_flags.h"
|
2006-10-22 11:46:36 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
namespace lyx {
|
|
|
|
|
|
2004-03-18 12:53:43 +00:00
|
|
|
|
/// Maybe this can go entirely
|
2003-10-29 10:47:21 +00:00
|
|
|
|
class DispatchResult {
|
|
|
|
|
public:
|
2004-03-18 12:53:43 +00:00
|
|
|
|
///
|
2006-10-22 11:46:36 +00:00
|
|
|
|
DispatchResult() : dispatched_(false), update_(Update::None) {}
|
2004-03-18 12:53:43 +00:00
|
|
|
|
///
|
2006-10-22 11:46:36 +00:00
|
|
|
|
DispatchResult(bool disp, Update::flags f) : dispatched_(disp), update_(f) {}
|
2004-03-18 12:53:43 +00:00
|
|
|
|
//
|
|
|
|
|
bool dispatched() const { return dispatched_; }
|
|
|
|
|
///
|
|
|
|
|
void dispatched(bool disp) { dispatched_ = disp; }
|
|
|
|
|
///
|
2006-10-22 11:46:36 +00:00
|
|
|
|
Update::flags update() const { return update_; }
|
2004-03-18 12:53:43 +00:00
|
|
|
|
///
|
2006-10-22 11:46:36 +00:00
|
|
|
|
void update(Update::flags f) { update_ = f; }
|
2003-10-29 13:24:57 +00:00
|
|
|
|
private:
|
2004-03-18 12:53:43 +00:00
|
|
|
|
/// was the event fully dispatched?
|
2003-11-01 15:45:19 +00:00
|
|
|
|
bool dispatched_;
|
2004-03-18 12:53:43 +00:00
|
|
|
|
/// do we need to redraw the screen afterwards?
|
2006-10-22 11:46:36 +00:00
|
|
|
|
Update::flags update_;
|
2003-10-29 10:47:21 +00:00
|
|
|
|
};
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
2003-10-29 10:47:21 +00:00
|
|
|
|
#endif // DISPATCH_RESULT_H
|