PageRenderTime 26ms CodeModel.GetById 18ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/core/externals/update-engine/externals/google-toolbox-for-mac/XcodePlugin/GTMXcodeMenuItem.h

http://macfuse.googlecode.com/
C++ Header | 69 lines | 20 code | 15 blank | 34 comment | 0 complexity | 802808797dc26c1bb6a45ca26663b2c8 MD5 | raw file
 1//
 2//  GTMXcodeMenuItem.h
 3//
 4//  Copyright 2007-2009 Google Inc.
 5//
 6//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 7//  use this file except in compliance with the License.  You may obtain a copy
 8//  of the License at
 9//
10//  http://www.apache.org/licenses/LICENSE-2.0
11//
12//  Unless required by applicable law or agreed to in writing, software
13//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15//  License for the specific language governing permissions and limitations under
16//  the License.
17//
18
19#import <Cocoa/Cocoa.h>
20
21@class PBXTarget;
22
23@protocol GTMXcodeMenuItemProtocol
24// name of the menu item
25- (NSString*)title;
26
27// the action to perform
28- (SEL)actionSelector;
29
30// what menu to insert the item into
31- (NSMenu*)insertionMenu;
32
33// where we want the menu item inserted
34- (int)insertionIndex;
35
36// the hot key
37- (NSString*)keyEquivalent;
38
39// the depth of the item as a hierarchical menu item
40// eg 0 is in the root menu, 2 is in the Root:Debug:Attach menu
41- (int)depth;
42
43// method is called when the item is inserted
44- (void)wasInserted:(NSMenuItem*)item;
45
46// allow the icon to being added to make the menus easier to find
47- (BOOL)allowGDTMenuIcon;
48@end
49
50// Concrete implementation of GTMXcodeMenuItemProtocol for menu items
51// to inherit from.
52@interface GTMXcodeMenuItem : NSObject<GTMXcodeMenuItemProtocol>
53// the default action for menu items
54- (void)action:(id)sender;
55
56// returns the array of currently "selected files" in Xcode. This can be
57// the front most text document, or a selection out of the browser window.
58- (NSArray*)selectedPaths;
59
60// Expand |path| based on |target| and |configuration|.
61// If newPath is not absolute, expand kSrcRootPath and prepend it to newPath.
62- (NSString *)pathByExpandingString:(NSString *)path 
63              forBuildConfiguration:(NSString *)configuration
64                           ofTarget:(PBXTarget *)target;
65
66// Used to figure out what order to install menu items
67- (NSComparisonResult)compareDepth:(id<GTMXcodeMenuItemProtocol>)item;
68
69@end