class InsetMathSymbol;
class InsetMathUnknown;
class InsetMathSymbol;
class InsetMathUnknown;
class NormalStream;
class OctaveStream;
class NormalStream;
class OctaveStream;
virtual InsetMathSymbol const * asSymbolInset() const { return 0; }
virtual InsetMathUnknown * asUnknownInset() { return 0; }
virtual InsetMathUnknown const * asUnknownInset() const { return 0; }
virtual InsetMathSymbol const * asSymbolInset() const { return 0; }
virtual InsetMathUnknown * asUnknownInset() { return 0; }
virtual InsetMathUnknown const * asUnknownInset() const { return 0; }
- virtual RefInset * asRefInset() { return 0; }
+ virtual InsetMathRef * asRefInset() { return 0; }
/// identifies things that can get scripts
virtual bool isScriptable() const { return false; }
/// identifies things that can get scripts
virtual bool isScriptable() const { return false; }
docstring const & name = cmd.argument();
string data;
if (name == "ref") {
docstring const & name = cmd.argument();
string data;
if (name == "ref") {
+ InsetMathRef tmp(name);
data = tmp.createDialogStr(to_utf8(name));
}
cur.bv().showInsetDialog(to_utf8(name), data, 0);
data = tmp.createDialogStr(to_utf8(name));
}
cur.bv().showInsetDialog(to_utf8(name), data, 0);
+InsetMathRef::InsetMathRef()
: CommandInset(from_ascii("ref"))
{}
: CommandInset(from_ascii("ref"))
{}
-RefInset::RefInset(docstring const & data)
+InsetMathRef::InsetMathRef(docstring const & data)
-auto_ptr<InsetBase> RefInset::doClone() const
+auto_ptr<InsetBase> InsetMathRef::doClone() const
- return auto_ptr<InsetBase>(new RefInset(*this));
+ return auto_ptr<InsetBase>(new InsetMathRef(*this));
-void RefInset::infoize(odocstream & os) const
+void InsetMathRef::infoize(odocstream & os) const
{
os << "Ref: " << cell(0);
}
{
os << "Ref: " << cell(0);
}
-void RefInset::doDispatch(Cursor & cur, FuncRequest & cmd)
+void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY:
{
switch (cmd.action) {
case LFUN_INSET_MODIFY:
-bool RefInset::getStatus(Cursor & cur, FuncRequest const & cmd,
+bool InsetMathRef::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {
FuncStatus & status) const
{
switch (cmd.action) {
-docstring const RefInset::screenLabel() const
+docstring const InsetMathRef::screenLabel() const
{
docstring str;
for (int i = 0; !types[i].latex_name.empty(); ++i) {
{
docstring str;
for (int i = 0; !types[i].latex_name.empty(); ++i) {
-void RefInset::validate(LaTeXFeatures & features) const
+void InsetMathRef::validate(LaTeXFeatures & features) const
{
if (commandname() == "vref" || commandname() == "vpageref")
features.require("varioref");
{
if (commandname() == "vref" || commandname() == "vpageref")
features.require("varioref");
-int RefInset::docbook(Buffer const & buf, odocstream & os,
+int InsetMathRef::docbook(Buffer const & buf, odocstream & os,
OutputParams const & runparams) const
{
if (cell(1).empty()) {
OutputParams const & runparams) const
{
if (cell(1).empty()) {
-string const RefInset::createDialogStr(string const & name) const
+string const InsetMathRef::createDialogStr(string const & name) const
{
InsetCommandParams icp(to_ascii(commandname()));
icp["reference"] = asString(cell(0));
{
InsetCommandParams icp(to_ascii(commandname()));
icp["reference"] = asString(cell(0));
-RefInset::ref_type_info RefInset::types[] = {
+InsetMathRef::ref_type_info InsetMathRef::types[] = {
{ from_ascii("ref"), from_ascii(N_("Standard")), from_ascii(N_("Ref: "))},
{ from_ascii("eqref"), from_ascii(N_("Equation")), from_ascii(N_("EqRef: "))},
{ from_ascii("pageref"), from_ascii(N_("Page Number")), from_ascii(N_("Page: "))},
{ from_ascii("ref"), from_ascii(N_("Standard")), from_ascii(N_("Ref: "))},
{ from_ascii("eqref"), from_ascii(N_("Equation")), from_ascii(N_("EqRef: "))},
{ from_ascii("pageref"), from_ascii(N_("Page Number")), from_ascii(N_("Page: "))},
class Buffer;
// for \ref
class Buffer;
// for \ref
-class RefInset : public CommandInset {
+class InsetMathRef : public CommandInset {
- explicit RefInset(docstring const & data);
+ explicit InsetMathRef(docstring const & data);
///
//void write(WriteStream & os) const;
///
///
//void write(WriteStream & os) const;
///
///
void validate(LaTeXFeatures & features) const;
///
///
void validate(LaTeXFeatures & features) const;
///
- virtual RefInset * asRefInset() { return this; }
+ virtual InsetMathRef * asRefInset() { return this; }
/// docbook output
int docbook(Buffer const & buf, odocstream & os, OutputParams const &) const;
/// docbook output
int docbook(Buffer const & buf, odocstream & os, OutputParams const &) const;
docstring const & inset = l->inset;
//lyxerr << " found inset: '" << inset << '\'' << endl;
if (inset == "ref")
docstring const & inset = l->inset;
//lyxerr << " found inset: '" << inset << '\'' << endl;
if (inset == "ref")
- return MathAtom(new RefInset(l->name));
+ return MathAtom(new InsetMathRef(l->name));
if (inset == "overset")
return MathAtom(new InsetMathOverset);
if (inset == "underset")
if (inset == "overset")
return MathAtom(new InsetMathOverset);
if (inset == "underset")
else if (t.cs() == "ref" || t.cs() == "prettyref" ||
t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") {
else if (t.cs() == "ref" || t.cs() == "prettyref" ||
t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") {
- cell->push_back(MathAtom(new RefInset(t.cs())));
+ cell->push_back(MathAtom(new InsetMathRef(t.cs())));
parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
}
parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
}