#include "MacroTable.h"
#include "MathData.h"
-#include "support/types.h"
-
namespace lyx {
+class OutputParams;
+class XHTMLStream;
+
/// This class contains the macro definition.
class MathMacroTemplate : public InsetMathNest {
public:
void write(WriteStream & os) const;
/// Output LaTeX code, but assume that the macro is not definied yet
/// if overwriteRedefinition is true
- void write(WriteStream & os, bool overwriteRedefinition) const;
+ int write(WriteStream & os, bool overwriteRedefinition) const;
+ /// Nothing happens. This is simply to suppress the default output.
+ docstring xhtml(XHTMLStream &, OutputParams const &) const;
///
- int plaintext(odocstream &, OutputParams const &) const;
+ int plaintext(odocstringstream &, OutputParams const &, size_t) const;
///
- bool noFontChange() const { return true; }
+ bool inheritFont() const { return false; }
///
docstring name() const;
virtual void validate(LaTeXFeatures &) const;
/// decide whether its a redefinition
- void updateToContext(MacroContext const & mc) const;
+ void updateToContext(MacroContext const & mc);
///
void draw(PainterInfo & pi, int x, int y) const;
///
void infoize(odocstream & os) const;
///
- docstring contextMenu(BufferView const &, int, int) const;
+ std::string contextMenuName() const;
protected:
///
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
/// (re)newcommand or def
mutable MacroType type_;
/// defined before already?
- mutable bool redefinition_;
+ bool redefinition_;
///
void createLook(int args) const;
///