- InsetCommand::metrics(mi, dim);
- center_indent_ = (mi.base.textwidth - dim.wid) / 2;
- dim.wid = mi.base.textwidth;
- dim_ = dim;
-}
-
-
-void InsetPrintIndex::draw(PainterInfo & pi, int x, int y) const
-{
- InsetCommand::draw(pi, x + center_indent_, y);
-}
-
-
-dispatch_result InsetIndex::localDispatch(FuncRequest const & cmd)
-{
- switch (cmd.action) {
- case LFUN_INSET_EDIT:
- InsetCommandMailer("index", *this).showDialog(cmd.view());
- return DISPATCHED;
-
- default:
- return InsetCommand::localDispatch(cmd);
- }
-}
-
-
-int InsetIndex::docbook(Buffer const &, ostream & os, bool) const
-{
- os << "<indexterm><primary>" << getContents()