]> git.saurik.com Git - wxWidgets.git/blame - src/html/m_dflist.cpp
Remove DoSetSizeHints() call from Create()
[wxWidgets.git] / src / html / m_dflist.cpp
CommitLineData
336e2d44 1/////////////////////////////////////////////////////////////////////////////
93763ad5 2// Name: src/html/m_dflist.cpp
336e2d44
VS
3// Purpose: wxHtml module for definition lists (DL,DT,DD)
4// Author: Vaclav Slavik
336e2d44 5// Copyright: (c) 1999 Vaclav Slavik
65571936 6// Licence: wxWindows licence
336e2d44
VS
7/////////////////////////////////////////////////////////////////////////////
8
336e2d44
VS
9#include "wx/wxprec.h"
10
2b5f62a0 11#ifdef __BORLANDC__
93763ad5 12 #pragma hdrstop
336e2d44
VS
13#endif
14
93763ad5
WS
15#if wxUSE_HTML && wxUSE_STREAMS
16
b4f4d3dd 17#ifndef WX_PRECOMP
336e2d44
VS
18#endif
19
336e2d44
VS
20#include "wx/html/forcelnk.h"
21#include "wx/html/m_templ.h"
22
23#include "wx/html/htmlcell.h"
24
25FORCE_LINK_ME(m_dflist)
26
27
28
29
2b5f62a0 30TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD" )
336e2d44 31
fc7a2a60
VZ
32 TAG_HANDLER_CONSTR(DEFLIST) { }
33
336e2d44
VS
34 TAG_HANDLER_PROC(tag)
35 {
36 wxHtmlContainerCell *c;
37
38
04dbb646
VZ
39 if (tag.GetName() == wxT("DL"))
40 {
e3774124 41 if (m_WParser->GetContainer()->GetFirstChild() != NULL)
04dbb646 42 {
4f9297b0
VS
43 m_WParser->CloseContainer();
44 m_WParser->OpenContainer();
336e2d44 45 }
4f9297b0 46 m_WParser->GetContainer()->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
336e2d44
VS
47
48 ParseInner(tag);
49
e3774124 50 if (m_WParser->GetContainer()->GetFirstChild() != NULL)
04dbb646 51 {
4f9297b0
VS
52 m_WParser->CloseContainer();
53 m_WParser->OpenContainer();
336e2d44 54 }
4f9297b0 55 m_WParser->GetContainer()->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
336e2d44 56
d1da8872 57 return true;
336e2d44 58 }
04dbb646
VZ
59 else if (tag.GetName() == wxT("DT"))
60 {
211dfedd
VS
61 m_WParser->CloseContainer();
62 c = m_WParser->OpenContainer();
63 c->SetAlignHor(wxHTML_ALIGN_LEFT);
64 c->SetMinHeight(m_WParser->GetCharHeight());
d1da8872 65 return false;
336e2d44 66 }
211dfedd 67 else // "DD"
04dbb646 68 {
4f9297b0
VS
69 m_WParser->CloseContainer();
70 c = m_WParser->OpenContainer();
71 c->SetIndent(5 * m_WParser->GetCharWidth(), wxHTML_INDENT_LEFT);
d1da8872 72 return false;
336e2d44 73 }
336e2d44
VS
74 }
75
76TAG_HANDLER_END(DEFLIST)
77
78
79TAGS_MODULE_BEGIN(DefinitionList)
80
81 TAGS_MODULE_ADD(DEFLIST)
82
83TAGS_MODULE_END(DefinitionList)
84
85#endif