Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTTheme.h
Go to the documentation of this file.
1 #import "CPTDefinitions.h"
2 
7 
10 extern CPTThemeName __nonnull const kCPTDarkGradientTheme;
11 extern CPTThemeName __nonnull const kCPTPlainBlackTheme;
12 extern CPTThemeName __nonnull const kCPTPlainWhiteTheme;
13 extern CPTThemeName __nonnull const kCPTSlateTheme;
14 extern CPTThemeName __nonnull const kCPTStocksTheme;
15 
17 @class CPTGraph;
18 @class CPTPlotAreaFrame;
19 @class CPTAxisSet;
20 @class CPTMutableTextStyle;
21 
23 
24 @property (nonatomic, readwrite, strong, nullable) Class graphClass;
25 
28 +(void)registerTheme:(nonnull Class)themeClass;
29 +(nullable NSArray<Class> *)themeClasses;
30 +(nullable instancetype)themeNamed:(nullable CPTThemeName)themeName;
31 +(nonnull CPTThemeName)name;
33 
36 -(void)applyThemeToGraph:(nonnull CPTGraph *)graph;
38 
39 @end
40 
45 
48 -(nullable id)newGraph;
49 
50 -(void)applyThemeToBackground:(nonnull CPTGraph *)graph;
51 -(void)applyThemeToPlotArea:(nonnull CPTPlotAreaFrame *)plotAreaFrame;
52 -(void)applyThemeToAxisSet:(nonnull CPTAxisSet *)axisSet;
54 
55 @end
CPTThemeName
NSString * CPTThemeName
Theme name type.
Definition: CPTTheme.h:6
NSObject
kCPTStocksTheme
CPTThemeName __nonnull const kCPTStocksTheme
A graph theme with a gradient background and white lines.
CPTTheme::graphClass
Class graphClass
The class used to create new graphs. Must be a subclass of CPTGraph.
Definition: CPTTheme.h:24
CPTTheme(AbstractMethods)
CPTTheme abstract methods—must be overridden by subclasses.
Definition: CPTTheme.h:44
kCPTPlainBlackTheme
CPTThemeName __nonnull const kCPTPlainBlackTheme
A graph theme with black backgrounds and white lines.
kCPTPlainWhiteTheme
CPTThemeName __nonnull const kCPTPlainWhiteTheme
A graph theme with white backgrounds and black lines.
kCPTDarkGradientTheme
CPTThemeName __nonnull const kCPTDarkGradientTheme
A graph theme with dark gray gradient backgrounds and light gray lines.
+[CPTTheme themeClasses]
nullable NSArray< Class > * themeClasses()
List of the available theme classes, sorted by name.
Definition: CPTTheme.m:102
+[CPTTheme name]
nonnull CPTThemeName name()
The name used for this theme class.
Definition: CPTTheme.m:152
CPTMutableTextStyle
Mutable wrapper for text style properties.
Definition: CPTMutableTextStyle.h:6
CPTTheme
Creates a CPTGraph instance formatted with a predefined style.
Definition: CPTTheme.h:22
CPTDefinitions.h
Class
typedef Class
-[CPTTheme(AbstractMethods) newGraph]
nullable id newGraph()
Creates a new graph styled with the theme.
Definition: CPTTheme.m:211
kCPTSlateTheme
CPTThemeName __nonnull const kCPTSlateTheme
A graph theme with colors that match the default iPhone navigation bar, toolbar buttons,...
cpt_swift_struct
#define cpt_swift_struct
Marks a type definition to be imported into Swift as a structure.
Definition: CPTDefinitions.h:73
NSString
CPTPlotAreaFrame
A layer drawn on top of the graph layer and behind all plot elements.
Definition: CPTPlotAreaFrame.h:8
id
typedef id
CPTGraph
An abstract graph class.
Definition: CPTGraph.h:74
CPTAxisSet
A container layer for the set of axes for a graph.
Definition: CPTAxisSet.h:7
NSSecureCoding-p