]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.h
Streamlining CollapseStatus stuff
[lyx.git] / src / TextClass.h
index b5ea3a38b571f19da53ddb269dc37b805eafc6f2..64716c1741e87cc4553196e705310e8149d3610a 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <vector>
 #include <set>
+#include <map>
 
 namespace lyx {
 
@@ -40,9 +41,23 @@ public:
 };
 
 
+class InsetLayout {
+public:
+       docstring labelstring;
+       std::string latextype;
+       std::string latexname;
+       std::string latexparam;
+       Font font;
+       Font labelfont;
+       docstring preamble;
+};
+
+
 /// List of semantically defined character style insets
 typedef std::vector<CharStyle> CharStyles;
 
+/// List of inset layouts
+typedef std::map<docstring, InsetLayout> InsetLayouts;
 
 /// Stores the layout specification of a LyX document class.
 class TextClass {
@@ -79,6 +94,8 @@ public:
        ///
        void readCharStyle(Lexer &, std::string const &);
        ///
+       void readInsetLayout(Lexer &, docstring const &);
+       ///
        void readFloat(Lexer &);
        ///
        void readCounter(Lexer &);
@@ -101,6 +118,8 @@ public:
        Counters & counters() const;
        /// CharStyles of this doc class
        CharStyles & charstyles() const { return charstylelist_; };
+       ///  Inset layouts of this doc class
+       InsetLayout const & insetlayout(docstring const & name) const;
        /// Retrieve element of name s:
        CharStyles::iterator charstyle(std::string const & s) const;
        ///
@@ -110,6 +129,8 @@ public:
        ///
        std::string const & name() const;
        ///
+       docstring const & labelstring() const;
+       ///
        std::string const & latexname() const;
        ///
        std::string const & description() const;
@@ -229,11 +250,14 @@ private:
        /// CharStyles available to this layout
        mutable CharStyles charstylelist_;
 
+       /// Input layouts available to this layout
+       mutable InsetLayouts insetlayoutlist_;
+
        /// available types of float, eg. figure, algorithm.
        boost::shared_ptr<FloatList> floatlist_;
 
        /// Types of counters, eg. sections, eqns, figures, avail. in document class.
-       boost::shared_ptr<Counters> ctrs_;
+       boost::shared_ptr<Counters> counters_;
 
        /// Has this layout file been loaded yet?
        mutable bool loaded_;