root/Trunk/Adium.framework/Versions/A/Headers/AIMenuControllerProtocol.h @ 2

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

Initial commit of skeletal project.

Line 
1/*
2 *  AIMenuControllerProtocol.h
3 *  Adium
4 *
5 *  Created by Evan Schoenberg on 7/31/06.
6 *
7 */
8
9#import <Adium/AIControllerProtocol.h>
10
11#define AIMenuDidChange  @"AIMenuDidChange"
12
13/* Each of the items in this enum must correspond to an NSMenuItem which is:
14 *              1. Declared in the AIMenuController.h interface
15 *              2. Connected to AIMenuController in MainMenu.nib
16 *              3. Be included in the locationArray in -[AIMenuController awakeFromNib]
17 *
18 * If the menu item isn't the first in its menu, it can be connected to the Quit Adium menu item; AIMenuController will move it
19 * to the appropriate place.
20 */
21typedef enum {
22    LOC_Adium_About = 0, LOC_Adium_Preferences, LOC_Adium_Other,
23    LOC_File_New, LOC_File_Close, LOC_File_Save, LOC_File_Accounts, LOC_File_Additions,
24    LOC_Edit_Bottom, LOC_Edit_Links, LOC_Edit_Additions,
25        LOC_View_General, LOC_View_Sorting, LOC_View_Toggles, LOC_View_Counting_Toggles, LOC_View_Appearance_Toggles, LOC_View_Additions, 
26    LOC_Contact_Manage, LOC_Contact_Info, LOC_Contact_Action, LOC_Contact_NegativeAction, LOC_Contact_Additions,
27        LOC_Status_State, LOC_Status_SocialNetworking, LOC_Status_Accounts, LOC_Status_Additions,
28    LOC_Format_Styles, LOC_Format_Palettes, LOC_Format_Additions, 
29    LOC_Window_Top, LOC_Window_Commands, LOC_Window_Auxiliary, LOC_Window_Fixed,
30    LOC_Help_Local, LOC_Help_Web, LOC_Help_Additions,
31    LOC_Dock_Status
32} AIMenuLocation;
33
34typedef enum {
35    Context_Group_AttachDetach,Context_Contact_AttachDetach,Context_Group_Manage,Context_Contact_Manage,Context_Contact_Action, Context_Contact_NegativeAction,
36    Context_Contact_Message, Context_Contact_Additions, Context_Contact_ChatAction, Context_Contact_Stranger_ChatAction, Context_Contact_ListAction,
37        Context_Contact_GroupChatAction,
38        Context_Tab_Action,
39        Context_TextView_LinkEditing, Context_TextView_Edit
40} AIContextMenuLocation;
41
42@class AIListObject, AIChat;
43
44@protocol AIMenuController <AIController>
45//Custom menu items
46- (void)addMenuItem:(NSMenuItem *)newItem toLocation:(AIMenuLocation)location;
47- (void)removeMenuItem:(NSMenuItem *)targetItem;
48
49- (void)delayMenuItemPostProcessing;
50- (void)endDelayMenuItemPostProcessing;
51
52//Contextual menu items
53- (void)addContextualMenuItem:(NSMenuItem *)newItem toLocation:(AIContextMenuLocation)location;
54- (NSMenu *)contextualMenuWithLocations:(NSArray *)inLocationArray forListObject:(AIListObject *)inObject;
55- (NSMenu *)contextualMenuWithLocations:(NSArray *)inLocationArray forListObject:(AIListObject *)inObject inChat:(AIChat *)inChat;
56- (AIListObject *)currentContextMenuObject;
57- (AIChat *)currentContextMenuChat;
58
59- (NSTextView *)contextualMenuTextView;
60- (NSMenu *)contextualMenuWithLocations:(NSArray *)inLocationArray forTextView:(NSTextView *)inObject;
61
62//Control over the italics menu item
63- (void)removeItalicsKeyEquivalent;
64- (void)restoreItalicsKeyEquivalent;
65@end
66
67@interface NSObject (MenuItemUpdating)
68- (void)menu:(NSMenu *)menu needsUpdateForMenuItem:(NSMenuItem *)menuItem;
69@end
70
Note: See TracBrowser for help on using the browser.