]> git.lyx.org Git - lyx.git/blobdiff - src/layout.h
Angus insetindex patch + protect patch from Dekel
[lyx.git] / src / layout.h
index 57f78a30f584cc7ed9068ea321e918f3acbe8980..641aad24c5506a7ace3b23ebaec2dda24474a55d 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef LAYOUT_H
 #define LAYOUT_H
 
+#include <vector>
+
 #ifdef __GNUG__
 #pragma interface
 #endif
 #include "lyxfont.h"
 #include "Spacing.h"
 
-#include <vector>
-
-using std::ostream;
-using std::vector;
-using std::pair;
-
 /// Reads the style files
 extern void LyXSetStyle();
 
@@ -36,11 +32,14 @@ enum { // no good name for this
        ///
        LYX_LAYOUT_DEFAULT = 99
 };
+
+
 // Could this cause confusion that both DUMMY_LAYOUT and  LAYOUT_DEFAULT has
 // the same value? (Lgb)
 ///
 #define LYX_DUMMY_LAYOUT 99
 
+
 /// The different output types
 enum OutputType {
         ///
@@ -143,9 +142,7 @@ enum LYX_LABEL_TYPES {
        ///
        LABEL_COUNTER_ENUMIII,
        ///
-       LABEL_COUNTER_ENUMIV,
-       ///
-       LABEL_FIRST_COUNTER = LABEL_COUNTER_CHAPTER
+       LABEL_COUNTER_ENUMIV
 };
 
 enum LYX_END_LABEL_TYPES {
@@ -156,9 +153,11 @@ enum LYX_END_LABEL_TYPES {
        ///
        END_LABEL_FILLED_BOX,
        ///
+       END_LABEL_STATIC,
+       ///
        END_LABEL_ENUM_FIRST = END_LABEL_NO_LABEL,
        ///
-       END_LABEL_ENUM_LAST = END_LABEL_FILLED_BOX
+       END_LABEL_ENUM_LAST = END_LABEL_STATIC
 };
                
 /* Fix labels are printed flushright, manual labels flushleft. 
@@ -204,6 +203,7 @@ public:
        string const & obsoleted_by() const { return obsoleted_by_; }
        string const & latexname() const { return latexname_; }
        string const & labelstring() const { return labelstring_; }
+       string const & endlabelstring() const { return endlabelstring_; }
        string const & preamble() const { return preamble_; }
        string const & latexparam() const { return latexparam_; }
        string const & labelstring_appendix() const {
@@ -342,6 +342,9 @@ private:
        /// Label string. "Abstract", "Reference", "Caption"...
        string labelstring_;
 
+       ///
+       string endlabelstring_;
+
        /// Label string inside appendix. "Appendix", ...
        string labelstring_appendix_;
 
@@ -357,12 +360,13 @@ private:
 class LyXTextClass {
 public:
        ///
-       typedef vector<LyXLayout> LayoutList;
+       typedef std::vector<LyXLayout> LayoutList;
        ///
        typedef LayoutList::const_iterator const_iterator;
        ///
        typedef LayoutList::size_type size_type;
        ///
+       explicit
        LyXTextClass (string const & = string(), 
                      string const & = string(), 
                      string const & = string());
@@ -503,7 +507,6 @@ private:
 };
 
 
-///
 inline
 void operator|=(LyXTextClass::Provides & p1, LyXTextClass::Provides p2)
 {
@@ -512,26 +515,14 @@ void operator|=(LyXTextClass::Provides & p1, LyXTextClass::Provides p2)
 
 
 ///
-inline
-ostream & operator<<(ostream & os, LyXTextClass::PageSides p)
-{
-       switch (p) {
-       case LyXTextClass::OneSide:
-               os << "1";
-               break;
-       case LyXTextClass::TwoSides:
-               os << "2";
-               break;
-       }
-       return os;
-}
+std::ostream & operator<<(std::ostream & os, LyXTextClass::PageSides p);
 
 
 ///
 class LyXTextClassList {
 public:
        ///
-       typedef vector<LyXTextClass> ClassList;
+       typedef std::vector<LyXTextClass> ClassList;
        ///
        typedef ClassList::const_iterator const_iterator;
        ///
@@ -546,7 +537,7 @@ public:
                                LyXTextClass::size_type layout) const;
 
        /// Gets layout number from textclass number and layout name
-       pair<bool, LyXTextClass::size_type>
+       std::pair<bool, LyXTextClass::size_type>
        NumberOfLayout(size_type textclass,
                       string const & name) const;
 
@@ -558,7 +549,7 @@ public:
        /** Gets textclass number from name.
            Returns -1 if textclass name does not exist
        */
-       pair<bool, size_type>
+       std::pair<bool, size_type>
        NumberOfClass(string const & textclass) const;
 
        ///