]>
git.saurik.com Git - wxWidgets.git/blob - src/html/m_dflist.cpp
8deb90d5583a300d121996a75ec320c1534cfa5e
1 /////////////////////////////////////////////////////////////////////////////
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 /////////////////////////////////////////////////////////////////////////////
11 #pragma implementation
14 #include "wx/wxprec.h"
29 #include "wx/html/forcelnk.h"
30 #include "wx/html/m_templ.h"
32 #include "wx/html/htmlcell.h"
34 FORCE_LINK_ME(m_dflist
)
39 TAG_HANDLER_BEGIN(DEFLIST
, "DL,DT,DD")
43 wxHtmlContainerCell
*c
;
46 if (tag
.GetName() == "DL") {
47 if (m_WParser
-> GetContainer() -> GetFirstCell() != NULL
) {
48 m_WParser
-> CloseContainer();
49 m_WParser
-> OpenContainer();
51 m_WParser
-> GetContainer() -> SetIndent(m_WParser
-> GetCharHeight(), wxHTML_INDENT_TOP
);
55 if (m_WParser
-> GetContainer() -> GetFirstCell() != NULL
) {
56 m_WParser
-> CloseContainer();
57 m_WParser
-> OpenContainer();
59 m_WParser
-> GetContainer() -> SetIndent(m_WParser
-> GetCharHeight(), wxHTML_INDENT_TOP
);
64 else if (tag
.GetName() == "DT") {
65 if (!tag
.IsEnding()) {
66 m_WParser
-> CloseContainer();
67 c
= m_WParser
-> OpenContainer();
68 c
-> SetAlignHor(wxHTML_ALIGN_LEFT
);
69 c
-> SetMinHeight(m_WParser
-> GetCharHeight());
74 else if (!tag
.IsEnding()) { // "DD"
75 m_WParser
-> CloseContainer();
76 c
= m_WParser
-> OpenContainer();
77 c
-> SetIndent(5 * m_WParser
-> GetCharWidth(), wxHTML_INDENT_LEFT
);
84 TAG_HANDLER_END(DEFLIST
)
87 TAGS_MODULE_BEGIN(DefinitionList
)
89 TAGS_MODULE_ADD(DEFLIST
)
91 TAGS_MODULE_END(DefinitionList
)