#include "ColorCode.h"
#include "FontInfo.h"
+#include "Layout.h"
#include "LayoutEnums.h"
-#include "LayoutPtr.h"
#include "insets/InsetLayout.h"
// typedefs
///////////////////////////////////////////////////////////////////
/// The individual paragraph layouts comprising the document class
- typedef std::vector<LayoutPtr> LayoutList;
+ typedef std::vector<Layout> LayoutList;
/// The inset layouts available to this class
typedef std::map<docstring, InsetLayout> InsetLayouts;
///
///////////////////////////////////////////////////////////////////
// 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
///////////////////////////////////////////////////////////////////
///
- LayoutPtr const & defaultLayout() const;
+ Layout const & defaultLayout() const;
///
docstring const & defaultLayoutName() const;
+ ///
+ bool isDefaultLayout(Layout const &) const;
+ ///
+ bool isEmptyLayout(Layout const &) const;
/// returns a special layout for use when we don't really want one,
/// e.g., in table cells
- LayoutPtr const & emptyLayout() const
+ Layout const & emptyLayout() const
{ return operator[](emptylayout_); };
/// the name of the empty layout
docstring const & emptyLayoutName() const
///
bool hasLayout(docstring const & name) const;
///
- LayoutPtr const & operator[](docstring const & vname) const;
+ Layout const & operator[](docstring const & vname) const;
///////////////////////////////////////////////////////////////////
// reading routines
protected:
/// Protect construction
TextClass();
+ ///
+ Layout & operator[](docstring const & vname);
+
+ ///////////////////////////////////////////////////////////////////
+ // non-const iterators
+ ///////////////////////////////////////////////////////////////////
+ ///
+ typedef LayoutList::iterator iterator;
+ ///
+ iterator begin() { return layoutlist_.begin(); }
+ ///
+ iterator end() { return layoutlist_.end(); }
+
///////////////////////////////////////////////////////////////////
// members
///////////////////////////////////////////////////////////////////