IPlugView

Plug-in definition of a view. \ingroup pluginGUI vstIPlug vst300 - [plug imp] - [released: 3.0.0]

\par Sizing of a view Usually the size of a Plug-in view is fixed. But both the host and the Plug-in can cause a view to be resized: \n - <b> Host </b> : If IPlugView::canResize () returns kResultTrue the host will setup the window so that the user can resize it. While the user resizes the window IPlugView::checkSizeConstraint () is called, allowing the Plug-in to change the size to a valid rect. The host then resizes the window to this rect and has to call IPlugView::onSize (). \n \n - <b> Plug-in </b> : The Plug-in can call IPlugFrame::resizeView () and cause the host to resize the window. Afterwards in the same callstack the host has to call IPlugView::onSize () if a resize is needed (size was changed). Note that if the host calls IPlugView::getSize () before calling IPlugView::onSize () (if needed), it will get the current (old) size not the wanted one!! Here the calling sequence: * plug-in->host: IPlugFrame::resizeView (newSize) * host->plug-in (optional): IPlugView::getSize () returns the currentSize (not the newSize)! * host->plug-in: if newSize is different from the current size: IPlugView::onSize (newSize) * host->plug-in (optional): IPlugView::getSize () returns the newSize \n <b>Please only resize the platform representation of the view when IPlugView::onSize () is called.</b>

\par Keyboard handling The Plug-in view receives keyboard events from the host. A view implementation must not handle keyboard events by the means of platform callbacks, but let the host pass them to the view. The host depends on a proper return value when IPlugView::onKeyDown is called, otherwise the Plug-in view may cause a malfunction of the host's key command handling!

\see IPlugFrame, \ref platformUIType

Members

Functions

attached
tresult attached(void* parent, FIDString type)

The parent window of the view has been created, the (platform) representation of the view should now be created as well. Note that the parent is owned by the caller and you are not allowed to alter it in any way other than adding your own views. Note that in this call the Plug-in could call a IPlugFrame::resizeView ()! \param parent : platform handle of the parent window or view \param type : \ref platformUIType which should be created

canResize
tresult canResize()

Is view sizable by user.

checkSizeConstraint
tresult checkSizeConstraint(ViewRect* rect)

On live resize this is called to check if the view can be resized to the given rect, if not * adjust the rect to the allowed size.

getSize
tresult getSize(ViewRect* size)

Returns the size of the platform representation of the view.

isPlatformTypeSupported
tresult isPlatformTypeSupported(FIDString type)

Is Platform UI Type supported \param type : IDString of \ref platformUIType

onFocus
tresult onFocus(TBool state)

Focus changed message.

onKeyDown
tresult onKeyDown(char16 key, int16 keyCode, int16 modifiers)

Handling of keyboard events : Key Down. \param key : unicode code of key \param keyCode : virtual keycode for non ascii keys - see \ref VirtualKeyCodes in keycodes.h \param modifiers : any combination of modifiers - see \ref KeyModifier in keycodes.h \return kResultTrue if the key is handled, otherwise kResultFalse. \n <b> Please note that kResultTrue must only be returned if the key has really been handled. </b> Otherwise key command handling of the host might be blocked!

onKeyUp
tresult onKeyUp(char16 key, int16 keyCode, int16 modifiers)

Handling of keyboard events : Key Up. \param key : unicode code of key \param keyCode : virtual keycode for non ascii keys - see \ref VirtualKeyCodes in keycodes.h \param modifiers : any combination of KeyModifier - see \ref KeyModifier in keycodes.h \return kResultTrue if the key is handled, otherwise return kResultFalse.

onSize
tresult onSize(ViewRect* newSize)

Resizes the platform representation of the view to the given rect. Note that if the Plug-in * requests a resize (IPlugFrame::resizeView ()) onSize has to be called afterward.

onWheel
tresult onWheel(float distance)

Handling of mouse wheel.

removed
tresult removed()

The parent window of the view is about to be destroyed. You have to remove all your own views from the parent window or view.

setFrame
tresult setFrame(IPlugFrame frame)

Sets IPlugFrame object to allow the Plug-in to inform the host about resizing.

Static variables

iid
TUID iid;
Undocumented in source.

Inherited Members

From FUnknown

iid
TUID iid;
Undocumented in source.

Meta