git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68267
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
IHTMLDocument2* document = GetDocument();
IHTMLElement *bodyTag = NULL;
IHTMLElement *htmlTag = NULL;
IHTMLDocument2* document = GetDocument();
IHTMLElement *bodyTag = NULL;
IHTMLElement *htmlTag = NULL;
HRESULT hr = document->get_body(&bodyTag);
if(SUCCEEDED(hr))
{
hr = bodyTag->get_parentElement(&htmlTag);
if(SUCCEEDED(hr))
{
HRESULT hr = document->get_body(&bodyTag);
if(SUCCEEDED(hr))
{
hr = bodyTag->get_parentElement(&htmlTag);
if(SUCCEEDED(hr))
{
htmlTag->get_outerHTML(&bstr);
htmlTag->get_outerHTML(&bstr);
+ source = wxString(bstr);
htmlTag->Release();
}
bodyTag->Release();
}
document->Release();
htmlTag->Release();
}
bodyTag->Release();
}
document->Release();
}
wxWebViewZoom wxWebViewIE::GetZoom()
}
wxWebViewZoom wxWebViewIE::GetZoom()
return GetIETextZoom();
else
wxFAIL;
return GetIETextZoom();
else
wxFAIL;
+
+ //Dummy return to stop compiler warnings
+ return wxWEB_VIEW_ZOOM_MEDIUM;
{
return wxWEB_VIEW_ZOOM_LARGE;
}
{
return wxWEB_VIEW_ZOOM_LARGE;
}
+ else /*if (zoom > 145) */ //Using else removes a compiler warning
{
return wxWEB_VIEW_ZOOM_LARGEST;
}
{
return wxWEB_VIEW_ZOOM_LARGEST;
}
IHTMLDocument2* document = GetDocument();
BSTR mode;
document->get_designMode(&mode);
IHTMLDocument2* document = GetDocument();
BSTR mode;
document->get_designMode(&mode);
if(wxString(mode) == "On")
return true;
else
return false;
if(wxString(mode) == "On")
return true;
else
return false;
}
void wxWebViewIE::SelectAll()
}
void wxWebViewIE::SelectAll()
{
IHTMLDocument2* document = GetDocument();
IHTMLSelectionObject* selection;
{
IHTMLDocument2* document = GetDocument();
IHTMLSelectionObject* selection;
HRESULT hr = document->get_selection(&selection);
if(SUCCEEDED(hr))
{
HRESULT hr = document->get_selection(&selection);
if(SUCCEEDED(hr))
{
selection->get_type(&type);
selection->get_type(&type);
selection->Release();
}
document->Release();
selection->Release();
}
document->Release();
- return wxString(type) != "None";
}
void wxWebViewIE::DeleteSelection()
}
void wxWebViewIE::DeleteSelection()
wxString wxWebViewIE::GetPageText()
{
IHTMLDocument2* document = GetDocument();
wxString wxWebViewIE::GetPageText()
{
IHTMLDocument2* document = GetDocument();
IHTMLElement* body;
HRESULT hr = document->get_body(&body);
if(SUCCEEDED(hr))
{
IHTMLElement* body;
HRESULT hr = document->get_body(&body);
if(SUCCEEDED(hr))
{
body->get_innerText(&out);
body->get_innerText(&out);
body->Release();
}
document->Release();
body->Release();
}
document->Release();
}
bool wxWebViewIE::CanExecCommand(wxString command)
}
bool wxWebViewIE::CanExecCommand(wxString command)