]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtextclass.h
Restore the version number position on the splash screen
[lyx.git] / src / lyxtextclass.h
index 1204e5215c0b619b7a7de313d3e4f4a15b6f2095..2936b13d24fc436526b2aacdf1f0d6f6f6fba77a 100644 (file)
 #include <boost/shared_ptr.hpp>
 
 #include <vector>
+#include <set>
+
+namespace lyx {
+
+namespace support { class FileName; }
 
 class LyXLex;
 class Counters;
@@ -31,7 +36,7 @@ public:
        std::string latexparam;
        LyXFont font;
        LyXFont labelfont;
-       std::string preamble;
+       docstring preamble;
 };
 
 
@@ -62,7 +67,7 @@ public:
        const_iterator end() const { return layoutlist_.end(); }
 
        /// Performs the read of the layout file.
-       bool Read(std::string const & filename, bool merge = false);
+       bool read(support::FileName const & filename, bool merge = false);
        ///
        void readOutputType(LyXLex &);
        ///
@@ -84,7 +89,7 @@ public:
        LyXLayout_ptr const & operator[](std::string const & vname) const;
 
        /// Sees to that the textclass structure has been loaded
-       bool load() const;
+       bool load(std::string const & path = std::string()) const;
        /// Has this layout file been loaded yet?
        bool loaded() const { return loaded_; }
 
@@ -119,23 +124,10 @@ public:
        ///
        std::string const & pagestyle() const;
        ///
-       std::string const & preamble() const;
+       docstring const & preamble() const;
 
-       /// Packages that are already loaded by the class
-       enum Provides {
-               ///
-               nothing = 0,
-               ///
-               amsmath = 1,
-               ///
-               makeidx = 2,
-               ///
-               url = 4,
-               ///
-               natbib = 8
-       };
-       ///
-       bool provides(Provides p) const;
+       /// is this feature already provided by the class?
+       bool provides(std::string const & p) const;
 
        ///
        unsigned int columns() const;
@@ -153,7 +145,7 @@ public:
        ///
        int tocdepth() const;
 
-       /// Can be LaTeX, LinuxDoc, etc.
+       /// Can be LaTeX, DocBook, etc.
        OutputType outputType() const;
 
        ///
@@ -202,9 +194,9 @@ private:
        ///
        std::string defaultlayout_;
        /// preamble text to support layout styles
-       std::string preamble_;
+       docstring preamble_;
        /// latex packages loaded by document class.
-       Provides provides_;
+       std::set<std::string> provides_;
        ///
        unsigned int columns_;
        ///
@@ -213,7 +205,7 @@ private:
        int secnumdepth_;
        /// header depth to appear in table of contents
        int tocdepth_;
-       /// Can be LaTeX, LinuxDoc, etc.
+       /// Can be LaTeX, DocBook, etc.
        OutputType outputType_;
        /** Base font. The paragraph and layout fonts are resolved against
            this font. This has to be fully instantiated. Attributes
@@ -256,15 +248,10 @@ private:
 };
 
 
-/// Merge two different provides flags into one bit field record
-inline
-void operator|=(LyXTextClass::Provides & p1, LyXTextClass::Provides p2)
-{
-       p1 = static_cast<LyXTextClass::Provides>(p1 | p2);
-}
-
-
 /// convert page sides option to text 1 or 2
 std::ostream & operator<<(std::ostream & os, LyXTextClass::PageSides p);
 
+
+} // namespace lyx
+
 #endif