Implement cut / copy / paste in osx webkit and fix the function stubs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -85,18 +85,18 @@ public:
|
|||||||
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) {}
|
virtual void LoadHistoryItem(wxSharedPtr<wxWebHistoryItem> item) {}
|
||||||
|
|
||||||
//Undo / redo functionality
|
//Undo / redo functionality
|
||||||
virtual bool CanUndo() {}
|
virtual bool CanUndo() { return false; }
|
||||||
virtual bool CanRedo() {}
|
virtual bool CanRedo() { return false; }
|
||||||
virtual void Undo() {}
|
virtual void Undo() {}
|
||||||
virtual void Redo() {}
|
virtual void Redo() {}
|
||||||
|
|
||||||
//Clipboard functions
|
//Clipboard functions
|
||||||
virtual bool CanCut() {}
|
virtual bool CanCut() { return false; }
|
||||||
virtual bool CanCopy() {}
|
virtual bool CanCopy() { return false; }
|
||||||
virtual bool CanPaste() {}
|
virtual bool CanPaste() { return false; }
|
||||||
virtual void Cut() {}
|
virtual void Cut();
|
||||||
virtual void Copy() {}
|
virtual void Copy();
|
||||||
virtual void Paste() {}
|
virtual void Paste();
|
||||||
|
|
||||||
// ---- methods not from the parent (common) interface
|
// ---- methods not from the parent (common) interface
|
||||||
wxString GetSelectedText();
|
wxString GetSelectedText();
|
||||||
|
@@ -956,6 +956,30 @@ void wxWebViewWebKit::SetPage(const wxString& src, const wxString& baseUrl)
|
|||||||
wxNSStringWithWxString( baseUrl )]];
|
wxNSStringWithWxString( baseUrl )]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxWebViewWebKit::Cut()
|
||||||
|
{
|
||||||
|
if ( !m_webView )
|
||||||
|
return;
|
||||||
|
|
||||||
|
[(WebView*)m_webView cut];
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxWebViewWebKit::Copy()
|
||||||
|
{
|
||||||
|
if ( !m_webView )
|
||||||
|
return;
|
||||||
|
|
||||||
|
[(WebView*)m_webView copy];
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxWebViewWebKit::Paste()
|
||||||
|
{
|
||||||
|
if ( !m_webView )
|
||||||
|
return;
|
||||||
|
|
||||||
|
[(WebView*)m_webView paste];
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------
|
//------------------------------------------------------------
|
||||||
// Listener interfaces
|
// Listener interfaces
|
||||||
//------------------------------------------------------------
|
//------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user