# Class TCustomContextMenuHandler

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFContextMenuHandler

## Declaration

`type TCustomContextMenuHandler = class(TCefContextMenuHandlerOwn)`

## Description

This item has no description.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedOwn
- TCefContextMenuHandlerOwn
- TCustomContextMenuHandler

## Overview

### Fields

| `FEvents: Pointer;`

### Methods

| `procedure OnBeforeContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); override;`
| `function RunContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel; const callback: ICefRunContextMenuCallback): Boolean; override;`
| `function OnContextMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags): Boolean; override;`
| `procedure OnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); override;`
| `function RunQuickMenu(const browser: ICefBrowser; const frame: ICefFrame; location: PCefPoint; size: PCefSize; edit_state_flags: TCefQuickMenuEditStateFlags; const callback: ICefRunQuickMenuCallback): boolean; override;`
| `function OnQuickMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; command_id: integer; event_flags: TCefEventFlags): boolean; override;`
| `procedure OnQuickMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); override;`
| `procedure RemoveReferences; override;`
| `constructor Create(const events : IChromiumEvents); reintroduce; virtual;`
| `destructor Destroy; override;`

## Description

### Fields

| `FEvents: Pointer;`
This item has no description.

### Methods

| `procedure OnBeforeContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); override;`
This item has no description. Showing description inherited from ICefContextMenuHandler.OnBeforeContextMenu. Called before a context menu is displayed. |params| provides information about the context menu state. |model| initially contains the default context menu. The |model| can be cleared to show no context menu or modified to show a custom menu. Do not keep references to |params| or |model| outside of this callback.

| `function RunContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel; const callback: ICefRunContextMenuCallback): Boolean; override;`
This item has no description. Showing description inherited from ICefContextMenuHandler.RunContextMenu. Called to allow custom display of the context menu. |params| provides information about the context menu state. |model| contains the context menu model resulting from OnBeforeContextMenu. For custom display return true (1) and execute |callback| either synchronously or asynchronously with the selected command ID. For default display return false (0). Do not keep references to |params| or |model| outside of this callback.

| `function OnContextMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags): Boolean; override;`
This item has no description. Showing description inherited from ICefContextMenuHandler.OnContextMenuCommand. Called to execute a command selected from the context menu. Return true (1) if the command was handled or false (0) for the default implementation. See TCefMenuId for the command ids that have default implementations. All user-defined command ids should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |params| will have the same values as what was passed to on_before_context_menu(). Do not keep a reference to |params| outside of this callback.

| `procedure OnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); override;`
This item has no description. Showing description inherited from ICefContextMenuHandler.OnContextMenuDismissed. Called when the context menu is dismissed irregardless of whether the menu was canceled or a command was selected.

| `function RunQuickMenu(const browser: ICefBrowser; const frame: ICefFrame; location: PCefPoint; size: PCefSize; edit_state_flags: TCefQuickMenuEditStateFlags; const callback: ICefRunQuickMenuCallback): boolean; override;`
This item has no description. Showing description inherited from ICefContextMenuHandler.RunQuickMenu. Called to allow custom display of the quick menu for a windowless browser. |location| is the top left corner of the selected region. |size| is the size of the selected region. |edit_state_flags| is a combination of flags that represent the state of the quick menu. Return true (1) if the menu will be handled and execute |callback| either synchronously or asynchronously with the selected command ID. Return false (0) to cancel the menu.

| `function OnQuickMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; command_id: integer; event_flags: TCefEventFlags): boolean; override;`
This item has no description. Showing description inherited from ICefContextMenuHandler.OnQuickMenuCommand. Called to execute a command selected from the quick menu for a windowless browser. Return true (1) if the command was handled or false (0) for the default implementation. See TCefMenuId for command IDs that have default implementations.

| `procedure OnQuickMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); override;`
This item has no description. Showing description inherited from ICefContextMenuHandler.OnQuickMenuDismissed. Called when the quick menu for a windowless browser is dismissed irregardless of whether the menu was canceled or a command was selected.

| `procedure RemoveReferences; override;`
This item has no description. Showing description inherited from ICefContextMenuHandler.RemoveReferences. Custom procedure to clear all references.

| `constructor Create(const events : IChromiumEvents); reintroduce; virtual;`
This item has no description.

| `destructor Destroy; override;`
This item has no description.

Generated by PasDoc 0.16.0-snapshot.