]>
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 /////////////////////////////////////////////////////////////////////////////
11 #pragma implementation
14 #include "wx/wxprec.h"
18 #if wxUSE_HTML && wxUSE_STREAMS
27 #include "wx/html/forcelnk.h"
28 #include "wx/html/m_templ.h"
30 #include "wx/html/htmlcell.h"
32 FORCE_LINK_ME(m_dflist
)
37 TAG_HANDLER_BEGIN(DEFLIST
, "DL,DT,DD" )
39 TAG_HANDLER_CONSTR(DEFLIST
) { }
43 wxHtmlContainerCell
*c
;
46 if (tag
.GetName() == wxT("DL"))
48 if (m_WParser
->GetContainer()->GetFirstChild() != NULL
)
50 m_WParser
->CloseContainer();
51 m_WParser
->OpenContainer();
53 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
57 if (m_WParser
->GetContainer()->GetFirstChild() != NULL
)
59 m_WParser
->CloseContainer();
60 m_WParser
->OpenContainer();
62 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
66 else if (tag
.GetName() == wxT("DT"))
68 m_WParser
->CloseContainer();
69 c
= m_WParser
->OpenContainer();
70 c
->SetAlignHor(wxHTML_ALIGN_LEFT
);
71 c
->SetMinHeight(m_WParser
->GetCharHeight());
76 m_WParser
->CloseContainer();
77 c
= m_WParser
->OpenContainer();
78 c
->SetIndent(5 * m_WParser
->GetCharWidth(), wxHTML_INDENT_LEFT
);
83 TAG_HANDLER_END(DEFLIST
)
86 TAGS_MODULE_BEGIN(DefinitionList
)
88 TAGS_MODULE_ADD(DEFLIST
)
90 TAGS_MODULE_END(DefinitionList
)