diff --git a/include/wx/html/helpdata.h b/include/wx/html/helpdata.h
index 6c01b0c744..abc04b35ed 100644
--- a/include/wx/html/helpdata.h
+++ b/include/wx/html/helpdata.h
@@ -61,7 +61,6 @@ protected:
WX_DECLARE_EXPORTED_OBJARRAY(wxHtmlBookRecord, wxHtmlBookRecArray);
-
typedef struct
{
short int m_Level;
diff --git a/include/wx/html/htmlcell.h b/include/wx/html/htmlcell.h
index 862f7ebebb..0dd32f2fea 100644
--- a/include/wx/html/htmlcell.h
+++ b/include/wx/html/htmlcell.h
@@ -84,7 +84,7 @@ class WXDLLEXPORT wxHtmlCell : public wxObject
// Condition is unique condition identifier (see htmldefs.h)
// (user-defined condition IDs should start from 10000)
// and param is optional parameter
- // Example : m_Cell -> Find(HTML_COND_ISANCHOR, "news");
+ // Example : m_Cell -> Find(wxHTML_COND_ISANCHOR, "news");
// returns pointer to anchor news
virtual void OnMouseClick(wxWindow *parent, int x, int y, bool left, bool middle, bool right);
@@ -200,11 +200,11 @@ class WXDLLEXPORT wxHtmlContainerCell : public wxHtmlCell
void SetAlignVer(int al) {m_AlignVer = al;}
// sets horizontal/vertical alignment
int GetAlignVer() const {return m_AlignVer;}
- void SetIndent(int i, int what, int units = HTML_UNITS_PIXELS);
- // sets left-border indentation. units is one of HTML_UNITS_* constants
- // what is combination of HTML_INDENT_*
+ void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS);
+ // sets left-border indentation. units is one of wxHTML_UNITS_* constants
+ // what is combination of wxHTML_INDENT_*
int GetIndent(int ind) const;
- // returns the indentation. ind is one of HTML_INDENT_* constants
+ // returns the indentation. ind is one of wxHTML_INDENT_* constants
int GetIndentUnits(int ind) const;
// returns type of value returned by GetIndent(ind)
void SetAlign(const wxHtmlTag& tag);
@@ -214,7 +214,7 @@ class WXDLLEXPORT wxHtmlContainerCell : public wxHtmlCell
// sets floating width adjustment
// (examples : 32 percent of parent container,
// -15 pixels percent (this means 100 % - 15 pixels)
- void SetMinHeight(int h, int align = HTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align;}
+ void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align;}
// sets minimal height of this container.
int GetMaxLineWidth() const {return m_MaxLineWidth;}
// returns maximal line width in this container.
@@ -245,7 +245,7 @@ class WXDLLEXPORT wxHtmlColourCell : public wxHtmlCell
wxColour m_Colour;
unsigned m_Flags;
- wxHtmlColourCell(wxColour clr, int flags = HTML_CLR_FOREGROUND) : wxHtmlCell() {m_Colour = clr; m_Flags = flags;}
+ wxHtmlColourCell(wxColour clr, int flags = wxHTML_CLR_FOREGROUND) : wxHtmlCell() {m_Colour = clr; m_Flags = flags;}
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
virtual void DrawInvisible(wxDC& dc, int x, int y);
};
diff --git a/include/wx/html/htmldefs.h b/include/wx/html/htmldefs.h
index fb316d43ba..20d945171a 100644
--- a/include/wx/html/htmldefs.h
+++ b/include/wx/html/htmldefs.h
@@ -20,13 +20,13 @@
// Describes alignment of text etc. in containers
//--------------------------------------------------------------------------------
-#define HTML_ALIGN_LEFT 0x0000
-#define HTML_ALIGN_RIGHT 0x0002
+#define wxHTML_ALIGN_LEFT 0x0000
+#define wxHTML_ALIGN_RIGHT 0x0002
-#define HTML_ALIGN_TOP 0x0004
-#define HTML_ALIGN_BOTTOM 0x0008
+#define wxHTML_ALIGN_TOP 0x0004
+#define wxHTML_ALIGN_BOTTOM 0x0008
-#define HTML_ALIGN_CENTER 0x0001
+#define wxHTML_ALIGN_CENTER 0x0001
@@ -35,8 +35,8 @@
// Used by wxHtmlColourCell to determine clr of what is changing
//--------------------------------------------------------------------------------
-#define HTML_CLR_FOREGROUND 0x0001
-#define HTML_CLR_BACKGROUND 0x0002
+#define wxHTML_CLR_FOREGROUND 0x0001
+#define wxHTML_CLR_BACKGROUND 0x0002
@@ -45,8 +45,8 @@
// Used to specify units
//--------------------------------------------------------------------------------
-#define HTML_UNITS_PIXELS 0x0001
-#define HTML_UNITS_PERCENT 0x0002
+#define wxHTML_UNITS_PIXELS 0x0001
+#define wxHTML_UNITS_PERCENT 0x0002
@@ -55,14 +55,14 @@
// Used to specify indetation relatives
//--------------------------------------------------------------------------------
-#define HTML_INDENT_LEFT 0x0010
-#define HTML_INDENT_RIGHT 0x0020
-#define HTML_INDENT_TOP 0x0040
-#define HTML_INDENT_BOTTOM 0x0080
+#define wxHTML_INDENT_LEFT 0x0010
+#define wxHTML_INDENT_RIGHT 0x0020
+#define wxHTML_INDENT_TOP 0x0040
+#define wxHTML_INDENT_BOTTOM 0x0080
-#define HTML_INDENT_HORIZONTAL HTML_INDENT_LEFT | HTML_INDENT_RIGHT
-#define HTML_INDENT_VERTICAL HTML_INDENT_TOP | HTML_INDENT_BOTTOM
-#define HTML_INDENT_ALL HTML_INDENT_VERTICAL | HTML_INDENT_HORIZONTAL
+#define wxHTML_INDENT_HORIZONTAL wxHTML_INDENT_LEFT | wxHTML_INDENT_RIGHT
+#define wxHTML_INDENT_VERTICAL wxHTML_INDENT_TOP | wxHTML_INDENT_BOTTOM
+#define wxHTML_INDENT_ALL wxHTML_INDENT_VERTICAL | wxHTML_INDENT_HORIZONTAL
@@ -72,14 +72,14 @@
// Identifiers of wxHtmlCell's Find() conditions
//--------------------------------------------------------------------------------
-#define HTML_COND_ISANCHOR 1
+#define wxHTML_COND_ISANCHOR 1
// Finds the anchor of 'param' name (pointer to wxString).
-#define HTML_COND_ISIMAGEMAP 2
+#define wxHTML_COND_ISIMAGEMAP 2
// Finds imagemap of 'param' name (pointer to wxString).
// (used exclusively by m_image.cpp)
-#define HTML_COND_USER 10000
+#define wxHTML_COND_USER 10000
// User-defined conditions should start from this number
@@ -88,14 +88,47 @@
// wxHTML internal constants
//--------------------------------------------------------------------------------
-#define HTML_SCROLL_STEP 16
+#define wxHTML_SCROLL_STEP 16
/* size of one scroll step of wxHtmlWindow in pixels */
-#define HTML_BUFLEN 1024
+#define wxHTML_BUFLEN 1024
/* size of temporary buffer used during parsing */
-#define HTML_REALLOC_STEP 32
+#define wxHTML_REALLOC_STEP 32
/* steps of array reallocation */
-#define HTML_PRINT_MAX_PAGES 999
+#define wxHTML_PRINT_MAX_PAGES 999
/* maximum number of pages printable via html printing */
+
+
+
+
+
+
+
+#if WXWIN_COMPATIBILITY_2
+
+#define HTML_ALIGN_LEFT wxHTML_ALIGN_LEFT
+#define HTML_ALIGN_RIGHT wxHTML_ALIGN_RIGHT
+#define HTML_ALIGN_TOP wxHTML_ALIGN_TOP
+#define HTML_ALIGN_BOTTOM wxHTML_ALIGN_BOTTOM
+#define HTML_ALIGN_CENTER wxHTML_ALIGN_CENTER
+#define HTML_CLR_FOREGROUND wxHTML_CLR_FOREGROUND
+#define HTML_CLR_BACKGROUND wxHTML_CLR_BACKGROUND
+#define HTML_UNITS_PIXELS wxHTML_UNITS_PIXELS
+#define HTML_UNITS_PERCENT wxHTML_UNITS_PERCENT
+#define HTML_INDENT_LEFT wxHTML_INDENT_LEFT
+#define HTML_INDENT_RIGHT wxHTML_INDENT_RIGHT
+#define HTML_INDENT_TOP wxHTML_INDENT_TOP
+#define HTML_INDENT_BOTTOM wxHTML_INDENT_BOTTOM
+#define HTML_INDENT_HORIZONTAL wxHTML_INDENT_HORIZONTAL
+#define HTML_INDENT_VERTICAL wxHTML_INDENT_VERTICAL
+#define HTML_INDENT_ALL wxHTML_INDENT_ALL
+#define HTML_COND_ISANCHOR wxHTML_COND_ISANCHOR
+#define HTML_COND_ISIMAGEMAP wxHTML_COND_ISIMAGEMAP
+#define HTML_COND_USER wxHTML_COND_USER
+
+#endif
+
+
+
#endif
#endif
diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h
index c35df126ec..6007670406 100644
--- a/include/wx/html/htmprint.h
+++ b/include/wx/html/htmprint.h
@@ -140,7 +140,7 @@ class wxHtmlPrintout : public wxPrintout
bool OnPrintPage(int page);
bool HasPage(int page);
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
- bool OnBeginDocument(int start, int end);
+ void OnBeginPrinting();
private:
@@ -154,7 +154,7 @@ class wxHtmlPrintout : public wxPrintout
private:
int m_NumPages;
- int m_PageBreaks[HTML_PRINT_MAX_PAGES];
+ int m_PageBreaks[wxHTML_PRINT_MAX_PAGES];
wxString m_Document, m_BasePath;
bool m_BasePathIsDir;
diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp
index 9379ddd1d9..e558e2fb8a 100644
--- a/src/html/helpdata.cpp
+++ b/src/html/helpdata.cpp
@@ -123,8 +123,8 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag)
m_Name = m_Page = wxEmptyString;
ParseInner(tag);
if (m_Page != wxEmptyString) {
- if (m_ItemsCnt % HTML_REALLOC_STEP == 0)
- m_Items = (wxHtmlContentsItem*) realloc(m_Items, (m_ItemsCnt + HTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem));
+ if (m_ItemsCnt % wxHTML_REALLOC_STEP == 0)
+ m_Items = (wxHtmlContentsItem*) realloc(m_Items, (m_ItemsCnt + wxHTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem));
m_Items[m_ItemsCnt].m_Level = m_Level;
m_Items[m_ItemsCnt].m_ID = m_ID;
m_Items[m_ItemsCnt].m_Page = new char[m_Page.Length() + 1];
@@ -248,7 +248,7 @@ bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f)
f -> Read(&x, sizeof(x));
st = m_ContentsCnt;
m_ContentsCnt += x;
- m_Contents = (wxHtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt / HTML_REALLOC_STEP + 1) * HTML_REALLOC_STEP * sizeof(wxHtmlContentsItem));
+ m_Contents = (wxHtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt / wxHTML_REALLOC_STEP + 1) * wxHTML_REALLOC_STEP * sizeof(wxHtmlContentsItem));
for (i = st; i < m_ContentsCnt; i++) {
f -> Read(&x, sizeof(x));
m_Contents[i].m_Level = x;
@@ -268,7 +268,7 @@ bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f)
f -> Read(&x, sizeof(x));
st = m_IndexCnt;
m_IndexCnt += x;
- m_Index = (wxHtmlContentsItem*) realloc(m_Index, (m_IndexCnt / HTML_REALLOC_STEP + 1) * HTML_REALLOC_STEP * sizeof(wxHtmlContentsItem));
+ m_Index = (wxHtmlContentsItem*) realloc(m_Index, (m_IndexCnt / wxHTML_REALLOC_STEP + 1) * wxHTML_REALLOC_STEP * sizeof(wxHtmlContentsItem));
for (i = st; i < m_IndexCnt; i++) {
f -> Read(&x, sizeof(x));
m_Index[i].m_Name = new char[x];
@@ -352,8 +352,8 @@ bool wxHtmlHelpData::AddBookParam(const wxString& title, const wxString& contfil
bookr = new wxHtmlBookRecord(path+'/', title, deftopic);
- if (m_ContentsCnt % HTML_REALLOC_STEP == 0)
- m_Contents = (wxHtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + HTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem));
+ if (m_ContentsCnt % wxHTML_REALLOC_STEP == 0)
+ m_Contents = (wxHtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + wxHTML_REALLOC_STEP) * sizeof(wxHtmlContentsItem));
m_Contents[m_ContentsCnt].m_Level = 0;
m_Contents[m_ContentsCnt].m_ID = 0;
m_Contents[m_ContentsCnt].m_Page = new char[deftopic.Length() + 1];
diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp
index 6ed7c1fa80..6979805f45 100644
--- a/src/html/htmlcell.cpp
+++ b/src/html/htmlcell.cpp
@@ -101,35 +101,35 @@ wxHtmlContainerCell::wxHtmlContainerCell(wxHtmlContainerCell *parent) : wxHtmlCe
m_Cells = m_LastCell = NULL;
m_Parent = parent;
if (m_Parent) m_Parent -> InsertCell(this);
- m_AlignHor = HTML_ALIGN_LEFT;
- m_AlignVer = HTML_ALIGN_BOTTOM;
+ m_AlignHor = wxHTML_ALIGN_LEFT;
+ m_AlignVer = wxHTML_ALIGN_BOTTOM;
m_IndentLeft = m_IndentRight = m_IndentTop = m_IndentBottom = 0;
- m_WidthFloat = 100; m_WidthFloatUnits = HTML_UNITS_PERCENT;
+ m_WidthFloat = 100; m_WidthFloatUnits = wxHTML_UNITS_PERCENT;
m_UseBkColour = FALSE;
m_UseBorder = FALSE;
m_MinHeight = m_MaxLineWidth = 0;
- m_MinHeightAlign = HTML_ALIGN_TOP;
+ m_MinHeightAlign = wxHTML_ALIGN_TOP;
}
void wxHtmlContainerCell::SetIndent(int i, int what, int units)
{
- int val = (units == HTML_UNITS_PIXELS) ? i : -i;
- if (what & HTML_INDENT_LEFT) m_IndentLeft = val;
- if (what & HTML_INDENT_RIGHT) m_IndentRight = val;
- if (what & HTML_INDENT_TOP) m_IndentTop = val;
- if (what & HTML_INDENT_BOTTOM) m_IndentBottom = val;
+ int val = (units == wxHTML_UNITS_PIXELS) ? i : -i;
+ if (what & wxHTML_INDENT_LEFT) m_IndentLeft = val;
+ if (what & wxHTML_INDENT_RIGHT) m_IndentRight = val;
+ if (what & wxHTML_INDENT_TOP) m_IndentTop = val;
+ if (what & wxHTML_INDENT_BOTTOM) m_IndentBottom = val;
}
int wxHtmlContainerCell::GetIndent(int ind) const
{
- if (ind & HTML_INDENT_LEFT) return m_IndentLeft;
- else if (ind & HTML_INDENT_RIGHT) return m_IndentRight;
- else if (ind & HTML_INDENT_TOP) return m_IndentTop;
- else if (ind & HTML_INDENT_BOTTOM) return m_IndentBottom;
+ if (ind & wxHTML_INDENT_LEFT) return m_IndentLeft;
+ else if (ind & wxHTML_INDENT_RIGHT) return m_IndentRight;
+ else if (ind & wxHTML_INDENT_TOP) return m_IndentTop;
+ else if (ind & wxHTML_INDENT_BOTTOM) return m_IndentBottom;
else return -1; /* BUG! Should not be called... */
}
@@ -139,12 +139,12 @@ int wxHtmlContainerCell::GetIndent(int ind) const
int wxHtmlContainerCell::GetIndentUnits(int ind) const
{
bool p = FALSE;
- if (ind & HTML_INDENT_LEFT) p = m_IndentLeft < 0;
- else if (ind & HTML_INDENT_RIGHT) p = m_IndentRight < 0;
- else if (ind & HTML_INDENT_TOP) p = m_IndentTop < 0;
- else if (ind & HTML_INDENT_BOTTOM) p = m_IndentBottom < 0;
- if (p) return HTML_UNITS_PERCENT;
- else return HTML_UNITS_PIXELS;
+ if (ind & wxHTML_INDENT_LEFT) p = m_IndentLeft < 0;
+ else if (ind & wxHTML_INDENT_RIGHT) p = m_IndentRight < 0;
+ else if (ind & wxHTML_INDENT_TOP) p = m_IndentTop < 0;
+ else if (ind & wxHTML_INDENT_BOTTOM) p = m_IndentBottom < 0;
+ if (p) return wxHTML_UNITS_PERCENT;
+ else return wxHTML_UNITS_PIXELS;
}
@@ -184,7 +184,7 @@ void wxHtmlContainerCell::Layout(int w)
*/
- if (m_WidthFloatUnits == HTML_UNITS_PERCENT) {
+ if (m_WidthFloatUnits == wxHTML_UNITS_PERCENT) {
if (m_WidthFloat < 0) m_Width = (100 + m_WidthFloat) * w / 100;
else m_Width = m_WidthFloat * w / 100;
}
@@ -214,9 +214,9 @@ void wxHtmlContainerCell::Layout(int w)
// my own layouting:
while (cell != NULL) {
switch (m_AlignVer) {
- case HTML_ALIGN_TOP : ybasicpos = 0; break;
- case HTML_ALIGN_BOTTOM : ybasicpos = - cell -> GetHeight(); break;
- case HTML_ALIGN_CENTER : ybasicpos = - cell -> GetHeight() / 2; break;
+ case wxHTML_ALIGN_TOP : ybasicpos = 0; break;
+ case wxHTML_ALIGN_BOTTOM : ybasicpos = - cell -> GetHeight(); break;
+ case wxHTML_ALIGN_CENTER : ybasicpos = - cell -> GetHeight() / 2; break;
}
ydiff = cell -> GetHeight() + ybasicpos;
@@ -233,9 +233,9 @@ void wxHtmlContainerCell::Layout(int w)
if (ysizeup < 0) ysizeup = 0;
if (ysizedown < 0) ysizedown = 0;
switch (m_AlignHor) {
- case HTML_ALIGN_LEFT : xdelta = 0; break;
- case HTML_ALIGN_RIGHT : xdelta = 0 + (s_width - xpos); break;
- case HTML_ALIGN_CENTER : xdelta = 0 + (s_width - xpos) / 2; break;
+ case wxHTML_ALIGN_LEFT : xdelta = 0; break;
+ case wxHTML_ALIGN_RIGHT : xdelta = 0 + (s_width - xpos); break;
+ case wxHTML_ALIGN_CENTER : xdelta = 0 + (s_width - xpos) / 2; break;
}
if (xdelta < 0) xdelta = 0;
xdelta += s_indent;
@@ -257,9 +257,9 @@ void wxHtmlContainerCell::Layout(int w)
m_Height = ypos + (ysizedown + ysizeup) + m_IndentBottom;
if (m_Height < m_MinHeight) {
- if (m_MinHeightAlign != HTML_ALIGN_TOP) {
+ if (m_MinHeightAlign != wxHTML_ALIGN_TOP) {
int diff = m_MinHeight - m_Height;
- if (m_MinHeightAlign == HTML_ALIGN_CENTER) diff /= 2;
+ if (m_MinHeightAlign == wxHTML_ALIGN_CENTER) diff /= 2;
cell = m_Cells;
while (cell) {
cell -> SetPos(cell -> GetPosX(), cell -> GetPosY() + diff);
@@ -363,11 +363,11 @@ void wxHtmlContainerCell::SetAlign(const wxHtmlTag& tag)
wxString alg = tag.GetParam("ALIGN");
alg.MakeUpper();
if (alg == "CENTER")
- SetAlignHor(HTML_ALIGN_CENTER);
+ SetAlignHor(wxHTML_ALIGN_CENTER);
else if (alg == "LEFT")
- SetAlignHor(HTML_ALIGN_LEFT);
+ SetAlignHor(wxHTML_ALIGN_LEFT);
else if (alg == "RIGHT")
- SetAlignHor(HTML_ALIGN_RIGHT);
+ SetAlignHor(wxHTML_ALIGN_RIGHT);
}
}
@@ -381,11 +381,11 @@ void wxHtmlContainerCell::SetWidthFloat(const wxHtmlTag& tag)
if (wd[wd.Length()-1] == '%') {
sscanf(wd.c_str(), "%i%%", &wdi);
- SetWidthFloat(wdi, HTML_UNITS_PERCENT);
+ SetWidthFloat(wdi, wxHTML_UNITS_PERCENT);
}
else {
sscanf(wd.c_str(), "%i", &wdi);
- SetWidthFloat(wdi, HTML_UNITS_PIXELS);
+ SetWidthFloat(wdi, wxHTML_UNITS_PIXELS);
}
}
}
@@ -433,9 +433,9 @@ void wxHtmlContainerCell::OnMouseClick(wxWindow *parent, int x, int y, bool left
void wxHtmlColourCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
{
- if (m_Flags & HTML_CLR_FOREGROUND)
+ if (m_Flags & wxHTML_CLR_FOREGROUND)
dc.SetTextForeground(m_Colour);
- if (m_Flags & HTML_CLR_BACKGROUND) {
+ if (m_Flags & wxHTML_CLR_BACKGROUND) {
dc.SetBackground(wxBrush(m_Colour, wxSOLID));
dc.SetTextBackground(m_Colour);
}
@@ -444,9 +444,9 @@ void wxHtmlColourCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
void wxHtmlColourCell::DrawInvisible(wxDC& dc, int x, int y)
{
- if (m_Flags & HTML_CLR_FOREGROUND)
+ if (m_Flags & wxHTML_CLR_FOREGROUND)
dc.SetTextForeground(m_Colour);
- if (m_Flags & HTML_CLR_BACKGROUND) {
+ if (m_Flags & wxHTML_CLR_BACKGROUND) {
dc.SetBackground(wxBrush(m_Colour, wxSOLID));
dc.SetTextBackground(m_Colour);
}
@@ -505,7 +505,7 @@ void wxHtmlWidgetCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
}
((wxScrolledWindow*)(m_Wnd -> GetParent())) -> ViewStart(&stx, &sty);
- m_Wnd -> SetSize(absx - HTML_SCROLL_STEP * stx, absy - HTML_SCROLL_STEP * sty, m_Width, m_Height);
+ m_Wnd -> SetSize(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty, m_Width, m_Height);
wxHtmlCell::Draw(dc, x, y, view_y1, view_y2);
}
@@ -524,7 +524,7 @@ void wxHtmlWidgetCell::DrawInvisible(wxDC& dc, int x, int y)
}
((wxScrolledWindow*)(m_Wnd -> GetParent())) -> ViewStart(&stx, &sty);
- m_Wnd -> SetSize(absx - HTML_SCROLL_STEP * stx, absy - HTML_SCROLL_STEP * sty, m_Width, m_Height);
+ m_Wnd -> SetSize(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty, m_Width, m_Height);
wxHtmlCell::DrawInvisible(dc, x, y);
}
diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp
index 806d4bb5b5..da21362a5e 100644
--- a/src/html/htmlpars.cpp
+++ b/src/html/htmlpars.cpp
@@ -69,11 +69,11 @@ void wxHtmlParser::DoneParser()
-#define HTML_MAX_BUFLEN 1024
+#define wxHTML_MAX_BUFLEN 1024
void wxHtmlParser::DoParsing(int begin_pos, int end_pos)
{
- char temp[HTML_BUFLEN], c;
+ char temp[wxHTML_BUFLEN], c;
int i;
int templen;
@@ -86,7 +86,7 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos)
// continue building word:
if (c != '<') {
temp[templen++] = c;
- if (templen == HTML_BUFLEN-1) {
+ if (templen == wxHTML_BUFLEN-1) {
temp[templen] = 0;
AddText(temp);
templen = 0;
diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp
index 11570576e3..a001a80126 100644
--- a/src/html/htmlwin.cpp
+++ b/src/html/htmlwin.cpp
@@ -116,8 +116,8 @@ bool wxHtmlWindow::SetPage(const wxString& source)
}
m_Cell = (wxHtmlContainerCell*) m_Parser -> Parse(source);
delete dc;
- m_Cell -> SetIndent(m_Borders, HTML_INDENT_ALL, HTML_UNITS_PIXELS);
- m_Cell -> SetAlignHor(HTML_ALIGN_CENTER);
+ m_Cell -> SetIndent(m_Borders, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS);
+ m_Cell -> SetAlignHor(wxHTML_ALIGN_CENTER);
CreateLayout();
Refresh();
return TRUE;
@@ -218,13 +218,13 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
bool wxHtmlWindow::ScrollToAnchor(const wxString& anchor)
{
- const wxHtmlCell *c = m_Cell -> Find(HTML_COND_ISANCHOR, &anchor);
+ const wxHtmlCell *c = m_Cell -> Find(wxHTML_COND_ISANCHOR, &anchor);
if (!c) return FALSE;
else {
int y;
for (y = 0; c != NULL; c = c -> GetParent()) y += c -> GetPosY();
- Scroll(-1, y / HTML_SCROLL_STEP);
+ Scroll(-1, y / wxHTML_SCROLL_STEP);
m_OpenedAnchor = anchor;
return TRUE;
}
@@ -265,9 +265,9 @@ void wxHtmlWindow::CreateLayout()
GetClientSize(&ClientWidth, &ClientHeight);
m_Cell -> Layout(ClientWidth);
if (ClientHeight < m_Cell -> GetHeight()) {
- SetScrollbars(HTML_SCROLL_STEP, HTML_SCROLL_STEP,
- m_Cell -> GetWidth() / HTML_SCROLL_STEP,
- m_Cell -> GetHeight() / HTML_SCROLL_STEP
+ SetScrollbars(wxHTML_SCROLL_STEP, wxHTML_SCROLL_STEP,
+ m_Cell -> GetWidth() / wxHTML_SCROLL_STEP,
+ m_Cell -> GetHeight() / wxHTML_SCROLL_STEP
/*cheat: top-level frag is always container*/);
}
else { /* we fit into window, no need for scrollbars */
@@ -430,7 +430,7 @@ void wxHtmlWindow::OnDraw(wxDC& dc)
while (upd) {
v_y = upd.GetY();
v_h = upd.GetH();
- if (m_Cell) m_Cell -> Draw(dc, 0, 0, y * HTML_SCROLL_STEP + v_y, y * HTML_SCROLL_STEP + v_h + v_y);
+ if (m_Cell) m_Cell -> Draw(dc, 0, 0, y * wxHTML_SCROLL_STEP + v_y, y * wxHTML_SCROLL_STEP + v_h + v_y);
upd++;
}
}
@@ -452,8 +452,8 @@ void wxHtmlWindow::OnKeyDown(wxKeyEvent& event)
int sty, szy, cliy;
ViewStart(&dummy, &sty);
- GetClientSize(&dummy, &cliy); cliy /= HTML_SCROLL_STEP;
- GetVirtualSize(&dummy, &szy); szy /= HTML_SCROLL_STEP;
+ GetClientSize(&dummy, &cliy); cliy /= wxHTML_SCROLL_STEP;
+ GetVirtualSize(&dummy, &szy); szy /= wxHTML_SCROLL_STEP;
switch (event.KeyCode()) {
case WXK_PAGEUP :
@@ -490,7 +490,7 @@ void wxHtmlWindow::OnMouseEvent(wxMouseEvent& event)
wxPoint pos;
wxString lnk;
- ViewStart(&sx, &sy); sx *= HTML_SCROLL_STEP; sy *= HTML_SCROLL_STEP;
+ ViewStart(&sx, &sy); sx *= wxHTML_SCROLL_STEP; sy *= wxHTML_SCROLL_STEP;
pos = event.GetPosition();
if (m_Cell)
@@ -509,7 +509,7 @@ void wxHtmlWindow::OnIdle(wxIdleEvent& event)
int x, y;
wxString lnk;
- ViewStart(&sx, &sy); sx *= HTML_SCROLL_STEP; sy *= HTML_SCROLL_STEP;
+ ViewStart(&sx, &sy); sx *= wxHTML_SCROLL_STEP; sy *= wxHTML_SCROLL_STEP;
wxGetMousePosition(&x, &y);
ScreenToClient(&x, &y);
lnk = m_Cell -> GetLink(sx + x, sy + y);
diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp
index da2b0d5e15..612566ed11 100644
--- a/src/html/htmprint.cpp
+++ b/src/html/htmprint.cpp
@@ -96,7 +96,7 @@ void wxHtmlDCRenderer::SetHtmlText(const wxString& html, const wxString& basepat
m_FS -> ChangePathTo(basepath, isdir);
m_DC -> SetUserScale(1.0, 1.0);
m_Cells = (wxHtmlContainerCell*) m_Parser -> Parse(html);
- m_Cells -> SetIndent(0, HTML_INDENT_ALL, HTML_UNITS_PIXELS);
+ m_Cells -> SetIndent(0, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS);
m_Cells -> Layout(m_Width);
}
@@ -163,7 +163,7 @@ wxHtmlPrintout::wxHtmlPrintout(const wxString& title) : wxPrintout(title)
{
m_Renderer = new wxHtmlDCRenderer;
m_RendererHdr = new wxHtmlDCRenderer;
- m_NumPages = HTML_PRINT_MAX_PAGES;
+ m_NumPages = wxHTML_PRINT_MAX_PAGES;
m_Document = m_BasePath = wxEmptyString; m_BasePathIsDir = TRUE;
m_Headers[0] = m_Headers[1] = wxEmptyString;
m_Footers[0] = m_Footers[1] = wxEmptyString;
@@ -181,12 +181,12 @@ wxHtmlPrintout::~wxHtmlPrintout()
-bool wxHtmlPrintout::OnBeginDocument(int start, int end)
+void wxHtmlPrintout::OnBeginPrinting()
{
int pageWidth, pageHeight, mm_w, mm_h;
float ppmm_h, ppmm_v;
- if (!wxPrintout::OnBeginDocument(start, end)) return FALSE;
+ wxPrintout::OnBeginPrinting();
GetPageSizePixels(&pageWidth, &pageHeight);
GetPageSizeMM(&mm_w, &mm_h);
@@ -225,8 +225,6 @@ bool wxHtmlPrintout::OnBeginDocument(int start, int end)
);
m_Renderer -> SetHtmlText(m_Document, m_BasePath, m_BasePathIsDir);
CountPages();
-
- return TRUE;
}
@@ -245,9 +243,9 @@ bool wxHtmlPrintout::OnPrintPage(int page)
void wxHtmlPrintout::GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo)
{
*minPage = 1;
- *maxPage = HTML_PRINT_MAX_PAGES;
+ *maxPage = wxHTML_PRINT_MAX_PAGES;
*selPageFrom = 1;
- *selPageTo = 1;
+ *selPageTo = wxHTML_PRINT_MAX_PAGES;
}
@@ -480,7 +478,7 @@ void wxHtmlEasyPrinting::DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *pr
else {
wxPreviewFrame *frame = new wxPreviewFrame(preview, m_Frame,
m_Name + _(" Preview"),
- wxPoint(100, 100), wxSize(500, 500));
+ wxPoint(100, 100), wxSize(650, 500));
frame -> Centre(wxBOTH);
frame -> Initialize();
frame -> Show(TRUE);
diff --git a/src/html/m_fonts.cpp b/src/html/m_fonts.cpp
index 2919a029b4..6c20b336b0 100644
--- a/src/html/m_fonts.cpp
+++ b/src/html/m_fonts.cpp
@@ -154,7 +154,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
c -> SetAlign(tag);
c -> InsertCell(new wxHtmlFontCell(m_WParser -> CreateCurrentFont()));
- c -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_TOP);
+ c -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_TOP);
m_WParser -> SetAlign(c -> GetAlignHor());
ParseInner(tag);
@@ -170,7 +170,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6")
m_WParser -> CloseContainer();
m_WParser -> OpenContainer();
c = m_WParser -> GetContainer();
- c -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_TOP);
+ c -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_TOP);
return TRUE;
}
diff --git a/src/html/m_hline.cpp b/src/html/m_hline.cpp
index 76130b09d3..3fbad4d47c 100644
--- a/src/html/m_hline.cpp
+++ b/src/html/m_hline.cpp
@@ -75,8 +75,8 @@ TAG_HANDLER_BEGIN(HR, "HR")
m_WParser -> CloseContainer();
c = m_WParser -> OpenContainer();
- c -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_VERTICAL);
- c -> SetAlignHor(HTML_ALIGN_CENTER);
+ 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) {}
diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp
index 5fb966afa4..825cb8b4f7 100644
--- a/src/html/m_image.cpp
+++ b/src/html/m_image.cpp
@@ -220,7 +220,7 @@ wxString wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
// wxHtmlImageMapCell
// 0-width, 0-height cell that represents map from imagemaps
// it is always placed before wxHtmlImageMapAreaCells
-// It responds to Find(HTML_COND_ISIMAGEMAP)
+// It responds to Find(wxHTML_COND_ISIMAGEMAP)
//--------------------------------------------------------------------------------
@@ -251,7 +251,7 @@ wxString wxHtmlImageMapCell::GetLink( int x, int y ) const
const wxHtmlCell *wxHtmlImageMapCell::Find( int cond, const void *param ) const
{
- if (cond == HTML_COND_ISIMAGEMAP)
+ if (cond == wxHTML_COND_ISIMAGEMAP)
{
if (m_Name == *((wxString*)(param)))
return this;
@@ -275,7 +275,7 @@ class wxHtmlImageCell : public wxHtmlCell
wxHtmlImageMapCell *m_ImageMap;
wxString m_MapName;
- wxHtmlImageCell(wxFSFile *input, int w = -1, int h = -1, int align = HTML_ALIGN_BOTTOM, wxString mapname = wxEmptyString);
+ wxHtmlImageCell(wxFSFile *input, int w = -1, int h = -1, int align = wxHTML_ALIGN_BOTTOM, wxString mapname = wxEmptyString);
~wxHtmlImageCell() {if (m_Image) delete m_Image;}
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
virtual wxString GetLink( int x = 0, int y = 0 ) const;
@@ -311,11 +311,11 @@ wxHtmlImageCell::wxHtmlImageCell(wxFSFile *input, int w, int h, int align, wxStr
delete img;
}
switch (align) {
- case HTML_ALIGN_TOP :
+ case wxHTML_ALIGN_TOP :
m_Descent = m_Height; break;
- case HTML_ALIGN_CENTER :
+ case wxHTML_ALIGN_CENTER :
m_Descent = m_Height / 2; break;
- case HTML_ALIGN_BOTTOM : default :
+ case wxHTML_ALIGN_BOTTOM : default :
m_Descent = 0; break;
}
@@ -347,7 +347,7 @@ wxString wxHtmlImageCell::GetLink( int x, int y ) const
p = p->GetParent();
}
p = op;
- wxHtmlCell *cell = (wxHtmlCell*)p->Find( HTML_COND_ISIMAGEMAP, (const void*)(&m_MapName));
+ wxHtmlCell *cell = (wxHtmlCell*)p->Find( wxHTML_COND_ISIMAGEMAP, (const void*)(&m_MapName));
if (!cell)
{
((wxString&)m_MapName).Clear();
@@ -384,12 +384,12 @@ TAG_HANDLER_BEGIN(IMG, "IMG, MAP, AREA")
str = m_WParser -> GetFS() -> OpenFile(tmp);
if (tag.HasParam("WIDTH")) tag.ScanParam("WIDTH", "%i", &w);
if (tag.HasParam("HEIGHT")) tag.ScanParam("HEIGHT", "%i", &h);
- al = HTML_ALIGN_BOTTOM;
+ al = wxHTML_ALIGN_BOTTOM;
if (tag.HasParam("ALIGN")) {
wxString alstr = tag.GetParam("ALIGN");
alstr.MakeUpper(); // for the case alignment was in ".."
- if (alstr == "TEXTTOP") al = HTML_ALIGN_TOP;
- else if ((alstr == "CENTER") || (alstr == "ABSCENTER")) al = HTML_ALIGN_CENTER;
+ if (alstr == "TEXTTOP") al = wxHTML_ALIGN_TOP;
+ else if ((alstr == "CENTER") || (alstr == "ABSCENTER")) al = wxHTML_ALIGN_CENTER;
}
if (tag.HasParam("USEMAP"))
{
diff --git a/src/html/m_layout.cpp b/src/html/m_layout.cpp
index c34aa54868..3a1ad13dbb 100644
--- a/src/html/m_layout.cpp
+++ b/src/html/m_layout.cpp
@@ -38,7 +38,7 @@ TAG_HANDLER_BEGIN(P, "P")
m_WParser -> CloseContainer();
m_WParser -> OpenContainer();
}
- m_WParser -> GetContainer() -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_TOP);
+ m_WParser -> GetContainer() -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_TOP);
m_WParser -> GetContainer() -> SetAlign(tag);
return FALSE;
}
@@ -72,13 +72,13 @@ TAG_HANDLER_BEGIN(CENTER, "CENTER")
int old = m_WParser -> GetAlign();
wxHtmlContainerCell *c = m_WParser -> GetContainer();
- m_WParser -> SetAlign(HTML_ALIGN_CENTER);
+ m_WParser -> SetAlign(wxHTML_ALIGN_CENTER);
if (c -> GetFirstCell() != NULL) {
m_WParser -> CloseContainer();
m_WParser -> OpenContainer();
}
else
- c -> SetAlignHor(HTML_ALIGN_CENTER);
+ c -> SetAlignHor(wxHTML_ALIGN_CENTER);
if (tag.HasEnding()) {
ParseInner(tag);
@@ -183,7 +183,7 @@ TAG_HANDLER_BEGIN(BODY, "BODY")
if (tag.HasParam("BGCOLOR")) {
if (tag.ScanParam("BGCOLOR", "#%lX", &tmp) == 1) {
clr = wxColour((tmp & 0xFF0000) >> 16 , (tmp & 0x00FF00) >> 8, (tmp & 0x0000FF));
- m_WParser -> GetContainer() -> InsertCell(new wxHtmlColourCell(clr, HTML_CLR_BACKGROUND));
+ m_WParser -> GetContainer() -> InsertCell(new wxHtmlColourCell(clr, wxHTML_CLR_BACKGROUND));
if (m_WParser -> GetWindow() != NULL)
m_WParser -> GetWindow() -> SetBackgroundColour(clr);
}
@@ -203,15 +203,15 @@ TAG_HANDLER_BEGIN(BLOCKQUOTE, "BLOCKQUOTE")
m_WParser -> CloseContainer();
c = m_WParser -> OpenContainer();
- if (c -> GetAlignHor() == HTML_ALIGN_RIGHT)
- c -> SetIndent(5 * m_WParser -> GetCharWidth(), HTML_INDENT_RIGHT);
+ if (c -> GetAlignHor() == wxHTML_ALIGN_RIGHT)
+ c -> SetIndent(5 * m_WParser -> GetCharWidth(), wxHTML_INDENT_RIGHT);
else
- c -> SetIndent(5 * m_WParser -> GetCharWidth(), HTML_INDENT_LEFT);
- c -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_TOP);
+ c -> SetIndent(5 * m_WParser -> GetCharWidth(), wxHTML_INDENT_LEFT);
+ c -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_TOP);
m_WParser -> OpenContainer();
ParseInner(tag);
c = m_WParser -> CloseContainer();
- c -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_BOTTOM);
+ c -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_BOTTOM);
m_WParser -> CloseContainer();
m_WParser -> OpenContainer();
return TRUE;
diff --git a/src/html/m_links.cpp b/src/html/m_links.cpp
index 58876ee6df..c4a7107d89 100644
--- a/src/html/m_links.cpp
+++ b/src/html/m_links.cpp
@@ -40,7 +40,7 @@ class wxHtmlAnchorCell : public wxHtmlCell
wxHtmlAnchorCell(const wxString& name) : wxHtmlCell() {m_AnchorName = name;}
virtual const wxHtmlCell* Find(int condition, const void* param) const
{
- if ((condition == HTML_COND_ISANCHOR) && (m_AnchorName == (*((const wxString*)param))))
+ if ((condition == wxHTML_COND_ISANCHOR) && (m_AnchorName == (*((const wxString*)param))))
return this;
else
return wxHtmlCell::Find(condition, param);
diff --git a/src/html/m_list.cpp b/src/html/m_list.cpp
index feaae666fe..d23cd40447 100644
--- a/src/html/m_list.cpp
+++ b/src/html/m_list.cpp
@@ -92,8 +92,8 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
m_WParser -> CloseContainer();
c = m_WParser -> OpenContainer();
- c -> SetWidthFloat(2 * m_WParser -> GetCharWidth(), HTML_UNITS_PIXELS);
- c -> SetAlignHor(HTML_ALIGN_RIGHT);
+ c -> SetWidthFloat(2 * m_WParser -> GetCharWidth(), wxHTML_UNITS_PIXELS);
+ c -> SetAlignHor(wxHTML_ALIGN_RIGHT);
if (m_Numbering == 0)
c -> InsertCell(new wxHtmlListmarkCell(m_WParser -> GetDC(), m_WParser -> GetActualColor()));
else {
@@ -104,8 +104,8 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
m_WParser -> CloseContainer();
c = m_WParser -> OpenContainer();
- c -> SetIndent(m_WParser -> GetCharWidth() / 4, HTML_INDENT_LEFT);
- c -> SetWidthFloat(-2 * m_WParser -> GetCharWidth(), HTML_UNITS_PIXELS);
+ c -> SetIndent(m_WParser -> GetCharWidth() / 4, wxHTML_INDENT_LEFT);
+ c -> SetWidthFloat(-2 * m_WParser -> GetCharWidth(), wxHTML_UNITS_PIXELS);
m_WParser -> OpenContainer();
@@ -127,9 +127,9 @@ TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI")
m_WParser -> OpenContainer();
c = m_WParser -> GetContainer();
}
- c -> SetAlignHor(HTML_ALIGN_LEFT);
- c -> SetIndent(2 * m_WParser -> GetCharWidth(), HTML_INDENT_LEFT);
- m_WParser -> OpenContainer() -> SetAlignVer(HTML_ALIGN_TOP);
+ c -> SetAlignHor(wxHTML_ALIGN_LEFT);
+ c -> SetIndent(2 * m_WParser -> GetCharWidth(), wxHTML_INDENT_LEFT);
+ m_WParser -> OpenContainer() -> SetAlignVer(wxHTML_ALIGN_TOP);
m_WParser -> OpenContainer();
m_WParser -> OpenContainer();
diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp
index 8412ee06ed..8f0e7bb2ea 100644
--- a/src/html/m_pre.cpp
+++ b/src/html/m_pre.cpp
@@ -124,8 +124,8 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
m_WParser -> CloseContainer();
c = m_WParser -> OpenContainer();
- c -> SetAlignHor(HTML_ALIGN_LEFT);
- c -> SetIndent(m_WParser -> GetCharHeight(), HTML_INDENT_VERTICAL);
+ c -> SetAlignHor(wxHTML_ALIGN_LEFT);
+ c -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_VERTICAL);
m_WParser -> SetFontUnderlined(FALSE);
m_WParser -> SetFontBold(FALSE);
diff --git a/src/html/m_tables.cpp b/src/html/m_tables.cpp
index 007a09dedb..67c6df4161 100644
--- a/src/html/m_tables.cpp
+++ b/src/html/m_tables.cpp
@@ -157,7 +157,7 @@ void wxHtmlTableCell::ReallocCols(int cols)
m_ColsInfo = (colStruct*) realloc(m_ColsInfo, sizeof(colStruct) * cols);
for (j = m_NumCols; j < cols; j++) {
m_ColsInfo[j].width = 0;
- m_ColsInfo[j].units = HTML_UNITS_PERCENT;
+ m_ColsInfo[j].units = wxHTML_UNITS_PERCENT;
}
m_NumCols = cols;
@@ -211,7 +211,7 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag)
m_CellInfo[r][c].rowspan = 1;
m_CellInfo[r][c].flag = cellUsed;
m_CellInfo[r][c].minheight = 0;
- m_CellInfo[r][c].valign = HTML_ALIGN_TOP;
+ m_CellInfo[r][c].valign = wxHTML_ALIGN_TOP;
/* scan for parameters: */
@@ -222,11 +222,11 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag)
if (wd[wd.Length()-1] == '%') {
sscanf(wd.c_str(), "%i%%", &m_ColsInfo[c].width);
- m_ColsInfo[c].units = HTML_UNITS_PERCENT;
+ m_ColsInfo[c].units = wxHTML_UNITS_PERCENT;
}
else {
sscanf(wd.c_str(), "%i", &m_ColsInfo[c].width);
- m_ColsInfo[c].units = HTML_UNITS_PIXELS;
+ m_ColsInfo[c].units = wxHTML_UNITS_PIXELS;
}
}
}
@@ -265,12 +265,12 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag)
wxString valign;
if (tag.HasParam("VALIGN")) valign = tag.GetParam("VALIGN"); else valign = m_tValign;
valign.MakeUpper();
- if (valign == "TOP") m_CellInfo[r][c].valign = HTML_ALIGN_TOP;
- else if (valign == "BOTTOM") m_CellInfo[r][c].valign = HTML_ALIGN_BOTTOM;
- else m_CellInfo[r][c].valign = HTML_ALIGN_CENTER;
+ if (valign == "TOP") m_CellInfo[r][c].valign = wxHTML_ALIGN_TOP;
+ else if (valign == "BOTTOM") m_CellInfo[r][c].valign = wxHTML_ALIGN_BOTTOM;
+ else m_CellInfo[r][c].valign = wxHTML_ALIGN_CENTER;
}
- cell -> SetIndent(m_Padding, HTML_INDENT_ALL, HTML_UNITS_PIXELS);
+ cell -> SetIndent(m_Padding, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS);
}
@@ -285,7 +285,7 @@ void wxHtmlTableCell::Layout(int w)
*/
- if (m_WidthFloatUnits == HTML_UNITS_PERCENT) {
+ if (m_WidthFloatUnits == wxHTML_UNITS_PERCENT) {
if (m_WidthFloat < 0) m_Width = (100 + m_WidthFloat) * w / 100;
else m_Width = m_WidthFloat * w / 100;
}
@@ -309,12 +309,12 @@ void wxHtmlTableCell::Layout(int w)
// 1a. setup fixed-width columns:
for (i = 0; i < m_NumCols; i++)
- if (m_ColsInfo[i].units == HTML_UNITS_PIXELS)
+ if (m_ColsInfo[i].units == wxHTML_UNITS_PIXELS)
wpix -= (m_ColsInfo[i].pixwidth = m_ColsInfo[i].width);
// 1b. setup floating-width columns:
for (i = 0; i < m_NumCols; i++)
- if ((m_ColsInfo[i].units == HTML_UNITS_PERCENT) && (m_ColsInfo[i].width != 0))
+ if ((m_ColsInfo[i].units == wxHTML_UNITS_PERCENT) && (m_ColsInfo[i].width != 0))
wtemp += (m_ColsInfo[i].pixwidth = m_ColsInfo[i].width * wpix / 100);
wpix -= wtemp;
@@ -411,7 +411,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
{
m_Table = NULL;
m_tAlign = m_rAlign = wxEmptyString;
- m_OldAlign = HTML_ALIGN_LEFT;
+ m_OldAlign = wxHTML_ALIGN_LEFT;
}
@@ -460,7 +460,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
m_WParser -> OpenContainer();
if (tag.GetName() == "TH") /*header style*/ {
- m_WParser -> SetAlign(HTML_ALIGN_CENTER);
+ m_WParser -> SetAlign(wxHTML_ALIGN_CENTER);
}
{
@@ -469,8 +469,8 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH")
als = m_rAlign;
if (tag.HasParam("ALIGN")) als = tag.GetParam("ALIGN");
als.MakeUpper();
- if (als == "RIGHT") m_WParser -> SetAlign(HTML_ALIGN_RIGHT);
- else if (als == "CENTER") m_WParser -> SetAlign(HTML_ALIGN_CENTER);
+ if (als == "RIGHT") m_WParser -> SetAlign(wxHTML_ALIGN_RIGHT);
+ else if (als == "CENTER") m_WParser -> SetAlign(wxHTML_ALIGN_CENTER);
}
m_WParser -> OpenContainer();
}
diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp
index 2764a914d0..c985d1aa44 100644
--- a/src/html/winpars.cpp
+++ b/src/html/winpars.cpp
@@ -106,7 +106,7 @@ void wxHtmlWinParser::InitParser(const wxString& source)
m_Link = "";
m_LinkColor.Set(0, 0, 0xFF);
m_ActualColor.Set(0, 0, 0);
- m_Align = HTML_ALIGN_LEFT;
+ m_Align = wxHTML_ALIGN_LEFT;
m_tmpLastWasSpace = FALSE;
OpenContainer();
@@ -132,7 +132,7 @@ wxObject* wxHtmlWinParser::GetProduct()
CloseContainer();
OpenContainer();
- GetContainer() -> SetIndent(m_CharHeight, HTML_INDENT_TOP);
+ GetContainer() -> SetIndent(m_CharHeight, wxHTML_INDENT_TOP);
top = m_Container;
while (top -> GetParent()) top = top -> GetParent();
return top;
@@ -166,7 +166,7 @@ void wxHtmlWinParser::AddText(const char* txt)
{
wxHtmlCell *c;
int i = 0, x, lng = strlen(txt);
- char temp[HTML_BUFLEN];
+ char temp[wxHTML_BUFLEN];
register char d;
int templen = 0;