]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlayout.h
Fix 3188, update the labels at each Caption insertion.
[lyx.git] / src / lyxlayout.h
index d437fde31f0d248d6fb15e8392ce9b8fc071e766..7cdff88aa062b1c0bd633e84b231b12e237de102 100644 (file)
 #include "lyxfont.h"
 #include "layout.h"
 #include "Spacing.h"
+#include "support/docstring.h"
 
 #include <string>
 
+
+namespace lyx {
+
 class LyXLex;
 class LyXTextClass;
 
@@ -29,7 +33,7 @@ public:
        ///
        LyXLayout();
        ///
-       bool Read(LyXLex &, LyXTextClass const &);
+       bool read(LyXLex &, LyXTextClass const &);
        ///
        void readAlign(LyXLex &);
        ///
@@ -55,11 +59,11 @@ public:
        ///
        std::string const & latexname() const { return latexname_; }
        ///
-       std::string const & labelstring() const { return labelstring_; }
+       lyx::docstring const & labelstring() const { return labelstring_; }
        ///
-       std::string const & endlabelstring() const { return endlabelstring_; }
+       lyx::docstring const & endlabelstring() const { return endlabelstring_; }
        ///
-       std::string const & preamble() const { return preamble_; }
+       docstring const & preamble() const { return preamble_; }
        ///
        std::string const & latexparam() const { return latexparam_; }
        ///
@@ -69,7 +73,7 @@ public:
        ///
        std::string const & itemtag() const { return itemtag_; }
        ///
-       std::string const & labelstring_appendix() const {
+       lyx::docstring const & labelstring_appendix() const {
                return labelstring_appendix_;
        }
        /** Default font for this layout/environment.
@@ -145,7 +149,13 @@ public:
        bool free_spacing;
        ///
        bool pass_thru;
-       ///
+       /**
+        * Whether this layout was declared with "Environment xxx" as opposed
+        * to "Style xxx". This is part of some unfinished generic environment
+        * handling (see also InsetEnvironment) started by Andre. No layout
+        * that is shipped with LyX has this flag set.
+        * Don't confuse this with isEnvironment()!
+        */
        bool is_environment;
        /// show this in toc
        int toclevel;
@@ -185,7 +195,7 @@ public:
        /// Does this layout allow for an optional parameter?
        int optionalargs;
        /// Which counter to step
-       std::string counter;
+       lyx::docstring counter;
        /// Depth of XML command
        int commanddepth;
 
@@ -208,11 +218,11 @@ private:
        /// LaTeX name for environment
        std::string latexname_;
        /// Label string. "Abstract", "Reference", "Caption"...
-       std::string labelstring_;
+       lyx::docstring labelstring_;
        ///
-       std::string endlabelstring_;
+       lyx::docstring endlabelstring_;
        /// Label string inside appendix. "Appendix", ...
-       std::string labelstring_appendix_;
+       lyx::docstring labelstring_appendix_;
        /// LaTeX parameter for environment
        std::string latexparam_;
        /// Internal tag to use (e.g., <title></title> for sect header)
@@ -222,7 +232,10 @@ private:
        /// Internal tag to surround the item text in a list)
        std::string itemtag_;
        /// Macro definitions needed for this layout
-       std::string preamble_;
+       docstring preamble_;
 };
 
+
+} // namespace lyx
+
 #endif