]>
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
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() == wxT("DL"))
48 if (m_WParser
->GetContainer()->GetFirstCell() != 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()->GetFirstCell() != NULL
)
59 m_WParser
->CloseContainer();
60 m_WParser
->OpenContainer();
62 m_WParser
->GetContainer()->SetIndent(m_WParser
->GetCharHeight(), wxHTML_INDENT_TOP
);
67 else if (tag
.GetName() == wxT("DT"))
71 m_WParser
->CloseContainer();
72 c
= m_WParser
->OpenContainer();
73 c
->SetAlignHor(wxHTML_ALIGN_LEFT
);
74 c
->SetMinHeight(m_WParser
->GetCharHeight());
79 else if (!tag
.IsEnding()) // "DD"
81 m_WParser
->CloseContainer();
82 c
= m_WParser
->OpenContainer();
83 c
->SetIndent(5 * m_WParser
->GetCharWidth(), wxHTML_INDENT_LEFT
);
90 TAG_HANDLER_END(DEFLIST
)
93 TAGS_MODULE_BEGIN(DefinitionList
)
95 TAGS_MODULE_ADD(DEFLIST
)
97 TAGS_MODULE_END(DefinitionList
)