JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
ivstcontextmenu.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------
2// Project : VST SDK
3//
4// Category : Interfaces
5// Filename : pluginterfaces/vst/ivstcontextmenu.h
6// Created by : Steinberg, 10/2010
7// Description : VST Context Menu Interfaces
8//
9//-----------------------------------------------------------------------------
10// This file is part of a Steinberg SDK. It is subject to the license terms
11// in the LICENSE file found in the top-level directory of this distribution
12// and at www.steinberg.net/sdklicenses.
13// No part of the SDK, including this file, may be copied, modified, propagated,
14// or distributed except according to the terms contained in the LICENSE file.
15//-----------------------------------------------------------------------------
16
17#pragma once
18
21
22//------------------------------------------------------------------------
24//------------------------------------------------------------------------
25
26namespace Steinberg {
27class IPlugView;
28
29namespace Vst {
30class IContextMenu;
31
32//------------------------------------------------------------------------
119{
120public:
126 virtual IContextMenu* PLUGIN_API createContextMenu (IPlugView* plugView, const ParamID* paramID) = 0;
127 //------------------------------------------------------------------------
128 static const FUID iid;
129};
130
131DECLARE_CLASS_IID (IComponentHandler3, 0x69F11617, 0xD26B400D, 0xA4B6B964, 0x7B6EBBAB)
132
133//------------------------------------------------------------------------
147{
148public:
150 virtual tresult PLUGIN_API executeMenuItem (int32 tag) = 0;
151 //------------------------------------------------------------------------
152 static const FUID iid;
153};
154
155DECLARE_CLASS_IID (IContextMenuTarget, 0x3CDF2E75, 0x85D34144, 0xBF86D36B, 0xD7C4894D)
156
157//------------------------------------------------------------------------
160{
162 int32 tag;
163 int32 flags;
164
165 enum Flags {
166 kIsSeparator = 1 << 0,
167 kIsDisabled = 1 << 1,
168 kIsChecked = 1 << 2,
169 kIsGroupStart = 1 << 3 | kIsDisabled,
170 kIsGroupEnd = 1 << 4 | kIsSeparator,
171 };
172};
173//------------------------------------------------------------------------
187class IContextMenu : public FUnknown
188{
189public:
190 typedef IContextMenuItem Item;
191
193 virtual int32 PLUGIN_API getItemCount () = 0;
194
196 virtual tresult PLUGIN_API getItem (int32 index, Item& item /*out*/, IContextMenuTarget** target /*out*/) = 0;
197
199 virtual tresult PLUGIN_API addItem (const Item& item, IContextMenuTarget* target) = 0;
200
202 virtual tresult PLUGIN_API removeItem (const Item& item, IContextMenuTarget* target) = 0;
203
205 virtual tresult PLUGIN_API popup (UCoord x, UCoord y) = 0;
206
207 //------------------------------------------------------------------------
208 static const FUID iid;
209};
210
211DECLARE_CLASS_IID (IContextMenu, 0x2E93C863, 0x0C9C4588, 0x97DBECF5, 0xAD17817D)
212
213//------------------------------------------------------------------------
214} // namespace Vst
215} // namespace Steinberg
216
217//------------------------------------------------------------------------
219//------------------------------------------------------------------------
Handling 16 Byte Globally Unique Identifiers.
Definition funknown.h:241
The basic interface of all interfaces.
Definition funknown.h:375
Plug-in definition of a view.
Definition iplugview.h:123
Extended host callback interface Vst::IComponentHandler3 for an edit controller.
virtual IContextMenu *PLUGIN_API createContextMenu(IPlugView *plugView, const ParamID *paramID)=0
Creates a host context menu for a plug-in:
Context Menu Item Target interface: Vst::IContextMenuTarget.
virtual tresult PLUGIN_API executeMenuItem(int32 tag)=0
Called when an menu item was executed.
Context Menu interface: Vst::IContextMenu.
virtual tresult PLUGIN_API getItem(int32 index, Item &item, IContextMenuTarget **target)=0
Gets a menu item and its target (target could be not assigned).
virtual tresult PLUGIN_API addItem(const Item &item, IContextMenuTarget *target)=0
Adds a menu item and its target.
virtual tresult PLUGIN_API removeItem(const Item &item, IContextMenuTarget *target)=0
Removes a menu item.
virtual tresult PLUGIN_API popup(UCoord x, UCoord y)=0
Pop-ups the menu.
virtual int32 PLUGIN_API getItemCount()=0
Gets the number of menu items.
int32 UCoord
Coordinates.
Definition ftypes.h:117
uint32 ParamID
parameter identifier
Definition vsttypes.h:81
TChar String128[128]
128 character UTF-16 string
Definition vsttypes.h:69
IContextMenuItem is an entry element of the context menu.
String128 name
Name of the item.
int32 tag
Identifier tag of the item.
int32 flags
Flags of the item.