-
Notifications
You must be signed in to change notification settings - Fork 3
/
PXEngineConfiguration.h
92 lines (78 loc) · 2.21 KB
/
PXEngineConfiguration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//
// PXEngineConfiguration.h
// PXEngine
//
// Created by Kevin Lindsey on 1/23/13.
// Copyright (c) 2013 Pixate, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PXStyleable.h"
/**
* A PXParseErrorDestination enumeration captures the various parse error logging destinations. These are set using the
* parse-error-destination property for the pixate-config element.
*/
typedef enum {
PXParseErrorDestinationNone,
PXParseErrorDestinationConsole,
#ifdef PX_LOGGING
PXParseErrorDestination_Logger
#endif
} PXParseErrorDestination;
/**
* A PXUpdateStylesType enumeration determines if the PXEngine will try to automatically style views.
*/
typedef enum {
PXUpdateStylesTypeAuto,
PXUpdateStylesTypeManual,
} PXUpdateStylesType;
/**
* A PXCacheStylesType enumeration determines if the PXEngine will try to cache styling.
*/
typedef enum {
PXCacheStylesTypeAuto,
PXCacheStylesTypeNone,
} PXCacheStylesType;
/**
* The PXEngineConfiguration class is used to set and retrieve global settings for the PXEngine.
*/
@interface PXEngineConfiguration : NSObject <PXStyleable>
/**
* Allow a style id to be associated with this object
*/
@property (nonatomic, copy) NSString *styleId;
/**
* Allow a style class to be associated with this object
*/
@property (nonatomic, copy) NSString *styleClass;
/**
* Determine where parse errors will be emitted
*/
@property (nonatomic) PXParseErrorDestination parseErrorDestination;
/**
* Determine when views should have their style updated
*/
@property (nonatomic) PXUpdateStylesType updateStylesType;
/**
* Determine if view styling is cached
*/
@property (nonatomic) PXCacheStylesType cacheStylesType;
/*
* Return the property value for the specifified property name
*
* @param name The name of the property
*/
- (id)propertyValueForName:(NSString *)name;
/*
* Set the property value for the specified property name
*
* @param value The new value
* @param name The property name
*/
- (void)setPropertyValue:(id)value forName:(NSString *)name;
/**
* Log the specified message to the target indicated by the loggingType property
*
* @param message The message to emit
*/
- (void)sendParseMessage:(NSString *)message;
@end