]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSpace.h
Move <algorithm> from DocIterator.h
[lyx.git] / src / mathed / InsetMathSpace.h
index a3e06d634e0f12d6c2e010ef26b8b94ac907d43b..ff23305466f92f09d3954c120ac3cbb9b3338ef4 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();
        ///
-       int ascent() const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       int descent() const;
+       void draw(PainterInfo & pi, int x, int y) const override;
+
        ///
-       int width() const;
+       void normalize(NormalStream &) const override;
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       void validate(LaTeXFeatures & features) const override;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
-
+       void maple(MapleStream &) const override;
+       ///
+       void mathematica(MathematicaStream &) const override;
        ///
-       void normalize(NormalStream &) const;
+       void octave(OctaveStream &) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
+       void mathmlize(MathStream & ms) const override;
        ///
-       void maple(MapleStream &) const;
+       void htmlize(HtmlStream & ms) const override;
        ///
-       void mathematica(MathematicaStream &) const;
+       void write(WriteStream & 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;
+       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 std::auto_ptr<InsetBase> doClone() const;
+       Inset * clone() const override;
+       ///
+       bool isNegative() const;
        ///
        int space_;
+       /// amount of space for \\hspace
+       Length length_;
 };