- info_ = findInfo(insetType, cmdName);
- BOOST_ASSERT(info_);
- params_.resize(info_->n);
-}
-
-
-//FIXME This should go into the Insets themselves...so they will tell
-//us what parameters they want.
-//Should this just vanish in favor of the two arg version, or is there
-//a reason to use it in some cases? What should happen in the single
-//arg case, then? Maybe use the default? or leave that up to the inset?
-InsetCommandParams::CommandInfo const *
-InsetCommandParams::findInfo(std::string const & insetType)
-{
- // No parameter may be named "preview", because that is a required
- // flag for all commands.
-
- // InsetBibitem
- if (insetType == "bibitem") {
- static const char * const paramnames[] = {"label", "key", ""};
- static const bool isoptional[] = {true, false};
- static const CommandInfo info = {2, paramnames, isoptional};
- return &info;
- }
-
- // InsetBibtex
- if (insetType == "bibtex") {
- static const char * const paramnames[] =
- {"options", "btprint", "bibfiles", ""};
- static const bool isoptional[] = {true, true, false};
- static const CommandInfo info = {3, paramnames, isoptional};
- return &info;
- }
-
- // InsetCitation
- if (insetType == "citation") {
- // standard cite does only take one argument if jurabib is
- // not used, but jurabib extends this to two arguments, so
- // we have to allow both here. InsetCitation takes care that
- // LaTeX output is nevertheless correct.
- static const char * const paramnames[] =
- {"after", "before", "key", ""};
- static const bool isoptional[] = {true, true, false};
- static const CommandInfo info = {3, paramnames, isoptional};
- return &info;
- }
-
- // InsetFloatlist
- if (insetType == "floatlist") {
- static const char * const paramnames[] = {"type", ""};
- static const bool isoptional[] = {false};
- static const CommandInfo info = {1, paramnames, isoptional};
- return &info;
- }
-
- // InsetHfill
- if (insetType == "hfill") {
- static const char * const paramnames[] = {""};
- static const CommandInfo info = {0, paramnames, 0};
- return &info;