*
* \author Asger Alstrup Nielsen
* \author Jean-Marc Lasgouttes
- * \author Lars Gullik Bjønnes
- * \author Jürgen Spitzmüller
+ * \author Lars Gullik Bjønnes
+ * \author Jürgen Spitzmüller
*
* Full author contact details are available in file CREDITS.
*/
PROTECTED,
/// Thin space ('\,')
THIN,
+ /// Medium space ('\:')
+ MEDIUM,
+ /// Thick space ('\;')
+ THICK,
/// \quad (1em)
QUAD,
/// \qquad (2em)
QQUAD,
- /// \enspace (0.5em unbreakable)
+ /// \enskip (0.5em unbreakable)
ENSPACE,
/// \enspace (0.5em breakable)
ENSKIP,
/// Negative thin space ('\negthinspace')
NEGTHIN,
+ /// Negative medium space ('\negmedspace')
+ NEGMEDIUM,
+ /// Negative thick space ('\negthickspace')
+ NEGTHICK,
/// rubber length
HFILL,
/// \hspace*{\fill}
CUSTOM_PROTECTED
};
///
- InsetSpaceParams() : kind(NORMAL), length(Length()) {}
+ InsetSpaceParams(bool m = false) : kind(NORMAL), math(m) {}
///
void write(std::ostream & os) const;
///
///
Kind kind;
///
- Length length;
+ GlueLength length;
+ /**
+ * Whether these params are to be used in mathed.
+ * This determines the set of valid kinds.
+ */
+ bool math;
};
{
public:
///
- InsetSpace() {}
+ InsetSpace() : Inset(0) {}
///
explicit InsetSpace(InsetSpaceParams const & par);
///
///
static std::string params2string(InsetSpaceParams const &);
///
- Length length() const;
+ GlueLength length() const;
-private:
///
docstring toolTip(BufferView const & bv, int x, int y) const;
///
int plaintext(odocstream &, OutputParams const &) const;
///
int docbook(odocstream &, OutputParams const &) const;
+ ///
+ docstring xhtml(XHTMLStream &, OutputParams const &) const;
+ ///
+ void validate(LaTeXFeatures & features) const;
/// the string that is passed to the TOC
void tocString(odocstream &) const;
///
- void edit(Cursor & cur, bool front,
- EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
- ///
- EDITABLE editable() const { return IS_EDITABLE; }
+ bool hasSettings() const { return true; }
///
InsetCode lyxCode() const { return SPACE_CODE; }
/// is this an expandible space (rubber length)?
bool isSpace() const { return true; }
///
docstring contextMenu(BufferView const & bv, int x, int y) const;
+protected:
///
Inset * clone() const { return new InsetSpace(*this); }
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
+public:
///
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+private:
+ ///
+ bool showInsetDialog(BufferView * bv) const;
///
InsetSpaceParams params_;
};