Library
ISOFormFieldController.h
1 //
2 // ISOFormFieldController.h
3 // iSignatureOffice
4 //
5 // Created by Florian Student on 8/14/12.
6 // Copyright (c) 2012 Florian Student. All rights reserved.
7 //
8 
9 #import "ISOFormFieldControllerDelegate.h"
11 
12 #define FORM_FIELD_DEFAULT_BG_COLOR [UIColor colorWithRed:221.0f/255.0f green:228.0f/255.0f blue:255.0f/255.0f alpha:1.0]
13 #define FORM_FIELD_DEFAULT_BG_COLOR_W_TRANSP [UIColor colorWithRed:85.0f/255.0f green:120.0f/255.0f blue:255.0f/255.0f alpha:0.2]
14 #define FORM_FIELD_SELECTED_ITEM_COLOR [UIColor colorWithRed:(153.0f + 5)/255.0f green:(193.0f + 5)/255.0f blue:(228.0f + 5)/255.0f alpha:1.0]
15 #define SIGNATURE_FIELD_EDITING_COLOR [UIColor colorWithRed:255.0f/255.0f green:255.0f/255.0f blue:0.0f/255.0f alpha:0.65]
16 
17 
18 //#define FORM_FIELD_DEFAULT_BG_COLOR_W_TRANSP_A [UIColor colorWithRed:85.0f/255.0f green:120.0f/255.0f blue:255.0f/255.0f alpha:0.0]
19 //#define FORM_FIELD_DEFAULT_BG_COLOR_W_TRANSP_B [UIColor colorWithRed:85.0f/255.0f green:120.0f/255.0f blue:255.0f/255.0f alpha:2.2]
20 
21 
22 #define FORM_FIELD_TYPE_SIGNATURE @"Signature"
23 #define FORM_FIELD_TYPE_TEXTFIELD @"Text"
24 #define FORM_FIELD_TYPE_CHECKBOX @"Checkbox"
25 #define FORM_FIELD_TYPE_RADIOBUTTON @"Radiobutton"
26 #define FORM_FIELD_TYPE_LISTBOX @"Listbox"
27 #define FORM_FIELD_TYPE_COMBOBOX @"Choice"
28 #define FORM_FIELD_TYPE_PHOTOFIELD @"photofield" //TODO
29 #define FORM_FIELD_TYPE_PHOTOSIGNARUREFIELD @"photosignaturefield" //TODO
30 
31 @interface ISOFormFieldController : UIViewController
32 
33 @property (strong, nonatomic, getter=getParameters) NSMutableDictionary* parameters;
34 @property (weak, nonatomic, setter=setDelegate:, getter=getDelegate) id<ISOFormFieldControllerDelegate> delegate; //delegate is ISOPageScrollView, sets property in addFormFields
35 @property (strong, nonatomic) NSString* type;
36 @property (strong, nonatomic) NSString* identifier; //convert to 32 bit int
37 @property (nonatomic, assign) BOOL hasFocus;
38 @property (nonatomic, assign) int pageIndex; // the page this formfield is on
39 @property (nonatomic, assign) BOOL required;
40 @property (nonatomic, assign) BOOL locked; // YES means the field cannot be modified by the user, e.g. a SignatureFormField will be locked after the signature is complete
41 @property (weak, nonatomic) ISODocumentViewController* documentViewController;
42 
43 
44 - (CGRect)frameForPresentation;
45 - (id)initWithParameters:(NSMutableDictionary*)params;
46 
47 - (void)acquireFocus;
48 - (void)refocus;
49 - (void)relinquishFocus;
50 
51 - (void)removeSelfFromPage;
52 
53 + (ISOFormFieldController*)createFormFieldControllerFromDictionaryRepresentation:(NSMutableDictionary*)representation forDocumentViewController:(ISODocumentViewController*)documentViewController;
54 
55 @end
Definition: ISOFormFieldController.h:31
void relinquishFocus()
Definition: ISOFormFieldController.m:131
void refocus()
Definition: ISOFormFieldController.m:122
void removeSelfFromPage()
Definition: ISOFormFieldController.m:143
void acquireFocus()
Definition: ISOFormFieldController.m:105
Definition: ISODocumentViewController.h:14