# Interface ICefFocusHandler

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFInterfaces

## Declaration

`type ICefFocusHandler = interface(ICefBaseRefCounted)`

## Description

Implement this interface to handle events related to focus. The functions of this interface will be called on the UI thread.

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_focus_handler_capi.h">CEF source file: /include/capi/cef_focus_handler_capi.h (cef_focus_handler_t))

## Hierarchy

- IInterface
- ICefBaseRefCounted
- ICefFocusHandler

## Overview

### Methods

| `procedure OnTakeFocus(const browser: ICefBrowser; next: Boolean);`
| `function OnSetFocus(const browser: ICefBrowser; source: TCefFocusSource): Boolean;`
| `procedure OnGotFocus(const browser: ICefBrowser);`
| `procedure RemoveReferences;`

## Description

### Methods

| `procedure OnTakeFocus(const browser: ICefBrowser; next: Boolean);`

Called when the browser component is about to loose focus. For instance, if focus was on the last HTML element and the user pressed the TAB key. |next| will be true (1) if the browser is giving focus to the next component and false (0) if the browser is giving focus to the previous component.

###### Attributes

GUID['{BB7FA3FA-7B1A-4ADC-8E50-12A24018DD90}']

| `function OnSetFocus(const browser: ICefBrowser; source: TCefFocusSource): Boolean;`
Called when the browser component is requesting focus. |source| indicates where the focus request is originating from. Return false (0) to allow the focus to be set or true (1) to cancel setting the focus.

| `procedure OnGotFocus(const browser: ICefBrowser);`
Called when the browser component has received focus.

| `procedure RemoveReferences;`
Custom procedure to clear all references.

Generated by PasDoc 0.17.0.snapshot.