Rename wxWebHistoryItem to wxWebViewHistoryItem.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-08-15 12:31:31 +00:00
parent 04fa04d806
commit c13d6ac1ea
12 changed files with 71 additions and 71 deletions

View File

@@ -74,9 +74,9 @@ public:
virtual bool CanGoForward(); virtual bool CanGoForward();
virtual void ClearHistory(); virtual void ClearHistory();
virtual void EnableHistory(bool enable = true); virtual void EnableHistory(bool enable = true);
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetBackwardHistory(); virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory();
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetForwardHistory(); virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory();
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item); virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item);
virtual wxString GetCurrentURL(); virtual wxString GetCurrentURL();
virtual wxString GetCurrentTitle(); virtual wxString GetCurrentTitle();
virtual wxString GetPageSource(); virtual wxString GetPageSource();

View File

@@ -1,14 +1,14 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: include/wx/gtk/webhistoryitem.h // Name: include/wx/gtk/webviewhistoryitem.h
// Purpose: wxWebHistoryItem header for GTK // Purpose: wxWebViewHistoryItem header for GTK
// Author: Steven Lamerton // Author: Steven Lamerton
// Id: $Id$ // Id: $Id$
// Copyright: (c) 2011 Steven Lamerton // Copyright: (c) 2011 Steven Lamerton
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GTK_WEBHISTORYITEM_H_ #ifndef _WX_GTK_WEBVIEWHISTORYITEM_H_
#define _WX_GTK_WEBHISTORYITEM_H_ #define _WX_GTK_WEBVIEWHISTORYITEM_H_
#include "wx/setup.h" #include "wx/setup.h"
@@ -16,10 +16,10 @@
#include "webkit/webkit.h" #include "webkit/webkit.h"
class WXDLLIMPEXP_WEB wxWebHistoryItem class WXDLLIMPEXP_WEB wxWebViewHistoryItem
{ {
public: public:
wxWebHistoryItem(const wxString& url, const wxString& title) : wxWebViewHistoryItem(const wxString& url, const wxString& title) :
m_url(url), m_title(title) {} m_url(url), m_title(title) {}
wxString GetUrl() { return m_url; } wxString GetUrl() { return m_url; }
wxString GetTitle() { return m_title; } wxString GetTitle() { return m_title; }
@@ -33,4 +33,4 @@ private:
#endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) #endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__)
#endif // _WX_GTK_WEBHISTORYITEM_H_ #endif // _WX_GTK_WEBVIEWHISTORYITEM_H_

View File

@@ -50,9 +50,9 @@ public:
const wxString& name = wxWebViewNameStr); const wxString& name = wxWebViewNameStr);
virtual void LoadUrl(const wxString& url); virtual void LoadUrl(const wxString& url);
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item); virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item);
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetBackwardHistory(); virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory();
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetForwardHistory(); virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory();
virtual bool CanGoForward(); virtual bool CanGoForward();
virtual bool CanGoBack(); virtual bool CanGoBack();
@@ -147,7 +147,7 @@ private:
//which are added as documentcomplete events arrive, unless we are loading //which are added as documentcomplete events arrive, unless we are loading
//an item from the history. The position is stored as an int, and reflects //an item from the history. The position is stored as an int, and reflects
//where we are in the history list. //where we are in the history list.
wxVector<wxSharedPtr<wxWebHistoryItem> > m_historyList; wxVector<wxSharedPtr<wxWebViewHistoryItem> > m_historyList;
int m_historyPosition; int m_historyPosition;
bool m_historyLoadingFromList; bool m_historyLoadingFromList;
bool m_historyEnabled; bool m_historyEnabled;

View File

