-
Notifications
You must be signed in to change notification settings - Fork 0
/
LabStatusPanel.m
executable file
·56 lines (42 loc) · 1.16 KB
/
LabStatusPanel.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// LabStatusPanel.m
// LabStatus
//
// Created by Christian Pape on 07.10.08.
// Copyright 2008 cc-productions. All rights reserved.
//
#import "LabStatusPanel.h"
@implementation LabStatusPanel
- (id)init
{
if (![super init])
return nil;
return self;
}
- (BOOL)canBecomeMainWindow
{
// required to behave like a main NSWindow
return YES;
}
- (BOOL)isExcludedFromWindowsMenu
{
// required to behave like a main NSWindow
return NO;
}
- (void)awakeFromNib
{
// required to behave like a main NSWindow
[[NSApplication sharedApplication] addWindowsItem:self title:[self title] filename:NO];
// required to behave like a main NSWindow
[self setHidesOnDeactivate:NO];
// tell the controller to not cascade its windows (required for auto-save)
[[self windowController] setShouldCascadeWindows:NO];
// auto-save window positions
[self setFrameAutosaveName:[self representedFilename]];
// setting the behaviour concernig spaces
[self setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
//[self setCollectionBehavior:NSWindowCollectionBehaviorDefault];
// required to behave like a main NSWindow
[self setFloatingPanel:NO];
}
@end