# Class TCefPanelRef

Description
Hierarchy
Methods

## Unit

uCEFPanel

## Declaration

`type TCefPanelRef = class(TCefViewRef, ICefPanel)`

## Description

A Panel is a container in the views hierarchy that can contain other Views as children. Methods must be called on the browser process UI thread unless otherwise indicated.

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

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedRef
- TCefViewRef
- TCefPanelRef

## Overview

### Methods

Protected | `function GetAsWindow: ICefWindow;`
Protected | `function SetToFillLayout: ICefFillLayout;`
Protected | `function SetToBoxLayout(const settings: TCefBoxLayoutSettings): ICefBoxLayout;`
Protected | `function GetLayout: ICefLayout;`
Protected | `procedure Layout;`
Protected | `procedure AddChildView(const view: ICefView);`
Protected | `procedure AddChildViewAt(const view: ICefView; index: Integer);`
Protected | `procedure ReorderChildView(const view: ICefView; index: Integer);`
Protected | `procedure RemoveChildView(const view: ICefView);`
Protected | `procedure RemoveAllChildViews;`
Protected | `function GetChildViewCount: NativeUInt;`
Protected | `function GetChildViewAt(index: Integer): ICefView;`
Public | `class function UnWrap(data: Pointer): ICefPanel;`
Public | `class function CreatePanel(const delegate: ICefPanelDelegate): ICefPanel;`

## Description

### Methods

Protected | `function GetAsWindow: ICefWindow;`
Returns this Panel as a Window or NULL if this is not a Window.

Protected | `function SetToFillLayout: ICefFillLayout;`
Set this Panel's Layout to FillLayout and return the FillLayout object.

Protected | `function SetToBoxLayout(const settings: TCefBoxLayoutSettings): ICefBoxLayout;`
Set this Panel's Layout to BoxLayout and return the BoxLayout object.

Protected | `function GetLayout: ICefLayout;`
Get the Layout.

Protected | `procedure Layout;`
Lay out the child Views (set their bounds based on sizing heuristics specific to the current Layout).

Protected | `procedure AddChildView(const view: ICefView);`
Add a child View.

Protected | `procedure AddChildViewAt(const view: ICefView; index: Integer);`
Add a child View at the specified |index|. If |index| matches the result of GetChildCount() then the View will be added at the end.

Protected | `procedure ReorderChildView(const view: ICefView; index: Integer);`
Move the child View to the specified |index|. A negative value for |index| will move the View to the end.

Protected | `procedure RemoveChildView(const view: ICefView);`
Remove a child View. The View can then be added to another Panel.

Protected | `procedure RemoveAllChildViews;`
Remove all child Views. The removed Views will be deleted if the client holds no references to them.

Protected | `function GetChildViewCount: NativeUInt;`
Returns the number of child Views.

Protected | `function GetChildViewAt(index: Integer): ICefView;`
Returns the child View at the specified |index|.

Public | `class function UnWrap(data: Pointer): ICefPanel;`
Returns a ICefPanel instance using a PCefPanel data pointer.

Public | `class function CreatePanel(const delegate: ICefPanelDelegate): ICefPanel;`
Create a new Panel.

Generated by PasDoc 1.0.4.