]> git.lyx.org Git - lyx.git/blobdiff - src/Text.h
* GuiToolbar.cpp:
[lyx.git] / src / Text.h
index 027fd0e8043880cf3347fd2444982e9ca68f81dc..34977dab015b563e6ce725cfad17c8e7d172a57b 100644 (file)
@@ -22,6 +22,7 @@ namespace lyx {
 class Buffer;
 class BufferParams;
 class BufferView;
+class CompletionList;
 class CursorSlice;
 class DocIterator;
 class ErrorList;
@@ -137,7 +138,9 @@ public:
        void getWord(CursorSlice & from, CursorSlice & to, word_location const) const;
        /// just selects the word the cursor is in
        void selectWord(Cursor & cur, word_location loc);
-
+       /// convenience function get the previous word or an empty string
+       docstring previousWord(CursorSlice const & sl) const;
+       
        /// what type of change operation to make
        enum ChangeOp {
                ACCEPT,
@@ -190,6 +193,10 @@ public:
        bool cursorBackwardOneWord(Cursor & cur);
        ///
        bool cursorForwardOneWord(Cursor & cur);
+       ///
+       bool cursorVisLeftOneWord(Cursor & cur);
+       ///
+       bool cursorVisRightOneWord(Cursor & cur);
        /// Delete from cursor up to the end of the current or next word.
        void deleteWordForward(Cursor & cur);
        /// Delete from cursor to start of current or prior word.
@@ -282,6 +289,15 @@ public:
        ///
        void setMacrocontextPosition(DocIterator const & pos);
 
+       ///
+       bool completionSupported(Cursor const & cur) const;
+       ///
+       CompletionList const * createCompletionList(Cursor const & cur) const;
+       ///
+       bool insertCompletion(Cursor & cur, docstring const & s, bool /*finished*/);
+       ///
+       docstring completionPrefix(Cursor const & cur) const;
+
 public:
        ///
        ParagraphList pars_;