]> git.lyx.org Git - features.git/blobdiff - src/TextClass.h
Kill indexing into the list of layouts.
[features.git] / src / TextClass.h
index 6e2302db5071160d879dcf434ff30ef04b78db0d..e4067ffd20eae613f11a764d3f49cd123b39646f 100644 (file)
@@ -57,6 +57,18 @@ public:
        typedef std::vector<LayoutPtr> LayoutList;
        /// The inset layouts available to this class
        typedef std::map<docstring, InsetLayout> InsetLayouts;
+       ///
+       typedef LayoutList::const_iterator const_iterator;
+       
+       ///////////////////////////////////////////////////////////////////
+       // Iterators
+       ///////////////////////////////////////////////////////////////////
+       /// Note that this returns a (LayoutPtr *). We really need a custom
+       /// iterator here.
+       const_iterator begin() const { return layoutlist_.begin(); }
+       ///
+       const_iterator end() const { return layoutlist_.end(); }
+
 
        ///////////////////////////////////////////////////////////////////
        // Layout Info
@@ -74,8 +86,6 @@ public:
                        { return emptylayout_; }
        /// Enumerate the paragraph styles.
        size_t layoutCount() const { return layoutlist_.size(); }
-       /// Access the paragraph styles.
-       LayoutPtr const & layout(size_t index) const { return layoutlist_[index]; }
        ///
        bool hasLayout(docstring const & name) const;
        ///