//
/////////////////////////////////////////////////////////////////////
-InsetPhantom::InsetPhantom(Buffer const & buf, string const & label)
+InsetPhantom::InsetPhantom(Buffer * buf, string const & label)
: InsetCollapsable(buf)
{
setDrawFrame(false);
}
-docstring InsetPhantom::editMessage() const
-{
- return _("Opened Phantom Inset");
-}
-
-
docstring InsetPhantom::name() const
{
return from_ascii("Phantom:" + phantomtranslator().find(params_.type));
void InsetPhantom::doDispatch(Cursor & cur, FuncRequest & cmd)
{
- switch (cmd.action) {
+ switch (cmd.action()) {
case LFUN_INSET_MODIFY:
string2params(to_utf8(cmd.argument()), params_);
- setLayout(buffer().params());
break;
case LFUN_INSET_DIALOG_UPDATE:
bool InsetPhantom::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
- switch (cmd.action) {
+ switch (cmd.action()) {
case LFUN_INSET_MODIFY:
if (cmd.getArg(0) == "phantom") {
docstring InsetPhantom::toolTip(BufferView const &, int, int) const
{
- OutputParams rp(&buffer().params().encoding());
- odocstringstream ods;
- InsetCollapsable::plaintext(ods, rp);
- docstring content_tip = support::wrapParas(ods.str());
+ docstring const tip = InsetText::toolTipText();
docstring res = phantomtranslator_loc().find(params_.type);
- if (!content_tip.empty())
- res += from_ascii(": ") + "\n" + content_tip;
+ if (!tip.empty())
+ res += from_ascii(": ") + "\n" + tip;
return res;
}
}
-docstring InsetPhantom::xhtml(odocstream &, OutputParams const &) const
+docstring InsetPhantom::xhtml(XHTMLStream &, OutputParams const &) const
{
return docstring();
}