virtual docstring contextMenuName() const;
- // FIXME This should really disappear in favor of
- // docstring name() const { return from_ascii(insetName(lyxCode()))); }
- // There's no reason to be using different names in different places.
- // But to do this we would need to change the file format, since the names
- // used there don't correspond to what is used here.
- ///
- virtual docstring name() const;
+ virtual docstring layoutName() const;
///
virtual InsetLayout const & getLayout() const;
/// Is this inset's layout defined in the document's textclass?
bool undefined() const;
- /// used to toggle insets
- /// is the inset open?
- /// should this inset be handled like a normal charater
+ /// should this inset be handled like a normal character?
+ /// (a character can be a letter or punctuation)
virtual bool isChar() const { return false; }
/// is this equivalent to a letter?
+ /// (a letter is a character that is considered part of a word)
virtual bool isLetter() const { return false; }
/// is this equivalent to a space (which is BTW different from
/// a line separator)?
/// returns whether this inset is allowed in other insets of given mode
virtual bool allowedIn(mode_type) const { return true; }
/**
- * Is this inset allowed within a font change?
- *
- * FIXME: noFontChange means currently that the font change is closed
- * in LaTeX before the inset, and that the contents of the inset
- * will be in default font. This should be changed so that the inset
- * changes the font again.
+ * The font is inherited from the parent for LaTeX export if this
+ * method returns true. No open font changes are closed in front of
+ * the inset for LaTeX export, and the font is inherited for all other
+ * exports as well as on screen.
+ * If this method returns false all open font changes are closed in
+ * front of the inset for LaTeX export. The default font is used
+ * inside the inset for all exports and on screen.
*/
- virtual bool noFontChange() const { return false; }
+ virtual bool inheritFont() const { return true; }
+ /**
+ * If this method returns true all explicitly set font attributes
+ * are reset during editing operations.
+ * For copy/paste the operations the language is never changed, since
+ * the language of a given text never changes if the text is
+ * formatted differently, while other font attribues like size may
+ * need to change if the text is copied from one environment to
+ * another one.
+ * If it returns false no font attribute is reset.
+ * The default implementation returns the negation of inheritFont(),
+ * since inherited inset font attributes do not need to be changed,
+ * and non-inherited ones need to be set explicitly.
+ */
+ virtual bool resetFontEdit() const { return !inheritFont(); }
/// set the change for the entire inset
virtual void setChange(Change const &) {}
///
virtual Dimension const dimension(BufferView const &) const;
///
- int scroll() const { return 0; }
- ///
virtual ColorCode backgroundColor(PainterInfo const &) const;
///
virtual ColorCode labelColor() const;