]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSpace.h
typo
[lyx.git] / src / mathed / InsetMathSpace.h
index a4f1d1332ad764d39782926a3f2313cf12699250..96121726b6806f3d13a7caaf01b68b95a18491ff 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 
 #include "InsetMath.h"
 
+#include "support/Length.h"
+
 
 namespace lyx {
 
+struct InsetSpaceParams;
 
 /// Smart spaces
 class InsetMathSpace : public InsetMath {
 public:
        ///
-       explicit InsetMathSpace(int sp);
+       explicit InsetMathSpace();
+       ///
+       explicit InsetMathSpace(std::string const & name, std::string const & length);
        ///
-       explicit InsetMathSpace(docstring const & name);
+       explicit InsetMathSpace(Length const & length, bool const prot = false);
        ///
-       InsetMathSpace const * asSpaceInset() const { return this; }
+       InsetMathSpace const * asSpaceInset() const override { return this; }
        ///
-       InsetMathSpace * asSpaceInset() { return this; }
+       InsetMathSpace * asSpaceInset() override { return this; }
        ///
        void incSpace();
        ///
-       bool metrics(MetricsInfo & mi, Dimension & dim) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void draw(PainterInfo & pi, int x, int y) const override;
 
        ///
-       void normalize(NormalStream &) const;
+       void normalize(NormalStream &) const override;
+       ///
+       void validate(LaTeXFeatures & features) const override;
+       ///
+       void maple(MapleStream &) const override;
+       ///
+       void mathematica(MathematicaStream &) const override;
+       ///
+       void octave(OctaveStream &) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
+       void mathmlize(MathMLStream & ms) const override;
        ///
-       void maple(MapleStream &) const;
+       void htmlize(HtmlStream & ms) const override;
        ///
-       void mathematica(MathematicaStream &) const;
+       void write(TeXMathStream & os) const override;
+       /// generate something that will be understood by the Dialogs.
+       InsetSpaceParams params() const;
        ///
-       void octave(OctaveStream &) const;
+       bool hasSettings() const override { return true; }
        ///
-       void write(WriteStream & os) const;
+       bool clickable(BufferView const &, int, int) const override { return true; }
+       ///
+       std::string contextMenuName() const override;
+       ///
+       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
+       ///
+       InsetCode lyxCode() const override { return MATH_SPACE_CODE; }
+
+protected:
+       ///
+       void doDispatch(Cursor & cur, FuncRequest & cmd) override;
 private:
-       virtual Inset * clone() const;
+       Inset * clone() const override;
+       ///
+       bool isNegative() const;
        ///
        int space_;
+       /// amount of space for \\hspace
+       Length length_;
 };