]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
Applied Angus patch to compile on DEC C++ and to avoid name clashes
[lyx.git] / src / lyxtext.h
index 05ffe20fd19ea34f308ee423f6c3fc0a5e8b7295..b8439b2d4b1ba3d4b8a9ac72f45e4debb523ceac 100644 (file)
@@ -58,7 +58,7 @@ public:
        ///
        mutable int number_of_rows;
        ///
-       mutable long height;
+       mutable int height;
        ///
        mutable unsigned int width;
        /// the current font settings
@@ -66,12 +66,17 @@ public:
        /// the current font
        mutable LyXFont real_current_font;
        /// first visible pixel-row is set from LyXScreen!!!
-       unsigned long first;
+       // unsigned is wrong here for text-insets!
+       int first;
        ///
        BufferView * bv_owner;
        ///
        InsetText * inset_owner;
+       ///
+       UpdatableInset * the_locking_inset;
 
+       ///
+       int GetRealCursorX(BufferView *) const;
        ///
        LyXFont const GetFont(Buffer const *, LyXParagraph * par,
                        LyXParagraph::size_type pos) const;
@@ -158,7 +163,7 @@ public:
        ///
        Row * need_break_row;
        ///
-       mutable long refresh_y;
+       mutable int refresh_y;
        ///
        int refresh_height;
        ///
@@ -179,7 +184,7 @@ public:
          (relative to the whole text). y is set to the real beginning
          of this row
          */ 
-       Row * GetRowNearY(long & y) const;
+       Row * GetRowNearY(int & y) const;
        
        /** returns the column near the specified x-coordinate of the row 
         x is set to the real beginning of this column
@@ -191,7 +196,7 @@ public:
         of the row
         */
        Row * GetRow(LyXParagraph * par,
-                    LyXParagraph::size_type pos, long & y) const;
+                    LyXParagraph::size_type pos, int & y) const;
 
        /** returns the height of a default row, needed  for scrollbar
         */
@@ -228,9 +233,9 @@ public:
        LyXCursor toggle_end_cursor;
    
        /// need the selection cursor:
-       void SetSelection();
+       void SetSelection(BufferView *);
        ///
-       void ClearSelection() const;
+       void ClearSelection(BufferView *) const;
        ///
        string const selectionAsString(Buffer const *) const;
        
@@ -271,10 +276,10 @@ public:
                         LyXFont const & font) const;
 
        ///
-       void SetCursorFromCoordinates(BufferView *, int x, long y) const;
+       void SetCursorFromCoordinates(BufferView *, int x, int y) const;
        ///
        void SetCursorFromCoordinates(BufferView *, LyXCursor &,
-                                     int x, long y) const;
+                                     int x, int y) const;
        ///
        void CursorUp(BufferView *) const;
        ///
@@ -284,10 +289,6 @@ public:
        ///
        void CursorRight(BufferView *, bool internal = true) const;
        ///
-       void CursorLeftIntern(BufferView *, bool internal = true) const;
-       ///
-       void CursorRightIntern(BufferView *, bool internal = true) const;
-       ///
        void CursorLeftOneWord(BufferView *) const;
        ///
        void CursorRightOneWord(BufferView *) const;
@@ -334,7 +335,7 @@ public:
          solution but faster.
         */
        void GetVisibleRow(BufferView *, int y_offset, int x_offset,
-                          Row * row_ptr, long y, bool cleared=false);
+                          Row * row_ptr, int y, bool cleared=false);
 
 #ifndef NEW_INSETS
        /* footnotes: */
@@ -392,21 +393,16 @@ public:
                          LyXAlignment align, 
                          string labelwidthstring,
                          bool noindent);
+#ifndef NO_PEXTRA
        ///
        void SetParagraphExtraOpt(BufferView *, int type,
                                  string const & width,
                                  string const & widthp,
                                  int alignment, bool hfill,
                                  bool start_minipage);
-
+#endif
        /* these things are for search and replace */
 
-       /** returns true if the specified string is at the specified
-         position
-         */
-       bool IsStringInText(LyXParagraph * par,
-                           LyXParagraph::size_type pos,
-                           string const & str) const;
        /** sets the selection over the number of characters of string,
          no check!!
          */
@@ -417,22 +413,15 @@ public:
          */
        void ReplaceSelectionWithString(BufferView *, string const & str);
 
-       /** if the string can be found: return true and set the cursor to
-         the new position */
-       bool SearchForward(BufferView *, string const & str) const;
-       ///
-       bool SearchBackward(BufferView *, string const & str) const;
-
        /// needed to insert the selection
        void InsertStringA(BufferView *, string const & str);
        /// needed to insert the selection
        void InsertStringB(BufferView *, string const & str);
 
-       /// usefull when texing from within LyX
-       bool GotoNextError(BufferView *) const;
-
-       /// just another feature :)
-       bool GotoNextNote(BufferView *) const;
+       /// Find next inset of some specified type.
+       bool GotoNextInset(BufferView *, std::vector<Inset::Code> const & codes,
+                          string const & contents = string()) const;
+       ///
 
        /* for the greater insets */
   
@@ -444,31 +433,6 @@ public:
        ///
        int NumberOfCell(LyXParagraph * par,
                         LyXParagraph::size_type pos) const;
-       /* table stuff -- begin*/
-
-       /** all table features of the text-class are put together in
-         this function. Possible values of feature are defined in table.h
-         */
-       void TableFeatures(BufferView *, int feature, string const & val) const;
-        ///
-       void TableFeatures(BufferView *, int feature) const;
-
-       /** pos points at the beginning of the next cell (if there is one)
-        */
-       int WidthOfCell(BufferView *, LyXParagraph * par,
-                       LyXParagraph::size_type & pos) const;
-       ///
-       void CheckParagraphInTable(BufferView *, LyXParagraph * par,
-                                  LyXParagraph::size_type pos);
-       ///
-       void InsertCharInTable(BufferView *, char c);
-       ///
-       void BackspaceInTable(BufferView *);
-       ///
-       bool HitInTable(BufferView *, Row * row, int x) const;
-       ///
-       bool MouseHitInTable(BufferView *, int x, long y) const;
-       /* table stuff -- end*/
        ///
        LyXParagraph * GetParFromID(int id);
 
@@ -533,7 +497,7 @@ public:
        }
        ///
        inline
-       int bidi_level(LyXParagraph::size_type pos) const {
+       LyXParagraph::size_type bidi_level(LyXParagraph::size_type pos) const {
                if (bidi_start == -1)
                        return 0;
                else