From 336e2d442411a3594ff8a24dda22cfe906e038c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 20 Dec 1999 12:49:14 +0000 Subject: [PATCH] added support for definition lists (DL,DT,DD) to wxHTML git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 11 +++- distrib/msw/tmake/filelist.txt | 1 + src/html/m_dflist.cpp | 93 ++++++++++++++++++++++++++++++++++ src/msw/makefile.b32 | 5 +- src/msw/makefile.bcc | 8 +-- src/msw/makefile.dos | 14 +---- src/msw/makefile.g95 | 3 +- src/msw/makefile.sc | 2 +- src/msw/makefile.vc | 3 +- src/msw/makefile.wat | 2 +- src/wxvc.dsp | 4 ++ src/wxvc_dll.dsp | 4 ++ 12 files changed, 124 insertions(+), 26 deletions(-) create mode 100644 src/html/m_dflist.cpp diff --git a/Makefile.in b/Makefile.in index 48148399f6..fdcfe6c820 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # -# This file was automatically generated by tmake at 19:00, 1999/12/14 +# This file was automatically generated by tmake at 17:50, 1999/12/18 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T! # @@ -248,8 +248,15 @@ WX_HEADERS = \ helpwin.h \ helpxlp.h \ icon.h \ + imagbmp.h \ image.h \ + imaggif.h \ + imagjpeg.h \ imaglist.h \ + imagpcx.h \ + imagpng.h \ + imagpnm.h \ + imagtiff.h \ intl.h \ ioswrap.h \ ipcbase.h \ @@ -1912,6 +1919,7 @@ HTMLOBJS = \ htmltag.o \ htmlwin.o \ htmprint.o \ + m_dflist.o \ m_fonts.o \ m_hline.o \ m_image.o \ @@ -1932,6 +1940,7 @@ HTMLDEPS = \ htmltag.d \ htmlwin.d \ htmprint.d \ + m_dflist.d \ m_fonts.d \ m_hline.d \ m_image.d \ diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index 8c8892dff9..895d832f73 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -427,6 +427,7 @@ m_image.cpp H m_layout.cpp H m_links.cpp H m_list.cpp H +m_dflist.cpp H m_pre.cpp H m_tables.cpp H htmprint.cpp H diff --git a/src/html/m_dflist.cpp b/src/html/m_dflist.cpp new file mode 100644 index 0000000000..8deb90d558 --- /dev/null +++ b/src/html/m_dflist.cpp @@ -0,0 +1,93 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: m_dflist.cpp +// Purpose: wxHtml module for definition lists (DL,DT,DD) +// Author: Vaclav Slavik +// RCS-ID: $Id$ +// Copyright: (c) 1999 Vaclav Slavik +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation +#endif + +#include "wx/wxprec.h" + + +#include "wx/defs.h" +#if wxUSE_HTML + +#ifdef __BORDLANDC__ +#pragma hdrstop +#endif + +#ifndef WXPRECOMP +#include "wx/wx.h" +#endif + + +#include "wx/html/forcelnk.h" +#include "wx/html/m_templ.h" + +#include "wx/html/htmlcell.h" + +FORCE_LINK_ME(m_dflist) + + + + +TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD") + + TAG_HANDLER_PROC(tag) + { + wxHtmlContainerCell *c; + + + if (tag.GetName() == "DL") { + if (m_WParser -> GetContainer() -> GetFirstCell() != NULL) { + m_WParser -> CloseContainer(); + m_WParser -> OpenContainer(); + } + m_WParser -> GetContainer() -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_TOP); + + ParseInner(tag); + + if (m_WParser -> GetContainer() -> GetFirstCell() != NULL) { + m_WParser -> CloseContainer(); + m_WParser -> OpenContainer(); + } + m_WParser -> GetContainer() -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_TOP); + + return TRUE; + } + + else if (tag.GetName() == "DT") { + if (!tag.IsEnding()) { + m_WParser -> CloseContainer(); + c = m_WParser -> OpenContainer(); + c -> SetAlignHor(wxHTML_ALIGN_LEFT); + c -> SetMinHeight(m_WParser -> GetCharHeight()); + } + return FALSE; + } + + else if (!tag.IsEnding()) { // "DD" + m_WParser -> CloseContainer(); + c = m_WParser -> OpenContainer(); + c -> SetIndent(5 * m_WParser -> GetCharWidth(), wxHTML_INDENT_LEFT); + return FALSE; + } + + else return FALSE; + } + +TAG_HANDLER_END(DEFLIST) + + +TAGS_MODULE_BEGIN(DefinitionList) + + TAGS_MODULE_ADD(DEFLIST) + +TAGS_MODULE_END(DefinitionList) + +#endif diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 index 965de52610..1f69ef06fd 100644 --- a/src/msw/makefile.b32 +++ b/src/msw/makefile.b32 @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 23:50, 1999/12/15 +# This file was automatically generated by tmake at 17:50, 1999/12/18 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! # @@ -313,6 +313,7 @@ HTMLOBJS = $(MSWDIR)\helpctrl.obj \ $(MSWDIR)\htmltag.obj \ $(MSWDIR)\htmlwin.obj \ $(MSWDIR)\htmprint.obj \ + $(MSWDIR)\m_dflist.obj \ $(MSWDIR)\m_fonts.obj \ $(MSWDIR)\m_hline.obj \ $(MSWDIR)\m_image.obj \ @@ -826,6 +827,8 @@ $(MSWDIR)\htmlwin.obj: $(HTMLDIR)\htmlwin.$(SRCSUFF) $(MSWDIR)\htmprint.obj: $(HTMLDIR)\htmprint.$(SRCSUFF) +$(MSWDIR)\m_dflist.obj: $(HTMLDIR)\m_dflist.$(SRCSUFF) + $(MSWDIR)\m_fonts.obj: $(HTMLDIR)\m_fonts.$(SRCSUFF) $(MSWDIR)\m_hline.obj: $(HTMLDIR)\m_hline.$(SRCSUFF) diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc index 559575639b..a017250a0d 100644 --- a/src/msw/makefile.bcc +++ b/src/msw/makefile.bcc @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 23:50, 1999/12/15 +# This file was automatically generated by tmake at 17:50, 1999/12/18 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T! # @@ -109,7 +109,6 @@ COMMONOBJS = \ $(MSWDIR)\ctrlcmn.obj \ $(MSWDIR)\ctrlsub.obj \ $(MSWDIR)\date.obj \ - $(MSWDIR)\datetime.obj \ $(MSWDIR)\datstrm.obj \ $(MSWDIR)\db.obj \ $(MSWDIR)\dbtable.obj \ @@ -146,7 +145,6 @@ COMMONOBJS = \ $(MSWDIR)\lboxcmn.obj \ $(MSWDIR)\list.obj \ $(MSWDIR)\log.obj \ - $(MSWDIR)\longlong.obj \ $(MSWDIR)\memory.obj \ $(MSWDIR)\menucmn.obj \ $(MSWDIR)\module.obj \ @@ -476,8 +474,6 @@ $(MSWDIR)\ctrlsub.obj: $(COMMDIR)\ctrlsub.$(SRCSUFF) $(MSWDIR)\date.obj: $(COMMDIR)\date.$(SRCSUFF) -$(MSWDIR)\datetime.obj: $(COMMDIR)\datetime.$(SRCSUFF) - $(MSWDIR)\datstrm.obj: $(COMMDIR)\datstrm.$(SRCSUFF) $(MSWDIR)\db.obj: $(COMMDIR)\db.$(SRCSUFF) @@ -550,8 +546,6 @@ $(MSWDIR)\list.obj: $(COMMDIR)\list.$(SRCSUFF) $(MSWDIR)\log.obj: $(COMMDIR)\log.$(SRCSUFF) -$(MSWDIR)\longlong.obj: $(COMMDIR)\longlong.$(SRCSUFF) - $(MSWDIR)\memory.obj: $(COMMDIR)\memory.$(SRCSUFF) $(MSWDIR)\menucmn.obj: $(COMMDIR)\menucmn.$(SRCSUFF) diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index 84d4c10ac0..99f293ec82 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 23:50, 1999/12/15 +# This file was automatically generated by tmake at 17:50, 1999/12/18 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T! # @@ -95,7 +95,6 @@ COMMONOBJS1 = \ $(COMMDIR)\ctrlcmn.obj \ $(COMMDIR)\ctrlsub.obj \ $(COMMDIR)\date.obj \ - $(COMMDIR)\datetime.obj \ $(COMMDIR)\datstrm.obj \ $(COMMDIR)\db.obj \ $(COMMDIR)\dbtable.obj \ @@ -132,7 +131,6 @@ COMMONOBJS1 = \ $(COMMDIR)\lboxcmn.obj \ $(COMMDIR)\list.obj \ $(COMMDIR)\log.obj \ - $(COMMDIR)\longlong.obj \ $(COMMDIR)\memory.obj \ $(COMMDIR)\menucmn.obj \ $(COMMDIR)\module.obj \ @@ -768,11 +766,6 @@ $(COMMDIR)/date.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << -$(COMMDIR)/datetime.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - $(COMMDIR)/datstrm.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) @@ -953,11 +946,6 @@ $(COMMDIR)/log.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << -$(COMMDIR)/longlong.obj: $*.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) -<< - $(COMMDIR)/memory.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 index 259d23576a..8155fada93 100644 --- a/src/msw/makefile.g95 +++ b/src/msw/makefile.g95 @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 23:50, 1999/12/15 +# This file was automatically generated by tmake at 17:50, 1999/12/18 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T! # @@ -180,6 +180,7 @@ HTMLOBJS = \ $(HTMLDIR)/htmltag.$(OBJSUFF) \ $(HTMLDIR)/htmlwin.$(OBJSUFF) \ $(HTMLDIR)/htmprint.$(OBJSUFF) \ + $(HTMLDIR)/m_dflist.$(OBJSUFF) \ $(HTMLDIR)/m_fonts.$(OBJSUFF) \ $(HTMLDIR)/m_hline.$(OBJSUFF) \ $(HTMLDIR)/m_image.$(OBJSUFF) \ diff --git a/src/msw/makefile.sc b/src/msw/makefile.sc index 75d5dabbf9..7cff1ea421 100644 --- a/src/msw/makefile.sc +++ b/src/msw/makefile.sc @@ -1,6 +1,6 @@ -# This file was automatically generated by tmake at 23:50, 1999/12/15 +# This file was automatically generated by tmake at 17:50, 1999/12/18 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T! # Symantec C++ makefile for the msw objects diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc index 1a927ad302..61b59dccdd 100644 --- a/src/msw/makefile.vc +++ b/src/msw/makefile.vc @@ -1,4 +1,4 @@ -# This file was automatically generated by tmake at 23:50, 1999/12/15 +# This file was automatically generated by tmake at 17:50, 1999/12/18 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T! # File: makefile.vc @@ -330,6 +330,7 @@ HTMLOBJS = ..\html\$D\helpctrl.obj \ ..\html\$D\htmltag.obj \ ..\html\$D\htmlwin.obj \ ..\html\$D\htmprint.obj \ + ..\html\$D\m_dflist.obj \ ..\html\$D\m_fonts.obj \ ..\html\$D\m_hline.obj \ ..\html\$D\m_image.obj \ diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat index 1b2247eda0..69c2d923f1 100644 --- a/src/msw/makefile.wat +++ b/src/msw/makefile.wat @@ -1,6 +1,6 @@ #!/binb/wmake.exe -# This file was automatically generated by tmake at 23:50, 1999/12/15 +# This file was automatically generated by tmake at 17:50, 1999/12/18 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! # diff --git a/src/wxvc.dsp b/src/wxvc.dsp index 095186e09f..67dba20a6f 100644 --- a/src/wxvc.dsp +++ b/src/wxvc.dsp @@ -647,6 +647,10 @@ SOURCE=.\html\m_list.cpp # End Source File # Begin Source File +SOURCE=.\html\m_dflist.cpp +# End Source File +# Begin Source File + SOURCE=.\html\m_pre.cpp # End Source File # Begin Source File diff --git a/src/wxvc_dll.dsp b/src/wxvc_dll.dsp index 279c780eb2..29ea46b043 100644 --- a/src/wxvc_dll.dsp +++ b/src/wxvc_dll.dsp @@ -637,6 +637,10 @@ SOURCE=.\html\m_list.cpp # End Source File # Begin Source File +SOURCE=.\html\m_dflist.cpp +# End Source File +# Begin Source File + SOURCE=.\html\m_pre.cpp # End Source File # Begin Source File -- 2.45.2