From eafdb19c44154550b3c6155a62642e7ab5c6e64d Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Sun, 31 Jul 2011 14:06:33 +0000 Subject: [PATCH] Split wxWebHistoryItem headers out into separate files for each backend. This will allow us to dramatically reduce the amount of code in the GTK history implementation and implement it and OSX history support more cleanly. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/bakefiles/files.bkl | 15 ++++++++++--- include/wx/gtk/webhistoryitem_webkit.h | 31 ++++++++++++++++++++++++++ include/wx/msw/webhistoryitem_ie.h | 31 ++++++++++++++++++++++++++ include/wx/osx/webhistoryitem_webkit.h | 31 ++++++++++++++++++++++++++ include/wx/webview.h | 15 ++++--------- 5 files changed, 109 insertions(+), 14 deletions(-) create mode 100644 include/wx/gtk/webhistoryitem_webkit.h create mode 100644 include/wx/msw/webhistoryitem_ie.h create mode 100644 include/wx/osx/webhistoryitem_webkit.h diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index bcdbd3c225..fd48ac92cf 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3361,9 +3361,18 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! - wx/msw/webview_ie.h - wx/gtk/webview_webkit.h - wx/osx/webview_webkit.h + + wx/msw/webhistoryitem_ie.h + wx/msw/webview_ie.h + + + wx/gtk/webhistoryitem_webkit.h + wx/gtk/webview_webkit.h + + + wx/osx/webhistoryitem_webkit.h + wx/osx/webview_webkit.h + $(WEB_HDR_PLATFORM) diff --git a/include/wx/gtk/webhistoryitem_webkit.h b/include/wx/gtk/webhistoryitem_webkit.h new file mode 100644 index 0000000000..13fe309a86 --- /dev/null +++ b/include/wx/gtk/webhistoryitem_webkit.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/gtk/webhistoryitem.h +// Purpose: wxWebHistoryItem header for GTK +// Author: Steven Lamerton +// Id: $Id$ +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_WEBHISTORYITEM_H_ +#define _WX_GTK_WEBHISTORYITEM_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW_WEBKIT + +class WXDLLIMPEXP_WEB wxWebHistoryItem +{ +public: + wxWebHistoryItem(const wxString& url, const wxString& title) : + m_url(url), m_title(title) {} + wxString GetUrl() { return m_url; } + wxString GetTitle() { return m_title; } + +private: + wxString m_url, m_title; +}; + +#endif // wxUSE_WEBVIEW_WEBKIT + +#endif // _WX_GTK_WEBHISTORYITEM_H_ diff --git a/include/wx/msw/webhistoryitem_ie.h b/include/wx/msw/webhistoryitem_ie.h new file mode 100644 index 0000000000..cbd547e585 --- /dev/null +++ b/include/wx/msw/webhistoryitem_ie.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/msw/webhistoryitem.h +// Purpose: wxWebHistoryItem header for MSW +// Author: Steven Lamerton +// Id: $Id$ +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_WEBHISTORYITEM_H_ +#define _WX_MSW_WEBHISTORYITEM_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW_IE + +class WXDLLIMPEXP_WEB wxWebHistoryItem +{ +public: + wxWebHistoryItem(const wxString& url, const wxString& title) : + m_url(url), m_title(title) {} + wxString GetUrl() { return m_url; } + wxString GetTitle() { return m_title; } + +private: + wxString m_url, m_title; +}; + +#endif // wxUSE_WEBVIEW_IE + +#endif // _WX_MSW_WEBHISTORYITEM_H_ diff --git a/include/wx/osx/webhistoryitem_webkit.h b/include/wx/osx/webhistoryitem_webkit.h new file mode 100644 index 0000000000..5c500fb9d5 --- /dev/null +++ b/include/wx/osx/webhistoryitem_webkit.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/osx/webhistoryitem.h +// Purpose: wxWebHistoryItem header for OSX +// Author: Steven Lamerton +// Id: $Id$ +// Copyright: (c) 2011 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_WEBHISTORYITEM_H_ +#define _WX_OSX_WEBHISTORYITEM_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW_WEBKIT + +class WXDLLIMPEXP_WEB wxWebHistoryItem +{ +public: + wxWebHistoryItem(const wxString& url, const wxString& title) : + m_url(url), m_title(title) {} + wxString GetUrl() { return m_url; } + wxString GetTitle() { return m_title; } + +private: + wxString m_url, m_title; +}; + +#endif // wxUSE_WEBVIEW_WEBKIT + +#endif // _WX_OSX_WEBHISTORYITEM_H_ diff --git a/include/wx/webview.h b/include/wx/webview.h index bb1a8fbcb7..5ece8ec257 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -20,20 +20,13 @@ #include "wx/sharedptr.h" #include "wx/vector.h" +#include "wx/osx/webhistoryitem_webkit.h" +#include "wx/gtk/webhistoryitem_webkit.h" +#include "wx/msw/webhistoryitem_ie.h" + class wxFSFile; class wxFileSystem; -class WXDLLIMPEXP_WEB wxWebHistoryItem -{ -public: - wxWebHistoryItem(const wxString& url, const wxString& title) : - m_url(url), m_title(title) {} - wxString GetUrl() { return m_url; } - wxString GetTitle() { return m_title; } - -private: - wxString m_url, m_title; -}; /** * Zoom level in web view component -- 2.45.2