comparison lisp/oobr/tree-nx/TreeButtonCell.m @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1
2 #import "TreeButtonCell.h"
3 #import "TreeButton.h"
4
5 @implementation TreeButtonCell
6
7 - parent { return parent; }
8 - setParent:anObject
9 { // anObject should be the parent Control object subclass
10 parent = anObject;
11 return self;
12 }
13
14 - (BOOL)trackMouse:(NXEvent *)theEvent
15 inRect:(const NXRect *)cellFrame ofView:aView
16 { // this traps the button being selected.
17 BOOL result = [super trackMouse:theEvent inRect:cellFrame ofView:aView];
18 if (result && [parent respondsTo:@selector(wasSelected:)]) {
19 [parent wasSelected:self];
20 }
21 return result;
22 }
23
24 - performClick:sender
25 {
26 [super performClick:sender];
27 if ([parent respondsTo:@selector(wasSelected:)]) {
28 [parent wasSelected:self];
29 }
30 return self;
31 }
32
33 @end