+2003-09-18 Angus Leeming <leeming@lyx.org>
+
+ * cursor.[Ch]: use the dispatch_result wrapper class DispatchResult to remove
+ #include "insets/insetbase.h" from cursor.h.
+
2003-09-18 Angus Leeming <leeming@lyx.org>
* paragraph.[Ch] (insetAllowed): use the InsetOld::Code wrapper class
InsetOld_code to remove #include "inset.h".
- * iterators.C: add #include "inset.h"
+ * iterators.C: add #include "insets/inset.h"
2003-09-16 Martin Vermeer <martin.vermeer@hut.fi>
using std::vector;
-dispatch_result Cursor::dispatch(FuncRequest const &)
+DispatchResult Cursor::dispatch(FuncRequest const &)
{
for (int i = data_.size() - 1; i >= 0; --i) {
lyxerr << "trying to dispatch to " << data_[i].text_ << std::endl;
#include "support/types.h"
-#include "insets/insetbase.h"
-
#include <vector>
+class BufferView;
+class DispatchResult;
+class FuncRequest;
class LyXText;
///
Cursor() {}
///
- dispatch_result dispatch(FuncRequest const & cmd);
+ DispatchResult dispatch(FuncRequest const & cmd);
public:
/// mainly used as stack, bnut wee need random access
std::vector<CursorItem> data_;
2003-09-18 Angus Leeming <leeming@lyx.org>
* inset.h: add the InsetOld::Code wrapper class InsetOld_code.
+ * insetbase.h: add the dispatch_result wrapper class DispatchResult.
2003-09-16 Angus Leeming <leeming@lyx.org>
DISPATCHED_POP
};
+/** \c DispatchResult is a wrapper for dispatch_result.
+ * It can be forward-declared and passed as a function argument without
+ * having to expose insetbase.h.
+ */
+class DispatchResult {
+ dispatch_result val_;
+public:
+ DispatchResult(dispatch_result val) : val_(val) {}
+ operator dispatch_result() const{ return val_; }
+};
+
+
/// Common base class to all insets
class InsetBase {