PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/PSTreeGraphView/PSTreeGraphModelNode.h

https://code.google.com/
C++ Header | 48 lines | 10 code | 20 blank | 18 comment | 0 complexity | 039b410837d694481460ea6a3519f2f0 MD5 | raw file
 1//
 2//  PSTreeGraphModelNode.h
 3//  PSTreeGraphView
 4//
 5//  Created by Ed Preston on 7/25/10.
 6//  Copyright 2010 Preston Software. All rights reserved.
 7//
 8//
 9//  This is a port of the sample code from Max OS X to iOS (iPad).
10//
11//  WWDC 2010 Session 141, “Crafting Custom Cocoa Views”
12//
13
14
15#import <Foundation/Foundation.h>
16
17/// The model nodes used with a TreeGraph are required to conform to the this protocol, 
18/// which enables the TreeGraph to navigate the model tree to find related nodes.
19
20@protocol PSTreeGraphModelNode <NSObject>
21
22@required
23
24/// The model node's parent node, or nil if it doesn't have a parent node.
25
26- (id <PSTreeGraphModelNode> )parentModelNode;
27
28/// The model node's child nodes.  If the node has no children, this should return an 
29/// empty array ([NSArray array]), not nil.
30
31- (NSArray *) childModelNodes;
32
33@end
34
35
36
37@protocol PSTreeGraphDelegate <NSObject>
38
39@required
40
41/// The delegate will configure the nodeView with the modelNode provided.
42
43- (void) configureNodeView:(UIView *)nodeView withModelNode:(id <PSTreeGraphModelNode> )modelNode;
44
45@end
46
47
48