Overlay windows
Overlay windows
- Subject: Overlay windows
- From: Ken Tabb <email@hidden>
- Date: Fri, 29 Apr 2005 16:24:01 +0100
Afternoon folks (over here anyway),
I'm about to add an overlay window over my graphics view so as to
remove the need to frequently redraw the (expensive) graphics
unnecessarily, and I have a few questions that I'd like to ask. I've
watched WWDC 2004's Cocoa Tips & Tricks session (411) where they
discuss creating an overlay window as a child window of the 'visible'
window, but there are some complexities I'd like to know the answer to:
[1] The overlay view needs to stay locked onto (same size / position
as) my graphics view. Bearing in mind my graphics window has a toolbar
that the user may show / hide mid-app, how do I guarantee that my
overlay view fits over my graphics view, and that it does not appear an
NSToolBar's height above / below it? Do I just catch the
graphicsWindows -windowDidResize notification and update then?
[2] My graphics view is inside a scrollview. Bearing in mind it is the
job of the overlay view to draw things (eg. selection handles) over the
appropriate objects in the graphics view, it's important that the
overlay view respects the scrolled location of the graphics view. So
what's the easiest way of tallying the overlay view's scrolled position
to the graphics view's scrolled position? Do I even need the overlay
view to be in a scrollview, or should I just offset the overlayView's
coordinate system relative to the scrolled position of the
graphicsView?
If notifications wouldn't work in [1] I'm thinking maybe bindings could
be used to bind the [[overlayWindow contentView] frame] to
[[graphicsWindow contentView] frame], which should allow for a toolbar
shifting the graphics window's contentView up / down.
Ditto I was wondering if I could somehow bind the overlayView's frame,
bounds and scrolled position to the graphicsView's respective
attributes, so that my selection handles appear in the right places
(and are only drawn for visible objects etc.)?
Stop me if I'm barking up the wrong tree here 8^)
Have a great weekend, especially those of you lucky enough to get your
ADC Tiger discs today (we live in the sticks here in the UK!),
Ken
- - - - - - - - - -
Dr. Ken Tabb
Mac & UNIX Developer - Health & Human Sciences
Machine Vision & Neural Network researcher - School of Computer Science
University of Hertfordshire, UK
http://www.health.herts.ac.uk/ken/
Certified non-Microsoft Solution Provider
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden