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

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

Initial commit of skeletal project.

Line 
1//
2//  AIMultiCellOutlineView.h
3//  Adium
4//
5//  Created by Adam Iser on Tue Mar 23 2004.
6//  Copyright (c) 2004-2005 The Adium Team. All rights reserved.
7//
8
9#import <AIUtilities/AIVariableHeightOutlineView.h>
10
11/*!
12 * @class AIMultiCellOutlineView
13 * @brief An outline view with two different cells, one each for expandable and nonexpandable items
14 *
15 * This outline view is a subclass of <tt>AIAlternatingRowOutlineView</tt> which simplifies its implementation into the case with two different cells, one for expandable items ("groups") and one for nonexpandable items ("content").
16 */
17@interface AIMultiCellOutlineView : AIVariableHeightOutlineView {
18        NSCell  *contentCell;
19        NSCell  *groupCell;
20       
21        float   groupRowHeight;
22        float   contentRowHeight;
23}
24
25/*!
26 * @brief Set the cell used for nonexpandable items
27 *
28 * Set the cell used for displaying nonexpandable items ("content")
29 * @param cell The <tt>NSCell</tt> to use for content.
30 */
31- (void)setContentCell:(NSCell *)cell;
32
33/*!
34 * @brief Returns the cell used for nonexpandable items
35 *
36 * Returns the cell used for displaying nonexpandable items ("content")
37 * @return The <tt>NSCell</tt> used for content.
38 */
39- (NSCell *)contentCell;
40
41/*!
42 * @brief Set the cell used for expandable items
43 *
44 * Set the cell used for displaying expandable items ("groups")
45 * @param cell The <tt>NSCell</tt> to use for groups.
46 */
47- (void)setGroupCell:(NSCell *)cell;
48
49/*!
50 * @brief Returns the cell used for expandable items
51 *
52 * Returns the cell used for displaying expandable items ("groups")
53 * @return The <tt>NSCell</tt> used for groups.
54 */
55- (NSCell *)groupCell;
56
57@end
58
59@interface NSObject (AIMultiCellOutlineViewDelegate)
60/*
61 * @brief Is this item a group?
62 *
63 * Note that we do NOT use the Mac OS X 10.5+ delegate method outlineView:isGroupItem:.
64 * Doing so requests that the cell be drawn in the "group style", which may not be desired.
65 * If both behaviors are desired, simply implement this delegate method and call outlineView:isGroupItem: to
66 * share code between the two.
67 *
68 * @result YES if the groupCell should be used for displaying this item.
69 */
70- (BOOL)outlineView:(NSOutlineView *)outlineView isGroup:(id)item;
71@end
Note: See TracBrowser for help on using the browser.