forked from atg/Ingredients
-
Notifications
You must be signed in to change notification settings - Fork 2
/
IGKWindow.m
45 lines (38 loc) · 1.39 KB
/
IGKWindow.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
//
// IGKWindow.m
// Ingredients
//
// Created by Alex Gordon on 22/02/2010.
// Written in 2010 by Fileability.
//
#import "IGKWindow.h"
#import "IGKMultiSelector.h"
#import "IGKWindowController.h"
@implementation IGKWindow
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)styleMask
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag
{
if (self = [super initWithContentRect:contentRect styleMask:styleMask backing:bufferingType defer:flag])
{
#if 0
NSSize addButtonSize = NSMakeSize(91, 22);
multiSelector = [[IGKMultiSelector alloc] initWithFrame:NSMakeRect(contentRect.size.width-addButtonSize.width, contentRect.size.height, addButtonSize.width, addButtonSize.height)];
[multiSelector setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin];
//[multiSelector setImage:[NSImage imageNamed:@"window_frame_add_button"]];
[[[self contentView] superview] addSubview:multiSelector];
#endif
}
return self;
}
#pragma mark --- Applescript support ---
- (id)handleSearchScriptCommand:(NSScriptCommand*)scriptCommand
{
NSString* searchString = nil;
searchString = [[scriptCommand arguments] objectForKey:@"searchString"];
NSAssert(searchString != nil, @"No search string found for search script command");
[(IGKWindowController*)[self windowController] executeSearchWithString:searchString];
return nil;
}
@end