robbieduncan, I tried playing around with your method, but it gets screwy if you don't use the NSColorPanel class.
Using poseAsClass: (marked as deprecated in Leopard), I got it to work:
Code:
@interface Blah : NSColorPanel {}
@end
@implementation Blah
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
{
windowStyle |= 8223;
return [super initWithContentRect:contentRect styleMask:windowStyle backing:bufferingType defer:deferCreation];
}
@end
@implementation Controller
+ (void)initialize
{
[[Blah class] poseAsClass:[NSColorPanel class]];
}
- (void)awakeFromNib
{
[NSApp orderFrontColorPanel:nil];
}
@end
As you can see, the the controls don't fit the HUD style. I didn't find in the documentation a style mask for HUD windows. It must be private? But I setup a HUD window in IB and figured it out was 8223, so that works. I also did a screenshot using NSTexturedBackgroundWindowMask, which looks much better.