18 #ifndef UIExtensionsManager_h
19 #define UIExtensionsManager_h
21 #import "PanelController.h"
22 #import "FSSettingBar.h"
24 #import <FoxitRDK/FSPDFViewControl.h>
25 #import "FSReadToolbarItem.h"
26 #import "FSUtilities.h"
27 #import "FSMenuViewManager.h"
28 #import "FSMainToolbar.h"
29 #import "FSMenuControl.h"
30 #import "FSPermissionProvider.h"
31 #import "FSAppInfoProvider.h"
35 NS_ASSUME_NONNULL_BEGIN
124 #pragma mark - Batch Operation
129 - (void)onAnnotsAdded:(NSArray<
FSAnnot*> *)annots;
134 - (void)onAnnotsWillDelete:(NSArray<
FSAnnot*> *)annots;
146 - (void)onToolChanged:(NSString *)lastToolName CurrentToolName:(NSString *)toolName;
178 #pragma mark - PageView Gesture+Touch
187 - (BOOL)onPageViewLongPress:(
int)pageIndex recognizer:(UILongPressGestureRecognizer *)recognizer;
196 - (BOOL)onPageViewTap:(
int)pageIndex recognizer:(UITapGestureRecognizer *_Nullable)recognizer;
205 - (BOOL)onPageViewPan:(
int)pageIndex recognizer:(UIPanGestureRecognizer *)recognizer;
214 - (BOOL)onPageViewShouldBegin:(
int)pageIndex recognizer:(UIGestureRecognizer *)gestureRecognizer;
225 - (BOOL)onPageViewTouchesBegan:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event;
236 - (BOOL)onPageViewTouchesMoved:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event;
247 - (BOOL)onPageViewTouchesEnded:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event;
258 - (BOOL)onPageViewTouchesCancelled:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event;
268 - (void)onDraw:(
int)pageIndex inContext:(CGContextRef)context;
296 - (void)onAnnotSelected:(
FSAnnot *)annot;
301 - (void)onAnnotDeselected:(
FSAnnot *)annot;
309 - (BOOL)addAnnot:(
FSAnnot *)annot;
318 - (BOOL)addAnnot:(
FSAnnot *)annot addUndo:(BOOL)addUndo;
325 - (BOOL)modifyAnnot:(
FSAnnot *)annot;
334 - (BOOL)modifyAnnot:(
FSAnnot *)annot addUndo:(BOOL)addUndo;
341 - (BOOL)removeAnnot:(
FSAnnot *)annot;
350 - (BOOL)removeAnnot:(
FSAnnot *)annot addUndo:(BOOL)addUndo;
358 - (BOOL)flattenAnnot:(
FSAnnot *)annot;
359 #pragma mark - PageView Gesture+Touch
370 - (BOOL)onPageViewLongPress:(
int)pageIndex recognizer:(UILongPressGestureRecognizer *)recognizer annot:(
FSAnnot *_Nullable)annot;
381 - (BOOL)onPageViewTap:(
int)pageIndex recognizer:(UITapGestureRecognizer *)recognizer annot:(
FSAnnot *_Nullable)annot;
392 - (BOOL)onPageViewPan:(
int)pageIndex recognizer:(UIPanGestureRecognizer *)recognizer annot:(
FSAnnot *)annot;
403 - (BOOL)onPageViewShouldBegin:(
int)pageIndex recognizer:(UIGestureRecognizer *)gestureRecognizer annot:(
FSAnnot *_Nullable)annot;
416 - (BOOL)onPageViewTouchesBegan:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event annot:(
FSAnnot *)annot;
429 - (BOOL)onPageViewTouchesMoved:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event annot:(
FSAnnot *)annot;
442 - (BOOL)onPageViewTouchesEnded:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event annot:(
FSAnnot *)annot;
455 - (BOOL)onPageViewTouchesCancelled:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event annot:(
FSAnnot *)annot;
475 - (void)onDraw:(
int)pageIndex inContext:(CGContextRef)context annot:(
FSAnnot *_Nullable)annot;
486 - (void)onAnnotChanged:(
FSAnnot *)annot property:(
long)property from:(NSValue *)oldValue to:(NSValue *)newValue;
505 - (void)onXFAWidgetDeselected:(
FSXFAWidget *)widget;
516 - (BOOL)onPageViewTap:(
int)pageIndex recognizer:(UITapGestureRecognizer *)recognizer widget:(
FSXFAWidget *_Nullable)widget;
527 - (BOOL)onPageViewShouldBegin:(
int)pageIndex recognizer:(UIGestureRecognizer *)gestureRecognizer widget:(
FSXFAWidget *_Nullable)widget;
540 - (BOOL)onPageViewTouchesBegan:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event widget:(
FSXFAWidget *_Nullable)widget;
553 - (BOOL)onPageViewTouchesMoved:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event widget:(
FSXFAWidget *_Nullable)widget;
566 - (BOOL)onPageViewTouchesEnded:(
int)pageIndex touches:(NSSet *)touches withEvent:(UIEvent *)event widget:(
FSXFAWidget *_Nullable)widget;
575 - (void)onDraw:(
int)pageIndex inContext:(CGContextRef)context widget:(
FSXFAWidget *_Nullable)widget;
585 - (void)onFullScreen:(BOOL)isFullScreen;
605 - (BOOL)onLinkOpen:(
id)link LocationInfo:(CGPoint)pointParam;
623 - (void)onDocModified:(
FSPDFDoc *)doc;
634 - (void)onDigitalSignatureSigned:(BOOL)success;
644 - (void)onDigitalSignatureSigned:(BOOL)success originalDoc:(
FSPDFDoc *)originalDoc outputPath:(NSString *)outputPath;
648 - (BOOL)canReplaceDigitalSignatureOriginalFile:(NSString *)originalFile;
669 - (BOOL)openFileAtPath:(NSString *)filePath;
713 - (BOOL)uiextensionsManager:(
UIExtensionsManager *)uiextensionsManager openNewDocAtPath:(NSString *)path shouldCloseCurrentDoc:(BOOL)closeCurrentDoc completionCallBack:(
void (^)(
void))completionCallBack;
721 - (void)quitUIExtensionsManager:(
UIExtensionsManager *)uiextensionsManager control:(UIControl *)control;
742 @property (nonatomic, strong) NSMutableDictionary<NSNumber *, FSReadToolSettings *> *
addToolsSettings;
744 @property (nonatomic, weak) id<UIExtensionsManagerDelegate>
delegate;
764 @property (nonatomic, copy, nullable)
void (^
goBack)(void);
813 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
815 @property (nonatomic, weak, readonly) UIWindowScene *windowScene API_AVAILABLE(ios(13.0));
837 - (id)initWithPDFViewControl:(
FSPDFViewCtrl *)viewctrl configuration:(NSData *_Nullable)jsonConfigData;
897 - (void)enableTopToolbar:(BOOL)isEnabled;
903 - (void)enableBottomToolbar:(BOOL)isEnabled;
910 - (void)enableSmallTopToolbar:(BOOL)isEnabled;
916 - (void)enableSmallBottomToolbar:(BOOL)isEnabled;
918 #pragma mark - Toolhandler and AnnotHandler registration.
926 - (id<
IToolHandler>)getToolHandlerByName:(NSString *)name;
941 - (void)registerToolHandler:(
id<
IToolHandler>)toolHandler;
948 - (void)unregisterToolHandler:(
id<
IToolHandler>)toolHandler;
955 - (void)registerAnnotHandler:(
id<
IAnnotHandler>)annotHandler;
962 - (void)unregisterAnnotHandler:(
id<
IAnnotHandler>)annotHandler;
964 #pragma mark - Tool and annotation event listeners.
994 #pragma mark - Document modified event listeners.
1011 #pragma mark - link event listeners.
1027 #pragma mark - signature event listeners.
1043 #pragma mark - UI Interaction event listeners.
1059 #pragma mark - Property bar of annotation for setting/getting annotation color and opacity.
1068 - (void)showPropertyWithToolSettings:(
FSReadToolSettings *)toolSettings rect:(CGRect)rect inView:(UIView *)view;
1075 - (void)showSearchBar:(BOOL)show;
1099 #pragma mark - Module
1104 - (__kindof id<
IModule>)getModuleByName:(FSModuleStringName)name;
1111 - (void)setFullScreen:(BOOL)fullScreen;
1128 + (void)printDoc:(
FSPDFDoc *)doc animated:(BOOL)animated inWindow:(UIWindow *)window jobName:(nullable NSString *)jobName delegate:(nullable
id<UIPrintInteractionControllerDelegate>)delegate completionHandler:(nullable UIPrintInteractionCompletionHandler)completion;
1141 + (void)printDoc:(
FSPDFDoc *)doc fromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated inWindow:(UIWindow *)window jobName:(nullable NSString *)jobName delegate:(nullable
id<UIPrintInteractionControllerDelegate>)delegate completionHandler:(nullable UIPrintInteractionCompletionHandler)completion;
1170 -(void)documentSaveAS:(
void (^_Nullable)(
void))successed error:(
void (^_Nullable)(
void))error;
1177 - (void)setMoreItemClikedCallback:(
void (^)(UIView* moreItem))clickedCallback;
1179 #pragma mark - Main toolbar item info
1198 -(void)setToolbarItemHiddenWithTag:(FS_TOOLBAR_ITEM_TAG)itemTag hidden:(BOOL)isHidden;
1206 - (void)enableModification:(BOOL)isEnabled;
1216 NS_ASSUME_NONNULL_END
@ FSMeasurementMM
Millimeters.
Definition: UIExtensionsManager.h:683
The PDF document event listener.
Definition: FSPDFViewControl.h:203
FSXFAWidget * currentWidget
The Current selected xfa widget.
Definition: UIExtensionsManager.h:793
id< FSActionCallback > actionHandler
The Current action handler.
Definition: UIExtensionsManager.h:790
FSReadToolSettingsType
The read tool settings type.
Definition: FSReadToolbarItem.h:17
BOOL canUpdateAnnotDefaultProperties
Can update annot default properties, default is yes.
Definition: UIExtensionsManager.h:748
UIColor * primaryColor
Get/Set the primary color The default is #923094.
Definition: UIExtensionsManager.h:730
The UI extensions manager which has included the default implementation of text selection tool,...
Definition: UIExtensionsManager.h:726
void(^ goBack)(void)
Caller can choose to provide a block to execute when user tap on 'back' button on the top toolbar.
Device rotation delegate.
Definition: FSPDFViewControl.h:178
BOOL enableHighlightLinks
Whether to allow to highlight links.
Definition: UIExtensionsManager.h:754
Module base.
Definition: UIExtensionsManager.h:38
id< IFSPermissionProvider > permissionProvider
Permission provider.
Definition: UIExtensionsManager.h:806
The UI extensions manager.
Definition: FSPDFViewControl.h:618
FSToolbarType
Panel types.
Definition: UIExtensionsManager.h:609
FSMainTopbar * topToolbar
The Current UIExtensionsManager topToolbar.
Definition: UIExtensionsManager.h:766
Definition: FSPDFObjC.h:4922
Panel controller.
Definition: PanelController.h:36
NSSet< UIExtensionsManager * > * openedExtensionsManagers()
MoreMenuView * more
The more menu View.
Definition: UIExtensionsManager.h:738
id< UIExtensionsManagerDelegate > delegate
Delegate of UI extensions manager.
Definition: UIExtensionsManager.h:744
BOOL continueAddAnnot
Whether to keep tool active after using it to add an annotation.
Definition: UIExtensionsManager.h:774
BOOL isAutoSaveDoc
Set to automatically save documents Yes/No.
Definition: UIExtensionsManager.h:786
UIColor * stateBarColor
Get/Set the stateBar color.
Definition: UIExtensionsManager.h:732
FSAnnot * currentAnnot
The Current selected annotation.
Definition: UIExtensionsManager.h:750
Definition: UIExtensionsManager.h:687
FSSettingBar * settingBar
The setting bar. It shows when tap on the view button in the bottom bar.
Definition: UIExtensionsManager.h:772
Definition: FSMainToolbar.h:214
FSPanelController * panelController
The panel controller.
Definition: UIExtensionsManager.h:770
BOOL canAddAnnot()
Judge whether the annotation can be added.
BOOL isMultiFileMode
Whether the preview mode is multiple file mode.
Definition: UIExtensionsManager.h:784
BOOL isFullScreen
Whether is full screen. When full screen, top and bottom bar is not shown.
Definition: UIExtensionsManager.h:776
NSString * annotAuthor
Set/get annot author.
Definition: UIExtensionsManager.h:734
FSUIManagerState getState()
Get state of extensions manager.
FSAppInfoProvider * appInfoProvider
Set/Get the app Info provider.
Definition: UIExtensionsManager.h:808
FSUIManagerState
States of extensions manager.
Definition: FSUtilities.h:270
FSPDFDocSaveFlags docSaveFlag
The Current doc save flag.
Definition: UIExtensionsManager.h:788
Definition: UIExtensionsManager.h:661
UIColor * highlightFormColor
Get/Set the highlight color for form and call -[FSPDFViewCtrl Refresh] if you want to take effect imm...
Definition: UIExtensionsManager.h:762
Modules config for UIExtensionsManager.
Definition: UIExtensionsConfig.h:109
BOOL canModifyAnnot()
Judge whether the annotation can be modified.
UIStatusBarStyle preferredStatusBarStyle
The controller preferred status bar style for UIExtensionsManager. The default is UIStatusBarStyleDef...
Definition: UIExtensionsManager.h:728
FSPDFViewCtrl * pdfViewCtrl
The PDF view control.
Definition: UIExtensionsManager.h:736
The page event listener.
Definition: FSPDFViewControl.h:255
Definition: FSAppInfoProvider.h:18
Signature modified event listener.
Definition: UIExtensionsManager.h:628
Foxit PDF view control for viewing/editing/saving the PDF file.
Definition: FSPDFViewControl.h:783
BOOL isScreenLocked
Whether screen rotation is locked or not.
Definition: UIExtensionsManager.h:778
id< FSMenuControlDelegate > menuControlDelegate
Delegate of menucontrol.
Definition: UIExtensionsManager.h:804
FSMainBottombar * bottomToolbar
The Current UIExtensionsManager bottomToolbar.
Definition: UIExtensionsManager.h:768
FSAnnotType
Enumeration for PDF annotation type.
Definition: FSPDFObjC.h:3809
BOOL isDocModified
Whether the current document is modified or not.
Definition: UIExtensionsManager.h:782
Annotations permission delegate.
Definition: UIExtensionsManager.h:44
A search event listener.
Definition: UIExtensionsManager.h:150
id< IToolHandler > currentToolHandler
The Current tool handler.
Definition: UIExtensionsManager.h:746
Definition: FSMainToolbar.h:263
Definition: FSPDFObjC.h:3901
void updatePageNumber()
update page number.
NSMutableDictionary< NSNumber *, FSReadToolSettings * > * addToolsSettings
Get/set settings on add tools .If set to nil, it will be automatically created using default config.
Definition: UIExtensionsManager.h:742
The ui interaction event listener.
Definition: UIExtensionsManager.h:652
id< FSExtFileOpenDelegate > extFileOpenDelegate
Delegate for opening external file .
Definition: UIExtensionsManager.h:810
FSModuleStringName getName()
Get the module name.
BOOL disableFingerWhenLinkApplePencil
Whether to disable finger add ink type annotation when linking to Apple Pencil . The default is YES.
Definition: UIExtensionsManager.h:812
FSMeasurementUnits
Enumeration for measurement units of page size information.
Definition: UIExtensionsManager.h:677
The annotation handler, it should handle the operations on the specified annotation.
Definition: UIExtensionsManager.h:282
BOOL enableHighlightForm
Whether to allow to highlight form and call -[FSPDFViewCtrl Refresh] if you want to take effect immed...
Definition: UIExtensionsManager.h:756
FSUIElementType
ui emlement types.
Definition: FSUtilities.h:25
The full screen event listener.
Definition: UIExtensionsManager.h:579
UIExtensionsManager * currentExtManager
Definition: UIExtensionsManager.h:1212
void resumeAutoFullScreen()
Resume the auto full screen mode.
Definition: FSPDFObjC.h:185
UIColor * linksHighlightColor
Get/Set the highlight color for links.
Definition: UIExtensionsManager.h:758
NSString * getCurrentSelectedText()
Get current selected text.
NSString * preventOverrideFilePath
Prevent to override original pdf file.
Definition: UIExtensionsManager.h:780
void suspendAutoFullScreen()
Suspend the auto full screen mode.
@ FSTopBar
The top tool bar.
Definition: UIExtensionsManager.h:611
Annotation event listener.
Definition: UIExtensionsManager.h:64
FSMenuViewManager * menuViewManager
The custom view manager .
Definition: UIExtensionsManager.h:740
@ FSMeasurementCM
Centermeters.
Definition: UIExtensionsManager.h:681
Definition: FSPDFObjC.h:5757
A link event listener.
Definition: UIExtensionsManager.h:597
@ FSMeasurementInch
Inch.
Definition: UIExtensionsManager.h:679
BOOL canDeleteAnnot()
Judge whether the annotation can be deleted.
id< FSAnnotsPermissionDelegate > annotsPermissionDelegate
Delegate of annotations permission. If set, once one of the implementation results is false,...
Definition: UIExtensionsManager.h:802
Setting bar is actived by tapping "View" item on the bottom bar.
Definition: FSSettingBar.h:197
The page number event listener.
Definition: UIExtensionsManager.h:589
BOOL isAutoSaveSignedDoc
Set to automatically save the signed document Yes/No.
Definition: UIExtensionsManager.h:796
BOOL useLogicalPageNumbers
Whether to use logical page numbers. The default is NO.
Definition: UIExtensionsManager.h:818
FSMeasurementUnits measurementUnits
Measurement units for page size information. The default is inch.
Definition: UIExtensionsManager.h:820
BOOL prefersStatusBarHidden
Whether the PDF view hide the status bar.
Definition: UIExtensionsManager.h:800
@ FSBottomBar
The bottom tool bar.
Definition: UIExtensionsManager.h:613
BOOL enableLinks
Whether to allow to jump to link address when tap on the link annotation.
Definition: UIExtensionsManager.h:752
Document modified event listener.
Definition: UIExtensionsManager.h:617
UIColor * selectionHighlightColor
Get/Set the highlight color for text selection.
Definition: UIExtensionsManager.h:760
void onSearchCanceled()
Triggered when the text searching is canceled.
Recovery event listener used when view control runs out of memory.
Definition: FSPDFViewControl.h:165
NSString * signedDocSavePath
Set/Get the full PDF file path where the signed document is saved and it works when set to automatica...
Definition: UIExtensionsManager.h:798
Definition: UIExtensionsManager.h:1211
void onSearchStarted()
Triggered when the text searching is started.
NSMutableDictionary * getToolbarItemHiddenStatus()
Get toolbar item hide/show status.
FSPDFDocSaveFlags
Enumeration for PDF document saving flags.
Definition: FSPDFObjC.h:4871
@2025 Foxit Software Incorporated. All rights reserved.