Implement clipboard api in gtk.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		| @@ -120,7 +120,13 @@ public: | |||||||
|     virtual wxWebViewZoom GetZoom(); |     virtual wxWebViewZoom GetZoom(); | ||||||
|     virtual void SetZoom(wxWebViewZoom); |     virtual void SetZoom(wxWebViewZoom); | ||||||
|  |  | ||||||
|  |     //Clipboard functions | ||||||
|  |     virtual bool CanCut(); | ||||||
|  |     virtual bool CanCopy(); | ||||||
|  |     virtual bool CanPaste(); | ||||||
|  |     virtual void Cut(); | ||||||
|  |     virtual void Copy(); | ||||||
|  |     virtual void Paste(); | ||||||
|  |  | ||||||
|     /** FIXME: hack to work around signals being received too early */ |     /** FIXME: hack to work around signals being received too early */ | ||||||
|     bool m_ready; |     bool m_ready; | ||||||
|   | |||||||
| @@ -18,6 +18,7 @@ | |||||||
| #include <wx/event.h> | #include <wx/event.h> | ||||||
| #include <wx/sstream.h> | #include <wx/sstream.h> | ||||||
| #include "wx/sharedptr.h" | #include "wx/sharedptr.h" | ||||||
|  | #include "wx/vector.h" | ||||||
|  |  | ||||||
| class WXDLLIMPEXP_WEB wxWebHistoryItem | class WXDLLIMPEXP_WEB wxWebHistoryItem | ||||||
| { | { | ||||||
|   | |||||||
| @@ -489,6 +489,36 @@ void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | bool wxWebViewWebKit::CanCut() | ||||||
|  | { | ||||||
|  |     return webkit_web_view_can_cut_clipboard(WEBKIT_WEB_VIEW(web_view)); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | bool wxWebViewWebKit::CanCopy() | ||||||
|  | { | ||||||
|  |     return webkit_web_view_can_copy_clipboard(WEBKIT_WEB_VIEW(web_view)); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | bool wxWebViewWebKit::CanPaste() | ||||||
|  | { | ||||||
|  |     return webkit_web_view_can_paste_clipboard(WEBKIT_WEB_VIEW(web_view)); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void wxWebViewWebKit::Cut() | ||||||
|  | { | ||||||
|  |     webkit_web_view_cut_clipboard(WEBKIT_WEB_VIEW(web_view)); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void wxWebViewWebKit::Copy() | ||||||
|  | { | ||||||
|  |     webkit_web_view_copy_clipboard(WEBKIT_WEB_VIEW(web_view)); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | void wxWebViewWebKit::Paste() | ||||||
|  | { | ||||||
|  |     webkit_web_view_paste_clipboard(WEBKIT_WEB_VIEW(web_view)); | ||||||
|  | } | ||||||
|  |  | ||||||
| wxString wxWebViewWebKit::GetCurrentURL() | wxString wxWebViewWebKit::GetCurrentURL() | ||||||
| { | { | ||||||
|     // FIXME: check which encoding the web kit control uses instead of |     // FIXME: check which encoding the web kit control uses instead of | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user