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:
@@ -106,7 +106,7 @@ public:
|
|||||||
//Selection
|
//Selection
|
||||||
virtual void DeleteSelection();
|
virtual void DeleteSelection();
|
||||||
virtual bool HasSelection();
|
virtual bool HasSelection();
|
||||||
virtual void SelectAll() {};
|
virtual void SelectAll();
|
||||||
virtual wxString GetSelectedText();
|
virtual wxString GetSelectedText();
|
||||||
virtual wxString GetSelectedSource() { return ""; }
|
virtual wxString GetSelectedSource() { return ""; }
|
||||||
virtual void ClearSelection();
|
virtual void ClearSelection();
|
||||||
|
@@ -920,6 +920,11 @@ void wxWebViewWebKit::ClearSelection()
|
|||||||
RunScript("window.getSelection().removeAllRanges();");
|
RunScript("window.getSelection().removeAllRanges();");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxWebViewWebKit::SelectAll()
|
||||||
|
{
|
||||||
|
RunScript("window.getSelection().selectAllChildren(document.body);");
|
||||||
|
}
|
||||||
|
|
||||||
wxString wxWebViewWebKit::GetPageText()
|
wxString wxWebViewWebKit::GetPageText()
|
||||||
{
|
{
|
||||||
id result = [[m_webView windowScriptObject]
|
id result = [[m_webView windowScriptObject]
|
||||||
|
Reference in New Issue
Block a user