]> git.lyx.org Git - lyx.git/blobdiff - src/bufferview_funcs.h
fix crash when collapsing ert with cursor inside
[lyx.git] / src / bufferview_funcs.h
index 743559b6421c916ea10e40d834d76ced5368c944..1f77007ab5ccf52d50bcbcd4ed68c02ddecda821 100644 (file)
 #define BUFFERVIEW_FUNCS_H
 
 #include <string>
+#include <vector>
 
-class LCursor;
 class LyXFont;
-class LyXText;
+class Point;
+class DocIterator;
+class BufferView;
+class InsetBase_code;
 
 
 namespace bv_funcs {
@@ -34,15 +37,27 @@ bool string2font(std::string const & data, LyXFont & font, bool & toggle);
  */
 std::string const freefont2string();
 
+Point getPos(DocIterator const & dit);
 
-/// what type of depth change to make
-enum DEPTH_CHANGE {
-       INC_DEPTH,
-       DEC_DEPTH
+enum CurStatus {
+       CUR_INSIDE,
+       CUR_ABOVE,
+       CUR_BELOW
 };
 
-/// Returns whether something would be changed by changeDepth
-bool changeDepthAllowed(LCursor & cur, LyXText * text, DEPTH_CHANGE);
+
+CurStatus status(BufferView const * bv, DocIterator const & dit);
+
+
+Point coordOffset(DocIterator const & dit);
+
+// Moves cursor to the next inset with one of the given codes.
+void gotoInset(BufferView * bv, std::vector<InsetBase_code> const & codes,
+              bool same_content);
+
+// Moves cursor to the next inset with given code.
+void gotoInset(BufferView * bv, InsetBase_code code, bool same_content);
+
 
 } // namespace bv_funcs