Mobile API Reference  MicroStrategy 2019
EditControlProperty.h
Go to the documentation of this file.
1 //
2 // EditControlProperty.h
3 // iPadMain Library
4 //
5 // Created by Ma Xianqing on 3/11/11.
6 // Copyright 2011 MicroStrategy Inc. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "MSTRHandler.h"
11 #import "DSSIPhoneEnums.h"
12 
13 typedef enum EnumControlType
14 {
17  CT_SWITCH = 2,
18  CT_LIST = 3,
19  CT_SLIDER = 4,
22  CT_TOGGLE = 7,
26  CT_STEPPER = 12,
27  CT_BARCODE = 13,
31 
32 typedef enum _EnumValidateMethod {
40 
41 // Control Property
42 @interface ControlProperty : NSObject
43 {
45 
46  NSString* maxValue;
47  NSString* minValue;
48 
49  int maxlen;
50  int minlen;
51 
53 
54  //property for Time Picker and Slider
55  NSString* interval;
56 
57  //property for Switch and Slider
59  NSString* valueList;
60 
61  //property for Slider
63 
64  int mShowIcon;
67  double mControlWidth;
68 
70 
71  NSString* mUnsetString;
73 }
74 
75 + (ControlProperty*) controlPropertyWithFormatString:(NSString *)formatString DataType:(EnumDSSDataType)dataType;
76 + (ControlProperty*) controlPropertyWithControlType:(EnumControlType)controlType;
77 
78 + (int) instanceCount;
79 
80 - (void) readAttributesFromDictionary:(NSDictionary*) dictionary;
81 
82 @property (nonatomic) EnumControlType controlType;
83 
84 @property (nonatomic) int mIsPassword;
85 
86 @property (nonatomic, strong) NSString* maxValue;
87 @property (nonatomic, strong) NSString* minValue;
88 
89 @property (nonatomic) int maxlen;
90 @property (nonatomic) int minlen;
91 
92 @property (nonatomic, strong) NSString* interval;
93 @property (nonatomic) int mShowByDefault;
94 @property (nonatomic, strong) NSString* valueList;
95 @property (nonatomic) int mInputValue;
96 @property (nonatomic) int mShowIcon;
97 @property (nonatomic) int mShowPreview;
98 @property (nonatomic) int mPreviewLength;
99 @property (nonatomic) double mControlWidth;
100 @property (nonatomic) int mWidthMode;
101 @property (nonatomic) int mIncludeTime;
102 @property (nonatomic, strong) NSString* mUnsetString;
103 @property (nonatomic) int mLabelDisplayWidth;
104 
105 @end
106 
107 // Signature Control Property
109 @private
110  bool showline;
111 }
112 
113 @property (nonatomic) bool showline;
114 
115 @end
116 
117 // Text Field Control Property
119 @private
120  bool limitMin;
121  bool limitMax;
123  NSString* regularExp;
124 }
125 
126 @property (nonatomic) bool limitMin;
127 @property (nonatomic) bool limitMax;
128 @property (nonatomic) int validateMethod;
129 @property (nonatomic, strong) NSString* regularExp;
130 
131 @end
132 
133 // Likert Scale Control Property
135 @private
136  NSString* minLabel;
137  NSString* maxLabel;
138 }
139 
140 @property (nonatomic, strong) NSString* minLable;
141 @property (nonatomic, strong) NSString* maxLable;
142 
143 @end
144 
145 // Stepper Control Property
147 @private
148 // NSString* minvalue;
149 // NSString* maxvalue;
150 // NSString* intervalValue;
151 }
152 
153 //@property (nonatomic, retain) NSString* minvalue;
154 //@property (nonatomic, retain) NSString* maxvalue;
155 //@property (nonatomic, retain) NSString* intervalValue;
156 
157 @end
158 
159 // Barcode Control Property
161 @private
163 }
164 
165 @property (nonatomic) bool matchValue;
166 
167 @end
168 
169 // Star rating Control Property
171 @private
172 
174 }
175 
176 @property (nonatomic) int displayStyle;
177 
178 @end
179 
180 // Switch Control Property
182 @private
184 }
185 
186 @property (nonatomic) bool isCheckBox;
187 
188 @end
189 
190 // List Control Property
192 @private
193  NSString *unsetValue;
196 }
197 @property (nonatomic, strong) NSString* unsetValue;
198 @property (nonatomic) int displayStyle;
199 @property (nonatomic) int itemsPerRow;
200 @end
201 
202 
204 - (BOOL)isNumberCell;
205 - (BOOL)isTextCell;
206 - (BOOL)isDateCell;
207 - (BOOL)isTimeCell;
209 
210 @optional
211 - (void)setPropertyType: (EnumControlType) iType andValue: (ControlProperty*) iValue;
212 @end
213 
214 
215 
216 @interface EditControlProperty : NSObject <MSTRHandler>{
219 }
220 
221 @property (nonatomic) EnumControlType mControlType;
222 @property (nonatomic, strong) ControlProperty* mControlProperty;
223 
224 -(bool) ParseFormatString: (NSString *) iFormatString forValue: (id<ControlPropertyDelegate>) ipValue;
225 
230 + (EditControlProperty*) createEditControlProperty:(id<ControlPropertyDelegate>) ipValue parseFormatString:(NSString*)nsString;
231 @end
int displayStyle
Definition: EditControlProperty.h:173
signed char BOOL
Definition: PDCwtypes.h:101
int maxlen
Definition: EditControlProperty.h:49
Definition: EditControlProperty.h:37
bool matchValue
Definition: EditControlProperty.h:162
Definition: EditControlProperty.h:22
Definition: EditControlProperty.h:35
NSString * valueList
Definition: EditControlProperty.h:59
Definition: EditControlProperty.h:19
int mShowPreview
Definition: EditControlProperty.h:65
ControlProperty * mControlProperty
Definition: EditControlProperty.h:218
Definition: EditControlProperty.h:134
int mWidthMode
Definition: EditControlProperty.h:69
Definition: EditControlProperty.h:170
bool limitMin
Definition: EditControlProperty.h:120
Definition: EditControlProperty.h:108
bool limitMax
Definition: EditControlProperty.h:121
Definition: EditControlProperty.h:27
Definition: EditControlProperty.h:15
Definition: EditControlProperty.h:203
Definition: EditControlProperty.h:118
Definition: EditControlProperty.h:25
EnumControlType mControlType
Definition: EditControlProperty.h:217
Definition: EditControlProperty.h:16
EnumDSSDataType
Definition: DSSIPhoneEnums.h:39
int mIsPassword
Definition: EditControlProperty.h:44
Definition: EditControlProperty.h:21
Definition: MSTRHandler.h:12
Definition: EditControlProperty.h:36
int itemsPerRow
Definition: EditControlProperty.h:195
int mLabelDisplayWidth
Definition: EditControlProperty.h:72
Definition: EditControlProperty.h:160
int mShowIcon
Definition: EditControlProperty.h:64
Definition: EditControlProperty.h:42
NSString * unsetValue
Definition: EditControlProperty.h:193
Definition: EditControlProperty.h:17
NSString * interval
Definition: EditControlProperty.h:55
NSString * maxValue
Definition: EditControlProperty.h:46
_EnumValidateMethod
Definition: EditControlProperty.h:32
Definition: EditControlProperty.h:24
Definition: EditControlProperty.h:38
int mInputValue
Definition: EditControlProperty.h:62
Definition: EditControlProperty.h:28
Definition: EditControlProperty.h:33
NSString * regularExp
Definition: EditControlProperty.h:123
int validateMethod
Definition: EditControlProperty.h:122
Definition: EditControlProperty.h:181
Definition: EditControlProperty.h:216
Definition: EditControlProperty.h:18
bool showline
Definition: EditControlProperty.h:110
EnumControlType
Definition: EditControlProperty.h:13
enum _EnumValidateMethod EnumValidateMethod
Definition: EditControlProperty.h:23
NSString * mUnsetString
Definition: EditControlProperty.h:71
Definition: EditControlProperty.h:34
Definition: EditControlProperty.h:146
int minlen
Definition: EditControlProperty.h:50
Definition: EditControlProperty.h:29
int mIncludeTime
Definition: EditControlProperty.h:52
Definition: EditControlProperty.h:20
Definition: EditControlProperty.h:26
NSString * minValue
Definition: EditControlProperty.h:47
double mControlWidth
Definition: EditControlProperty.h:67
Definition: EditControlProperty.h:191
int mShowByDefault
Definition: EditControlProperty.h:58
int mPreviewLength
Definition: EditControlProperty.h:66
int displayStyle
Definition: EditControlProperty.h:194
bool isCheckBox
Definition: EditControlProperty.h:183