-
Notifications
You must be signed in to change notification settings - Fork 0
/
DrawerView.m
executable file
·42 lines (34 loc) · 976 Bytes
/
DrawerView.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
// ##############################################################
// DrawerView.m
// Magic Number Machine
//
// Created by Matt Gallagher on Sat Apr 26 2003.
// Copyright (c) 2003 Matt Gallagher. All rights reserved.
// ##############################################################
#import "DrawerView.h"
#import "DataManager.h"
//
// About the DrawerView
//
// Only exists to catch shift and option keys when the focus is in the drawer,
// otherwise we use standard window behaviour.
//
@implementation DrawerView
- (BOOL)allowsVibrancy {
return YES;
}
//
// flagsChanged
//
// Tells the data manager when the state of the shift or option keys changes.
//
- (void)flagsChanged:(NSEvent*)theEvent
{
NSEventModifierFlags newFlags = [theEvent modifierFlags];
// [dataManager optionIsPressed:(newFlags & NSAlternateKeyMask) != 0];
if ((newFlags & NSEventModifierFlagShift) != 0) {
[dataManager shiftIsPressed];
}
[super flagsChanged:theEvent];
}
@end