root/Trunk/AIUtilities.framework/Versions/A/Headers/AIMenuAdditions.h @ 2

Revision 2, 2.5 KB (checked in by jon, 16 years ago)

Initial commit of skeletal project.

Line 
1/*-------------------------------------------------------------------------------------------------------*\
2| Adium, Copyright (C) 2001-2005, Adam Iser  (adamiser@mac.com | http://www.adiumx.com)                   |
3\---------------------------------------------------------------------------------------------------------/
4 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU
5 | General Public License as published by the Free Software Foundation; either version 2 of the License,
6 | or (at your option) any later version.
7 |
8 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
10 | Public License for more details.
11 |
12 | You should have received a copy of the GNU General Public License along with this program; if not,
13 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
14 \------------------------------------------------------------------------------------------------------ */
15
16@interface NSMenu (ItemCreationAdditions)
17
18- (NSMenuItem *)addItemWithTitle:(NSString *)aString target:(id)target action:(SEL)aSelector keyEquivalent:(NSString *)charCode;
19- (NSMenuItem *)addItemWithTitle:(NSString *)aString target:(id)target action:(SEL)aSelector keyEquivalent:(NSString *)charCode tag:(int)tag;
20- (NSMenuItem *)addItemWithTitle:(NSString *)aString target:(id)target action:(SEL)aSelector keyEquivalent:(NSString *)charCode representedObject:(id)object;
21- (void)removeAllItems;
22- (void)removeAllItemsButFirst;
23
24@end
25
26@interface NSMenu (AIMenuAdditions)
27
28- (void)setAllMenuItemsToState:(int)state;
29
30//Swap two menu items
31+ (void)swapMenuItem:(NSMenuItem *)itemA with:(NSMenuItem *)itemB;
32
33//Recollapse an alternate menu item
34+ (void)updateAlternateMenuItem:(NSMenuItem *)alternateItem;
35
36//Find the first enabled menu item
37- (NSMenuItem *)firstEnabledMenuItem;
38
39@end
40
41@interface NSMenuItem (ItemCreationAdditions)
42
43- (id)initWithTitle:(NSString *)aString target:(id)target action:(SEL)aSelector keyEquivalent:(NSString *)charCode;
44- (id)initWithTitle:(NSString *)aString target:(id)target action:(SEL)aSelector keyEquivalent:(NSString *)charCode representedObject:(id)object;
45- (id)initWithTitle:(NSString *)aString target:(id)target action:(SEL)aSelector keyEquivalent:(NSString *)charCode keyMask:(unsigned int)keyMask;
46- (void)removeKeyEquivalent;
47
48@end
Note: See TracBrowser for help on using the browser.