source: orbit/iOS/Orbit/Orbit/CorePlotHeaders/CPTGraph.h @ cef53d8

ServoTab_Interfacepyramid
Last change on this file since cef53d8 was a9059a5, checked in by Steve Castellotti <sc@…>, 10 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: 3.7 KB
Line 
1// Abstract class
2#import "CPTBorderedLayer.h"
3#import "CPTDefinitions.h"
4
5/// @file
6
7@class CPTAxisSet;
8@class CPTGraphHostingView;
9@class CPTLegend;
10@class CPTPlot;
11@class CPTPlotAreaFrame;
12@class CPTPlotSpace;
13@class CPTTheme;
14@class CPTTextStyle;
15@class CPTLayerAnnotation;
16
17/// @name Graph
18/// @{
19
20/** @brief Notification sent by various objects to tell the graph it should redraw itself.
21 *  @ingroup notification
22 **/
23extern NSString *const CPTGraphNeedsRedrawNotification;
24
25/// @}
26
27/**
28 *  @brief Enumeration of graph layers.
29 **/
30typedef enum _CPTGraphLayerType {
31    CPTGraphLayerTypeMinorGridLines, ///< Minor grid lines.
32    CPTGraphLayerTypeMajorGridLines, ///< Major grid lines.
33    CPTGraphLayerTypeAxisLines,      ///< Axis lines.
34    CPTGraphLayerTypePlots,          ///< Plots.
35    CPTGraphLayerTypeAxisLabels,     ///< Axis labels.
36    CPTGraphLayerTypeAxisTitles      ///< Axis titles.
37}
38CPTGraphLayerType;
39
40#pragma mark -
41
42@interface CPTGraph : CPTBorderedLayer {
43    @private
44    __cpt_weak CPTGraphHostingView *hostingView;
45    CPTPlotAreaFrame *plotAreaFrame;
46    NSMutableArray *plots;
47    NSMutableArray *plotSpaces;
48    NSString *title;
49    CPTTextStyle *titleTextStyle;
50    CPTRectAnchor titlePlotAreaFrameAnchor;
51    CGPoint titleDisplacement;
52    CPTLayerAnnotation *titleAnnotation;
53    CPTLegend *legend;
54    CPTLayerAnnotation *legendAnnotation;
55    CPTRectAnchor legendAnchor;
56    CGPoint legendDisplacement;
57}
58
59/// @name Hosting View
60/// @{
61@property (nonatomic, readwrite, cpt_weak_property) __cpt_weak CPTGraphHostingView *hostingView;
62/// @}
63
64/// @name Title
65/// @{
66@property (nonatomic, readwrite, copy) NSString *title;
67@property (nonatomic, readwrite, copy) CPTTextStyle *titleTextStyle;
68@property (nonatomic, readwrite, assign) CGPoint titleDisplacement;
69@property (nonatomic, readwrite, assign) CPTRectAnchor titlePlotAreaFrameAnchor;
70/// @}
71
72/// @name Layers
73/// @{
74@property (nonatomic, readwrite, retain) CPTAxisSet *axisSet;
75@property (nonatomic, readwrite, retain) CPTPlotAreaFrame *plotAreaFrame;
76@property (nonatomic, readonly, retain) CPTPlotSpace *defaultPlotSpace;
77@property (nonatomic, readwrite, retain) NSArray *topDownLayerOrder;
78/// @}
79
80/// @name Legend
81/// @{
82@property (nonatomic, readwrite, retain) CPTLegend *legend;
83@property (nonatomic, readwrite, assign) CPTRectAnchor legendAnchor;
84@property (nonatomic, readwrite, assign) CGPoint legendDisplacement;
85/// @}
86
87/// @name Data Source
88/// @{
89-(void)reloadData;
90-(void)reloadDataIfNeeded;
91/// @}
92
93/// @name Retrieving Plots
94/// @{
95-(NSArray *)allPlots;
96-(CPTPlot *)plotAtIndex:(NSUInteger)idx;
97-(CPTPlot *)plotWithIdentifier:(id<NSCopying>)identifier;
98/// @}
99
100/// @name Adding and Removing Plots
101/// @{
102-(void)addPlot:(CPTPlot *)plot;
103-(void)addPlot:(CPTPlot *)plot toPlotSpace:(CPTPlotSpace *)space;
104-(void)removePlot:(CPTPlot *)plot;
105-(void)removePlotWithIdentifier:(id<NSCopying>)identifier;
106-(void)insertPlot:(CPTPlot *)plot atIndex:(NSUInteger)idx;
107-(void)insertPlot:(CPTPlot *)plot atIndex:(NSUInteger)idx intoPlotSpace:(CPTPlotSpace *)space;
108/// @}
109
110/// @name Retrieving Plot Spaces
111/// @{
112-(NSArray *)allPlotSpaces;
113-(CPTPlotSpace *)plotSpaceAtIndex:(NSUInteger)idx;
114-(CPTPlotSpace *)plotSpaceWithIdentifier:(id<NSCopying>)identifier;
115/// @}
116
117/// @name Adding and Removing Plot Spaces
118/// @{
119-(void)addPlotSpace:(CPTPlotSpace *)space;
120-(void)removePlotSpace:(CPTPlotSpace *)plotSpace;
121/// @}
122
123/// @name Themes
124/// @{
125-(void)applyTheme:(CPTTheme *)theme;
126/// @}
127
128@end
129
130#pragma mark -
131
132/** @category CPTGraph(AbstractFactoryMethods)
133 *  @brief CPTGraph abstract methods—must be overridden by subclasses
134 **/
135@interface CPTGraph(AbstractFactoryMethods)
136
137/// @name Factory Methods
138/// @{
139-(CPTPlotSpace *)newPlotSpace;
140-(CPTAxisSet *)newAxisSet;
141/// @}
142
143@end
Note: See TracBrowser for help on using the repository browser.