Implement SelectAll for OSX WebKit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-08-06 12:58:26 +00:00
parent c6ea1fdaf9
commit 835165d576
2 changed files with 6 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ public:
//Selection
virtual void DeleteSelection();
virtual bool HasSelection();
virtual void SelectAll() {};
virtual void SelectAll();
virtual wxString GetSelectedText();
virtual wxString GetSelectedSource() { return ""; }
virtual void ClearSelection();

View File

@@ -920,6 +920,11 @@ void wxWebViewWebKit::ClearSelection()
RunScript("window.getSelection().removeAllRanges();");
}
void wxWebViewWebKit::SelectAll()
{
RunScript("window.getSelection().selectAllChildren(document.body);");
}
wxString wxWebViewWebKit::GetPageText()
{
id result = [[m_webView windowScriptObject]