]> git.lyx.org Git - lyx.git/blobdiff - src/Counters.h
* GuiToolbar.cpp:
[lyx.git] / src / Counters.h
index f7d2cea1341e9ea73e1be86ee902b69d2e053c1f..28e7b686322791d3236f7b056c50a0893965d744 100644 (file)
@@ -73,6 +73,8 @@ private:
 /// Every instantiation is an array of counters of type Counter.
 class Counters {
 public:
+       ///
+       Counters() : appendix_(false), subfloat_(false) {}
        /// Add a new counter to array.
        void newCounter(docstring const & newc);
        /// Add new counter having oldc as its master and ls as its label.
@@ -116,6 +118,10 @@ public:
        std::string const & current_float() const { return current_float_; }
        /// Sets the current enclosing float.
        void current_float(std::string const & f) { current_float_ = f; }
+       /// Are we in a subfloat?
+       bool isSubfloat() const { return subfloat_; }
+       /// Set the state variable indicating whether we are in a subfloat.
+       void isSubfloat(bool s) { subfloat_ = s; };
 private:
        /// returns the expanded string representation of the counter
        /// with recursion protection through callers.
@@ -137,6 +143,8 @@ private:
        bool appendix_;
        /// The current enclosing float.
        std::string current_float_;
+       /// Are we in a subfloat?
+       bool subfloat_;
 };