@@ -1,23 +1,23 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: include/wx/msw/webhistoryitem.h // Name: include/wx/msw/webviewhistoryitem.h
// Purpose: wxWebHistoryItem header for MSW // Purpose: wxWebViewHistoryItem header for MSW
// Author: Steven Lamerton // Author: Steven Lamerton
// Id: $Id$ // Id: $Id$
// Copyright: (c) 2011 Steven Lamerton // Copyright: (c) 2011 Steven Lamerton
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_WEBHISTORYITEM_H_ #ifndef _WX_MSW_WEBVIEWHISTORYITEM_H_
#define _WX_MSW_WEBHISTORYITEM_H_ #define _WX_MSW_WEBVIEWHISTORYITEM_H_
#include "wx/setup.h" #include "wx/setup.h"
#if wxUSE_WEBVIEW_IE && defined(__WXMSW__) #if wxUSE_WEBVIEW_IE && defined(__WXMSW__)
class WXDLLIMPEXP_WEB wxWebHistoryItem class WXDLLIMPEXP_WEB wxWebViewHistoryItem
{ {
public: public:
wxWebHistoryItem(const wxString& url, const wxString& title) : wxWebViewHistoryItem(const wxString& url, const wxString& title) :
m_url(url), m_title(title) {} m_url(url), m_title(title) {}
wxString GetUrl() { return m_url; } wxString GetUrl() { return m_url; }
wxString GetTitle() { return m_title; } wxString GetTitle() { return m_title; }
@@ -28,4 +28,4 @@ private:
#endif // wxUSE_WEBVIEW_IE && defined(__WXMSW__) #endif // wxUSE_WEBVIEW_IE && defined(__WXMSW__)
#endif // _WX_MSW_WEBHISTORYITEM_H_ #endif // _WX_MSW_WEBVIEWHISTORYITEM_H_

View File

@@ -81,9 +81,9 @@ public:
//History functions //History functions
virtual void ClearHistory(); virtual void ClearHistory();
virtual void EnableHistory(bool enable = true); virtual void EnableHistory(bool enable = true);
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetBackwardHistory(); virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory();
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetForwardHistory(); virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory();
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item); virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item);
//Undo / redo functionality //Undo / redo functionality
virtual bool CanUndo(); virtual bool CanUndo();

View File

