+/**
+ * \file command_inset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
#include "command_inset.h"
+#include "math_data.h"
#include "math_mathmlstream.h"
+#include "dispatchresult.h"
#include "funcrequest.h"
-#include "Lsstream.h"
+#include "support/std_sstream.h"
+
+
+using std::string;
+using std::auto_ptr;
+using std::ostringstream;
CommandInset::CommandInset(string const & name)
}
-MathInset * CommandInset::clone() const
+auto_ptr<InsetBase> CommandInset::clone() const
{
- return new CommandInset(*this);
+ return auto_ptr<InsetBase>(new CommandInset(*this));
}
button_.draw(pi, x, y);
}
-dispatch_result
-CommandInset::dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
+
+DispatchResult
+CommandInset::priv_dispatch(FuncRequest const & cmd,
+ idx_type & idx, pos_type & pos)
{
switch (cmd.action) {
default:
- return MathNestInset::dispatch(cmd, idx, pos);
+ return MathNestInset::priv_dispatch(cmd, idx, pos);
}
- return UNDISPATCHED;
+ return DispatchResult(false);
}
WriteStream wsdata(data);
write(wsdata);
wsdata << "\n\\end_inset\n\n";
- return STRCONV(data.str());
+ return data.str();
}