Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

simX

macrumors 6502a
Original poster
May 28, 2002
765
4
Bay Area, CA
I'd like to figure out a way to create those cool black-looking style floating palettes that Apple often creates, like the transparent black palette in iPhoto 5 that allows you to adjust brightness, contrast, color levels, etc. I believe these are also used in Motion as well.

Basically it's like those bezel "windows" that come up when you increase or decrease the volume via the keyboard -- they come up for about 3 seconds and are transparent, and they fade away after about a second or so. The "windows" for my Xcode project are going to act similarly and look similar (i.e.: black/gray, partially transparent, all four corners are rounded), except that the delay to fade is going to be different -- on the order of 10 seconds.

Ideally these windows would also be easily accessible via Cocoa methods (and not Carbon, because I'm not entirely familiar with Carbon).

Anyone have any ideas? Thanks in advance.
 

Catfish_Man

macrumors 68030
Sep 13, 2001
2,579
2
Portland, OR
Apple's developer page has sample code for a round transparent window. You can probably work from there, although it might be somewhat tricky to duplicate the black Motion/Aperture/iPhoto style windows.
 

whooleytoo

macrumors 604
Aug 2, 2002
6,607
716
Cork, Ireland.
Catfish_Man said:
Apple's developer page has sample code for a round transparent window. You can probably work from there, although it might be somewhat tricky to duplicate the black Motion/Aperture/iPhoto style windows.

Yup, work from this example to create a custom window with no title bar or border, then you can use

Code:
	// Make the window translucent
	NSColor*	translucent = [NSColor colorWithDeviceRed:0.0 green:0.0 blue:0.0 alpha:0.6] ;
	[myWindow setBackgroundColor:translucent];

To set the window's colour and degree of translucency (tinker with the alpha parameter to suit your needs).
 

simX

macrumors 6502a
Original poster
May 28, 2002
765
4
Bay Area, CA
Catfish_Man said:
Apple's developer page has sample code for a round transparent window. You can probably work from there, although it might be somewhat tricky to duplicate the black Motion/Aperture/iPhoto style windows.

Can you give me a URL? The FunkyOverlayWindow example doesn't show how to modify the shape of a window -- the "funky overlay window" is still rectangular in shape. The cited example of the round window seems to be exactly the thing I need, but I can't find it.

[UPDATE: Found it!]
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.