Add the ability to enable / disable and check for the editable property of a rendering engine. Implement for all three backends and extend the sample, document and unit test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -544,6 +544,26 @@ void wxWebViewIE::Redo()
|
||||
ExecCommand("Redo");
|
||||
}
|
||||
|
||||
void wxWebViewIE::SetEditable(bool enable)
|
||||
{
|
||||
IHTMLDocument2* document = GetDocument();
|
||||
if( enable )
|
||||
document->put_designMode(SysAllocString(L"On"));
|
||||
else
|
||||
document->put_designMode(SysAllocString(L"Off"));
|
||||
}
|
||||
|
||||
bool wxWebViewIE::IsEditable()
|
||||
{
|
||||
IHTMLDocument2* document = GetDocument();
|
||||
BSTR mode;
|
||||
document->get_designMode(&mode);
|
||||
if(wxString(mode) == "On")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxWebViewIE::CanExecCommand(wxString command)
|
||||
{
|
||||
IHTMLDocument2* document = GetDocument();
|
||||
|
||||
Reference in New Issue
Block a user