您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ supportsFocus函数代码示例

51自学网 2021-06-03 08:33:39
  C++
这篇教程C++ supportsFocus函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中supportsFocus函数的典型用法代码示例。如果您正苦于以下问题:C++ supportsFocus函数的具体用法?C++ supportsFocus怎么用?C++ supportsFocus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: supportsFocus

bool SVGAElement::isMouseFocusable() const{    if (isLink())        return supportsFocus();    return SVGElement::isMouseFocusable();}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:7,


示例2: if

unsigned RenderThemeChromiumWin::determineState(RenderObject* o, ControlSubPart subPart){    unsigned result = TS_NORMAL;    ControlPart appearance = o->style()->appearance();    if (!isEnabled(o))        result = TS_DISABLED;    else if (isReadOnlyControl(o))        result = (appearance == TextFieldPart || appearance == TextAreaPart || appearance == SearchFieldPart) ? ETS_READONLY : TS_DISABLED;    // Active overrides hover and focused.    else if (isPressed(o) && (subPart == SpinButtonUp) == isSpinUpButtonPartPressed(o))        result = TS_PRESSED;    else if (supportsFocus(appearance) && isFocused(o))        result = ETS_FOCUSED;    else if (isHovered(o) && (subPart == SpinButtonUp) == isSpinUpButtonPartHovered(o))        result = TS_HOT;    // CBS_UNCHECKED*: 1-4    // CBS_CHECKED*: 5-8    // CBS_MIXED*: 9-12    if (isIndeterminate(o))        result += 8;    else if (isChecked(o))        result += 4;    return result;}
开发者ID:dslab-epfl,项目名称:warr,代码行数:25,


示例3: wxASSERT

bool RenderThemeWx::paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r){    wxWindow* window = o->view()->frameView()->nativeWindow();    wxDC* dc = static_cast<wxDC*>(i.context->platformContext());    wxASSERT(dc->IsOk());    int flags = 0;        if (!isEnabled(o))        flags |= wxCONTROL_DISABLED;    EAppearance appearance = o->style()->appearance();    if (supportsFocus(o->style()->appearance()) && isFocused(o))        flags |= wxCONTROL_FOCUSED;    if (isPressed(o))        flags |= wxCONTROL_PRESSED;        if (appearance == PushButtonAppearance || appearance == ButtonAppearance)        wxRendererNative::Get().DrawPushButton(window, *dc, r, flags);    // TODO: add a radio button rendering API to wx    //else if(appearance == RadioAppearance)    else if(appearance == CheckboxAppearance) {        if (isChecked(o))            flags |= wxCONTROL_CHECKED;        wxRendererNative::Get().DrawCheckBox(window, *dc, r, flags);    }            return false;}
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:30,


示例4: dc

bool RenderThemeWx::paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r){    wxScrolledWindow* window = o->view()->frameView()->nativeWindow();    wxPaintDC dc((wxWindow*)window);    window->DoPrepareDC(dc);    int flags = 0;        if (!isEnabled(o))        flags |= wxCONTROL_DISABLED;    EAppearance appearance = o->style()->appearance();    if (supportsFocus(o->style()->appearance()) && isFocused(o))        flags |= wxCONTROL_FOCUSED;    if (isPressed(o))        flags |= wxCONTROL_PRESSED;        if(appearance == PushButtonAppearance || appearance == ButtonAppearance)        wxRendererNative::Get().DrawPushButton(window, dc, r, flags);    // TODO: add a radio button rendering API to wx    //else if(appearance == RadioAppearance)    //    wxRendererNative::Get().    else if(appearance == CheckboxAppearance)        wxRendererNative::Get().DrawCheckBox(window, dc, r, flags);            return false;}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:28,


示例5: imageElement

bool HTMLAreaElement::rendererIsFocusable() const{    HTMLImageElement* image = imageElement();    if (!image || !image->renderer() || image->renderer()->style()->visibility() != VISIBLE)        return false;    return supportsFocus() && Element::tabIndex() >= 0;}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:8,


示例6: applyTheme

EAppearance RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) const{    // Default bits: no focus, no mouse over    option.state &= ~(QStyle::State_HasFocus | QStyle::State_MouseOver);    if (!isEnabled(o))        option.state &= ~QStyle::State_Enabled;    if (isReadOnlyControl(o))        // Readonly is supported on textfields.        option.state |= QStyle::State_ReadOnly;    if (supportsFocus(o->style()->appearance()) && isFocused(o))        option.state |= QStyle::State_HasFocus;    if (isHovered(o))        option.state |= QStyle::State_MouseOver;    EAppearance result = o->style()->appearance();    switch (result) {        case PushButtonAppearance:        case SquareButtonAppearance:        case ButtonAppearance:        case ButtonBevelAppearance:        case ListItemAppearance:        case MenulistButtonAppearance:        case ScrollbarButtonLeftAppearance:        case ScrollbarButtonRightAppearance:        case ScrollbarTrackHorizontalAppearance:        case ScrollbarTrackVerticalAppearance:        case ScrollbarThumbHorizontalAppearance:        case ScrollbarThumbVerticalAppearance:        case SearchFieldResultsButtonAppearance:        case SearchFieldCancelButtonAppearance: {            if (isPressed(o))                option.state |= QStyle::State_Sunken;            else if (result == PushButtonAppearance)                option.state |= QStyle::State_Raised;            break;        }    }    if(result == RadioAppearance || result == CheckboxAppearance)        option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off);    // If the webview has a custom palette, use it    Page *page = o->document()->page();    if (page) {        QWidget *view = static_cast<ChromeClientQt*>(page->chrome()->client())->m_webPage->view();        if (view)            option.palette = view->palette();    }    return result;}
开发者ID:FilipBE,项目名称:qtextended,代码行数:56,


示例7: if

unsigned RenderThemeChromiumWin::determineSliderThumbState(RenderObject* o){    unsigned result = TUS_NORMAL;    if (!isEnabled(o->parent()))        result = TUS_DISABLED;    else if (supportsFocus(o->style()->appearance()) && isFocused(o->parent()))        result = TUS_FOCUSED;    else if (static_cast<RenderSlider*>(o->parent())->inDragMode())        result = TUS_PRESSED;    else if (isHovered(o))        result = TUS_HOT;    return result;}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:13,


示例8: handleKeypressEvent

void HTMLElement::handleKeypressEvent(KeyboardEvent* event){    if (!isSpatialNavigationEnabled(document().frame()) || !supportsFocus())        return;    // if the element is a text form control (like <input type=text> or <textarea>)    // or has contentEditable attribute on, we should enter a space or newline    // even in spatial navigation mode instead of handling it as a "click" action.    if (isTextFormControl() || isContentEditable())        return;    int charCode = event->charCode();    if (charCode == '/r' || charCode == ' ') {        dispatchSimulatedClick(event);        event->setDefaultHandled();    }}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:15,


示例9: applyTheme

EAppearance RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) const{    // Default bits: no focus, no mouse over    option.state &= ~(QStyle::State_HasFocus | QStyle::State_MouseOver);    if (!isEnabled(o))        option.state &= ~QStyle::State_Enabled;    if (isReadOnlyControl(o))        // Readonly is supported on textfields.        option.state |= QStyle::State_ReadOnly;    if (supportsFocus(o->style()->appearance()) && isFocused(o))        option.state |= QStyle::State_HasFocus;    if (isHovered(o))        option.state |= QStyle::State_MouseOver;    EAppearance result = o->style()->appearance();    switch (result) {        case PushButtonAppearance:        case SquareButtonAppearance:        case ButtonAppearance:        case ButtonBevelAppearance:        case ListItemAppearance:        case MenulistButtonAppearance:        case ScrollbarButtonLeftAppearance:        case ScrollbarButtonRightAppearance:        case ScrollbarTrackHorizontalAppearance:        case ScrollbarTrackVerticalAppearance:        case ScrollbarThumbHorizontalAppearance:        case ScrollbarThumbVerticalAppearance:        case SearchFieldResultsButtonAppearance:        case SearchFieldCancelButtonAppearance: {            if (isPressed(o))                option.state |= QStyle::State_Sunken;            else if (result == PushButtonAppearance)                option.state |= QStyle::State_Raised;            break;        }    }    if(result == RadioAppearance || result == CheckboxAppearance)        option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off);    return result;}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:48,


示例10: if

unsigned RenderThemeGdk::determineState(RenderObject* o){    unsigned result = TS_NORMAL;    if (!isEnabled(o))        result = TS_DISABLED;    else if (isReadOnlyControl(o))        result = TFS_READONLY; // Readonly is supported on textfields.    else if (supportsFocus(o->style()->appearance()) && isFocused(o))        result = TS_FOCUSED;    else if (isPressed(o))        result = TS_ACTIVE;    else if (isHovered(o))        result = TS_HOVER;    if (isChecked(o))        result += 4; // 4 unchecked states, 4 checked states.    return result;}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:17,


示例11: document

void Element::focus(bool restorePreviousSelection){    Document* doc = document();    if (doc->focusedNode() == this)        return;    doc->updateLayoutIgnorePendingStylesheets();        if (!supportsFocus())        return;        if (Page* page = doc->page())        page->focusController()->setFocusedNode(this, doc->frame());    if (!isFocusable()) {        ensureRareData()->setNeedsFocusAppearanceUpdateSoonAfterAttach(true);        return;    }            cancelFocusAppearanceUpdate();    updateFocusAppearance(restorePreviousSelection);}
开发者ID:Katarzynasrom,项目名称:patch-hosting-for-android-x86-support,代码行数:22,


示例12: tabIndex

short SVGElement::tabIndex() const{    if (supportsFocus())        return Element::tabIndex();    return -1;}
开发者ID:astojilj,项目名称:chromium-crosswalk,代码行数:6,


示例13: supportsFocus

bool RenderThemeGtk::supportsFocusRing(const RenderStyle& style) const{    return supportsFocus(style.appearance());}
开发者ID:aosm,项目名称:WebCore,代码行数:4,


示例14: supportsFocus

bool HTMLOptionElement::isFocusable() const{    // Option elements do not have a renderer so we check the renderStyle instead.    return supportsFocus() && renderStyle() && renderStyle()->display() != NONE;}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:5,


示例15: handleKeypressEvent

void HTMLElement::handleKeypressEvent(KeyboardEvent* event){    if (!document()->settings() || !document()->settings()->spatialNavigationEnabled() || !supportsFocus())        return;    int charCode = event->charCode();    if (charCode == '/r' || charCode == ' ') {        dispatchSimulatedClick(event);        event->setDefaultHandled();    }}
开发者ID:windyuuy,项目名称:opera,代码行数:10,


示例16: supportsFocus

bool RenderThemeQt::supportsFocusRing(const RenderStyle* style) const{    return supportsFocus(style->appearance());}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:4,



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


C++ surf函数代码示例
C++ supply_register_by_name函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。