本文整理汇总了C++中IWebUIDelegate类的典型用法代码示例。如果您正苦于以下问题:C++ IWebUIDelegate类的具体用法?C++ IWebUIDelegate怎么用?C++ IWebUIDelegate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IWebUIDelegate类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: windowRect
FloatRect WebChromeClient::windowRect()
{
IWebUIDelegate* uiDelegate = 0;
if (SUCCEEDED(m_webView->uiDelegate(&uiDelegate))) {
RECT rect;
HRESULT retval = uiDelegate->webViewFrame(m_webView, &rect);
uiDelegate->Release();
if (SUCCEEDED(retval))
return rect;
}
return FloatRect();
}
示例2: windowResizerRect
IntRect WebChromeClient::windowResizerRect() const
{
IntRect intRect;
IWebUIDelegate* ui;
if (SUCCEEDED(m_webView->uiDelegate(&ui)) && ui) {
IWebUIDelegatePrivate* uiPrivate;
if (SUCCEEDED(ui->QueryInterface(IID_IWebUIDelegatePrivate, (void**)&uiPrivate))) {
RECT r;
if (SUCCEEDED(uiPrivate->webViewResizerRect(m_webView, &r)))
intRect = IntRect(r.left, r.top, r.right-r.left, r.bottom-r.top);
uiPrivate->Release();
}
ui->Release();
}
return intRect;
}
示例3: registerCommandForUndo
void WebEditorClient::registerCommandForUndo(PassRefPtr<EditCommand> command)
{
IWebUIDelegate* uiDelegate = 0;
if (SUCCEEDED(m_webView->uiDelegate(&uiDelegate))) {
LPCTSTR actionName = undoNameForEditAction(command->editingAction());
WebEditorUndoCommand* undoCommand = new WebEditorUndoCommand(command, true);
if (!undoCommand)
return;
uiDelegate->registerUndoWithTarget(m_undoTarget, 0, undoCommand);
undoCommand->Release(); // the undo manager owns the reference
BSTR actionNameBSTR = SysAllocString(actionName);
if (actionNameBSTR) {
uiDelegate->setActionTitle(actionNameBSTR);
SysFreeString(actionNameBSTR);
}
uiDelegate->Release();
}
}