# Class TCEFMenuButtonComponent

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFMenuButtonComponent

## Declaration

`type TCEFMenuButtonComponent = class(TCEFLabelButtonComponent, ICefMenuButtonDelegateEvents)`

## Description

This item has no description.

## Hierarchy

- TObject
- TPersistent
- TComponent
- TCEFViewComponent
- TCEFButtonComponent
- TCEFLabelButtonComponent
- TCEFMenuButtonComponent

## Overview

### Fields

Protected | `FMenuButton: ICefMenuButton;`
Protected | `FOnMenuButtonPressed: TOnMenuButtonPressedEvent;`

### Methods

Protected | `procedure DestroyView; override;`
Protected | `procedure Initialize; override;`
Protected | `function GetInitialized: boolean; override;`
Protected | `function GetAsView: ICefView; override;`
Protected | `function GetAsButton: ICefButton; override;`
Protected | `function GetAsLabelButton: ICefLabelButton; override;`
Protected | `function GetAsMenuButton: ICefMenuButton; override;`
Protected | `procedure doOnMenuButtonPressed(const menu_button: ICefMenuButton; const screen_point: TCefPoint; const button_pressed_lock: ICefMenuButtonPressedLock);`
Protected | `procedure doCreateCustomView; override;`
Public | `procedure CreateMenuButton(const aText : ustring);`
Public | `procedure ShowMenu(const menu_model: ICefMenuModel; const screen_point: TCefPoint; anchor_position: TCefMenuAnchorPosition);`
Public | `procedure TriggerMenu;`

### Properties

Published | `property OnMenuButtonPressed : TOnMenuButtonPressedEvent read FOnMenuButtonPressed write FOnMenuButtonPressed;`

## Description

### Fields

Protected | `FMenuButton: ICefMenuButton;`
This item has no description.

Protected | `FOnMenuButtonPressed: TOnMenuButtonPressedEvent;`
ICefMenuButtonDelegateEvents

### Methods

Protected | `procedure DestroyView; override;`
This item has no description.

Protected | `procedure Initialize; override;`
This item has no description.

Protected | `function GetInitialized: boolean; override;`
This item has no description.

Protected | `function GetAsView: ICefView; override;`
This item has no description.

Protected | `function GetAsButton: ICefButton; override;`
This item has no description.

Protected | `function GetAsLabelButton: ICefLabelButton; override;`
This item has no description.

Protected | `function GetAsMenuButton: ICefMenuButton; override;`
This item has no description.

Protected | `procedure doOnMenuButtonPressed(const menu_button: ICefMenuButton; const screen_point: TCefPoint; const button_pressed_lock: ICefMenuButtonPressedLock);`
ICefMenuButtonDelegateEvents

Protected | `procedure doCreateCustomView; override;`
ICefViewDelegateEvents

Public | `procedure CreateMenuButton(const aText : ustring);`
Create a new MenuButton.

Public | `procedure ShowMenu(const menu_model: ICefMenuModel; const screen_point: TCefPoint; anchor_position: TCefMenuAnchorPosition);`
Show a menu with contents |menu_model|. |screen_point| specifies the menu position in screen coordinates. |anchor_position| specifies how the menu will be anchored relative to |screen_point|. This function should be called from ICefMenuButtonDelegate.OnMenuButtonPressed().

Public | `procedure TriggerMenu;`
Show the menu for this button. Results in a call to ICefMenuButtonDelegate.OnMenuButtonPressed().

### Properties

Published | `property OnMenuButtonPressed : TOnMenuButtonPressedEvent read FOnMenuButtonPressed write FOnMenuButtonPressed;`
Called when |button| is pressed. Call ICefMenuButton.ShowMenu() to show a popup menu at |screen_point|. When showing a custom popup such as a window keep a reference to |button_pressed_lock| until the popup is hidden to maintain the pressed button state.

Generated by PasDoc 1.0.4.