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

Revision 2, 3.8 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#import <AppKit/NSCell.h>
17
18/*!
19 * @class AIImageTextCell
20 * @brief A cell which displays an image and one or two lines of text
21 *
22 * This NSCell subclass displays in image on the left and one or two lines of text centered vertically in the space remaining for the cell
23 */
24@interface AIImageTextCell : NSCell {
25        NSFont                  *font;
26    NSString            *subString;
27        float                   maxImageWidth;
28        float                   imageTextPadding;
29        NSLineBreakMode lineBreakMode;
30        BOOL    imageAfterMainString;
31        BOOL    highlightWhenNotKey;
32}
33
34/*
35 * @brief Set a string to be drawn underneath the stringValue of the cell
36 *
37 * If non-nil, this string will be drawn underneath the stringValue of the cell.  The two will, together, be vertically centered (when not present, the stringValue alone is vertically centered). It is drawn in with the system font, at size 10.
38 */
39- (void)setSubString:(NSString *)inSubString;
40
41/*
42 * @brief Set the maximum width of the image drawn on the left
43 *
44 * Set the maximum width of the image drawn on the left.  The default value is 24.
45 */
46- (void)setMaxImageWidth:(float)inMaxImageWidth;
47
48/*
49 * @brief Set the padding between text and image
50 *
51 * Half this distance will be the padding between the left cell edge and the image or the text.
52 * Half this distance will be the padding from the right edge of the image or text and the right cell edge.
53 */
54- (void)setImageTextPadding:(float)inImageTextPadding;
55
56/*!     @brief  Ask whether the image goes before both strings, or after the main string.
57 *
58 *      @par    If \c YES, the image is drawn after with main string, with \c imageTextPadding points between them. If \c NO, the image is drawn before both strings (if there is a \c subString, the image won't be placed on the baseline of the main string).
59 *
60 *      @return \c YES if the image will be drawn after the main string; \c NO if the image will be drawn before both strings.
61 */
62- (BOOL) drawsImageAfterMainString;
63/*!     @brief  Set whether the image goes before both strings, or after the main string.
64 *
65 *      @par    If \c YES, the image is drawn after with main string, with \c imageTextPadding points between them. If \c NO, the image is drawn before both strings (if there is a \c subString, the image won't be placed on the baseline of the main string).
66 *
67 *      @param  flag    \c YES if you want the image to be drawn after the main string; \c NO if you want the image to be drawn before both strings.
68 */
69- (void) setDrawsImageAfterMainString:(BOOL)flag;
70
71/*! @brief Set whether the strings are considered highlighted even if the window is not key
72 *
73 * @par         If \c YES, the text is drawn as highlighted even when not the key wndow. If \c NO, it is drawn normally.
74 */
75- (void) setHighlightWhenNotKey:(BOOL)flag;
76
77- (void)setLineBreakMode:(NSLineBreakMode)inLineBreakMode;
78
79@end
Note: See TracBrowser for help on using the browser.