@@ -1,24 +1,24 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: include/wx/osx/webhistoryitem.h // Name: include/wx/osx/webviewhistoryitem.h
// Purpose: wxWebHistoryItem header for OSX // Purpose: wxWebViewHistoryItem header for OSX
// Author: Steven Lamerton // Author: Steven Lamerton
// Id: $Id$ // Id: $Id$
// Copyright: (c) 2011 Steven Lamerton // Copyright: (c) 2011 Steven Lamerton
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_WEBHISTORYITEM_H_ #ifndef _WX_OSX_WEBVIEWHISTORYITEM_H_
#define _WX_OSX_WEBHISTORYITEM_H_ #define _WX_OSX_WEBVIEWHISTORYITEM_H_
#include "wx/setup.h" #include "wx/setup.h"
#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \ #if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
|| defined(__WXOSX_CARBON__)) || defined(__WXOSX_CARBON__))
class WXDLLIMPEXP_WEB wxWebHistoryItem class WXDLLIMPEXP_WEB wxWebViewHistoryItem
{ {
public: public:
wxWebHistoryItem(const wxString& url, const wxString& title) : wxWebViewHistoryItem(const wxString& url, const wxString& title) :
m_url(url), m_title(title) {} m_url(url), m_title(title) {}
wxString GetUrl() { return m_url; } wxString GetUrl() { return m_url; }
wxString GetTitle() { return m_title; } wxString GetTitle() { return m_title; }
@@ -32,4 +32,4 @@ private:
#endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX_MAC__) #endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX_MAC__)
#endif // _WX_OSX_WEBHISTORYITEM_H_ #endif // _WX_OSX_WEBVIEWHISTORYITEM_H_

View File

@@ -20,9 +20,9 @@
#include "wx/sharedptr.h" #include "wx/sharedptr.h"
#include "wx/vector.h" #include "wx/vector.h"
#include "wx/osx/webhistoryitem_webkit.h" #include "wx/osx/webviewhistoryitem_webkit.h"
#include "wx/gtk/webhistoryitem_webkit.h" #include "wx/gtk/webviewhistoryitem_webkit.h"
#include "wx/msw/webhistoryitem_ie.h" #include "wx/msw/webviewhistoryitem_ie.h"
class wxFSFile; class wxFSFile;
class wxFileSystem; class wxFileSystem;
@@ -193,9 +193,9 @@ public:
virtual void ClearHistory() = 0; virtual void ClearHistory() = 0;
virtual void EnableHistory(bool enable = true) = 0; virtual void EnableHistory(bool enable = true) = 0;
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetBackwardHistory() = 0; virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory() = 0;
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetForwardHistory() = 0; virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory() = 0;
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) = 0; virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item) = 0;
/** /**
* Stop the current page loading process, if any. * Stop the current page loading process, if any.

View File

@@ -87,7 +87,7 @@ enum wxWebViewBackend
}; };
/** /**
@class wxWebHistoryItem @class wxWebViewHistoryItem
A simple class that contains the URL and title of an element of the history A simple class that contains the URL and title of an element of the history
of a wxWebView. of a wxWebView.
@@ -97,13 +97,13 @@ enum wxWebViewBackend
@see wxWebView @see wxWebView
*/ */
class wxWebHistoryItem class wxWebViewHistoryItem
{ {
public: public:
/** /**
Construtor. Construtor.
*/ */
wxWebHistoryItem(const wxString& url, const wxString& title); wxWebViewHistoryItem(const wxString& url, const wxString& title);
/** /**
@return The url of the page. @return The url of the page.
@@ -456,14 +456,14 @@ public:
Returns a list of items in the back history. The first item in the Returns a list of items in the back history. The first item in the
vector is the first page that was loaded by the control. vector is the first page that was loaded by the control.
*/ */
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetBackwardHistory() = 0; virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory() = 0;
/** /**
Returns a list of items in the forward history. The first item in the Returns a list of items in the forward history. The first item in the
vector is the next item in the history with respect to the curently vector is the next item in the history with respect to the curently
loaded page. loaded page.
*/ */
virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetForwardHistory() = 0; virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory() = 0;
/** /**
Navigate back in the history of visited pages. Navigate back in the history of visited pages.
@@ -480,7 +480,7 @@ public:
/** /**
Loads a history item. Loads a history item.
*/ */
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) = 0; virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item) = 0;
/** /**
@name Selection @name Selection

View File

@@ -50,7 +50,7 @@
//We map menu items to their history items //We map menu items to their history items
WX_DECLARE_HASH_MAP(int, wxSharedPtr<wxWebHistoryItem>, WX_DECLARE_HASH_MAP(int, wxSharedPtr<wxWebViewHistoryItem>,
wxIntegerHash, wxIntegerEqual, wxMenuHistoryMap); wxIntegerHash, wxIntegerEqual, wxMenuHistoryMap);
class WebApp : public wxApp class WebApp : public wxApp
@@ -629,8 +629,8 @@ void WebFrame::OnToolsClicked(wxCommandEvent& WXUNUSED(evt))
} }
m_histMenuItems.clear(); m_histMenuItems.clear();
wxVector<wxSharedPtr<wxWebHistoryItem> > back = m_browser->GetBackwardHistory(); wxVector<wxSharedPtr<wxWebViewHistoryItem> > back = m_browser->GetBackwardHistory();
wxVector<wxSharedPtr<wxWebHistoryItem> > forward = m_browser->GetForwardHistory(); wxVector<wxSharedPtr<wxWebViewHistoryItem> > forward = m_browser->GetForwardHistory();
wxMenuItem* item; wxMenuItem* item;
@@ -646,7 +646,7 @@ void WebFrame::OnToolsClicked(wxCommandEvent& WXUNUSED(evt))
item->Check(); item->Check();
//No need to connect the current item //No need to connect the current item
m_histMenuItems[item->GetId()] = wxSharedPtr<wxWebHistoryItem>(new wxWebHistoryItem(m_browser->GetCurrentURL(), m_browser->GetCurrentTitle())); m_histMenuItems[item->GetId()] = wxSharedPtr<wxWebViewHistoryItem>(new wxWebViewHistoryItem(m_browser->GetCurrentURL(), m_browser->GetCurrentTitle()));
for(unsigned int i = 0; i < forward.size(); i++) for(unsigned int i = 0; i < forward.size(); i++)
{ {

View File

@@ -546,9 +546,9 @@ void wxWebViewWebKit::EnableHistory(bool enable)
} }
} }
wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewWebKit::GetBackwardHistory() wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetBackwardHistory()
{ {
wxVector<wxSharedPtr<wxWebHistoryItem> > backhist; wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist;
WebKitWebBackForwardList* history; WebKitWebBackForwardList* history;
history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view)); history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view));
GList* list = webkit_web_back_forward_list_get_back_list_with_limit(history, GList* list = webkit_web_back_forward_list_get_back_list_with_limit(history,
@@ -557,19 +557,19 @@ wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewWebKit::GetBackwardHistory()
for(int i = g_list_length(list) - 1; i >= 0 ; i--) for(int i = g_list_length(list) - 1; i >= 0 ; i--)
{ {
WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)g_list_nth_data(list, i); WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)g_list_nth_data(list, i);
wxWebHistoryItem* wxitem = new wxWebHistoryItem( wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem(
webkit_web_history_item_get_uri(gtkitem), webkit_web_history_item_get_uri(gtkitem),
webkit_web_history_item_get_title(gtkitem)); webkit_web_history_item_get_title(gtkitem));
wxitem->m_histItem = gtkitem; wxitem->m_histItem = gtkitem;
wxSharedPtr<wxWebHistoryItem> item(wxitem); wxSharedPtr<wxWebViewHistoryItem> item(wxitem);
backhist.push_back(item); backhist.push_back(item);
} }
return backhist; return backhist;
} }
wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewWebKit::GetForwardHistory() wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetForwardHistory()
{ {
wxVector<wxSharedPtr<wxWebHistoryItem> > forwardhist; wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist;
WebKitWebBackForwardList* history; WebKitWebBackForwardList* history;
history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view)); history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view));
GList* list = webkit_web_back_forward_list_get_forward_list_with_limit(history, GList* list = webkit_web_back_forward_list_get_forward_list_with_limit(history,
@@ -577,17 +577,17 @@ wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewWebKit::GetForwardHistory()
for(guint i = 0; i < g_list_length(list); i++) for(guint i = 0; i < g_list_length(list); i++)
{ {
WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)g_list_nth_data(list, i); WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)g_list_nth_data(list, i);
wxWebHistoryItem* wxitem = new wxWebHistoryItem( wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem(
webkit_web_history_item_get_uri(gtkitem), webkit_web_history_item_get_uri(gtkitem),
webkit_web_history_item_get_title(gtkitem)); webkit_web_history_item_get_title(gtkitem));
wxitem->m_histItem = gtkitem; wxitem->m_histItem = gtkitem;
wxSharedPtr<wxWebHistoryItem> item(wxitem); wxSharedPtr<wxWebViewHistoryItem> item(wxitem);
forwardhist.push_back(item); forwardhist.push_back(item);
} }
return forwardhist; return forwardhist;
} }
void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item)
{ {
WebKitWebHistoryItem* gtkitem = item->m_histItem; WebKitWebHistoryItem* gtkitem = item->m_histItem;
if(gtkitem) if(gtkitem)

View File

@@ -325,7 +325,7 @@ bool wxWebViewIE::CanGoForward()
return false; return false;
} }
void wxWebViewIE::LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) void wxWebViewIE::LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item)
{ {
int pos = -1; int pos = -1;
for(unsigned int i = 0; i < m_historyList.size(); i++) for(unsigned int i = 0; i < m_historyList.size(); i++)
@@ -341,9 +341,9 @@ void wxWebViewIE::LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item)
m_historyPosition = pos; m_historyPosition = pos;
} }
wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewIE::GetBackwardHistory() wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewIE::GetBackwardHistory()
{ {
wxVector<wxSharedPtr<wxWebHistoryItem> > backhist; wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist;
//As we don't have std::copy or an iterator constructor in the wxwidgets //As we don't have std::copy or an iterator constructor in the wxwidgets
//native vector we construct it by hand //native vector we construct it by hand
for(int i = 0; i < m_historyPosition; i++) for(int i = 0; i < m_historyPosition; i++)
@@ -353,9 +353,9 @@ wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewIE::GetBackwardHistory()
return backhist; return backhist;
} }
wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewIE::GetForwardHistory() wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewIE::GetForwardHistory()
{ {
wxVector<wxSharedPtr<wxWebHistoryItem> > forwardhist; wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist;
//As we don't have std::copy or an iterator constructor in the wxwidgets //As we don't have std::copy or an iterator constructor in the wxwidgets
//native vector we construct it by hand //native vector we construct it by hand
for(int i = m_historyPosition + 1; i < static_cast<int>(m_historyList.size()); i++) for(int i = m_historyPosition + 1; i < static_cast<int>(m_historyList.size()); i++)
@@ -789,7 +789,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt)
m_historyList.erase(m_historyList.begin() + m_historyPosition + 1, m_historyList.erase(m_historyList.begin() + m_historyPosition + 1,
m_historyList.end()); m_historyList.end());
} }
wxSharedPtr<wxWebHistoryItem> item(new wxWebHistoryItem(url, GetCurrentTitle())); wxSharedPtr<wxWebViewHistoryItem> item(new wxWebViewHistoryItem(url, GetCurrentTitle()));
m_historyList.push_back(item); m_historyList.push_back(item);
m_historyPosition++; m_historyPosition++;
} }

View File

@@ -921,9 +921,9 @@ void wxWebViewWebKit::ClearHistory()
[m_webView setMaintainsBackForwardList:YES]; [m_webView setMaintainsBackForwardList:YES];
} }
wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewWebKit::GetBackwardHistory() wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetBackwardHistory()
{ {
wxVector<wxSharedPtr<wxWebHistoryItem> > backhist; wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist;
WebBackForwardList* history = [m_webView backForwardList]; WebBackForwardList* history = [m_webView backForwardList];
int count = [history backListCount]; int count = [history backListCount];
for(int i = -count; i < 0; i++) for(int i = -count; i < 0; i++)
@@ -931,17 +931,17 @@ wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewWebKit::GetBackwardHistory()
WebHistoryItem* item = [history itemAtIndex:i]; WebHistoryItem* item = [history itemAtIndex:i];
wxString url = wxStringWithNSString([item URLString]); wxString url = wxStringWithNSString([item URLString]);
wxString title = wxStringWithNSString([item title]); wxString title = wxStringWithNSString([item title]);
wxWebHistoryItem* wxitem = new wxWebHistoryItem(url, title); wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem(url, title);
wxitem->m_histItem = item; wxitem->m_histItem = item;
wxSharedPtr<wxWebHistoryItem> itemptr(wxitem); wxSharedPtr<wxWebViewHistoryItem> itemptr(wxitem);
backhist.push_back(itemptr); backhist.push_back(itemptr);
} }
return backhist; return backhist;
} }
wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewWebKit::GetForwardHistory() wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetForwardHistory()
{ {
wxVector<wxSharedPtr<wxWebHistoryItem> > forwardhist; wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist;
WebBackForwardList* history = [m_webView backForwardList]; WebBackForwardList* history = [m_webView backForwardList];
int count = [history forwardListCount]; int count = [history forwardListCount];
for(int i = 1; i <= count; i++) for(int i = 1; i <= count; i++)
@@ -949,15 +949,15 @@ wxVector<wxSharedPtr<wxWebHistoryItem> > wxWebViewWebKit::GetForwardHistory()
WebHistoryItem* item = [history itemAtIndex:i]; WebHistoryItem* item = [history itemAtIndex:i];
wxString url = wxStringWithNSString([item URLString]); wxString url = wxStringWithNSString([item URLString]);
wxString title = wxStringWithNSString([item title]); wxString title = wxStringWithNSString([item title]);
wxWebHistoryItem* wxitem = new wxWebHistoryItem(url, title); wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem(url, title);
wxitem->m_histItem = item; wxitem->m_histItem = item;
wxSharedPtr<wxWebHistoryItem> itemptr(wxitem); wxSharedPtr<wxWebViewHistoryItem> itemptr(wxitem);
forwardhist.push_back(itemptr); forwardhist.push_back(itemptr);
} }
return forwardhist; return forwardhist;
} }
void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item)
{ {
[m_webView goToBackForwardItem:item->m_histItem]; [m_webView goToBackForwardItem:item->m_histItem];
} }