forked from flit/MidiKeys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OverlayIndicator.h
51 lines (39 loc) · 1.08 KB
/
OverlayIndicator.h
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
//
// OverlayIndicator.h
// MidiKeys
//
// Created by Chris Reed on Tue Jun 17 2003.
// Copyright (c) 2003 Chris Reed. All rights reserved.
//
#import <Cocoa/Cocoa.h>
//! Margin around the image.
#define kOverlayIndicatorMargin 40.0f
/*!
* @brief Manages an indicator popup window.
*
* This class manages a one-shot overlay window that displays an arbitrary
* image. It is very similar to the overlay that appears when you adjust
* volume or contrast from the keyboard.
*/
@interface OverlayIndicator : NSObject
{
NSView * _contentView;
NSWindow *_overlayWindow;
NSTimer *_timer;
id _delegate;
NSString * _message;
}
//! @brief Designated initializer.
- initWithView:(NSView *)theView;
//! @brief Create an overlay showing an image.
- initWithImage:(NSImage *)theImage;
- (void)setDelegate:(id)theDelegate;
- (id)delegate;
- (NSString *)message;
- (void)setMessage:(NSString *)theMessage;
- (void)showUntilDate:(NSDate *)hideDate;
- (void)close;
@end
@interface NSObject (OverlayIndicatorDelegate)
- (void)overlayIndicatorDidClose:(OverlayIndicator *)theIndicator;
@end