# Interface ICefFocusHandler

Description
Hierarchy
Methods

## 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

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

## Description

### Methods

Public | `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}']

Public | `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.

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

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

Generated by PasDoc 1.0.4.