The OpenD Programming Language

ICoreWebView2ContextMenuItem

Undocumented in source.

Members

Functions

add_CustomItemSelected
HRESULT add_CustomItemSelected(ICoreWebView2CustomItemSelectedEventHandler eventHandler, EventRegistrationToken* token)

Add an event handler for the CustomItemSelected event. CustomItemSelected event is raised when the user selects this ContextMenuItem. Will only be raised for end developer created context menu items

get_Children
HRESULT get_Children(ICoreWebView2ContextMenuItemCollection* value)

Gets the list of children menu items through a ContextMenuItemCollection if the kind is Submenu. If the kind is not submenu, will return null.

get_CommandId
HRESULT get_CommandId(INT32* value)

Gets the Command ID for the ContextMenuItem. Use this to report the SelectedCommandId in ContextMenuRequested event.

get_Icon
HRESULT get_Icon(IStream** value)

Gets the Icon for the ContextMenuItem in PNG, Bitmap or SVG formats in the form of an IStream. Stream will be rewound to the start of the image data.

get_IsChecked
HRESULT get_IsChecked(BOOL* value)

Gets the checked property of the ContextMenuItem, used if the kind is Check box or Radio.

get_IsEnabled
HRESULT get_IsEnabled(BOOL* value)

Gets the enabled property of the ContextMenuItem.

get_Kind
HRESULT get_Kind(COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND* value)

Gets the ContextMenuItem kind.

get_Label
HRESULT get_Label(LPWSTR* value)

Gets the localized label for the ContextMenuItem. Will contain an ampersand for characters to be used as keyboard accelerator.

get_Name
HRESULT get_Name(LPWSTR* value)

Gets the unlocalized name for the ContextMenuItem. Use this to distinguish between context menu item types. This will be the English label of the menu item in lower camel case. For example, the "Save as" menu item will be "saveAs". Extension menu items will be "extension", custom menu items will be "custom" and spellcheck items will be "spellCheck". Some example context menu item names are: - "saveAs" - "copyImage" - "openLinkInNewWindow" - "cut" - "copy" - "paste"

get_ShortcutKeyDescription
HRESULT get_ShortcutKeyDescription(LPWSTR* value)

Gets the localized keyboard shortcut for this ContextMenuItem. It will be the empty string if there is no keyboard shortcut. This is text intended to be displayed to the end user to show the keyboard shortcut. For example this property is Ctrl+Shift+I for the "Inspect" ContextMenuItem.

put_IsChecked
HRESULT put_IsChecked(BOOL value)

Sets the checked property of the ContextMenuItem. Must only be used for custom context menu items that are of kind Check box or Radio.

put_IsEnabled
HRESULT put_IsEnabled(BOOL value)

Sets the enabled property of the ContextMenuItem. Must only be used in the case of a custom context menu item. The default value for this is TRUE.

remove_CustomItemSelected
HRESULT remove_CustomItemSelected(EventRegistrationToken token)

Remove an event handler previously added with add_CustomItemSelected.

Meta