/////////////////////////////////////////////////////////////////////////////
-// Name: mod_hline.cpp
+// Name: m_hline.cpp
// Purpose: wxHtml module for horizontal line (HR tag)
// Author: Vaclav Slavik
// RCS-ID: $Id$
#pragma implementation
#endif
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
#include "wx/defs.h"
-#if wxUSE_HTML
+#if wxUSE_HTML && wxUSE_STREAMS
#ifdef __BORDLANDC__
#pragma hdrstop
#endif
#ifndef WXPRECOMP
-#include <wx/wx.h>
+ #include "wx/brush.h"
+ #include "wx/pen.h"
+ #include "wx/dc.h"
#endif
-
-
#include "wx/html/forcelnk.h"
#include "wx/html/m_templ.h"
#include "wx/html/htmlcell.h"
-FORCE_LINK_ME(mod_hline)
+FORCE_LINK_ME(m_hline)
//-----------------------------------------------------------------------------
public:
wxHtmlLineCell(int size) : wxHtmlCell() {m_Height = size;}
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
- void Layout(int w) {m_Width = w; if (m_Next) m_Next -> Layout(w);}
+ void Layout(int w)
+ { m_Width = w; wxHtmlCell::Layout(w); }
};
dc.SetBrush(mybrush);
dc.SetPen(mypen);
dc.DrawRectangle(x + m_PosX, y + m_PosY, m_Width, m_Height);
- wxHtmlCell::Draw(dc, x, y, view_y1, view_y2);
}
wxHtmlContainerCell *c;
int sz;
- m_WParser -> CloseContainer();
- c = m_WParser -> OpenContainer();
+ m_WParser->CloseContainer();
+ c = m_WParser->OpenContainer();
- c -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_VERTICAL);
- c -> SetAlignHor(wxHTML_ALIGN_CENTER);
- c -> SetAlign(tag);
- c -> SetWidthFloat(tag);
- if (tag.HasParam("SIZE") && tag.ScanParam("SIZE", "%i", &sz) == 1) {}
- else sz = 1;
- c -> InsertCell(new wxHtmlLineCell(sz));
+ c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_VERTICAL);
+ c->SetAlignHor(wxHTML_ALIGN_CENTER);
+ c->SetAlign(tag);
+ c->SetWidthFloat(tag);
+ sz = 1;
+ tag.GetParamAsInt(wxT("SIZE"), &sz);
+ c->InsertCell(new wxHtmlLineCell((int)((double)sz * m_WParser->GetPixelScale())));
- m_WParser -> CloseContainer();
- m_WParser -> OpenContainer();
+ m_WParser->CloseContainer();
+ m_WParser->OpenContainer();
return FALSE;
}