From 58f8437f4b8b741ddc8e7bcde21bf983cc618430 Mon Sep 17 00:00:00 2001 From: pepper Date: Sat, 10 Jan 2015 21:37:24 -0800 Subject: added vstsdk --- .../vstgui/Documentation/html/maceditor.html | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 vendor/vstsdk2.4/vstgui.sf/vstgui/Documentation/html/maceditor.html (limited to 'vendor/vstsdk2.4/vstgui.sf/vstgui/Documentation/html/maceditor.html') diff --git a/vendor/vstsdk2.4/vstgui.sf/vstgui/Documentation/html/maceditor.html b/vendor/vstsdk2.4/vstgui.sf/vstgui/Documentation/html/maceditor.html new file mode 100644 index 0000000..702648f --- /dev/null +++ b/vendor/vstsdk2.4/vstgui.sf/vstgui/Documentation/html/maceditor.html @@ -0,0 +1,73 @@ + + +VSTGUI: Macintosh Editor as HIViewRef + + + + +
+
+

Macintosh Editor as HIViewRef

+Introduction

+In the beginning of VST the Plug-In's GUI was attached at the left-top corner without a mechanism for the host to move it. This and the evolution of the macintosh platform makes it necessary to change this old behaviour. The modern way on Mac OS X to do UI design with C/C++ is to use HIViews and window compositing.
+ The VST SDK 2.4 requires the Plug-In to attach one HIView to the window and that this HIView can be moved around and that it can be embedded into other subviews.
+ Hosts which implement VST 2.4 need to provide a window to the Plug-In which is composited if the Plug-In itself uses 2.4. If the Plug-In uses an earlier VST SDK it should provide a non composited window.

+


+

+Adding an HIView on effEditOpen

+As before the ptr in effEditOpen is a WindowRef. You need to add one HIView to the content view of this window.

+

HIViewRef contentView;
+if (HIViewFindByID (HIViewGetRoot ((WindowRef)ptr, kHIViewWindowContentID, &contentView) == noErr)
+        HIViewAddSubview (contentView, myPluginView);
+

+


+

+Closing on effEditClose

+When effEditClose is called you should remove your HIView from the window.

+

HIViewRemoveFromSuperview (myPluginView);
+

+Don't do anything with the window. It is not your window.

+


+

+Resizing the Plug-In

+If you want to resize your view, just do it, but don't resize the host window.

+

HIRect pluginBounds;
+HIViewGetFrame (myPluginView, &pluginBounds);
+pluginBounds.size.width = newWidth;
+pluginBounds.size.height = newHeight;
+HIViewSetFrame (myPluginView, &pluginBounds);
+

+The host needs to listen to bounds changes on the Plug-In view and resize its window accordingly.

+


+

+No more effEditDraw, effEditIdle, effEditMouse, effEditTop, effEditSleep

+You need to use Carbon Events now, which you register on the HIView, not on the window if possible. But don't remove these opcodes from your editor yet.

+


+

+VST 2.4 Plug-Ins and VST 2.3 Hosts

+Now there is a conflict situation that VST 2.3 hosts may not work with HIViews and window compositing. Therefore you need at least support effEditDraw, so that your Plug-In draws correctly in these hosts. Mouse, idle and activation events can be handled via Carbon Events.

+

See also:
Apple HIView Programming Guide
+ + + + Empty + + + + + + +
+
+
+Copyright ©2006 Steinberg Media Technologies. +All Rights Reserved. +
+ + + -- cgit v1.2.3-70-g09d2