]>
git.saurik.com Git - wxWidgets.git/blob - src/html/m_dflist.cpp
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 /////////////////////////////////////////////////////////////////////////////
10 #include "wx/wxprec.h"
13 #if wxUSE_HTML && wxUSE_STREAMS
22 #include "wx/html/forcelnk.h"
23 #include "wx/html/m_templ.h"
25 #include "wx/html/htmlcell.h"
27 FORCE_LINK_ME(m_dflist
)
32 TAG_HANDLER_BEGIN(DEFLIST
, "DL,DT,DD" )
34 TAG_HANDLER_CONSTR(DEFLIST
) { }
38 wxHtmlContainerCell
*c
;
41 if (tag
.GetName() == wxT("DL"))
43 if (m_WParser
->GetContainer()->GetFirstChild() != NULL
)
45 m_WParser
->CloseContainer();
46 m_WParser
->OpenContainer();
48 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
52 if (m_WParser
->GetContainer()->GetFirstChild() != NULL
)
54 m_WParser
->CloseContainer();
55 m_WParser
->OpenContainer();
57 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
61 else if (tag
.GetName() == wxT("DT"))
63 m_WParser
->CloseContainer();
64 c
= m_WParser
->OpenContainer();
65 c
->SetAlignHor(wxHTML_ALIGN_LEFT
);
66 c
->SetMinHeight(m_WParser
->GetCharHeight());
71 m_WParser
->CloseContainer();
72 c
= m_WParser
->OpenContainer();
73 c
->SetIndent(5 * m_WParser
->GetCharWidth(), wxHTML_INDENT_LEFT
);
78 TAG_HANDLER_END(DEFLIST
)
81 TAGS_MODULE_BEGIN(DefinitionList
)
83 TAGS_MODULE_ADD(DEFLIST
)
85 TAGS_MODULE_END(DefinitionList
)