source: orbit/iOS/Orbit/Orbit/CorePlotHeaders/CPTPlotSpace.h @ a9059a5

RawEEGRaw_EEG_PlotServoTab_Interfacepyramid
Last change on this file since a9059a5 was a9059a5, checked in by Steve Castellotti <sc@…>, 9 years ago

Arduino:

  • updated to permit custom setting of Throttle, Yaw, and Pitch

Android:

  • Minor tweak to Configuration location

iOS:

  • Property mode set to 100644
File size: 6.0 KB
Line 
1#import "CPTDefinitions.h"
2#import "CPTResponder.h"
3
4@class CPTLayer;
5@class CPTPlotRange;
6@class CPTGraph;
7@class CPTPlotSpace;
8
9/// @name Plot Space
10/// @{
11
12/** @brief Plot space coordinate change notification.
13 *
14 *  This notification is posted to the default notification center whenever the mapping between
15 *  the plot space coordinate system and drawing coordinates changes.
16 *  @ingroup notification
17 **/
18extern NSString *const CPTPlotSpaceCoordinateMappingDidChangeNotification;
19
20/// @}
21
22/**
23 *  @brief Plot space delegate.
24 **/
25@protocol CPTPlotSpaceDelegate<NSObject>
26
27@optional
28
29/// @name Scaling
30/// @{
31
32/** @brief @optional Informs the receiver that it should uniformly scale (e.g., in response to a pinch gesture).
33 *  @param space The plot space.
34 *  @param interactionScale The scaling factor.
35 *  @param interactionPoint The coordinates of the scaling centroid.
36 *  @return @YES if the gesture should be handled by the plot space, and @NO if not.
37 *  In either case, the delegate may choose to take extra actions, or handle the scaling itself.
38 **/
39-(BOOL)plotSpace:(CPTPlotSpace *)space shouldScaleBy:(CGFloat)interactionScale aboutPoint:(CGPoint)interactionPoint;
40
41/// @}
42
43/// @name Scrolling
44/// @{
45
46/** @brief @optional Notifies that plot space is going to scroll.
47 *  @param space The plot space.
48 *  @param proposedDisplacementVector The proposed amount by which the plot space will shift.
49 *  @return The displacement actually applied.
50 **/
51-(CGPoint)plotSpace:(CPTPlotSpace *)space willDisplaceBy:(CGPoint)proposedDisplacementVector;
52
53/// @}
54
55/// @name Plot Range Changes
56/// @{
57
58/** @brief @optional Notifies that plot space is going to change a plot range.
59 *  @param space The plot space.
60 *  @param newRange The proposed new plot range.
61 *  @param coordinate The coordinate of the range.
62 *  @return The new plot range to be used.
63 **/
64-(CPTPlotRange *)plotSpace:(CPTPlotSpace *)space willChangePlotRangeTo:(CPTPlotRange *)newRange forCoordinate:(CPTCoordinate)coordinate;
65
66/** @brief @optional Notifies that plot space has changed a plot range.
67 *  @param space The plot space.
68 *  @param coordinate The coordinate of the range.
69 **/
70-(void)plotSpace:(CPTPlotSpace *)space didChangePlotRangeForCoordinate:(CPTCoordinate)coordinate;
71
72/// @}
73
74/// @name User Interaction
75/// @{
76
77/** @brief @optional Notifies that plot space intercepted a device down event.
78 *  @param space The plot space.
79 *  @param event The native event.
80 *  @param point The point in the host view.
81 *  @return Whether the plot space should handle the event or not.
82 *  In either case, the delegate may choose to take extra actions, or handle the scaling itself.
83 **/
84-(BOOL)plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceDownEvent:(CPTNativeEvent *)event atPoint:(CGPoint)point;
85
86/** @brief @optional Notifies that plot space intercepted a device dragged event.
87 *  @param space The plot space.
88 *  @param event The native event.
89 *  @param point The point in the host view.
90 *  @return Whether the plot space should handle the event or not.
91 *  In either case, the delegate may choose to take extra actions, or handle the scaling itself.
92 **/
93-(BOOL)plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceDraggedEvent:(CPTNativeEvent *)event atPoint:(CGPoint)point;
94
95/** @brief @optional Notifies that plot space intercepted a device cancelled event.
96 *  @param space The plot space.
97 *  @param event The native event.
98 *  @return Whether the plot space should handle the event or not.
99 *  In either case, the delegate may choose to take extra actions, or handle the scaling itself.
100 **/
101-(BOOL)plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceCancelledEvent:(CPTNativeEvent *)event;
102
103/** @brief @optional Notifies that plot space intercepted a device up event.
104 *  @param space The plot space.
105 *  @param event The native event.
106 *  @param point The point in the host view.
107 *  @return Whether the plot space should handle the event or not.
108 *  In either case, the delegate may choose to take extra actions, or handle the scaling itself.
109 **/
110-(BOOL)plotSpace:(CPTPlotSpace *)space shouldHandlePointingDeviceUpEvent:(CPTNativeEvent *)event atPoint:(CGPoint)point;
111
112/// @}
113
114@end
115
116#pragma mark -
117
118@interface CPTPlotSpace : NSObject<CPTResponder, NSCoding> {
119    @private
120    __cpt_weak CPTGraph *graph;
121    id<NSCopying, NSCoding, NSObject> identifier;
122    __cpt_weak id<CPTPlotSpaceDelegate> delegate;
123    BOOL allowsUserInteraction;
124}
125
126@property (nonatomic, readwrite, copy) id<NSCopying, NSCoding, NSObject> identifier;
127@property (nonatomic, readwrite, assign) BOOL allowsUserInteraction;
128@property (nonatomic, readwrite, cpt_weak_property) __cpt_weak CPTGraph *graph;
129@property (nonatomic, readwrite, cpt_weak_property) __cpt_weak id<CPTPlotSpaceDelegate> delegate;
130
131@end
132
133#pragma mark -
134
135/** @category CPTPlotSpace(AbstractMethods)
136 *  @brief CPTPlotSpace abstract methods—must be overridden by subclasses
137 **/
138@interface CPTPlotSpace(AbstractMethods)
139
140/// @name Coordinate Space Conversions
141/// @{
142-(CGPoint)plotAreaViewPointForPlotPoint:(NSDecimal *)plotPoint;
143-(CGPoint)plotAreaViewPointForDoublePrecisionPlotPoint:(double *)plotPoint;
144-(void)plotPoint:(NSDecimal *)plotPoint forPlotAreaViewPoint:(CGPoint)point;
145-(void)doublePrecisionPlotPoint:(double *)plotPoint forPlotAreaViewPoint:(CGPoint)point;
146
147-(CGPoint)plotAreaViewPointForEvent:(CPTNativeEvent *)event;
148-(void)plotPoint:(NSDecimal *)plotPoint forEvent:(CPTNativeEvent *)event;
149-(void)doublePrecisionPlotPoint:(double *)plotPoint forEvent:(CPTNativeEvent *)event;
150/// @}
151
152/// @name Coordinate Range
153/// @{
154-(void)setPlotRange:(CPTPlotRange *)newRange forCoordinate:(CPTCoordinate)coordinate;
155-(CPTPlotRange *)plotRangeForCoordinate:(CPTCoordinate)coordinate;
156/// @}
157
158/// @name Scale Types
159/// @{
160-(void)setScaleType:(CPTScaleType)newType forCoordinate:(CPTCoordinate)coordinate;
161-(CPTScaleType)scaleTypeForCoordinate:(CPTCoordinate)coordinate;
162/// @}
163
164/// @name Adjusting Ranges
165/// @{
166-(void)scaleToFitPlots:(NSArray *)plots;
167-(void)scaleBy:(CGFloat)interactionScale aboutPoint:(CGPoint)interactionPoint;
168/// @}
169
170@end
Note: See TracBrowser for help on using the repository browser.