1 | /* |
---|
2 | * Adium is the legal property of its developers, whose names are listed in the copyright file included |
---|
3 | * with this source distribution. |
---|
4 | * |
---|
5 | * This program is free software; you can redistribute it and/or modify it under the terms of the GNU |
---|
6 | * General Public License as published by the Free Software Foundation; either version 2 of the License, |
---|
7 | * or (at your option) any later version. |
---|
8 | * |
---|
9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
---|
10 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
---|
11 | * Public License for more details. |
---|
12 | * |
---|
13 | * You should have received a copy of the GNU General Public License along with this program; if not, |
---|
14 | * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
15 | */ |
---|
16 | |
---|
17 | #import <Adium/AIAbstractListController.h> |
---|
18 | #import <Adium/AIListCell.h> |
---|
19 | #import <AIUtilities/AIImageDrawingAdditions.h> |
---|
20 | |
---|
21 | //User Icon |
---|
22 | #define USER_ICON_LEFT_PAD 2 |
---|
23 | #define USER_ICON_RIGHT_PAD 2 |
---|
24 | |
---|
25 | //Status icon |
---|
26 | #define STATUS_ICON_LEFT_PAD 2 |
---|
27 | #define STATUS_ICON_RIGHT_PAD 2 |
---|
28 | |
---|
29 | //Service icon |
---|
30 | #define SERVICE_ICON_LEFT_PAD 2 |
---|
31 | #define SERVICE_ICON_RIGHT_PAD 2 |
---|
32 | |
---|
33 | #define TEXT_WITH_IMAGES_LEFT_PAD 2 |
---|
34 | #define TEXT_WITH_IMAGES_RIGHT_PAD 2 |
---|
35 | |
---|
36 | @interface AIListContactCell : AIListCell { |
---|
37 | BOOL userIconVisible; |
---|
38 | BOOL extendedStatusVisible; |
---|
39 | BOOL statusIconsVisible; |
---|
40 | BOOL serviceIconsVisible; |
---|
41 | |
---|
42 | BOOL statusMessageVisible; |
---|
43 | BOOL idleTimeVisible; |
---|
44 | |
---|
45 | NSSize userIconSize; |
---|
46 | int userIconRoundingRadius; |
---|
47 | int statusFontHeight; |
---|
48 | |
---|
49 | BOOL backgroundColorIsStatus; |
---|
50 | BOOL backgroundColorIsEvents; |
---|
51 | BOOL shouldUseContactTextColors; |
---|
52 | |
---|
53 | LIST_POSITION userIconPosition; |
---|
54 | LIST_POSITION statusIconPosition; |
---|
55 | LIST_POSITION serviceIconPosition; |
---|
56 | BOOL idleTimeIsBelow; |
---|
57 | BOOL statusMessageIsBelow; |
---|
58 | BOOL useStatusMessageAsExtendedStatus; |
---|
59 | BOOL useAliasesOnNonParentContacts; |
---|
60 | |
---|
61 | float backgroundOpacity; |
---|
62 | |
---|
63 | NSFont *statusFont; |
---|
64 | NSColor *statusColor; |
---|
65 | |
---|
66 | NSDictionary *_statusAttributes; |
---|
67 | NSMutableDictionary *_statusAttributesInverted; |
---|
68 | } |
---|
69 | |
---|
70 | //Status Text |
---|
71 | - (void)setStatusFont:(NSFont *)inFont; |
---|
72 | - (NSFont *)statusFont; |
---|
73 | - (NSDictionary *)statusAttributes; |
---|
74 | - (NSDictionary *)statusAttributesInverted; |
---|
75 | - (void)setTextAlignment:(NSTextAlignment)inAlignment; |
---|
76 | - (void)setStatusColor:(NSColor *)inColor; |
---|
77 | - (NSColor *)statusColor; |
---|
78 | |
---|
79 | //Display options |
---|
80 | - (void)setUserIconVisible:(BOOL)inShowIcon; |
---|
81 | - (BOOL)userIconVisible; |
---|
82 | - (void)setUserIconSize:(int)inSize; |
---|
83 | - (int)userIconSize; |
---|
84 | |
---|
85 | - (void)setExtendedStatusVisible:(BOOL)inShowStatus; |
---|
86 | - (BOOL)extendedStatusVisible; |
---|
87 | |
---|
88 | - (void)setStatusIconsVisible:(BOOL)inShowStatus; |
---|
89 | - (BOOL)statusIconsVisible; |
---|
90 | |
---|
91 | - (void)setServiceIconsVisible:(BOOL)inShowService; |
---|
92 | - (BOOL)serviceIconsVisible; |
---|
93 | |
---|
94 | - (void)setIdleTimeIsBelowName:(BOOL)isBelow; |
---|
95 | - (void)setIdleTimeIsVisible:(BOOL)isVisible; |
---|
96 | - (void)setStatusMessageIsBelowName:(BOOL)isBelow; |
---|
97 | - (void)setStatusMessageIsVisible:(BOOL)isVisible; |
---|
98 | |
---|
99 | - (void)setUserIconPosition:(LIST_POSITION)inPosition; |
---|
100 | - (void)setStatusIconPosition:(LIST_POSITION)inPosition; |
---|
101 | - (void)setServiceIconPosition:(LIST_POSITION)inPosition; |
---|
102 | - (void)setBackgroundOpacity:(float)inOpacity; |
---|
103 | - (float)backgroundOpacity; |
---|
104 | - (void)setBackgroundColorIsStatus:(BOOL)isStatus; |
---|
105 | - (void)setBackgroundColorIsEvents:(BOOL)isEvents; |
---|
106 | - (void)setShouldUseContactTextColors:(BOOL)flag; |
---|
107 | - (void)setUseStatusMessageAsExtendedStatus:(BOOL)flag; |
---|
108 | |
---|
109 | //Drawing |
---|
110 | - (void)drawContentWithFrame:(NSRect)rect; |
---|
111 | - (void)drawBackgroundWithFrame:(NSRect)rect; |
---|
112 | - (NSRect)drawUserIconInRect:(NSRect)inRect position:(IMAGE_POSITION)position; |
---|
113 | - (NSRect)drawStatusIconInRect:(NSRect)rect position:(IMAGE_POSITION)position; |
---|
114 | - (NSRect)drawServiceIconInRect:(NSRect)rect position:(IMAGE_POSITION)position; |
---|
115 | - (NSRect)drawUserExtendedStatusInRect:(NSRect)rect withMessage:(NSString *)string drawUnder:(BOOL)drawUnder; |
---|
116 | - (NSColor *)labelColor; |
---|
117 | - (NSColor *)textColor; |
---|
118 | - (NSImage *)userIconImage; |
---|
119 | - (NSImage *)statusImage; |
---|
120 | - (NSImage *)serviceImage; |
---|
121 | //- (BOOL)drawStatusBelowLabelInRect:(NSRect)rect; |
---|
122 | - (float)imageOpacityForDrawing; |
---|
123 | |
---|
124 | // Should not parent contacts have their aliases shown? |
---|
125 | - (void)setUseAliasesOnNonParentContacts:(BOOL)inFlag; |
---|
126 | |
---|
127 | @end |
---|