-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFluidZip_Window.m
64 lines (45 loc) · 871 Bytes
/
FluidZip_Window.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
57
58
59
60
61
62
63
64
//
// FluidZip_Window.m
// FluidApp
#import "FluidZip_Window.h"
@implementation FluidZip_Window
- (void)setImage:(NSImage *)in_image
{
NSImageView *v = [[NSImageView alloc] init];
if (r_img) [r_img release];
r_img = in_image;
[r_img retain];
[v setImage:in_image];
[i_scrollView setDocumentView:v];
[i_scrollView setNeedsDisplay:YES];
NSPoint fo = {0,0};
[v setFrameOrigin:fo];
[v setFrameSize:[in_image size]];
[v release];
}
- (NSImage*)image
{
return r_img;
}
- (void)dealloc
{
if (r_img) [r_img release];
[super dealloc];
}
- (void)setTitle:(NSString*)in_title
{
[i_window setTitle:in_title];
}
- (NSString*)title
{
return [i_window title];
}
- (void) windowDidBecomeMain:(NSNotification *) notification
{
if (m_del) [m_del onGotFocus:self];
}
- (void)setDelegate:(id<FluidZipWindowDelegate>)in_del
{
m_del = in_del;
}
@end