Basic: How to go about implementing such a view?
Basic: How to go about implementing such a view?
- Subject: Basic: How to go about implementing such a view?
- From: Matt Rajca <email@hidden>
- Date: Tue, 30 Dec 2008 22:35:46 -0600
Hi!
I am trying to figure out how to implement a 'Piano Roll' view in
Cocoa. Attached is a screenshot of what I'm trying to accomplish.
Disregard the keyboard on the left of the window and let's just focus
on the area with the colorful rectangles, symbolizing notes.
1. When drawing the light and dark grey rows which make up a
background, should I just use a loop with Quartz 2D/Cocoa Drawing calls?
2. When drawing the vertical lines, should I just use a loop with
Quartz 2D/Cocoa Drawing calls?
3. Should I put the notes (colorful rectangles) each in a separate
view (or Core Animation layer), or is it effective to just draw them
directly in the main view (same view in which the rows are drawn)? I
am eventually going to want to resize them and change their position
by dragging them around.
4. How would I go about changing the view's width as more notes
(rectangles) are added to the view? When enclosed in a NSScrollView,
would manipulating the width of the view also hide/show the horizontal
scrollbar appropriately?
Thanks!
~Matt
_______________________________________________
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