Implement HasSelection for the OSX WebKit backend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
//Selection
|
||||
virtual void DeleteSelection();
|
||||
virtual bool HasSelection() { return false; };
|
||||
virtual bool HasSelection();
|
||||
virtual void SelectAll() {};
|
||||
virtual wxString GetSelectedText();
|
||||
virtual wxString GetSelectedSource() { return ""; }
|
||||
|
@@ -940,11 +940,24 @@ void wxWebViewWebKit::DeleteSelection()
|
||||
[(WebView*)m_webView deleteSelection];
|
||||
}
|
||||
|
||||
bool wxWebViewWebKit::HasSelection()
|
||||
{
|
||||
DOMRange* range = [m_webView selectedDOMRange];
|
||||
if(!range)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::EnableHistory(bool enable)
|
||||
{
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
|
||||
[m_webView setMaintainsBackForwardList:enable];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user