VST 3 Interfaces: IContextMenu Class Reference
Author: Steinberg

VST 3 Interfaces VST 3.8 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
IContextMenu Class Referenceabstract

Context Menu interface: Vst::IContextMenu. More...

`#include <ivstcontextmenu.h>`

Inheritance diagram for IContextMenu:

## Public Types
typedef IContextMenuItem | Item

## Public Member Functions
virtual int32 | getItemCount ()=0
| Gets the number of menu items.
virtual tresult | getItem (int32 index, Item &item, IContextMenuTarget **target)=0
| Gets a menu item and its target (target could be not assigned).
virtual tresult | addItem (const Item &item, IContextMenuTarget *target)=0
| Adds a menu item and its target.
virtual tresult | removeItem (const Item &item, IContextMenuTarget *target)=0
| Removes a menu item.
virtual tresult | popup (UCoord x, UCoord y)=0
| Pop-ups the menu.
Public Member Functions inherited from FUnknown
virtual tresult | queryInterface (const TUID _iid, void **obj)=0
virtual uint32 | addRef ()=0
virtual uint32 | release ()=0

## Static Public Attributes
static const FUID | iid
Static Public Attributes inherited from FUnknown
static const FUID | iid

## Detailed Description

Context Menu interface: Vst::IContextMenu.

- [host imp]
- [create with IComponentHandler3::createContextMenu(..)]
- [released: 3.5.0]
- [optional]

A context menu is composed of Item (entry). A Item is defined by a name, a tag, a flag and a associated target (called when this item will be selected/executed). With IContextMenu the plug-in can retrieve a Item, add a Item, remove a Item and pop-up the menu.

See also
  IComponentHandler3 for more information.

## Member Typedef Documentation

## ◆ Item

typedef IContextMenuItem Item

## Member Function Documentation

## ◆ getItemCount()

virtual int32 getItemCount | ( |  | ) |
| pure virtual

Gets the number of menu items.

Note
  [UI-thread]

## ◆ getItem()

virtual tresult getItem | ( | int32 | index,
|  | Item & | item,
|  | IContextMenuTarget ** | target )
| pure virtual

Gets a menu item and its target (target could be not assigned).

Note
  [UI-thread]

## ◆ addItem()

virtual tresult addItem | ( | const Item & | item,
|  | IContextMenuTarget * | target )
| pure virtual

Adds a menu item and its target.

Note
  [UI-thread]

## ◆ removeItem()

virtual tresult removeItem | ( | const Item & | item,
|  | IContextMenuTarget * | target )
| pure virtual

Removes a menu item.

Note
  [UI-thread]

## ◆ popup()

virtual tresult popup | ( | UCoord | x,
|  | UCoord | y )
| pure virtual

Pop-ups the menu.

Coordinates are relative to the top-left position of the plug-ins view.

Note
  [UI-thread]

## Member Data Documentation

## ◆ iid

const FUID iid
| static

Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.