]> git.lyx.org Git - features.git/commitdiff
Use the dispatch_result wrapper class DispatchResult to remove
authorAngus Leeming <leeming@lyx.org>
Thu, 18 Sep 2003 11:21:53 +0000 (11:21 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 18 Sep 2003 11:21:53 +0000 (11:21 +0000)
#include "insets/insetbase.h" from cursor.h.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7787 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/cursor.C
src/cursor.h
src/insets/ChangeLog
src/insets/insetbase.h

index dbafc1fede1eb604648606245c135348036e5da8..efd24b59fd3639c52027ab07e553fb4d5e7fa925 100644 (file)
@@ -1,9 +1,14 @@
+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>
 
index 0e1d34b17e0a2aa05baa043e7a74c8d152148c45..11070ca67f0d6b0b7f9a78cdd9b6223a11ebe08a 100644 (file)
@@ -23,7 +23,7 @@
 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;
index bb99d96b62be35601bf4dd385219876a3bc751ad..c0740a9181ba4e7354a446831dcf828205242783 100644 (file)
 
 #include "support/types.h"
 
-#include "insets/insetbase.h"
-
 #include <vector>
 
+class BufferView;
+class DispatchResult;
+class FuncRequest;
 class LyXText;
 
 
@@ -47,7 +48,7 @@ public:
        ///
        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_;
index 2e203660b7b9ecaa198745e27447f3f41ef766b2..ec1d6a81c42438a33ad3957c52fea048e77b7fe1 100644 (file)
@@ -1,6 +1,7 @@
 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>
 
index f12a6af89e78c0d679cb45c5b2818007512a639d..f5eecdbdfa5bef3774fd2e4c72cc4396fa8adede 100644 (file)
@@ -50,6 +50,18 @@ enum dispatch_result {
        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 {