1 | // |
---|
2 | // AIContactMenu.h |
---|
3 | // Adium |
---|
4 | // |
---|
5 | // Created by Adam Iser on 5/31/05. |
---|
6 | // Copyright 2006 The Adium Team. All rights reserved. |
---|
7 | // |
---|
8 | |
---|
9 | #import <Adium/AIAbstractListObjectMenu.h> |
---|
10 | |
---|
11 | @class AIAccount, AIListContact, AIListObject; |
---|
12 | |
---|
13 | @interface AIContactMenu : AIAbstractListObjectMenu <AIListObjectObserver> { |
---|
14 | AIListObject *containingObject; |
---|
15 | |
---|
16 | id delegate; |
---|
17 | BOOL delegateRespondsToDidSelectContact; |
---|
18 | BOOL delegateRespondsToShouldIncludeContact; |
---|
19 | BOOL delegateRespondsToValidateContact; |
---|
20 | BOOL shouldUseDisplayName; |
---|
21 | BOOL shouldDisplayGroupHeaders; |
---|
22 | BOOL shouldUseUserIcon; |
---|
23 | BOOL shouldSetTooltip; |
---|
24 | } |
---|
25 | |
---|
26 | + (id)contactMenuWithDelegate:(id)inDelegate forContactsInObject:(AIListObject *)inContainingObject; |
---|
27 | |
---|
28 | - (void)setDelegate:(id)inDelegate; |
---|
29 | - (id)delegate; |
---|
30 | |
---|
31 | @end |
---|
32 | |
---|
33 | @interface NSObject (AIContactMenuDelegate) |
---|
34 | - (void)contactMenu:(AIContactMenu *)inContactMenu didRebuildMenuItems:(NSArray *)menuItems; |
---|
35 | - (void)contactMenu:(AIContactMenu *)inContactMenu didSelectContact:(AIListContact *)inContact; //Optional |
---|
36 | - (AIListContact *)contactMenu:(AIContactMenu *)inContactMenu validateContact:(AIListContact *)inContact; //Optional |
---|
37 | - (BOOL)contactMenu:(AIContactMenu *)inContactMenu shouldIncludeContact:(AIListContact *)inContact; //Optional |
---|
38 | - (BOOL)contactMenuShouldUseUserIcon:(AIContactMenu *)inContactMenu; //Optional |
---|
39 | - (BOOL)contactMenuShouldSetTooltip:(AIContactMenu *)inContactMenu; //Optional |
---|
40 | // Called on each rebuild: |
---|
41 | - (BOOL)contactMenuShouldDisplayGroupHeaders:(AIContactMenu *)inContactMenu; //Optional; only applies to contained groups |
---|
42 | - (BOOL)contactMenuShouldUseDisplayName:(AIContactMenu *)inContactMenu; //Optional |
---|
43 | @end |
---|