Extend history api using the ie backend to include loading history items, and getting the backward and forward history lists.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -388,6 +388,30 @@ void wxWebViewIE::LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item)
|
||||
m_historyPosition = pos;
|
||||
}
|
||||
|
||||
wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewIE::GetBackwardHistory()
|
||||
{
|
||||
wxVector<wxSharedPtr<wxWebHistoryItem> > backhist;
|
||||
//As we don't have std::copy or an iterator constructor in the wxwidgets
|
||||
//native vector we construct it by hand
|
||||
for(int i = 0; i < m_historyPosition; i++)
|
||||
{
|
||||
backhist.push_back(m_historyList[i]);
|
||||
}
|
||||
return backhist;
|
||||
}
|
||||
|
||||
wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewIE::GetForwardHistory()
|
||||
{
|
||||
wxVector<wxSharedPtr<wxWebHistoryItem> > forwardhist;
|
||||
//As we don't have std::copy or an iterator constructor in the wxwidgets
|
||||
//native vector we construct it by hand
|
||||
for(int i = m_historyPosition + 1; i < m_historyList.size(); i++)
|
||||
{
|
||||
forwardhist.push_back(m_historyList[i]);
|
||||
}
|
||||
return forwardhist;
|
||||
}
|
||||
|
||||
void wxWebViewIE::GoBack()
|
||||
{
|
||||
LoadHistoryItem(m_historyList[m_historyPosition - 1]);
|
||||
|
||||
Reference in New Issue
Block a user