class Text;
class TocBackend;
class TocList;
-class XHTMLStream;
+class XMLStream;
class otexstream;
namespace graphics { class PreviewLoader; }
/// docbook output
virtual int docbook(odocstream & os, OutputParams const &) const;
/// XHTML output
- /// the inset is expected to write XHTML to the XHTMLStream
+ /// the inset is expected to write XHTML to the XMLStream
/// \return any "deferred" material that should be written outside the
/// normal stream, and which will in fact be written after the current
/// paragraph closes. this is appropriate e.g. for floats.
- virtual docstring xhtml(XHTMLStream & xs, OutputParams const &) const;
+ virtual docstring xhtml(XMLStream &, OutputParams const &) const;
/// Writes a string representation of the inset to the odocstream.
/// This one should be called when you want the whole contents of
virtual OutputParams::CtObject CtObject(OutputParams const &) const { return OutputParams::CT_NORMAL; }
- enum DisplayType {
+ enum RowFlags {
Inline = 0,
- AlignLeft,
- AlignCenter,
- AlignRight
+ // break row before this inset
+ BreakBefore = 1 << 0,
+ // break row after this inset
+ BreakAfter = 1 << 1,
+ // it is possible to break after this inset
+ CanBreakAfter = 1 << 2,
+ // force new (maybe empty) row after this inset
+ RowAfter = 1 << 3,
+ // specify an alignment (left, right) for a display inset
+ // (default is center)
+ AlignLeft = 1 << 4,
+ AlignRight = 1 << 5,
+ // A display inset breaks row at both ends
+ Display = BreakBefore | BreakAfter
};
- /// should we have a non-filled line before this inset?
- virtual DisplayType display() const { return Inline; }
+ /// How should this inset be displayed in its row?
+ virtual RowFlags rowFlags() const { return Inline; }
/// indentation before this inset (only needed for displayed hull insets with fleqn option)
virtual int indent(BufferView const &) const { return 0; }
///
Buffer * buffer_;
};
+
+inline Inset::RowFlags operator|(Inset::RowFlags const d1,
+ Inset::RowFlags const d2)
+{
+ return static_cast<Inset::RowFlags>(int(d1) | int(d2));
+}
+
+
+inline Inset::RowFlags operator&(Inset::RowFlags const d1,
+ Inset::RowFlags const d2)
+{
+ return static_cast<Inset::RowFlags>(int(d1) & int(d2));
+}
+
+
} // namespace lyx
#endif