]> git.lyx.org Git - features.git/blobdiff - src/Counters.h
Unify naming of menu items
[features.git] / src / Counters.h
index 77e1f118fa751573a147b78fc1896b2f0cd17868..e411bbb26cd94b3bb148ebdb9d11bc39fa75bfdd 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "OutputEnums.h"
 
-#include "support/docstring.h"
+#include "support/strfwd.h"
 
 #include <map>
 #include <vector>
@@ -35,7 +35,7 @@ public:
        Counter();
        ///
        Counter(docstring const & mc, docstring const & ls,
-               docstring const & lsa);
+               docstring const & lsa, docstring const & guiname);
        /// \return true on success
        bool read(Lexer & lex);
        ///
@@ -67,6 +67,8 @@ public:
        /// Similar, but used for formatted references in XHTML output.
        /// E.g., for a section counter it might be "section \thesection"
        docstring const & prettyFormat() const { return prettyformat_; }
+       ///
+       docstring const & guiName() const { return guiname_; }
 
        /// Returns a map of LaTeX-like strings to format the counter.
        /** For each language, the string is similar to what one gets
@@ -97,6 +99,8 @@ private:
        docstring labelstringappendix_;
        /// Similar, but used for formatted references in XHTML output
        docstring prettyformat_;
+       ///
+       docstring guiname_;
        /// Cache of the labelstring with \\the<counter> expressions expanded,
        /// indexed by language
        mutable StringMap flatlabelstring_;
@@ -120,7 +124,8 @@ public:
        void newCounter(docstring const & newc,
                        docstring const & masterc,
                        docstring const & ls,
-                       docstring const & lsa);
+                       docstring const & lsa,
+                       docstring const & guiname);
        /// Checks whether the given counter exists.
        bool hasCounter(docstring const & c) const;
        /// reads the counter name
@@ -157,7 +162,7 @@ public:
        bool remove(docstring const & cnt);
        /// Copy counters whose name matches match from the &from to
        /// the &to array of counters. Empty string matches all.
-       void copy(Counters & from, Counters & to,
+       void copy(Counters const & from, Counters & to,
                  docstring const & match = docstring());
        /** returns the expanded string representation of counter \c
         *  c. The \c lang code is used to translate the string.
@@ -174,6 +179,8 @@ public:
        /// format given by Counter::prettyFormat().
        docstring prettyCounter(docstring const & cntr,
                               std::string const & lang) const;
+       ///
+       docstring const & guiName(docstring const & cntr) const;
        /// Are we in appendix?
        bool appendix() const { return appendix_; }
        /// Set the state variable indicating whether we are in appendix.