root/Trunk/AIUtilities.framework/Versions/A/Headers/AIAlternatingRowOutlineView.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 <AIUtilities/AIOutlineView.h>
17
18/*!
19 * @class AIAlternatingRowOutlineView
20 * @brief An <tt>AIOutlineView</tt> subclass supporting alternating rows.
21 *
22 * This functionality was added, with less control to the programmer, in OS X 10.3.  <tt>AIAlternatingRowOutlineView</tt> also supports disabling it from drawing its background (useful if cells wish to draw their own backgrounds and potentially be transparent).
23 */
24@interface AIAlternatingRowOutlineView : AIOutlineView {
25    NSColor             *alternatingRowColor;
26       
27    BOOL                drawsAlternatingRows;
28        BOOL            drawsBackground;
29        BOOL            drawsGradientSelection;
30}
31
32/*!
33 * @brief Set if the outline view draws a grid, alternating by rows.
34 *
35 * The grid will be drawn alternating between the background color and the color specified by setAlternatingRowColor:, which has a sane, light blue default.
36 * @param flag YES if the alternating rows should be drawn
37 */
38- (void)setDrawsAlternatingRows:(BOOL)flag;
39/*!
40 * @brief Returns if the outline view draws alternating rows
41 *
42 * Returns if the outline view draws alternating rows
43 * @return YES if the alternating rows will be drawn
44 */
45- (BOOL)drawsAlternatingRows;
46
47/*!
48 * @brief Set the color used for drawing alternating row backgrounds.
49 *
50 * Ignored if drawsAlternatingRows is NO.
51 * @param color The <tt>NSColor</tt> to use for drawing alternating row backgrounds.
52 */
53- (void)setAlternatingRowColor:(NSColor *)color;
54
55/*!
56 * @brief Returns the color used for drawing alternating row backgrounds.
57 *
58 * This is only applicable if drawsAlternatingRows is YES.
59 * @return color The <tt>NSColor</tt> used for drawing alternating row backgrounds.
60 */
61- (NSColor *)alternatingRowColor;
62
63/*!
64 * @brief Set if the outlineView should draw its background
65 *
66 * If this is NO, no background will be drawn (this means that the alternating rows will not be drawn, either).  This is useful if cells wish to draw their own backgrounds.
67 * @param inDraw YES if the background should be drawn; NO if it should not.  The default is YES.
68 */
69- (void)setDrawsBackground:(BOOL)inDraw;
70
71/*!
72 * @brief Returns if the outlineView draws its background
73 *
74 * @return YES if the background is drawn; NO if it is not.
75 */
76- (BOOL)drawsBackground;
77
78/*!
79 * @brief Returns the <tt>NSColor</tt> which should be used to draw the background of the specified row
80 *
81 * @param row An integer row
82 * @return An <tt>NSColor</tt> used to draw the background for <b>row</b>
83 */
84- (NSColor *)backgroundColorForRow:(int)row;
85
86- (void)setDrawsGradientSelection:(BOOL)inDrawsGradientSelection;
87- (BOOL)drawsGradientSelection;
88@end
89
90@interface AIAlternatingRowOutlineView (PRIVATE_AIAlternatingRowOutlineViewAndSubclasses)
91- (void)_drawRowInRect:(NSRect)rect colored:(BOOL)colored selected:(BOOL)selected;
92@end
Note: See TracBrowser for help on using the browser.