# Class TCefMenuModelRef

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFMenuModel

## Declaration

`type TCefMenuModelRef = class(TCefBaseRefCountedRef, ICefMenuModel)`

## Description

This item has no description.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedRef
- TCefMenuModelRef

## Overview

### Methods

| `function IsSubMenu: Boolean;`
| `function Clear: Boolean;`
| `function GetCount: NativeUInt;`
| `function AddSeparator: Boolean;`
| `function AddItem(commandId: Integer; const text: ustring): Boolean;`
| `function AddCheckItem(commandId: Integer; const text: ustring): Boolean;`
| `function AddRadioItem(commandId: Integer; const text: ustring; groupId: Integer): Boolean;`
| `function AddSubMenu(commandId: Integer; const text: ustring): ICefMenuModel;`
| `function InsertSeparatorAt(index: NativeUInt): Boolean;`
| `function InsertItemAt(index: NativeUInt; commandId: Integer; const text: ustring): Boolean;`
| `function InsertCheckItemAt(index: NativeUInt; commandId: Integer; const text: ustring): Boolean;`
| `function InsertRadioItemAt(index: NativeUInt; commandId: Integer; const text: ustring; groupId: Integer): Boolean;`
| `function InsertSubMenuAt(index: NativeUInt; commandId: Integer; const text: ustring): ICefMenuModel;`
| `function Remove(commandId: Integer): Boolean;`
| `function RemoveAt(index: NativeUInt): Boolean;`
| `function GetIndexOf(commandId: Integer): Integer;`
| `function GetCommandIdAt(index: NativeUInt): Integer;`
| `function SetCommandIdAt(index: NativeUInt; commandId: Integer): Boolean;`
| `function GetLabel(commandId: Integer): ustring;`
| `function GetLabelAt(index: NativeUInt): ustring;`
| `function SetLabel(commandId: Integer; const text: ustring): Boolean;`
| `function SetLabelAt(index: NativeUInt; const text: ustring): Boolean;`
| `function GetType(commandId: Integer): TCefMenuItemType;`
| `function GetTypeAt(index: NativeUInt): TCefMenuItemType;`
| `function GetGroupId(commandId: Integer): Integer;`
| `function GetGroupIdAt(index: NativeUInt): Integer;`
| `function SetGroupId(commandId, groupId: Integer): Boolean;`
| `function SetGroupIdAt(index: NativeUInt; groupId: Integer): Boolean;`
| `function GetSubMenu(commandId: Integer): ICefMenuModel;`
| `function GetSubMenuAt(index: NativeUInt): ICefMenuModel;`
| `function IsVisible(commandId: Integer): Boolean;`
| `function isVisibleAt(index: NativeUInt): Boolean;`
| `function SetVisible(commandId: Integer; visible: Boolean): Boolean;`
| `function SetVisibleAt(index: NativeUInt; visible: Boolean): Boolean;`
| `function IsEnabled(commandId: Integer): Boolean;`
| `function IsEnabledAt(index: NativeUInt): Boolean;`
| `function SetEnabled(commandId: Integer; enabled: Boolean): Boolean;`
| `function SetEnabledAt(index: NativeUInt; enabled: Boolean): Boolean;`
| `function IsChecked(commandId: Integer): Boolean;`
| `function IsCheckedAt(index: NativeUInt): Boolean;`
| `function setChecked(commandId: Integer; checked: Boolean): Boolean;`
| `function setCheckedAt(index: NativeUInt; checked: Boolean): Boolean;`
| `function HasAccelerator(commandId: Integer): Boolean;`
| `function HasAcceleratorAt(index: NativeUInt): Boolean;`
| `function SetAccelerator(commandId, keyCode: Integer; shiftPressed, ctrlPressed, altPressed: Boolean): Boolean;`
| `function SetAcceleratorAt(index: NativeUInt; keyCode: Integer; shiftPressed, ctrlPressed, altPressed: Boolean): Boolean;`
| `function RemoveAccelerator(commandId: Integer): Boolean;`
| `function RemoveAcceleratorAt(index: NativeUInt): Boolean;`
| `function GetAccelerator(commandId: Integer; out keyCode: Integer; out shiftPressed, ctrlPressed, altPressed: Boolean): Boolean;`
| `function GetAcceleratorAt(index: NativeUInt; out keyCode: Integer; out shiftPressed, ctrlPressed, altPressed: Boolean): Boolean;`
| `function SetColor(commandId: Integer; colorType: TCefMenuColorType; color: TCefColor): Boolean;`
| `function SetColorAt(index: Integer; colorType: TCefMenuColorType; color: TCefColor): Boolean;`
| `function GetColor(commandId: Integer; colorType: TCefMenuColorType; out color: TCefColor): Boolean;`
| `function GetColorAt(index: Integer; colorType: TCefMenuColorType; out color: TCefColor): Boolean;`
| `function SetFontList(commandId: Integer; const fontList: ustring): Boolean;`
| `function SetFontListAt(index: Integer; const fontList: ustring): Boolean;`
| `class function UnWrap(data: Pointer): ICefMenuModel;`
| `class function New(const delegate: ICefMenuModelDelegate): ICefMenuModel;`

