+2002-08-02 Angus Leeming <leeming@lyx.org>
+
+ * insetcollapsable.[Ch] (addPreview):
+ * insettabular.[Ch] (addPreview):
+ * insettext.[Ch] (addPreview): new methods. Can now generate previews
+ for insets in insets.
+
2002-08-02 Angus Leeming <leeming@lyx.org>
* insetcite.C: fix typo.
first_after_edit = false;
return str;
}
+
+
+void InsetCollapsable::addPreview(grfx::PreviewLoader & loader) const
+{
+ inset.addPreview(loader);
+}
bool searchBackward(BufferView * bv, string const & str,
bool = true, bool = false);
+ ///
+ void addPreview(grfx::PreviewLoader &) const;
+
protected:
///
int ascent_collapsed() const;
return true;
}
+
+
+void InsetTabular::addPreview(grfx::PreviewLoader & loader) const
+{
+ int const rows = tabular->rows();
+ int const columns = tabular->columns();
+ for (int i = 0; i < rows; ++i) {
+ for (int j = 0; j < columns; ++j) {
+ tabular->GetCellInset(i,j)->addPreview(loader);
+ }
+ }
+}
// "normal" means without width set!
bool forceDefaultParagraphs(Inset const * in) const;
+ ///
+ void addPreview(grfx::PreviewLoader &) const;
+
//
// Public structures and variables
///
reinitLyXText();
}
+
+
+void InsetText::addPreview(grfx::PreviewLoader & loader) const
+{
+ Paragraph * par = getFirstParagraph(0);
+ while (par) {
+ Paragraph::inset_iterator it = par->inset_iterator_begin();
+ Paragraph::inset_iterator end = par->inset_iterator_end();
+ for (; it != end; ++it) {
+ it->addPreview(loader);
+ }
+
+ par = par->next();
+ }
+}
///
void appendParagraphs(BufferParams const & bparams, Paragraph *);
///
+ void addPreview(grfx::PreviewLoader &) const;
+
//
// Public structures and variables
///