Re: Carbon Views in Logic 6.3.3
Re: Carbon Views in Logic 6.3.3
- Subject: Re: Carbon Views in Logic 6.3.3
- From: Pavol Markovic <email@hidden>
- Date: Tue, 11 Oct 2005 13:21:05 +0200
This is because Logic Pre-7 passes non-zero offset seen in CreateUI
method (another good testing host for UI is CoreAudio SDK's
AudioUnitHosting). You've done correct thing by uncommenting the line.
I think the pop-up menus offset problem was fixed in head branch of
vstgui, you can try comparing the sources or ask Arne at vstgui-devel
mailing list (but I've just realized you've already done it).
Best regards,
PM
On Oct 11, 2005, at 12:04 PM, Muon Software Ltd - Dave wrote:
I've managed to get my AU to pass validation, but I'm having now having
problems with the plugin's editor in various hosts. Since this is a
direct
port of a VST plugin that uses VSTGUI3 I used the drawtest example code
(downloadable from the VSTGUI CVS with the tag vstgui_300) to get me
started
and so far it works pretty well.
The editor is drawn at the correct location in the host's window in
Logic
7.1.1, Garageband and AU Lab. However in Logic 6.3.3 the editor is
drawn
over the top of the toolbar Logic adds to the top of the window, and a
white
border appears at the bottom.
There's a commented out line in the drawtest example which I copied
from as
follows:-
OSStatus VSTGUIAUView::CreateUI(Float32 xoffset, Float32 yoffset)
{
m_ptrPlugin=NULL;
UInt32 propertySize=sizeof(m_ptrPlugin);
if
(AudioUnitGetProperty(GetEditAudioUnit(),kTachyonPointerProperty,kAudio
UnitS
cope_Global,0,&m_ptrPlugin,&propertySize)==noErr)
{
assert(m_ptrPlugin!=NULL);
editor = new CMuonTachyonEditor (m_ptrPlugin);
WindowRef window = GetCarbonWindow ();
editor->open (window);
m_ptrPlugin->setPtrEditor((CMuonTachyonEditor*)editor);
// HIViewMoveBy ((HIViewRef)editor->getFrame ()->getPlatformControl
(),
xoffset, yoffset);
EmbedControl ((HIViewRef)editor->getFrame ()->getPlatformControl ());
CRect fsize = editor->getFrame ()->getViewSize (fsize);
SizeControl (mCarbonPane, fsize.width (), fsize.height ());
CreateEventLoopTimer (kEventDurationSecond, kEventDurationSecond /
24);
HIViewSetVisible ((HIViewRef)editor->getFrame ()->getPlatformControl
(),
true);
HIViewSetNeedsDisplay ((HIViewRef)editor->getFrame
()->getPlatformControl
(), true);
}
return noErr;
};
If I uncomment the line "HIViewMoveBy", the editor appears correctly in
Logic 6.3.3, but my editor's dynamic pop-up menus appear in the wrong
position when triggered - they are shifted down by roughly the same
amount
as the editor is from the top of the host window. It is as if the mouse
coordinates used to work out where the context menu should appear are
relative to the top of the window (not the top of the editor!) and are
then
shifted again by the editor offset. The editor and context menus appear
correctly in Logic 7.1.1 etc. regardless of whether or not the
HIViewMoveBy
call is commented out or not.
Anyone got any suggestions?
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden