• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Another Logic question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another Logic question


  • Subject: Re: Another Logic question
  • From: Howard Moon <email@hidden>
  • Date: Thu, 5 Dec 2002 14:38:28 -0800

On Thursday, December 5, 2002, at 02:22 PM, Andy wrote:


My drawing if fine, but my mouse tracking is offset by the difference between the Mixer window and my Pan window. Obviously, I need to subtract that difference from the mouse coordinates, but how do I get the Mixer window port handle in order to call GetPortBounds on it and make my subtraction?

I'm not sure that's really what you want to do ? It seems odd that you need to subtract the difference between two windows! (You should never really need to do that). It sounds more like you are receiving global mouse coords when you actually want local coords.

One thing with Logic is that the AU window port is not always the current port when mouse tracking. It depends on how you are receiving or generating your mouse events, but you may need to call SetPort() on the window to make sure it is current. Also your tracking code should always be aware of the base coordinate system. This can get tricky if you're mixing core-graphics with carbon/quickdraw because you have the added complexity of inverted origins, CG origin is at bottom-left, QD is top-right.



Andy,

GetMouse returns local coordinates, but the coordinates I was getting were relative to the parent window (The Track Mixer), not to the view window. The strange thing is that I my drawing functions were correct. So I'm not sure how setting the port would have helped. Anyway, using Urs' suggestion, I changed to calling GetGlobalMouse and subtracting the window+control coordinates to see where I was relative to my custom control.

That worked perfectly.

Now I've got a new problem:

I updated to the latest SDK, and what did I find??? Changes made to the Base Classes (AUCarbonViewCntrol, etc.) apparently now allow the host (Logic Audio in this case) to specify the appearance and event handling of controls in my view. So, instead of a white window with the Aqua look and feel, I now get vst-style (I guess) windows and controls, with a blue background, sliders with strange octagonal handles, and I no longer get my custom control mouse or drawing events. So how do I do custom drawing now??? My custom slider shows up like all the other sliders! (I was doing the drawing myself, as well as the mouse tracking.)

If I run under Audio Unit Hosting, my component does not even show up! (The window shrinks to just the list of songs, with no visible controls!)

I'm totally confused now. Has there been some major change to Audio Units that I need to be aware of (and missed)?

Howard
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Another Logic question
      • From: Andy <email@hidden>
References: 
 >Re: Another Logic question (From: Andy <email@hidden>)

  • Prev by Date: Re: Another Logic question
  • Next by Date: Re: Another Logic question
  • Previous by thread: Re: Another Logic question
  • Next by thread: Re: Another Logic question
  • Index(es):
    • Date
    • Thread