Re: highlight a nsview on click-drag?
Re: highlight a nsview on click-drag?
- Subject: Re: highlight a nsview on click-drag?
- From: Sandor Szatmari <email@hidden>
- Date: Tue, 17 Mar 2015 07:28:11 -0400
Graham,
> On Mar 15, 2015, at 18:57, Graham Cox <email@hidden> wrote:
>
> If I were designing this, I'd probably have a single NSView subclass that handled three things: a) optimally drawing the waveform, b) maintaining and drawing the playhead and
I like the simplicity of your design, but considering point b, how does a play head that spans multiple tracks, for a multi track editing interface, work? Presumably, we're talking about each view managing a single channel of audio. If there were many channels, would managing the play head in a separate, superimposed, view (or layer) be easier, or would you expect the play heads from each of the audio channel views be easily synchronized without any tear or drift?
> c) maintaining and drawing a selection rectangle. I wouldn't use additional views for the playhead and selection graphics because that's just asking for low performance (CALayers however, would be a different matter, and probably a good solution, but these can be created as part of a single view). Keep it all in one view where it's all nice and simple and you can use the fastest drawing techniques you can, such as low-level Core Graphics, or CALayers. You can then ask your view questions, such as "where is the playhead?", "what is my selection time range?" and so on. Presumably the answers to these are used to set propeties on the audio player itself which is independent of the view.
>
> --Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden