Re: How to find all clipping siblings for a view?
Re: How to find all clipping siblings for a view?
- Subject: Re: How to find all clipping siblings for a view?
- From: "Norbert M. Doerner" <email@hidden>
- Date: Fri, 16 Apr 2010 10:40:38 +0200
For some reason I need to do a job which NSWindow usually does, when
it redraws itself (AFAIU) - I need to find all its views, which have z-
order higher than my view, then get their bounding rectangles, unite
them, subtract from the window content view bounding rectangle and
sect the result with my view bounding rectangle. This is because my
view uses QuickDraw to redraw itself, but those functions draw on
screen directly (AFAIU) and don't take into account other views,
located above current view.
Could anybody show the right way to go?
NSView *rootView;
NSArray *mySubViews
rootView = [theWindow contentView];
mySubViews = [rootView subviews];
mySubViews is any NSArray of NSViews. Go through them, and get the
frame for each of them, then do your math.
For certain view types, you may need to consider their subviews as
well, such as NSTabView, which has its own mySubViews = [aTabView
tabViewItems];
Alternatively, consider drawing your stuff into an NSImage and use an
image view to let Cocoa do all the magic for you...
Yours,
--
Norbert M. Doerner
CEO, West-Forest-Systems
In der Trift 13
56459 Langenhahn, Germany
Fon: +49 (2663) 91 70 128 (Central European Time Zone...)
Fax: +49 (2663) 91 70 126
AIM (iChat), Skype: cdfinderceo
Twitter: http://www.twitter.com/cdfinder
---------------------------------------------------------------------------------------------------
CDFinder - The Search Is Over! http://www.cdfinder.de/
Catalog and organize your photos, songs, videos, disks, data, anything...
NEW: CDFinder 5.7 - Better Cataloging than ever - and Geotagging.
Also catalogs MS Word, Quark XPress, Adobe InDesign
Illustrator. And more!
---------------------------------------------------------------------------------------------------
_______________________________________________
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