]> git.saurik.com Git - wxWidgets.git/commitdiff
addedd support for <pre width=...>
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 9 Nov 2003 13:59:50 +0000 (13:59 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 9 Nov 2003 13:59:50 +0000 (13:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/html/test/regres.htm
src/html/m_pre.cpp

index 7e61edcbc8b42b55e8d501d2b5a35b1b521f6b10..a98d37adf2cacde9b705fe0bec382017b5d8daa0 100644 (file)
@@ -6,5 +6,9 @@
 
 <font size="+2">Unbre</font>akable word<P>
 
 
 <font size="+2">Unbre</font>akable word<P>
 
+<pre width="50%">
+&lt;pre&gt; text, 50% wide
+</pre>
+
 </body>
 </html>
 </body>
 </html>
index 76090c9398da94813f72e1aae9d20f5643452369..2594df910c95e2f811f134a38b0099e3f079d585 100644 (file)
@@ -94,6 +94,8 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
 
         m_WParser->CloseContainer();
         c = m_WParser->OpenContainer();
 
         m_WParser->CloseContainer();
         c = m_WParser->OpenContainer();
+        c->SetWidthFloat(tag);
+        c = m_WParser->OpenContainer();
         c->SetAlignHor(wxHTML_ALIGN_LEFT);
         c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
 
         c->SetAlignHor(wxHTML_ALIGN_LEFT);
         c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
 
@@ -106,6 +108,7 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
         m_Parser->DoParsing();
         m_Parser->RestoreState();
 
         m_Parser->DoParsing();
         m_Parser->RestoreState();
 
+        m_WParser->CloseContainer();
         m_WParser->CloseContainer();
         c = m_WParser->OpenContainer();
 
         m_WParser->CloseContainer();
         c = m_WParser->OpenContainer();