这篇教程C++ supportsFocus函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中supportsFocus函数的典型用法代码示例。如果您正苦于以下问题:C++ supportsFocus函数的具体用法?C++ supportsFocus怎么用?C++ supportsFocus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了supportsFocus函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: supportsFocusbool SVGAElement::isMouseFocusable() const{ if (isLink()) return supportsFocus(); return SVGElement::isMouseFocusable();}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:7,
示例2: ifunsigned 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: wxASSERTbool 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: dcbool 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: imageElementbool 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: applyThemeEAppearance 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: ifunsigned 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: handleKeypressEventvoid 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: applyThemeEAppearance 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: ifunsigned 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: documentvoid 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: tabIndexshort SVGElement::tabIndex() const{ if (supportsFocus()) return Element::tabIndex(); return -1;}
开发者ID:astojilj,项目名称:chromium-crosswalk,代码行数:6,
示例13: supportsFocusbool RenderThemeGtk::supportsFocusRing(const RenderStyle& style) const{ return supportsFocus(style.appearance());}
开发者ID:aosm,项目名称:WebCore,代码行数:4,
示例14: supportsFocusbool 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: handleKeypressEventvoid 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: supportsFocusbool 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函数代码示例 |