## Description

### Methods

| `function IsSubMenu: Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.IsSubMenu. Returns true (1) if this menu is a submenu.

| `function Clear: Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.Clear. Clears the menu. Returns true (1) on success.

| `function GetCount: NativeUInt;`
This item has no description. Showing description inherited from ICefMenuModel.GetCount. Returns the number of items in this menu.

| `function AddSeparator: Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.AddSeparator. Add a separator to the menu. Returns true (1) on success.

| `function AddItem(commandId: Integer; const text: ustring): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.AddItem. Add an item to the menu. Returns true (1) on success.

| `function AddCheckItem(commandId: Integer; const text: ustring): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.AddCheckItem. Add a check item to the menu. Returns true (1) on success.

| `function AddRadioItem(commandId: Integer; const text: ustring; groupId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.AddRadioItem. Add a radio item to the menu. Only a single item with the specified |group_id| can be checked at a time. Returns true (1) on success.

| `function AddSubMenu(commandId: Integer; const text: ustring): ICefMenuModel;`
This item has no description. Showing description inherited from ICefMenuModel.AddSubMenu. Add a sub-menu to the menu. The new sub-menu is returned.

| `function InsertSeparatorAt(index: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.InsertSeparatorAt. Insert a separator in the menu at the specified |index|. Returns true (1) on success.

| `function InsertItemAt(index: NativeUInt; commandId: Integer; const text: ustring): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.InsertItemAt. Insert an item in the menu at the specified |index|. Returns true (1) on success.

| `function InsertCheckItemAt(index: NativeUInt; commandId: Integer; const text: ustring): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.InsertCheckItemAt. Insert a check item in the menu at the specified |index|. Returns true (1) on success.

| `function InsertRadioItemAt(index: NativeUInt; commandId: Integer; const text: ustring; groupId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.InsertRadioItemAt. Insert a radio item in the menu at the specified |index|. Only a single item with the specified |group_id| can be checked at a time. Returns true (1) on success.

| `function InsertSubMenuAt(index: NativeUInt; commandId: Integer; const text: ustring): ICefMenuModel;`
This item has no description. Showing description inherited from ICefMenuModel.InsertSubMenuAt. Insert a sub-menu in the menu at the specified |index|. The new sub-menu is returned.

| `function Remove(commandId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.Remove. Removes the item with the specified |command_id|. Returns true (1) on success.

| `function RemoveAt(index: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.RemoveAt. Removes the item at the specified |index|. Returns true (1) on success.

| `function GetIndexOf(commandId: Integer): Integer;`
This item has no description. Showing description inherited from ICefMenuModel.GetIndexOf. Returns the index associated with the specified |command_id| or -1 if not found due to the command id not existing in the menu.

| `function GetCommandIdAt(index: NativeUInt): Integer;`
This item has no description. Showing description inherited from ICefMenuModel.GetCommandIdAt. Returns the command id at the specified |index| or -1 if not found due to invalid range or the index being a separator.

| `function SetCommandIdAt(index: NativeUInt; commandId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetCommandIdAt. Sets the command id at the specified |index|. Returns true (1) on success.

| `function GetLabel(commandId: Integer): ustring;`
This item has no description. Showing description inherited from ICefMenuModel.GetLabel. Returns the label for the specified |command_id| or NULL if not found.

| `function GetLabelAt(index: NativeUInt): ustring;`
This item has no description. Showing description inherited from ICefMenuModel.GetLabelAt. Returns the label at the specified |index| or NULL if not found due to invalid range or the index being a separator.

| `function SetLabel(commandId: Integer; const text: ustring): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetLabel. Sets the label for the specified |command_id|. Returns true (1) on success.

| `function SetLabelAt(index: NativeUInt; const text: ustring): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetLabelAt. Set the label at the specified |index|. Returns true (1) on success.

| `function GetType(commandId: Integer): TCefMenuItemType;`
This item has no description. Showing description inherited from ICefMenuModel.GetType. Returns the item type for the specified |command_id|.

| `function GetTypeAt(index: NativeUInt): TCefMenuItemType;`
This item has no description. Showing description inherited from ICefMenuModel.GetTypeAt. Returns the item type at the specified |index|.

| `function GetGroupId(commandId: Integer): Integer;`
This item has no description. Showing description inherited from ICefMenuModel.GetGroupId. Returns the group id for the specified |command_id| or -1 if invalid.

| `function GetGroupIdAt(index: NativeUInt): Integer;`
This item has no description. Showing description inherited from ICefMenuModel.GetGroupIdAt. Returns the group id at the specified |index| or -1 if invalid.

| `function SetGroupId(commandId, groupId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetGroupId. Sets the group id for the specified |command_id|. Returns true (1) on success.

| `function SetGroupIdAt(index: NativeUInt; groupId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetGroupIdAt. Sets the group id at the specified |index|. Returns true (1) on success.

| `function GetSubMenu(commandId: Integer): ICefMenuModel;`
This item has no description. Showing description inherited from ICefMenuModel.GetSubMenu. Returns the submenu for the specified |command_id| or NULL if invalid.

| `function GetSubMenuAt(index: NativeUInt): ICefMenuModel;`
This item has no description. Showing description inherited from ICefMenuModel.GetSubMenuAt. Returns the submenu at the specified |index| or NULL if invalid.

| `function IsVisible(commandId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.IsVisible. Returns true (1) if the specified |command_id| is visible.

| `function isVisibleAt(index: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.isVisibleAt. Returns true (1) if the specified |index| is visible.

| `function SetVisible(commandId: Integer; visible: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetVisible. Change the visibility of the specified |command_id|. Returns true (1) on success.

| `function SetVisibleAt(index: NativeUInt; visible: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetVisibleAt. Change the visibility at the specified |index|. Returns true (1) on success.

| `function IsEnabled(commandId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.IsEnabled. Returns true (1) if the specified |command_id| is enabled.

| `function IsEnabledAt(index: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.IsEnabledAt. Returns true (1) if the specified |index| is enabled.

| `function SetEnabled(commandId: Integer; enabled: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetEnabled. Change the enabled status of the specified |command_id|. Returns true (1) on success.

| `function SetEnabledAt(index: NativeUInt; enabled: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetEnabledAt. Change the enabled status at the specified |index|. Returns true (1) on success.

| `function IsChecked(commandId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.IsChecked. Returns true (1) if the specified |command_id| is checked. Only applies to check and radio items.

| `function IsCheckedAt(index: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.IsCheckedAt. Returns true (1) if the specified |index| is checked. Only applies to check and radio items.

| `function setChecked(commandId: Integer; checked: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.setChecked. Check the specified |command_id|. Only applies to check and radio items. Returns true (1) on success.

| `function setCheckedAt(index: NativeUInt; checked: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.setCheckedAt. Check the specified |index|. Only applies to check and radio items. Returns true (1) on success.

| `function HasAccelerator(commandId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.HasAccelerator. Returns true (1) if the specified |command_id| has a keyboard accelerator assigned.

| `function HasAcceleratorAt(index: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.HasAcceleratorAt. Returns true (1) if the specified |index| has a keyboard accelerator assigned.

| `function SetAccelerator(commandId, keyCode: Integer; shiftPressed, ctrlPressed, altPressed: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetAccelerator. Set the keyboard accelerator for the specified |command_id|. |key_code| can be any virtual key or character value. Returns true (1) on success.

| `function SetAcceleratorAt(index: NativeUInt; keyCode: Integer; shiftPressed, ctrlPressed, altPressed: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetAcceleratorAt. Set the keyboard accelerator at the specified |index|. |key_code| can be any virtual key or character value. Returns true (1) on success.

| `function RemoveAccelerator(commandId: Integer): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.RemoveAccelerator. Remove the keyboard accelerator for the specified |command_id|. Returns true (1) on success.

| `function RemoveAcceleratorAt(index: NativeUInt): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.RemoveAcceleratorAt. Remove the keyboard accelerator at the specified |index|. Returns true (1) on success.

| `function GetAccelerator(commandId: Integer; out keyCode: Integer; out shiftPressed, ctrlPressed, altPressed: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.GetAccelerator. Retrieves the keyboard accelerator for the specified |command_id|. Returns true (1) on success.

| `function GetAcceleratorAt(index: NativeUInt; out keyCode: Integer; out shiftPressed, ctrlPressed, altPressed: Boolean): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.GetAcceleratorAt. Retrieves the keyboard accelerator for the specified |index|. Returns true (1) on success.

| `function SetColor(commandId: Integer; colorType: TCefMenuColorType; color: TCefColor): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.SetColor. Set the explicit color for |command_id| and |color_type| to |color|. Specify a |color| value of 0 to remove the explicit color. If no explicit color or default color is set for |color_type| then the system color will be used. Returns true (1) on success.

| `function SetColorAt(index: Integer; colorType: TCefMenuColorType; color: TCefColor): Boolean;`

This item has no description. Showing description inherited from ICefMenuModel.SetColorAt.

Set the explicit color for |command_id| and |index| to |color|. Specify a |color| value of 0 to remove the explicit color. Specify an |index| value of -1 to set the default color for items that do not have an explicit color set. If no explicit color or default color is set for |color_type| then the system color will be used. Returns true (1) on success.

| `function GetColor(commandId: Integer; colorType: TCefMenuColorType; out color: TCefColor): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.GetColor. Returns in |color| the color that was explicitly set for |command_id| and |color_type|. If a color was not set then 0 will be returned in |color|. Returns true (1) on success.

| `function GetColorAt(index: Integer; colorType: TCefMenuColorType; out color: TCefColor): Boolean;`
This item has no description. Showing description inherited from ICefMenuModel.GetColorAt. Returns in |color| the color that was explicitly set for |command_id| and |color_type|. Specify an |index| value of -1 to return the default color in |color|. If a color was not set then 0 will be returned in |color|. Returns true (1) on success.

| `function SetFontList(commandId: Integer; const fontList: ustring): Boolean;`

This item has no description. Showing description inherited from ICefMenuModel.SetFontList.

Sets the font list for the specified |command_id|. If |font_list| is NULL the system font will be used. Returns true (1) on success. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a comma-separated list of font family names, - STYLES is an optional space-separated list of style names (case-sensitive "Bold" and "Italic" are supported), and - SIZE is an integer font size in pixels with the suffix "px".

Here are examples of valid font description strings: - "Arial, Helvetica, Bold Italic 14px" - "Arial, 14px"

| `function SetFontListAt(index: Integer; const fontList: ustring): Boolean;`

This item has no description. Showing description inherited from ICefMenuModel.SetFontListAt.

Sets the font list for the specified |index|. Specify an |index| value of -1 to set the default font. If |font_list| is NULL the system font will be used. Returns true (1) on success. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a comma-separated list of font family names, - STYLES is an optional space-separated list of style names (case-sensitive "Bold" and "Italic" are supported), and - SIZE is an integer font size in pixels with the suffix "px".

Here are examples of valid font description strings: - "Arial, Helvetica, Bold Italic 14px" - "Arial, 14px"

| `class function UnWrap(data: Pointer): ICefMenuModel;`
This item has no description.

| `class function New(const delegate: ICefMenuModelDelegate): ICefMenuModel;`
This item has no description.

Generated by PasDoc 0.17.0.snapshot.