Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 55 lines (47 sloc) 2.264 kb
03b66b1 Stephen F. Booth Initial checkin
authored
1 /*
0d996f0 Stephen F. Booth Updated to 2-clause BSD license
authored
2 * Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Stephen F. Booth <me@sbooth.org>
3 * All Rights Reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
03b66b1 Stephen F. Booth Initial checkin
authored
27
28 #import "SFBViewSelectorBarItem.h"
29
30 @implementation SFBViewSelectorBarItem
31
32 + (id) itemWithIdentifier:(NSString *)identifier label:(NSString *)label tooltip:(NSString *)tooltip image:(NSImage *)image view:(NSView *)view
33 {
38c2243 Stephen F. Booth Updated for ARC
authored
34 return [[SFBViewSelectorBarItem alloc] initWithIdentifier:identifier label:label tooltip:tooltip image:image view:view];
03b66b1 Stephen F. Booth Initial checkin
authored
35 }
36
37 - (id) initWithIdentifier:(NSString *)identifier label:(NSString *)label tooltip:(NSString *)tooltip image:(NSImage *)image view:(NSView *)view
38 {
39 // The identifier and view are the only two required parameters
40 NSParameterAssert(nil != identifier);
41 NSParameterAssert(nil != view);
42
43 if((self = [super init])) {
44 self.identifier = identifier;
45 self.label = label;
46 self.tooltip = tooltip;
47 self.image = image;
48 self.view = view;
49 }
50
51 return self;
52 }
53
54 @end
Something went wrong with that request. Please try again.