#include "insets/InsetHFill.h"
#include "insets/InsetInclude.h"
#include "insets/InsetIndex.h"
+#include "insets/InsetInfo.h"
#include "insets/InsetNomencl.h"
#include "insets/InsetLabel.h"
#include "insets/InsetLine.h"
#include "insets/InsetSpace.h"
#include "insets/InsetTabular.h"
#include "insets/InsetTOC.h"
-#include "insets/InsetUrl.h"
+#include "insets/InsetHyperlink.h"
#include "insets/InsetVSpace.h"
#include "insets/InsetWrap.h"
case LFUN_WRAP_INSERT: {
string const argument = to_utf8(cmd.argument());
- if (argument == "figure")
+ if (argument == "figure" || argument == "table")
return new InsetWrap(params, argument);
lyxerr << "Non-existent wrapfig type: " << argument << endl;
return 0;
case LFUN_ENVIRONMENT_INSERT:
return new InsetEnvironment(params, cmd.argument());
+ case LFUN_INFO_INSERT:
+ return new InsetInfo(params, to_utf8(cmd.argument()));
#if 0
- case LFUN_LIST_INSERT:
- return new InsetList;
-
case LFUN_THEOREM_INSERT:
return new InsetTheorem;
#endif
inset->setParams(igp);
return inset.release();
+ } else if (name == "href") {
+ InsetCommandParams icp(name);
+ InsetCommandMailer::string2params(name, to_utf8(cmd.argument()),
+ icp);
+ return new InsetHyperlink(icp);
+
} else if (name == "include") {
InsetCommandParams iip(name);
InsetIncludeMailer::string2params(to_utf8(cmd.argument()), iip);
icp);
return new InsetTOC(icp);
- } else if (name == "url") {
- InsetCommandParams icp(name);
- InsetCommandMailer::string2params(name, to_utf8(cmd.argument()),
- icp);
- return new InsetUrl(icp);
-
} else if (name == "vspace") {
VSpace vspace;
InsetVSpaceMailer::string2params(to_utf8(cmd.argument()), vspace);
lex.pushToken(insetType);
//FIXME
- //Inset::Code const code = Inset::translate(insetType);
- //if (code == Inset::NO_CODE) { choke as below; }
+ //InsetCode const code = Inset::translate(insetType);
+ //if (code == NO_CODE) { choke as below; }
//InsetCommandParams inscmd();
InsetCommandParams inscmd(insetType);
inscmd.read(lex);
inset.reset(new InsetBibtex(inscmd));
} else if (insetType == "index") {
inset.reset(new InsetIndex(buf.params()));
- } else if (insetType == "nomenclature") {
- inset.reset(new InsetNomencl(inscmd));
+ } else if (insetType == "href") {
+ inset.reset(new InsetHyperlink(inscmd));
} else if (insetType == "include") {
inset.reset(new InsetInclude(inscmd));
} else if (insetType == "label") {
inset.reset(new InsetLabel(inscmd));
- } else if (insetType == "url") {
- inset.reset(new InsetUrl(inscmd));
+ } else if (insetType == "nomenclature") {
+ inset.reset(new InsetNomencl(inscmd));
} else if (insetType == "ref") {
if (!inscmd["name"].empty()
|| !inscmd["reference"].empty()) {
string tmptok = lex.getString();
inset.reset(new InsetWrap(buf.params(), tmptok));
#if 0
- } else if (tmptok == "List") {
- inset.reset(new InsetList);
} else if (tmptok == "Theorem") {
inset.reset(new InsetList);
#endif
inset.reset(new InsetIndex(buf.params()));
} else if (tmptok == "FloatList") {
inset.reset(new InsetFloatList);
+ } else if (tmptok == "Info") {
+ inset.reset(new InsetInfo(buf.params()));
} else {
lyxerr << "unknown Inset type '" << tmptok
<< "'" << std::endl;
inset->read(buf, lex);
// FIXME: hack..
- if (inset->lyxCode() == Inset::MATHMACRO_CODE) {
+ if (inset->lyxCode() == MATHMACRO_CODE) {
MathMacroTemplate const * tmpl =
static_cast<MathMacroTemplate*>(inset.get());
MacroTable::globalMacros().insert