]>
git.saurik.com Git - wxWidgets.git/blob - src/html/m_dflist.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/html/m_dflist.cpp
3 // Purpose: wxHtml module for definition lists (DL,DT,DD)
4 // Author: Vaclav Slavik
6 // Copyright: (c) 1999 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #include "wx/wxprec.h"
16 #if wxUSE_HTML && wxUSE_STREAMS
21 #include "wx/html/forcelnk.h"
22 #include "wx/html/m_templ.h"
24 #include "wx/html/htmlcell.h"
26 FORCE_LINK_ME(m_dflist
)
31 TAG_HANDLER_BEGIN(DEFLIST
, "DL,DT,DD" )
33 TAG_HANDLER_CONSTR(DEFLIST
) { }
37 wxHtmlContainerCell
*c
;
40 if (tag
.GetName() == wxT("DL"))
42 if (m_WParser
->GetContainer()->GetFirstChild() != NULL
)
44 m_WParser
->CloseContainer();
45 m_WParser
->OpenContainer();
47 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
51 if (m_WParser
->GetContainer()->GetFirstChild() != NULL
)
53 m_WParser
->CloseContainer();
54 m_WParser
->OpenContainer();
56 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
60 else if (tag
.GetName() == wxT("DT"))
62 m_WParser
->CloseContainer();
63 c
= m_WParser
->OpenContainer();
64 c
->SetAlignHor(wxHTML_ALIGN_LEFT
);
65 c
->SetMinHeight(m_WParser
->GetCharHeight());
70 m_WParser
->CloseContainer();
71 c
= m_WParser
->OpenContainer();
72 c
->SetIndent(5 * m_WParser
->GetCharWidth(), wxHTML_INDENT_LEFT
);
77 TAG_HANDLER_END(DEFLIST
)
80 TAGS_MODULE_BEGIN(DefinitionList
)
82 TAGS_MODULE_ADD(DEFLIST
)
84 TAGS_MODULE_END(DefinitionList
)