void FormGadget::handleFocusChange(FocusChange change) { if (form()->application().runningOnTreo600() && visible() && form()->visible()) { if (focusTaking == change) drawFocusRing(); else removeFocusRing(); } }
void CanvasRenderingContext2D::drawFocusIfNeededInternal(const Path& path, Element* element) { if (!focusRingCallIsValid(path, element)) return; // Note: we need to check document->focusedElement() rather than just calling // element->focused(), because element->focused() isn't updated until after // focus events fire. if (element->document().focusedElement() == element) { scrollPathIntoViewInternal(path); drawFocusRing(path); } // Update its accessible bounds whether it's focused or not. updateElementAccessibility(path, element); }
void FormGadget::drawProxy() { if (!visible()) return; if (form()->application().runningOnTreo600() && hasFocus()) drawFocusRing(); Graphics graphics(WinGetDrawWindow()); // form()->windowHandle() Rect rect; bounds(rect); bool db=doubleBuffer_; if (db) { Rect formBounds; form()->bounds(formBounds); Err error; WinHandle wh = WinCreateOffscreenWindow(formBounds.width(), formBounds.height(), nativeFormat, &error); if (errNone == error) { { Graphics offscreen(wh); ActivateGraphics active(offscreen); handleDraw(graphics); offscreen.copyArea(rect, graphics, rect.topLeft()); } WinDeleteWindow(wh, false); } else db=false; } if (!db) { Graphics::ClipRectangleSetter setClip(graphics, rect); handleDraw(graphics); } fireDrawCompleted(); }