• 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
Basic: How to go about implementing such a view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


JPEG image


_______________________________________________

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

  • Prev by Date: Problem adding an entity to a to-many relationship
  • Next by Date: Need Xcode/Cocoa template for screensaver & interactive OpenGL app
  • Previous by thread: Problem adding an entity to a to-many relationship
  • Next by thread: Need Xcode/Cocoa template for screensaver & interactive OpenGL app
  • Index(es):
    • Date
    • Thread