X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b2dadd342dde6cb35f351136c2b2c9cea007b1d..4c30035625ce9c4980e52db808704b377af12041:/src/html/htmlwin.cpp diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index 447a322890..c1af6ac461 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -29,7 +29,6 @@ #include "wx/html/forcelnk.h" - //----------------------------------------------------------------------------- // wxHtmlWindow //----------------------------------------------------------------------------- @@ -41,7 +40,7 @@ WX_DEFINE_OBJARRAY(HtmlHistoryArray) wxHtmlWindow::wxHtmlWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, - long style, const wxString& name) : wxScrolledWindow(parent, id, pos, size, wxVSCROLL, name) + long style, const wxString& name) : wxScrolledWindow(parent, id, pos, size, wxVSCROLL | wxHSCROLL, name) { m_tmpMouseMoved = FALSE; m_tmpLastLink = NULL; @@ -155,7 +154,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location) if (f == NULL) { wxString err; - err.Printf(_("The browser is unable to open requested location :\n\n%s"), WXSTRINGCAST location); + err.Printf(_("Unable to open requested location :\n\n%s"), WXSTRINGCAST location); m_tmpCanDrawLocks--; Refresh(); wxMessageBox(err, "Error"); @@ -271,11 +270,12 @@ void wxHtmlWindow::CreateLayout() #endif GetClientSize(&ClientWidth, &ClientHeight); m_Cell -> Layout(ClientWidth); - if (ClientHeight < m_Cell -> GetHeight()) { - 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*/); + if (ClientHeight < m_Cell -> GetHeight() + GetCharHeight()) { + SetScrollbars( + wxHTML_SCROLL_STEP, wxHTML_SCROLL_STEP, + m_Cell -> GetWidth() / wxHTML_SCROLL_STEP, + (m_Cell -> GetHeight() + GetCharHeight()) / wxHTML_SCROLL_STEP + /*cheat: top-level frag is always container*/); } else { /* we fit into window, no need for scrollbars */ SetScrollbars(wxHTML_SCROLL_STEP, 1, m_Cell -> GetWidth() / wxHTML_SCROLL_STEP, 0); // disable... @@ -433,8 +433,12 @@ void wxHtmlWindow::OnDraw(wxDC& dc) if (m_tmpCanDrawLocks > 0) return; dc.SetMapMode(wxMM_TEXT); +#if 0 +/* VS - I don't think this is neccessary any longer + MSC_VER 1200 means MSVC 6.0 and it works fine */ #if defined(_MSC_VER) && (_MSC_VER == 1200) ::SetMapMode((HDC)dc.GetHDC(), MM_TEXT); +#endif #endif dc.SetBackgroundMode(wxTRANSPARENT); ViewStart(&x, &y); @@ -469,12 +473,12 @@ void wxHtmlWindow::OnKeyDown(wxKeyEvent& event) switch (event.KeyCode()) { case WXK_PAGEUP : - case WXK_PRIOR : - Scroll(-1, sty - cliy); + case WXK_PRIOR : + Scroll(-1, sty - (2 * cliy / 3)); break; case WXK_PAGEDOWN : - case WXK_NEXT : - Scroll(-1, sty + cliy); + case WXK_NEXT : + Scroll(-1, sty + (2 * cliy / 3)); break; case WXK_HOME : Scroll(-1, 0); @@ -588,6 +592,7 @@ FORCE_LINK(m_pre) FORCE_LINK(m_hline) FORCE_LINK(m_links) FORCE_LINK(m_tables) +FORCE_LINK(m_meta) #endif