]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
outstanding changes
[lyx.git] / src / lyxtext.h
index 87d6b78c4b69127129341faf36ee4f9ce8bfca03..08e22dde7a7b9cd00bff427497b818f6a4e02e9e 100644 (file)
@@ -22,6 +22,8 @@
 #include "layout.h"
 #include "lyxrow.h"
 #include "vspace.h"
+#include "Spacing.h"
+#include "LColor.h"
 
 class Buffer;
 class BufferParams;
@@ -47,10 +49,15 @@ public:
        };
        ///
        enum word_location {
-               /// the word around the cursor
+               // the word around the cursor, only if the cursor is
+               //not at a boundary
+               WHOLE_WORD_STRICT,
+               // the word around the cursor
                WHOLE_WORD,
                /// the word begining from the cursor position
                PARTIAL_WORD,
+               /// the word around the cursor or before the cursor
+               PREVIOUS_WORD,
                /// the next word (not yet used)
                NEXT_WORD
        };
@@ -90,6 +97,10 @@ public:
        LyXFont const getFont(Buffer const *, Paragraph * par,
                        Paragraph::size_type pos) const;
        ///
+       LyXFont const getLayoutFont(Buffer const *, Paragraph * par) const;
+       ///
+       LyXFont const getLabelFont(Buffer const *, Paragraph * par) const;
+       ///
        void setCharFont(Buffer const *, Paragraph * par,
                         Paragraph::size_type pos, LyXFont const & font);
        void setCharFont(BufferView *, Paragraph * par,
@@ -144,6 +155,9 @@ public:
        
        ///
        void toggleFree(BufferView *, LyXFont const &, bool toggleall = false);
+
+       ///
+       string getStringToIndex(BufferView *);
        
        /** recalculates the heights of all previous rows of the
            specified paragraph.  needed, if the last characters font
@@ -165,10 +179,10 @@ public:
    
        /** Completes the insertion with a full rebreak.
            Returns true if something was broken. */
-        bool fullRebreak(BufferView *);
+       bool fullRebreak(BufferView *);
 
        ///
-       Row * need_break_row;
+       mutable Row * need_break_row;
        ///
        mutable int refresh_y;
        ///
@@ -184,6 +198,7 @@ public:
 
        /// give and set the LyXText status
        text_status status() const;
+       ///
        void status(BufferView *, text_status) const;
 
 private:       
@@ -263,7 +278,7 @@ public:
        /// need the selection cursor:
        void setSelection(BufferView *);
        ///
-       void clearSelection(BufferView *) const;
+       void clearSelection() const;
        ///
        string const selectionAsString(Buffer const *) const;
        
@@ -271,7 +286,7 @@ public:
        void getWord(LyXCursor & from, LyXCursor & to, 
                     word_location const) const;
        /// just selects the word the cursor is in
-       void selectWord(BufferView *, word_location const = WHOLE_WORD);
+       void selectWord(BufferView *, word_location const);
        /// returns the inset at cursor (if it exists), 0 otherwise
        Inset * getInset() const;
 
@@ -353,7 +368,7 @@ public:
        void deleteLineForward(BufferView *);
        ///
        bool selectWordWhenUnderCursor(BufferView *, 
-                                      word_location const = WHOLE_WORD);
+                                      word_location const);
        ///
        enum TextCase {
                ///
@@ -383,7 +398,7 @@ public:
        /// 
        void toggleInset(BufferView *);
        ///
-       void cutSelection(BufferView *, bool = true);
+       void cutSelection(BufferView *, bool doclear = true, bool realcut = true);
        ///
        void copySelection(BufferView *);
        ///
@@ -392,14 +407,6 @@ public:
        void copyEnvironmentType();
        ///
        void pasteEnvironmentType(BufferView *);
-       ///
-       void insertFootnote();
-       ///
-       void insertMarginpar();
-       ///
-       void insertFigure();
-       ///
-       void insertTabular();
 
        /** the DTP switches for paragraphs. LyX will store the top settings
         always in the first physical paragraph, the bottom settings in the
@@ -412,6 +419,7 @@ public:
                          bool pagebreak_top, bool pagebreak_bottom,
                          VSpace const & space_top,
                          VSpace const & space_bottom,
+                         Spacing const & spacing,
                          LyXAlignment align, 
                          string labelwidthstring,
                          bool noindent);
@@ -606,6 +614,8 @@ private:
          */
        bool hfillExpansion(Buffer const *, Row const * row_ptr,
                            Paragraph::size_type pos) const;
+       /// 
+       LColor::color backgroundColor();
 
 
        ///