Andreas Vox wrote: > 3. Which iterator would I use to iterate all mathhull-insets > for snippet collection? Insetiterator?
See src/graphics/Previews.C This iterates over all top level insets. void Previews::generateBufferPreviews(Buffer const & buffer) const { PreviewLoader & ploader = loader(buffer); InsetBase & inset = buffer.inset(); InsetIterator it = inset_iterator_begin(inset); InsetIterator const end = inset_iterator_end(inset); for (; it != end; ++it) it->addPreview(ploader); ploader.startLoading(); } And this, in src/graphics/PreviewLoader.C iterates over all top level math macro insets. // Loop over the insets in the buffer and dump all the math-macros. InsetBase & inset = buffer_.inset(); InsetIterator it = inset_iterator_begin(inset); InsetIterator const end = inset_iterator_end(inset); for (; it != end; ++it) if (it->lyxCode() == InsetBase::MATHMACRO_CODE) it->latex(buffer_, os, runparams); Is hat enough info? > 4. Are these iterators compatible with STL? I think that that was a goal, yes. -- Angus