Foxit PDF SDK  9.1
Defines.h
1 
18 #import <Foundation/Foundation.h>
19 
20 #define FSLocalizedString(string) (string == nil ? nil : [[NSBundle bundleForClass:[self class]] localizedStringForKey:(string) value:@"" table:@"FoxitLocalizable"])
21 
22 #define GetImage(name) [UIImage imageNamed:name inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil]
23 
24 #define isEmptyString(string) ([string isEqualToString:@""] || string == nil)
25 
26 #define EDIT_ITEM_STROKEOUT 8
27 #define EDIT_ITEM_UNDERLINE 10
28 #define EDIT_ITEM_HIGHLIGHT 12
29 #define EDIT_ITEM_NOTE 14
30 #define EDIT_ITEM_RECTANGLE 2
31 #define EDIT_ITEM_FREETEXT 6
32 #define EDIT_ITEM_PENCIL 4
33 
34 #define DOCUMENT_PATH [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]
35 
36 //Define thumbnail/overview image size
37 //old Width = 58.0
38 #define THUMBNAIL_IMAGE_WIDTH 58.0
39 #define THUMBNAIL_IMAGR_HEIGHT 58.0
40 #define THUMBNAIL_IMAGE_WIDTH_EX 84.0
41 #define THUMBNAIL_IMAGE_HEIGHT_EX 87.0
42 #define THUMBNAIL_IMAGE_WIDTH_LARGE_EX 128.0
43 #define THUMBNAIL_IMAGE_HEIGHT_LARGE_EX 134.0f
44 #define FILE_IMAGE_WIDTH 50.0
45 #define FILE_IMAGE_HEIGHT 54.0
46 #define OVERVIEW_IMAGE_WIDTH 160.0
47 #define OVERVIEW_IMAGE_HEIGHT 200.0
48 #define OVERVIEW_IMAGE_WIDTH_IPHONE 142.0
49 #define OVERVIEW_IMAGE_HEIGHT_IPHONE 177.0
50 
51 #define kPreventRepeatClickTime(_seconds_) \
52 static BOOL shouldPrevent; \
53 if (shouldPrevent) return; \
54 shouldPrevent = YES; \
55 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)((_seconds_) * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ \
56 shouldPrevent = NO; \
57 }); \
58 
59 #define FS_TOPBAR_ITEM_BOOKMARK_TAG 100
60 #define FS_TOPBAR_ITEM_BACK_TAG 101
61 #define FS_TOPBAR_ITEM_MORE_TAG 102
62 #define FS_TOPBAR_ITEM_SEARCH_TAG 103
63 #define FS_BOTTOMBAR_ITEM_PANEL_TAG 200
64 #define FS_BOTTOMBAR_ITEM_ANNOT_TAG 201
65 #define FS_BOTTOMBAR_ITEM_SIGNATURE_TAG 202
66 #define FS_BOTTOMBAR_ITEM_READMODE_TAG 203
67 #define FS_BOTTOMBAR_ITEM_FILLSIGN_TAG 204
68 
69 
70 #define STATE_NORMAL 1
71 #define STATE_REFLOW 2
72 #define STATE_SEARCH 3
73 #define STATE_EDIT 4
74 #define STATE_SIGNATURE 5
75 #define STATE_ANNOTTOOL 6
76 #define STATE_PANZOOM 7
77 #define STATE_PAGENAVIGATE 8
78 #define STATE_CREATEFORM 9
79 #define STATE_SPEECH 10
80 #define STATE_FILLSIGN 11
81 
82 #define Tool_Select @"Select"
83 #define Tool_Note @"Note"
84 #define Tool_Freetext @"Freetext"
85 #define Tool_Textbox @"Textbox"
86 #define Tool_Callout @"Callout"
87 #define Tool_Pencil @"Pencil"
88 #define Tool_Eraser @"Eraser"
89 #define Tool_Stamp @"Stamp"
90 #define Tool_Insert @"Insert"
91 #define Tool_Replace @"Replace"
92 #define Tool_Attachment @"Attachment"
93 #define Tool_Signature @"Signature"
94 #define Tool_Line @"Line"
95 #define Tool_Arrow @"Arrow"
96 #define Tool_Markup @"Markup"
97 #define Tool_Highlight @"Highlight"
98 #define Tool_Squiggly @"Squiggly"
99 #define Tool_Strikeout @"Strikeout"
100 #define Tool_Underline @"Underline"
101 #define Tool_Shape @"Shape"
102 #define Tool_Rectangle @"Rectangle"
103 #define Tool_Oval @"Oval"
104 #define Tool_Distance @"Distance"
105 #define Tool_Image @"Image"
106 #define Tool_Polygon @"Polygon"
107 #define Tool_Cloud @"Cloud"
108 #define Tool_PolyLine @"PolyLine"
109 #define Tool_Audio @"Audio"
110 #define Tool_Video @"Video"
111 #define Tool_Multiple_Selection @"MultipleSelection"
112 #define Tool_Redaction @"Redaction"
113 #define Tool_Form @"Form"
114 #define Tool_Fill_Sign @"FillSign"
115 
116 #define Module_Fill_Sign @"FillSign"
117 
118 
119 #define FSAnnotArrowLine 99
120 #define FSAnnotInsert 101
121 #define FSAnnotTextbox 103
122 #define FSAnnotCloud 105
123 #define FSAnnotCallout 107
124 #define FSAnnotDistance 109
125 #define FSAnnotReplace 111
126 
127 #define IOS11_OR_LATER ([[UIDevice currentDevice] systemVersion].floatValue >= 11.0)
128 
129 #if defined(TARGET_OS_IPHONE) && defined(TARGET_OS_UIKITFORMAC)
130  #if !TARGET_OS_UIKITFORMAC && TARGET_OS_IPHONE
131  #define _MAC_CATALYST_ 0
132  #else
133  #define _MAC_CATALYST_ 1
134  #endif
135 #else
136  #define _MAC_CATALYST_ 0
137 #endif