# Class TCefViewDelegateOwn

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFViewDelegate

## Declaration

`type TCefViewDelegateOwn = class(TCefBaseRefCountedOwn, ICefViewDelegate)`

## Description

Implement this interface to handle view events. All size and position values are in density independent pixels (DIP) unless otherwise indicated. The functions of this interface will be called on the browser process UI thread unless otherwise indicated.

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

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedOwn
- TCefViewDelegateOwn

## Overview

### Methods

| `procedure OnGetPreferredSize(const view: ICefView; var aResult : TCefSize); virtual;`
| `procedure OnGetMinimumSize(const view: ICefView; var aResult : TCefSize); virtual;`
| `procedure OnGetMaximumSize(const view: ICefView; var aResult : TCefSize); virtual;`
| `procedure OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer); virtual;`
| `procedure OnParentViewChanged(const view: ICefView; added: boolean; const parent: ICefView); virtual;`
| `procedure OnChildViewChanged(const view: ICefView; added: boolean; const child: ICefView); virtual;`
| `procedure OnWindowChanged(const view: ICefView; added: boolean); virtual;`
| `procedure OnLayoutChanged(const view: ICefView; new_bounds: TCefRect); virtual;`
| `procedure OnFocus(const view: ICefView); virtual;`
| `procedure OnBlur(const view: ICefView); virtual;`
| `procedure OnThemeChanged(const view: ICefView); virtual;`
| `procedure InitializeCEFMethods; virtual;`
| `constructor Create; virtual;`

## Description

### Methods

| `procedure OnGetPreferredSize(const view: ICefView; var aResult : TCefSize); virtual;`
Return the preferred size for |view|. The Layout will use this information to determine the display size.

| `procedure OnGetMinimumSize(const view: ICefView; var aResult : TCefSize); virtual;`
Return the minimum size for |view|.

| `procedure OnGetMaximumSize(const view: ICefView; var aResult : TCefSize); virtual;`
Return the maximum size for |view|.

| `procedure OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer); virtual;`
Return the height necessary to display |view| with the provided |width|. If not specified the result of get_preferred_size().height will be used by default. Override if |view|'s preferred height depends upon the width (for example, with Labels).

| `procedure OnParentViewChanged(const view: ICefView; added: boolean; const parent: ICefView); virtual;`
Called when the parent of |view| has changed. If |view| is being added to |parent| then |added| will be true (1). If |view| is being removed from |parent| then |added| will be false (0). If |view| is being reparented the remove notification will be sent before the add notification. Do not modify the view hierarchy in this callback.

| `procedure OnChildViewChanged(const view: ICefView; added: boolean; const child: ICefView); virtual;`
Called when a child of |view| has changed. If |child| is being added to |view| then |added| will be true (1). If |child| is being removed from |view| then |added| will be false (0). If |child| is being reparented the remove notification will be sent to the old parent before the add notification is sent to the new parent. Do not modify the view hierarchy in this callback.

| `procedure OnWindowChanged(const view: ICefView; added: boolean); virtual;`
Called when |view| is added or removed from the ICefWindow.

| `procedure OnLayoutChanged(const view: ICefView; new_bounds: TCefRect); virtual;`
Called when the layout of |view| has changed.

| `procedure OnFocus(const view: ICefView); virtual;`
Called when |view| gains focus.

| `procedure OnBlur(const view: ICefView); virtual;`
Called when |view| loses focus.

| `procedure OnThemeChanged(const view: ICefView); virtual;`
( Called when the theme for |view| has changed, after the new theme colors have already been applied. Views are notified via the component hierarchy in depth-first reverse order (children before parents). This will be called in the following cases:
    1. When |view|, or a parent of |view|, is added to a Window.
    2. When the native/OS or Chrome theme changes for the Window that contains
       |view|. See ICefWindowDelegate.OnThemeColorsChanged documentation.
    3. When the client explicitly calls ICefWindow.ThemeChanged on the
       Window that contains |view|.
Optionally use this callback to override the new per-View theme colors by calling ICefView.SetBackgroundColor or the appropriate component- specific function. See ICefWindow.SetThemeColor documentation for how to customize additional Window theme colors. (

| `procedure InitializeCEFMethods; virtual;`
Links the methods in the internal CEF record data pointer with the methods in this class.

| `constructor Create; virtual;`
This item has no description.

Generated by PasDoc 0.16.0-snapshot.