wxHtmlWindow::OnLinkClicked and wxHtmlCell::Get/SetLink and wxHtmlWinParser::GetSetLink now work with wxHtmlLinkInfo instead of wxString (making it ready for frames)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -44,7 +44,7 @@ wxHtmlWindow::wxHtmlWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos,
|
||||
long style, const wxString& name) : wxScrolledWindow(parent, id, pos, size, wxVSCROLL, name)
|
||||
{
|
||||
m_tmpMouseMoved = FALSE;
|
||||
m_tmpLastLink = wxEmptyString;
|
||||
m_tmpLastLink = NULL;
|
||||
m_tmpCanDrawLocks = 0;
|
||||
m_FS = new wxFileSystem();
|
||||
m_RelatedStatusBar = -1;
|
||||
@@ -421,9 +421,9 @@ void wxHtmlWindow::AddFilter(wxHtmlFilter *filter)
|
||||
|
||||
|
||||
|
||||
void wxHtmlWindow::OnLinkClicked(const wxString& link)
|
||||
void wxHtmlWindow::OnLinkClicked(wxHtmlLinkInfo *link)
|
||||
{
|
||||
LoadPage(link);
|
||||
LoadPage(link -> GetHref());
|
||||
}
|
||||
|
||||
|
||||
@@ -522,7 +522,7 @@ void wxHtmlWindow::OnIdle(wxIdleEvent& event)
|
||||
if (m_tmpMouseMoved && (m_Cell != NULL)) {
|
||||
int sx, sy;
|
||||
int x, y;
|
||||
wxString lnk;
|
||||
wxHtmlLinkInfo *lnk;
|
||||
|
||||
ViewStart(&sx, &sy); sx *= wxHTML_SCROLL_STEP; sy *= wxHTML_SCROLL_STEP;
|
||||
wxGetMousePosition(&x, &y);
|
||||
@@ -530,13 +530,14 @@ void wxHtmlWindow::OnIdle(wxIdleEvent& event)
|
||||
lnk = m_Cell -> GetLink(sx + x, sy + y);
|
||||
|
||||
if (lnk != m_tmpLastLink) {
|
||||
if (lnk == wxEmptyString) {
|
||||
if (lnk == NULL) {
|
||||
SetCursor(cur_arrow);
|
||||
if (m_RelatedStatusBar != -1) m_RelatedFrame -> SetStatusText(wxEmptyString, m_RelatedStatusBar);
|
||||
}
|
||||
else {
|
||||
SetCursor(cur_hand);
|
||||
if (m_RelatedStatusBar != -1) m_RelatedFrame -> SetStatusText(lnk, m_RelatedStatusBar);
|
||||
if (m_RelatedStatusBar != -1)
|
||||
m_RelatedFrame -> SetStatusText(lnk -> GetHref(), m_RelatedStatusBar);
|
||||
}
|
||||
m_tmpLastLink = lnk;
|
||||
}
|
||||
|
Reference in New Issue
Block a user