//
//  POLinkTextFieldCell.h
//  POBase
//
//  Created by Pieter Omvlee on 6/4/08.
//  Copyright 2008 Bohemian Coding. All rights reserved.
//

/*!
 * @header CHLinkTextFieldCell
 * @abstract This class can be used to simulate an itunes-store-like arrow in a table
 */

#import <Cocoa/Cocoa.h>

/*!
 * @class CHLinkTextFieldCell
 * @abstract a subclass of NSTextFieldCell which can optionally display an arrow on the right.
 * @discussionThe arrow is only displayed if the text field is selected and has a value
 */
@interface CHLinkTextFieldCell : NSTextFieldCell {
  int lastResult;
}
- (NSImage *)actionImage;
- (int)hitTestResult;
@end

@interface CHCloseLinkTextFieldCell : CHLinkTextFieldCell
{
  
}
@end

/*!
 * @protocol POLinkTextFieldCellDelegate
 * @abstractThe delegate should implement this informal protocol.
 */
@interface NSObject (POLinkTextFieldCellDelegate)

/*!
 * @method tableView:shouldDrawArrowLinkForObject:key:
 * @param tableView the tableView which is about to draw the cell
 * @param anObject the object displayed at this row.
 * @param key the identifier of the NSTableColumn this cell is displayed in
 * Return YES to display the arrow.
 * This method only gets called if the cell is displayed in a selected row
 */
- (BOOL)tableView:(NSTableView *)tableView shouldActionImageForObject:(id)anObject key:(NSString *)aKey;
@end