From: Richard Heck Date: Fri, 12 Jun 2009 17:26:48 +0000 (+0000) Subject: XHTML for InsetWrap. X-Git-Tag: 2.0.0~6322 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9fcd1a6c6a7fe23d90d506b60eb036479baccdee;p=features.git XHTML for InsetWrap. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30080 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/HTML/HTML.notes b/development/HTML/HTML.notes index e9427d5cfc..fddefb1209 100644 --- a/development/HTML/HTML.notes +++ b/development/HTML/HTML.notes @@ -12,7 +12,7 @@ Known issues: These insets are basically done, though there are probably issues here and there, and there are even some FIXMEs: Bibitem, Branch, Collapsable, Footnote, Hyperlink, Info, Label, Line, - Marginal, Note, Newline, Newpage, Quotes, Space, SpecialChar + Marginal, Note, Newline, Newpage, Quotes, Space, SpecialChar, Wrap These insets do nothing for XHTML: ERT, OptArg, Phantom @@ -70,8 +70,6 @@ These do not yet work and need some attention: InsetTOC: We should just be able to use what we have in the TOC. To get links to work, though, we'll need to co-ordinate the writing of anchors in the sections, which won't actually happen until later. - InsetWrap: This should be simple enough, probably a div and some CSS, but I'm not sure - precisely what this is supposed to do. MATH Regarding math, the view seems to be that we should in the first instance just use what diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index 438cead752..060d4da271 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -294,6 +294,15 @@ InsetLayout Wrap Size Small EndFont MultiPar true + HTMLStyle + span.wrap { + float: right; + width: 40%; + border: 2px solid black; + padding: 1ex; + margin: 1ex; + } + EndHTMLStyle End InsetLayout URL diff --git a/src/insets/InsetWrap.cpp b/src/insets/InsetWrap.cpp index 3aec8c2aa2..4a3e8f7550 100644 --- a/src/insets/InsetWrap.cpp +++ b/src/insets/InsetWrap.cpp @@ -222,6 +222,20 @@ int InsetWrap::docbook(odocstream & os, OutputParams const & runparams) const } +docstring InsetWrap::xhtml(odocstream &, OutputParams const & rp) const +{ + string const len = params_.width.asHTMLString(); + docstring retval = from_ascii("
"); + odocstringstream os; + docstring const deferred = InsetText::xhtml(os, rp); + retval += os.str() + from_ascii("
"); + retval += deferred; +} + + bool InsetWrap::insetAllowed(InsetCode code) const { switch(code) { diff --git a/src/insets/InsetWrap.h b/src/insets/InsetWrap.h index 17e3b2b7b1..aa21ebf4cf 100644 --- a/src/insets/InsetWrap.h +++ b/src/insets/InsetWrap.h @@ -71,6 +71,8 @@ private: /// int docbook(odocstream &, OutputParams const &) const; /// + docstring xhtml(odocstream &, OutputParams const &) const; + /// docstring editMessage() const; /// bool insetAllowed(InsetCode) const;