+/////////////////////////////////////////////////////////////////////
+//
+// ParamInfo::ParamData
+//
+/////////////////////////////////////////////////////////////////////
+
+ParamInfo::ParamData::ParamData(std::string const & s, ParamType t,
+ ParamHandling h)
+ : name_(s), type_(t), handling_(h)
+{}
+
+
+bool ParamInfo::ParamData::isOptional() const
+{
+ return type_ == ParamInfo::LATEX_OPTIONAL;
+}
+
+
+bool ParamInfo::ParamData::operator==(ParamInfo::ParamData const & rhs) const
+{
+ return name() == rhs.name() && type() == rhs.type()
+ && handling() == rhs.handling();
+}
+
+
+bool ParamInfo::hasParam(std::string const & name) const
+{
+ const_iterator it = begin();
+ const_iterator last = end();
+ for (; it != last; ++it) {
+ if (it->name() == name)
+ return true;
+ }
+ return false;
+}
+
+
+void ParamInfo::add(std::string const & name, ParamType type,
+ ParamHandling handling)
+{
+ info_.push_back(ParamData(name, type, handling));
+}
+
+
+bool ParamInfo::operator==(ParamInfo const & rhs) const
+{
+ if (size() != rhs.size())
+ return false;
+ return equal(begin(), end(), rhs.begin());
+}
+
+
+ParamInfo::ParamData const &
+ ParamInfo::operator[](std::string const & name) const
+{
+ LASSERT(hasParam(name), /**/);
+ const_iterator it = begin();
+ const_iterator last = end();
+ for (; it != last; ++it) {
+ if (it->name() == name)
+ return *it;
+ }
+ return *it; // silence warning
+}
+
+
+/////////////////////////////////////////////////////////////////////
+//
+// InsetCommandParams
+//
+/////////////////////////////////////////////////////////////////////
+
+
+InsetCommandParams::InsetCommandParams(InsetCode code)
+ : insetCode_(code), preview_(false)
+{
+ cmdName_ = getDefaultCmd(code);
+ info_ = findInfo(code, cmdName_);
+}
+
+
+InsetCommandParams::InsetCommandParams(InsetCode code,
+ string const & cmdName)
+ : insetCode_(code), cmdName_(cmdName), preview_(false)
+{
+ info_ = findInfo(code, cmdName);
+}
+
+
+std::string InsetCommandParams::insetType() const
+{
+ return insetName(insetCode_);
+}
+
+
+string InsetCommandParams::getDefaultCmd(InsetCode code)
+{