Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HiView vs WindowRef and bitmaps



Larry,

Actually, I don't want to fill the window. I thought I did, but then I discovered that the window (seems to) includes all the real estate, including the bottom margin (or margin I'd like to see) and the title bar. Perhaps this explains the issue better. I want to draw to a space inside the window, and I'm using the HiView to define that space.

Yes, but when I draw to it, I don't see it. Yes, that's probably because I'm not sure what I'm doing. But when I draw to the HiView that's in the nib, it shows.

The concept is valid, so I'm not sure why you aren't seeing the results. When are you drawing? In a kEventControlDraw handler you've installed on the content view?


There's almost certainly a good reason why this isn't showing, but I remembered that one reason I made the HiView in the first place is that it placed the graphics where I want them on the window.

I thought you wanted them to fill the content area.

[...]
Fair enough, though I've only seen one in the inspector. to find it, I click on the HiView, and then in the inspector, I choose Size at the top, and then Layout Rect, and then bottom/ left, width/height, and the bottom left are the y and x. Is there another X and Y in the inspector?

There's the popup's Top/Left option in IB, and values you can obtain programmatically. But if you want it to fill the window, all you need to do is drag it to the top left corner and let IB snap it to the corner, then do the same thing with the resize box in the lower right corner.


[...]
Criticism taken although I *think* I understand what I've solved: I need the HiView for a variety of reasons, and that view is a different size than the window.

Different size than the content view?

I need the window to be an appropriate size so that the HiView is the size I need for the image to have the original size and aspect ratio.

The content view is an HIViewRef. In the above code, what are the bounds of the content view? Are the height and width the same as the results of GetWindowBounds (window, kWindowContentRgn,...)?


BTW, it's old school, but have you tried SetWindowSize using the size of the image?

Larry

_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >HiView vs WindowRef and bitmaps (From: Daniel Birns <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Laurence Harris <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Daniel Birns <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Laurence Harris <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Daniel Birns <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Laurence Harris <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Daniel Birns <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Laurence Harris <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Daniel Birns <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Laurence Harris <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Daniel Birns <email@hidden>)
 >Re: HiView vs WindowRef and bitmaps (From: Laurence Harris <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.