当前位置: 首页>>代码示例>>C++>>正文


C++ Frame::editor方法代码示例

本文整理汇总了C++中webcore::Frame::editor方法的典型用法代码示例。如果您正苦于以下问题:C++ Frame::editor方法的具体用法?C++ Frame::editor怎么用?C++ Frame::editor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在webcore::Frame的用法示例。


在下文中一共展示了Frame::editor方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: findString

bool DumpRenderTreeSupportQt::findString(QWebPageAdapter *adapter, const QString& string, const QStringList& optionArray)
{
    // 1. Parse the options from the array
    WebCore::FindOptions options = 0;
    const int optionCount = optionArray.size();
    for (int i = 0; i < optionCount; ++i) {
        const QString& option = optionArray.at(i);
        if (option == QLatin1String("CaseInsensitive"))
            options |= WebCore::CaseInsensitive;
        else if (option == QLatin1String("AtWordStarts"))
            options |= WebCore::AtWordStarts;
        else if (option == QLatin1String("TreatMedialCapitalAsWordStart"))
            options |= WebCore::TreatMedialCapitalAsWordStart;
        else if (option == QLatin1String("Backwards"))
            options |= WebCore::Backwards;
        else if (option == QLatin1String("WrapAround"))
            options |= WebCore::WrapAround;
        else if (option == QLatin1String("StartInSelection"))
            options |= WebCore::StartInSelection;
    }

    // 2. find the string
    WebCore::Frame* frame = adapter->page->focusController()->focusedOrMainFrame();
    return frame && frame->editor()->findString(string, options);
}
开发者ID:jbat100,项目名称:webkit,代码行数:25,代码来源:DumpRenderTreeSupportQt.cpp

示例2: handleSendEditingCapabilities

void BWebPage::handleSendEditingCapabilities(BMessage*)
{
    bool canCut = false;
    bool canCopy = false;
    bool canPaste = false;

    WebCore::Frame* frame = fPage->focusController()->focusedOrMainFrame();
    if (frame && frame->editor()) {
        WebCore::Editor* editor = frame->editor();

        canCut = editor->canCut() || editor->canDHTMLCut();
        canCopy = editor->canCopy() || editor->canDHTMLCopy();
        canPaste = editor->canPaste() || editor->canDHTMLPaste();
    }

    BMessage message(B_EDITING_CAPABILITIES_RESULT);
    message.AddBool("can cut", canCut);
    message.AddBool("can copy", canCopy);
    message.AddBool("can paste", canPaste);

    dispatchMessage(message);
}
开发者ID:,项目名称:,代码行数:22,代码来源:

示例3: firstRectForCharacterRange

QVariantList DumpRenderTreeSupportQt::firstRectForCharacterRange(QWebPageAdapter *adapter, int location, int length)
{
    WebCore::Frame* frame = adapter->page->focusController()->focusedOrMainFrame();
    QVariantList rect;

    if ((location + length < location) && (location + length))
        length = 0;

    RefPtr<Range> range = TextIterator::rangeFromLocationAndLength(frame->selection()->rootEditableElementOrDocumentElement(), location, length);

    if (!range)
        return QVariantList();

    QRect resultRect = frame->editor()->firstRectForRange(range.get());
    rect << resultRect.x() << resultRect.y() << resultRect.width() << resultRect.height();
    return rect;
}
开发者ID:jbat100,项目名称:webkit,代码行数:17,代码来源:DumpRenderTreeSupportQt.cpp

示例4: webkit_web_view_button_release_event

static gboolean webkit_web_view_button_release_event(GtkWidget* widget, GdkEventButton* event)
{
    //WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
    ////WebKitWebViewPrivate* priv = webView->priv;
    WebCore::Frame* focusedFrame = core(webView_s)->focusController()->focusedFrame();

    if (focusedFrame && focusedFrame->editor()->canEdit()) {
        GdkWindow* window = gtk_widget_get_parent_window(widget);
        gtk_im_context_set_client_window(imContext, window);
#ifdef MAEMO_CHANGES
        hildon_gtk_im_context_filter_event(imContext, (GdkEvent*)event);
        hildon_gtk_im_context_show(imContext);
#endif
    }

    return focusedFrame->eventHandler()->handleMouseReleaseEvent(PlatformMouseEvent(event));
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:17,代码来源:browserWidget.cpp

示例5: firstRectForCharacterRange

WebCore::IntRect DumpRenderTreeSupportEfl::firstRectForCharacterRange(Evas_Object* ewkView, int location, int length)
{
    DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page, WebCore::IntRect());

    if (!page->focusController() || !page->focusController()->focusedOrMainFrame())
        return WebCore::IntRect();

    if ((location + length < location) && (location + length))
        length = 0;

    WebCore::Frame* frame = page->focusController()->focusedOrMainFrame();

    RefPtr<WebCore::Range> range = WebCore::TextIterator::rangeFromLocationAndLength(frame->selection()->rootEditableElementOrDocumentElement(), location, length);
    if (!range)
        return WebCore::IntRect();

    return frame->editor().firstRectForRange(range.get());
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:18,代码来源:DumpRenderTreeSupportEfl.cpp

示例6: firstRectForCharacterRange

WebCore::IntRect DumpRenderTreeSupportEfl::firstRectForCharacterRange(Evas_Object* ewkView, int location, int length)
{
    WebCore::Page* page = EWKPrivate::corePage(ewkView);
    if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame() || !page->focusController()->focusedOrMainFrame()->editor())
        return WebCore::IntRect();

    if ((location + length < location) && (location + length))
        length = 0;

    WebCore::Frame* frame = page->focusController()->focusedOrMainFrame();
    WebCore::Editor* editor = frame->editor();

    RefPtr<WebCore::Range> range = WebCore::TextIterator::rangeFromLocationAndLength(frame->selection()->rootEditableElementOrDocumentElement(), location, length);
    if (!range)
        return WebCore::IntRect();

    return editor->firstRectForRange(range.get());
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例7: webkit_web_view_real_paste_clipboard

static void webkit_web_view_real_paste_clipboard(WebKitWebView*)
{
    WebCore::Frame* frame = core(webView_s)->focusController()->focusedOrMainFrame();
    frame->editor()->command("Paste").execute();
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:5,代码来源:browserWidget.cpp

示例8: webkit_web_view_real_select_all

static void webkit_web_view_real_select_all(WebKitWebView*)
{
    WebCore::Frame* frame = core(webView_s)->focusController()->focusedOrMainFrame();
    frame->editor()->command("SelectAll").execute();
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:5,代码来源:browserWidget.cpp


注:本文中的webcore::Frame::editor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。