namespace lyx {
-InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
- : InsetCollapsable(bp), name_(from_utf8(type))
+InsetWrap::InsetWrap(Buffer const & buf, string const & type)
+ : InsetCollapsable(buf), name_(from_utf8(type))
{
- setLabel(_("wrap: ") + floatName(type, bp));
+ setLabel(_("wrap: ") + floatName(type, buf.params()));
params_.type = type;
params_.lines = 0;
params_.placement = "o";
void InsetWrap::updateLabels(ParIterator const & it)
{
+ setLabel(_("wrap: ") + floatName(params_.type, buffer().params()));
Counters & cnts = buffer().params().documentClass().counters();
string const saveflt = cnts.current_float();
}
-void InsetWrap::draw(PainterInfo & pi, int x, int y) const
-{
- const_cast<InsetWrap &>(*this).setLabel(
- _("wrap: ") + floatName(params_.type, buffer().params()));
- InsetCollapsable::draw(pi, x, y);
-}
-
-
void InsetWrap::validate(LaTeXFeatures & features) const
{
features.require("wrapfig");
}
-Inset * InsetWrap::clone() const
-{
- return new InsetWrap(*this);
-}
-
-
docstring InsetWrap::editMessage() const
{
return _("Opened Wrap Inset");