]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
redraw fix 1.
[lyx.git] / src / paragraph.h
index f6e437064ae313d7a18ea5d422e93b66c1e5933a..f7fc207b2b1fe21b0da7842e1c4471d4ef8e24c6 100644 (file)
@@ -1,13 +1,10 @@
 // -*- C++ -*-
-/* This file is part of
- * ======================================================
- *
- *           LyX, The Document Processor
- *
- *         Copyright 1995 Matthias Ettrich
- *          Copyright 1995-2001 The LyX Team.
- *
- * ====================================================== */
+/**
+ *  \file paragraph.h
+ *  Copyright 1995 Matthias Ettrich
+ *  Copyright 2002 the LyX Team
+ *  Read the file COPYING
+ */
 
 #ifndef PARAGRAPH_H
 #define PARAGRAPH_H
@@ -18,6 +15,7 @@
 
 #include "LString.h"
 
+#include "lyxlayout_ptr_fwd.h"
 #include "insets/inset.h" // Just for Inset::Code
 #include "lyxfont.h" // Just for LyXFont::FONT_SIZE
 #include "support/types.h"
@@ -33,7 +31,7 @@ class Language;
 // After 1.2.0 is released, during 1.3.0cvs, we enable this. And after
 // a while we verify that reading of 1.2.x files work perfectly we remove
 // this code completely. (Lgb)
-//#define NO_PEXTRA_REALLY 1
+#define NO_PEXTRA_REALLY 1
 
 // Define this if you want to try out the new storage container for
 // paragraphs. std::container instead of obfuscated homegrown
@@ -125,10 +123,10 @@ public:
                                 bool moving_arg);
 
        ///
-       int startTeXParParams(BufferParams const &, std::ostream &) const;
+       int startTeXParParams(BufferParams const &, std::ostream &, bool) const;
 
        ///
-       int endTeXParParams(BufferParams const &, std::ostream &) const;
+       int endTeXParParams(BufferParams const &, std::ostream &, bool) const;
 
 
        ///
@@ -149,7 +147,7 @@ public:
 
        /** Check if the current paragraph is the last paragraph in a
            proof environment */
-       int getEndLabel(BufferParams const &) const;
+       int getEndLabel() const;
        ///
        Inset * inInset() const;
        ///
@@ -167,9 +165,9 @@ public:
        void clearContents();
 
        ///
-       string const & layout() const;
+       LyXLayout_ptr const & layout() const;
        ///
-       void layout(string const & new_layout);
+       void layout(LyXLayout_ptr const & new_layout);
 
        ///
        void setCounter(int i, int v);
@@ -224,9 +222,9 @@ public:
        /// The nesting depth of a paragraph
        depth_type getDepth() const;
        /// The maximal possible depth of a paragraph after this one
-       depth_type getMaxDepthAfter(Buffer const *) const;
+       depth_type getMaxDepthAfter() const;
        ///
-       void applyLayout(string const & new_layout);
+       void applyLayout(LyXLayout_ptr const & new_layout);
        ///
        int getFirstCounter(int i) const;
        ///
@@ -261,7 +259,7 @@ public:
        value_type getUChar(BufferParams const &, lyx::pos_type pos) const;
        /// The position must already exist.
        void setChar(lyx::pos_type pos, value_type c);
-       ///
+       /// pos <= size() (there is a dummy font change at the end of each par)
        void setFont(lyx::pos_type pos, LyXFont const & font);
        /// Returns the height of the highest font in range
        LyXFont::FONT_SIZE highestFontInRange(lyx::pos_type startpos,
@@ -321,7 +319,7 @@ public:
        Paragraph * getParFromID(int id) const;
 
        ///
-       int stripLeadingSpaces(lyx::textclass_type tclass);
+       int stripLeadingSpaces();
 
 #ifndef NO_PEXTRA_REALLY
        /* If I set a PExtra Indent on one paragraph of a ENV_LIST-TYPE
@@ -341,7 +339,11 @@ public:
        ParagraphParameters const & params() const;
 private:
        ///
-       string layout_;
+       LyXLayout_ptr layout_;
+public:
+       /** Both these definitions must be made public to keep Compaq cxx 6.5
+        *  happy.
+        */
        ///
        struct InsetTable {
                ///
@@ -354,6 +356,7 @@ private:
 
        ///
        typedef std::vector<InsetTable> InsetList;
+private:
        ///
        InsetList insetlist;
 public:
@@ -395,7 +398,7 @@ public:
        inset_iterator inset_iterator_begin();
        ///
        inset_iterator inset_iterator_end();
-       ///
+       /// returns inset iterator of the first inset at or after pos.
        inset_iterator InsetIterator(lyx::pos_type pos);
 
 private: