X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxtextclass.h;h=e400338ae4ad911c8c62b0a6d1efa2b437547b36;hb=37e82a546392d43f787826b85481a11f2a27af15;hp=2bf28f6a9e3013ec9fc19ba7390b721f00783172;hpb=44cd0fc9a1687cc63911c7f98d978594458e7813;p=lyx.git diff --git a/src/lyxtextclass.h b/src/lyxtextclass.h index 2bf28f6a9e..e400338ae4 100644 --- a/src/lyxtextclass.h +++ b/src/lyxtextclass.h @@ -22,6 +22,22 @@ class Counters; class FloatList; +/// +struct CharStyle { + std::string name; + std::string latextype; + std::string latexname; + std::string latexparam; + LyXFont font; + LyXFont labelfont; + std::string preamble; +}; + + +/// List of semantically defined character style insets +typedef std::vector CharStyles; + + /// Stores the layout specification of a LyX document class. class LyXTextClass { public: @@ -55,6 +71,8 @@ public: /// void readClassOptions(LyXLex &); /// + void readCharStyle(LyXLex &, std::string const &); + /// void readFloat(LyXLex &); /// void readCounter(LyXLex &); @@ -66,6 +84,8 @@ public: /// Sees to that the textclass structure has been loaded bool load() const; + /// Has this layout file been loaded yet? + bool loaded() const { return loaded_; } /// the list of floats defined in the document class FloatList & floats(); @@ -73,6 +93,10 @@ public: FloatList const & floats() const; /// The Counters present in this document class. Counters & counters() const; + /// CharStyles of this doc class + CharStyles & charstyles() const { return charstylelist_; }; + /// Retrieve element of name s: + CharStyles::iterator charstyle(std::string const & s) const; /// std::string const & defaultLayoutName() const; /// @@ -90,6 +114,8 @@ public: /// std::string const & options() const; /// + std::string const & class_header() const; + /// std::string const & pagestyle() const; /// std::string const & preamble() const; @@ -165,6 +191,8 @@ private: /// std::string pagestyle_; /// + std::string class_header_; + /// std::string defaultlayout_; /// preamble text to support layout styles std::string preamble_; @@ -199,6 +227,8 @@ private: /// Paragraph styles used in this layout LayoutList layoutlist_; + /// CharStyles available to this layout + mutable CharStyles charstylelist_; /// available types of float, eg. figure, algorithm. boost::shared_ptr floatlist_; @@ -207,7 +237,7 @@ 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_;