]>
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
5 // Copyright: (c) 1999 Vaclav Slavik
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
15 #if wxUSE_HTML && wxUSE_STREAMS
20 #include "wx/html/forcelnk.h"
21 #include "wx/html/m_templ.h"
23 #include "wx/html/htmlcell.h"
25 FORCE_LINK_ME(m_dflist
)
30 TAG_HANDLER_BEGIN(DEFLIST
, "DL,DT,DD" )
32 TAG_HANDLER_CONSTR(DEFLIST
) { }
36 wxHtmlContainerCell
*c
;
39 if (tag
.GetName() == wxT("DL"))
41 if (m_WParser
->GetContainer()->GetFirstChild() != NULL
)
43 m_WParser
->CloseContainer();
44 m_WParser
->OpenContainer();
46 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
50 if (m_WParser
->GetContainer()->GetFirstChild() != NULL
)
52 m_WParser
->CloseContainer();
53 m_WParser
->OpenContainer();
55 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
59 else if (tag
.GetName() == wxT("DT"))
61 m_WParser
->CloseContainer();
62 c
= m_WParser
->OpenContainer();
63 c
->SetAlignHor(wxHTML_ALIGN_LEFT
);
64 c
->SetMinHeight(m_WParser
->GetCharHeight());
69 m_WParser
->CloseContainer();
70 c
= m_WParser
->OpenContainer();
71 c
->SetIndent(5 * m_WParser
->GetCharWidth(), wxHTML_INDENT_LEFT
);
76 TAG_HANDLER_END(DEFLIST
)
79 TAGS_MODULE_BEGIN(DefinitionList
)
81 TAGS_MODULE_ADD(DEFLIST
)
83 TAGS_MODULE_END(DefinitionList
)