]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathCommand.h
g-brief loads babel internally. So don't load it ourselves.
[lyx.git] / src / mathed / InsetMathCommand.h
index e2a114304d15284f0f76d716e457343276c26075..a0144bcf55b2b145c7b47cf1c2bc28251054493b 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 "InsetMathNest.h"
 
-#include "insets/render_button.h"
+#include "insets/RenderButton.h"
 
 
 namespace lyx {
 
 
 /// Inset for things like \name[options]{contents}
-class CommandInset : public InsetMathNest {
+class InsetMathCommand : public InsetMathNest {
 public:
        ///
-       explicit CommandInset(docstring const & name);
+       explicit InsetMathCommand(Buffer * buf, docstring const & name,
+               bool needs_math_mode = true);
        ///
-       bool metrics(MetricsInfo & mi, Dimension & dim) const;
+       marker_type marker(BufferView const *) const override { return marker_type::NO_MARKER; }
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       InsetBase * editXY(LCursor &, int, int);
+       void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const;
+       Inset * editXY(Cursor &, int, int) override;
+       ///
+       void write(TeXMathStream & os) const override;
        //
        // void infoize(odocstream & os) const;
        ///
        virtual docstring const screenLabel() const;
        ///
        docstring const & commandname() const { return name_; }
+       ///
+       bool isActive() const override { return false; }
+
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       Inset * clone() const override;
 
        ///
        docstring name_;
        ///
+       bool needs_math_mode_;
+       ///
        mutable bool set_label_;
        ///
        mutable RenderButton button_;