2 #include "command_inset.h"
3 #include "math_mathmlstream.h"
4 #include "funcrequest.h"
8 CommandInset::CommandInset(string const & name)
15 MathInset * CommandInset::clone() const
17 return new CommandInset(*this);
22 CommandInset::dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
26 return ButtonInset::dispatch(cmd, idx, pos);
32 void CommandInset::write(WriteStream & os) const
34 os << '\\' << name_.c_str();
36 os << '[' << cell(1) << ']';
37 os << '{' << cell(0) << '}';
41 string CommandInset::screenLabel() const
47 string const CommandInset::createDialogStr(string const & name) const
50 data << name << " LatexCommand ";
51 WriteStream wsdata(data);
53 wsdata << "\n\\end_inset\n\n";
54 return STRCONV(data.str());