* 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 { return NO_MARKER; }
+ ///
+ void metrics(MetricsInfo & mi, Dimension & dim) const;
///
void draw(PainterInfo & pi, int x, int y) const;
///
- InsetBase * editXY(LCursor &, int, int);
+ Inset * editXY(Cursor &, int, int);
///
void write(WriteStream & os) const;
//
// void infoize(odocstream & os) const;
///
virtual docstring const screenLabel() const;
- /// generate something that will be understood by the Dialogs.
- std::string const createDialogStr(std::string const & name) const;
///
docstring const & commandname() const { return name_; }
+ ///
+ bool isActive() const { return false; }
+
private:
- virtual std::auto_ptr<InsetBase> doClone() const;
+ virtual Inset * clone() const;
///
docstring name_;
///
+ bool needs_math_mode_;
+ ///
mutable bool set_label_;
///
mutable RenderButton button_;