J'essaie de définir une fenêtre similaire à Mission Control et Exposé. J'ai créé un NSWindow
personnalisé qui est transparent et a un contour similaire à this question, mais je ne veux pas que l'utilisateur interagisse avec cette fenêtre.Décrire une fenêtre système
Y at-il un moyen de le faire?
ci-dessous est mon habitude NSWindow, que j'ai appelé avec
windowOutline = [[WindowOutline alloc] initWithContentRect:rect styleMask:1 backing:NSBackingStoreBuffered defer:false];
[windowOutline makeKeyAndOrderFront:self];
[windowOutline drawRect:rect];
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)windowStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
{
self = [super
initWithContentRect:contentRect
styleMask:NSBorderlessWindowMask
backing:bufferingType
defer:flag];
if (self)
{
[self setOpaque:NO];
[self setBackgroundColor:[NSColor clearColor]];
}
return self;
}
- (void)drawRect:(NSRect)frame {
frame = NSInsetRect(self.frame, 3.0, 3.0);
[NSBezierPath setDefaultLineWidth:6.0];
NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:frame
xRadius:6.0 yRadius:6.0];
[[NSColor redColor] set];
[path stroke];
}
Qu'avez-vous essayé? Pourriez-vous poster un code pour accompagner votre description? – Jules
Là. Ajouté dedans. – agg23