]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetRef.cpp
* InsetCollapsable:
[lyx.git] / src / insets / InsetRef.cpp
index f1838c28fcf71a2bfe74fce5969dbef1799e7710..5fb240a95dab94312580d9aa168f5c89a15879fe 100644 (file)
@@ -21,6 +21,7 @@
 #include "OutputParams.h"
 #include "sgml.h"
 
+#include "support/docstream.h"
 #include "support/lstrings.h"
 
 
@@ -42,6 +43,27 @@ InsetRef::InsetRef(InsetRef const & ir)
 {}
 
 
+bool InsetRef::isCompatibleCommand(std::string const & s) {
+       //FIXME This is likely not the best way to handle this.
+       //But this stuff is hardcoded elsewhere already.
+       return s == "ref" 
+               || s == "pageref"
+               || s == "vref" 
+               || s == "vpageref"
+               || s == "prettyref"
+               || s == "eqref";
+}
+
+
+CommandInfo const * InsetRef::findInfo(std::string const & /* cmdName */)
+{
+       static const char * const paramnames[] = {"name", "reference", ""};
+       static const bool isoptional[] = {true, false};
+       static const CommandInfo info = {2, paramnames, isoptional};
+       return &info;
+}
+
+
 void InsetRef::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        switch (cmd.action) {