class InsetMath;
class InsetText;
class LaTeXFeatures;
+class LColor_color;
class LCursor;
class LyXLex;
class LyXText;
/// describe content if cursor behind
virtual void infoize2(odocstream &) const {}
+ enum {
+ PLAINTEXT_NEWLINE = 10000
+ };
+
/// plain text output in ucs4 encoding
- /// return the number of characters, in case of multiple lines of
- /// output, add runparams.linelen to the number of chars in the last line
+ /// return the number of characters; in case of multiple lines of
+ /// output, add PLAINTEXT_NEWLINE to the number of chars in the last line
virtual int plaintext(Buffer const &, odocstream &,
OutputParams const &) const = 0;
/// docbook output
/// if this inset has paragraphs should they be output all as default
/// paragraphs with the default layout of the text class?
virtual bool forceDefaultParagraphs(idx_type) const { return false; }
+ /// Is the width forced to some value?
+ virtual bool hasFixedWidth() const { return false; }
///
virtual docstring const & getInsetName() const;
/// reject the changes within the inset
virtual void rejectChanges(BufferParams const &) {};
- /// pretty arbitrary
- virtual int width() const { return 10; }
- /// pretty arbitrary
- virtual int ascent() const { return 10; }
- /// pretty arbitrary
- virtual int descent() const { return 10; }
+ /// inset width.
+ int width() const { return dim_.wid; }
+ /// inset ascent.
+ int ascent() const { return dim_.asc; }
+ /// inset descent.
+ int descent() const { return dim_.des; }
///
int scroll() const { return 0; }
///
+ void setBackgroundColor(LColor_color);
+ ///
+ LColor_color backgroundColor() const;
+ ///
enum CollapseStatus {
Collapsed,
Inlined,
///
virtual void setStatus(LCursor &, CollapseStatus) {}
protected:
- InsetBase() {}
- InsetBase(InsetBase const &) {}
+ InsetBase();
+ InsetBase(InsetBase const & i);
/** The real dispatcher.
* Gets normally called from LCursor::dispatch(). LCursor::dispatch()
* assumes the common case of 'LFUN handled, need update'.
mutable Dimension dim_;
private:
virtual std::auto_ptr<InsetBase> doClone() const = 0;
+ /** We store the LColor::color value as an int to get LColor.h out
+ * of the header file.
+ */
+ int background_color_;
};