]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.h
Output keys with bibliography, too.
[lyx.git] / src / Cursor.h
index 0ed6981f267cfc055fcc1609ab64f29a1abe20b5..b19a12a9ae80e2acc95b53ef8b8850246340437f 100644 (file)
@@ -65,7 +65,7 @@ public:
        void leaveInset(Inset const & inset);
        /// sets cursor part
        void setCursor(DocIterator const & it);
-       /// sets the cursor to the anchor
+       /// sets the cursor to the normalized selection anchor
        void setCursorToAnchor();
 
        ///
@@ -84,6 +84,10 @@ public:
        /// do we have a multiline selection?
        bool selIsMultiLine() const 
                { return selection_ && selBegin().pit() != selEnd().pit(); }
+       /// 
+       void setWordSelection(bool set) { word_selection_ = set; }
+       ///
+       bool wordSelection() { return word_selection_; }
        /// did we place the anchor?
        bool mark() const { return mark_; }
        /// did we place the anchor?
@@ -312,6 +316,8 @@ private:
        bool selection_;
        /// are we on the way to get one?
        bool mark_;
+       /// are we in word-selection mode? This is set when double clicking.
+       bool word_selection_;
        /// If true, we are behind the previous char, otherwise we are in front
        // of the next char. This only make a difference when we are in front
        // of a big inset spanning a whole row and computing coordinates for
@@ -377,7 +383,8 @@ public:
        ///
        void niceInsert(MathAtom const & at);
        ///
-       void niceInsert(docstring const & str, Parse::flags f = Parse::NORMAL);
+       void niceInsert(docstring const & str, Parse::flags f = Parse::NORMAL,
+                       bool enter = true);
 
        /// in pixels from top of screen
        void setScreenPos(int x, int y);