/// \return true if \p child is a child of this \c Buffer.
bool isChild(Buffer * child) const;
+
+ /// return a vector with all children and grandchildren
+ std::vector<Buffer *> getChildren() const;
/// Is buffer read-only?
bool isReadonly() const;
void setInsetLabel(docstring const & label, InsetLabel const * il);
InsetLabel const * insetLabel(docstring const & label) const;
- // FIXME: buf should should be const because updateLabels() modifies
- // the contents of the paragraphs.
- void updateLabels(bool childonly = false) const;
+ /// sets the buffer_ member for every inset in this buffer.
+ // FIXME This really shouldn't be needed, but at the moment it's not
+ // clear how to do it just for the individual pieces we need.
+ void setBuffersForInsets() const;
+ ///
+ enum UpdateScope {
+ UpdateMaster,
+ UpdateChildOnly
+ };
+ ///
+ void updateLabels(UpdateScope = UpdateMaster) const;
///
void updateLabels(ParIterator & parit) const;