X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxtextclass.h;h=c2e36f3ea4a08bf6c0ca6fbf5d985a82e5468c77;hb=ba62665f966508db5a4de6864f4aa7374c5a5356;hp=9a526ae281bde6e81b84b3bd489765d140796e86;hpb=59fefa0759d0330d7db8066f5a1197f4f1dfc5a8;p=lyx.git diff --git a/src/lyxtextclass.h b/src/lyxtextclass.h index 9a526ae281..c2e36f3ea4 100644 --- a/src/lyxtextclass.h +++ b/src/lyxtextclass.h @@ -17,19 +17,26 @@ #include + +namespace lyx { + +namespace support { class FileName; } + class LyXLex; class Counters; class FloatList; /// -struct CharStyle { +class CharStyle { +public: std::string name; std::string latextype; std::string latexname; + std::string latexparam; LyXFont font; LyXFont labelfont; - std::string preamble; + docstring preamble; }; @@ -60,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 &); /// @@ -82,7 +89,9 @@ 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_; } /// the list of floats defined in the document class FloatList & floats(); @@ -111,9 +120,11 @@ public: /// std::string const & options() const; /// + std::string const & class_header() const; + /// std::string const & pagestyle() const; /// - std::string const & preamble() const; + docstring const & preamble() const; /// Packages that are already loaded by the class enum Provides { @@ -147,7 +158,7 @@ public: /// int tocdepth() const; - /// Can be LaTeX, LinuxDoc, etc. + /// Can be LaTeX, DocBook, etc. OutputType outputType() const; /// @@ -166,6 +177,12 @@ public: /// int size() const; + /// The minimal TocLevel of sectioning layouts + int min_toclevel() const; + /// The maximal TocLevel of sectioning layouts + int max_toclevel() const; + /// returns true if the class has a ToC structure + bool hasTocLevels() const; private: /// bool delete_layout(std::string const &); @@ -186,9 +203,11 @@ private: /// std::string pagestyle_; /// + std::string class_header_; + /// std::string defaultlayout_; /// preamble text to support layout styles - std::string preamble_; + docstring preamble_; /// latex packages loaded by document class. Provides provides_; /// @@ -199,7 +218,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 @@ -222,7 +241,7 @@ private: LayoutList layoutlist_; /// CharStyles available to this layout mutable CharStyles charstylelist_; - + /// available types of float, eg. figure, algorithm. boost::shared_ptr floatlist_; @@ -230,10 +249,15 @@ private: boost::shared_ptr ctrs_; /// Has this layout file been loaded yet? - mutable bool loaded; + mutable bool loaded_; /// Is the TeX class available? bool texClassAvail_; + + /// The minimal TocLevel of sectioning layouts + int min_toclevel_; + /// The maximal TocLevel of sectioning layouts + int max_toclevel_; }; @@ -248,4 +272,7 @@ void operator|=(LyXTextClass::Provides & p1, LyXTextClass::Provides p2) /// convert page sides option to text 1 or 2 std::ostream & operator<<(std::ostream & os, LyXTextClass::PageSides p); + +} // namespace lyx + #endif