]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtext.h
get rid of LYX_LIBS
[lyx.git] / src / lyxtext.h
index 601f7960f1a8562e8f1446ea89e0e5dba1ad04d5..89ffc10999321b2ca65ff95b87524d9cb8973d9a 100644 (file)
@@ -107,8 +107,6 @@ public:
                         lyx::pos_type pos, LyXFont const & font);
        void setCharFont(BufferView *, Paragraph * par,
                         lyx::pos_type pos, LyXFont const & font, bool toggleall);
-       /// returns a pointer to the very first Paragraph
-       Paragraph * firstParagraph() const;
   
        /// what you expect when pressing <enter> at cursor position
        void breakParagraph(BufferView *, char keep_layout = 0);
@@ -117,11 +115,11 @@ public:
          those paragraphs
          */
        Paragraph * setLayout(BufferView *, LyXCursor & actual_cursor,
-                                LyXCursor & selection_start,
-                                LyXCursor & selection_end,
-                                lyx::layout_type layout);
+                             LyXCursor & selection_start,
+                             LyXCursor & selection_end,
+                             string const & layout);
        ///
-       void setLayout(BufferView *, lyx::layout_type layout);
+       void setLayout(BufferView *, string const & layout);
        
        /// used in setlayout
        void makeFontEntriesLayoutSpecific(Buffer const *, Paragraph * par);
@@ -227,7 +225,12 @@ public:
         */
        Row * getRow(Paragraph * par,
                     lyx::pos_type pos, int & y) const;
-
+       /** returns the firstrow, this could be done with the above too but
+           IMO it's stupid to have to allocate a dummy y all the time I need
+           the first row
+       */
+       Row * firstRow() { return firstrow; }
+                       
        /** returns the height of a default row, needed  for scrollbar
         */
        int defaultHeight() const;
@@ -301,8 +304,8 @@ public:
        string const selectNextWordToSpellcheck(BufferView *, float & value) const;
        ///
        void selectSelectedWord(BufferView *);
-       ///
-       void setCursor(BufferView *, Paragraph * par,
+       /// returns true if par was empty and was removed
+       bool setCursor(BufferView *, Paragraph * par,
                       lyx::pos_type pos,
                       bool setfont = true,
                       bool boundary = false) const;
@@ -501,10 +504,9 @@ public:
                return bidi_start == -1 ||
                        (bidi_start <= pos && pos <= bidi_end);
        }
-public:
+private:
        ///
        mutable Row * firstrow;
-private:
        ///
        mutable Row * lastrow;
 
@@ -512,8 +514,7 @@ private:
          Asger has learned that this should be a buffer-property instead
          Lgb has learned that 'char' is a lousy type for non-characters
          */
-       lyx::layout_type copylayouttype;
-
+       string copylayouttype;
        /** inserts a new row behind the specified row, increments
            the touched counters */
        void insertRow(Row * row, Paragraph * par, lyx::pos_type pos) const;
@@ -556,9 +557,9 @@ private:
                Painter * pain; 
                // has the background been cleared
                bool cleared;
-               /// x offset
+               /// x offset (e.g. for insets)
                int xo;
-               /// y offset 
+               /// y offset (e.g. for insets)
                int yo;
                /// FIXME
                float x;
@@ -586,6 +587,13 @@ private:
        /// paint env depth bar 
        void paintRowDepthBar(DrawRowParams & p);
  
+       /// get the on-screen size of the length marker
+       int getLengthMarkerHeight(BufferView * bv, VSpace const & vsp) const;
+       /// paint an added space marker
+       int drawLengthMarker(DrawRowParams & p, string const & str,
+               VSpace const & vsp, int start); 
        /// paint a first row in a paragraph
        void paintFirstRow(DrawRowParams & p);
  
@@ -601,8 +609,8 @@ private:
                                  LyXCursor & cur,
                                  LyXCursor const & where) const;
        
-       ///
-       void deleteEmptyParagraphMechanism(BufferView *,
+       /// delete double space (false) or empty paragraphs (true) around old_cursor 
+       bool deleteEmptyParagraphMechanism(BufferView *,
                                           LyXCursor const & old_cursor) const;
 
 public:
@@ -623,9 +631,23 @@ private:
        ///
        int singleWidth(BufferView *, Paragraph * par,
                lyx::pos_type pos, char c) const;
-       ///
-       void draw(BufferView *, Row const * row,
-                 lyx::pos_type & pos, int offset, float & x, bool cleared);
+
+       /// draw normal chars
+       void drawChars(DrawRowParams & p, lyx::pos_type & vpos,
+               bool hebrew, bool arabic);
+       /// draw from arabic composed char
+       void drawArabicComposeChar(DrawRowParams & p, lyx::pos_type & vpos);
+       /// draw from hebrew composed char
+       void drawHebrewComposeChar(DrawRowParams & p, lyx::pos_type & vpos);
+       /// draw a mark for foreign language, starting from orig_x
+       void drawForeignMark(DrawRowParams & p, float const orig_x, LyXFont const & orig_font);
+       /// draw an inset 
+       void drawInset(DrawRowParams & p, lyx::pos_type const pos);
+       /// draw new line marker
+       void drawNewline(DrawRowParams & p, lyx::pos_type const pos);
+       /// draw text
+       void draw(DrawRowParams & p, lyx::pos_type & vpos);
 
        /// get the next breakpoint in a given paragraph
        lyx::pos_type nextBreakPoint(BufferView *, Row const * row, int width) const;