SBSOverlayController.h
Go to the documentation of this file.
1 //
2 // SBSOverlayController.h
3 // ScanditBarcodeScanner
4 //
5 // Created by Marco Biasini on 09/06/15.
6 // Copyright (c) 2015 Scandit AG. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 
26 #import <UIKit/UIKit.h>
27 #import "AudioToolbox/AudioServices.h"
28 
29 #import "SBSCommon.h"
30 
32 @class SBSBarcodePicker;
33 
40 
53 - (void)overlayController:(nonnull SBSOverlayController *)overlayController
54  didCancelWithStatus:(nullable NSDictionary *)status;
55 
56 @end
57 
71 
82 
84 
85 
103 @interface SBSOverlayController : UIViewController
104 
105 
111 @property (nullable, nonatomic, strong, readonly) UIToolbar *toolBar;
112 
118 @property (nullable, nonatomic, weak) id<SBSOverlayControllerDidCancelDelegate> cancelDelegate;
119 
128 @property (nonatomic, assign) SBSGuiStyle guiStyle;
129 
133 
143 - (BOOL)beepEnabled;
144 
150 - (void)setBeepEnabled:(BOOL)enabled;
151 
152 
160  - (BOOL)vibrateEnabled;
161 
167 - (void)setVibrateEnabled:(BOOL)enabled;
168 
185 - (BOOL)setScanSoundResource:(nonnull NSString *)path ofType:(nonnull NSString *)extension;
187 
188 
192 
204 - (void)setTorchEnabled:(BOOL)enabled;
205 
218 - (BOOL)setTorchOnImage:(nonnull UIImage *)torchOnImage
219  pressed:(nonnull UIImage *)torchOnPressedImage SBS_SWIFT_NAME(setTorchOnImage(torchOnImage:torchOnPressedImage:));
220 
239 - (BOOL)setTorchOnImageResource:(nonnull NSString *)fileName
240  pressedResource:(nonnull NSString *)pressedFileName
241  ofType:(nonnull NSString *)extension;
242 
255 - (BOOL)setTorchOffImage:(nonnull UIImage *)torchOffImage
256  pressed:(nonnull UIImage *)torchOffPressedImage SBS_SWIFT_NAME(setTorchOffImage(torchOffImage:torchOffPressedImage:));
257 
274 - (BOOL)setTorchOffImageResource:(nonnull NSString *)fileName
275  pressedResource:(nonnull NSString *)pressedFileName
276  ofType:(nonnull NSString *)extension;
277 
290 - (void)setTorchButtonLeftMargin:(float)leftMargin
291  topMargin:(float)topMargin
292  width:(float)width
293  height:(float)height SBS_SWIFT_NAME(setTorchButton(leftMargin:topMargin:width:height:));
294 
307 - (void)setTorchOffButtonAccessibilityLabel:(nonnull NSString *)label
308  hint:(nonnull NSString *)hint;
309 
322 - (void)setTorchOnButtonAccessibilityLabel:(nonnull NSString *)label
323  hint:(nonnull NSString *)hint;
324 
326 
327 
331 
344 - (void)setCameraSwitchVisibility:(SBSCameraSwitchVisibility)visibility;
345 
358 - (BOOL)setCameraSwitchImage:(nonnull UIImage *)cameraSwitchImage
359  pressed:(nonnull UIImage *)cameraSwitchPressedImage;
360 
379 - (BOOL)setCameraSwitchImageResource:(nonnull NSString *)fileName
380  pressedResource:(nonnull NSString *)pressedFileName
381  ofType:(nonnull NSString *)extension;
382 
398 - (void)setCameraSwitchButtonRightMargin:(float)rightMargin
399  topMargin:(float)topMargin
400  width:(float)width
401  height:(float)height SBS_SWIFT_NAME(setCameraSwitchButton(rightMargin:topMargin:width:height:));
402 
416 - (void)setCameraSwitchButtonBackAccessibilityLabel:(nonnull NSString *)label
417  hint:(nonnull NSString *)hint;
418 
432 - (void)setCameraSwitchButtonFrontAccessibilityLabel:(nonnull NSString *)label
433  hint:(nonnull NSString *)hint;
434 
436 
437 
441 
451 - (void)setTextRecognitionSwitchVisible:(BOOL)visible;
453 
454 
458 
474 - (void)drawViewfinder:(BOOL)draw SBS_DEPRECATED;
475 
495 - (void)setViewfinderHeight:(float)h
496  width:(float)w
497  landscapeHeight:(float)lH
498  landscapeWidth:(float)lW SBS_SWIFT_NAME(setViewfinder(height:width:landscapeHeight:landscapeWidth:)) SBS_DEPRECATED_MSG_ATTRIBUTE("use setViewfinderWidth:height:landscapeWidth:landscapeHeight: instead.");
499 
519 - (void)setViewfinderWidth:(float)w
520  height:(float)h
521  landscapeWidth:(float)lW
522  landscapeHeight:(float)lH SBS_SWIFT_NAME(setViewfinder(width:height:landscapeWidth:landscapeHeight:));
523 
543 - (void)setViewfinderPortraitWidth:(float)w
544  height:(float)h SBS_SWIFT_NAME(setViewfinderPortrait(width:height:));
545 
546 
566 - (void)setViewfinderLandscapeWidth:(float)w
567  height:(float)h SBS_SWIFT_NAME(setViewfinderLandscape(width:height:));
568 
582 - (void)setViewfinderColor:(float)r green:(float)g blue:(float)b SBS_SWIFT_NAME(setViewfinderColor(red:green:blue:));
583 
597 - (void)setViewfinderDecodedColor:(float)r green:(float)g blue:(float)b SBS_SWIFT_NAME(setViewfinderDecodedColor(red:green:blue:));
598 
599 
608 - (void)resetUI;
610 
611 
615 
624 - (void)showToolBar:(BOOL)show;
625 
635 - (void)setToolBarButtonCaption:(nonnull NSString *)caption;
637 
638 
642 
655 - (void)setMissingCameraPermissionInfoText:(nonnull NSString *)infoText;
657 
666 - (void)setMatrixScanHighlightingColor:(nonnull UIColor *)color forState:(SBSMatrixScanHighlightingState)state;
667 
668 @end
669 
Definition: SBSOverlayController.h:66
Controls the camera and orchestrates the barcode scanning process.
Definition: SBSBarcodePicker.h:145
SBSMatrixScanHighlightingState
Definition: SBSOverlayController.h:77
controls the scan screen user interface.
Definition: SBSOverlayController.h:103
Definition: SBSOverlayController.h:78
Definition: SBSOverlayController.h:80
UIToolbar * toolBar
The tool bar that can be shown at the bottom of the scan screen.
Definition: SBSOverlayController.h:111
Definition: SBSOverlayController.h:67
Definition: SBSOverlayController.h:64
#define SBS_ENUM_END(name)
Definition: SBSCommon.h:17
SBSGuiStyle
Enumeration of different GUI styles.
Definition: SBSCommon.h:116
BOOL beepEnabled()
Whether to play a sound when a barcode is recognized. If the phone's ring mode is set to muted or vib...
id< SBSOverlayControllerDidCancelDelegate > cancelDelegate
The overlay controller delegate that handles the didCancelWithStatus callback.
Definition: SBSOverlayController.h:118
Definition: SBSOverlayController.h:69
SBSGuiStyle guiStyle
The GUI style drawn to display the indicator where the code should be scanned and the visualization o...
Definition: SBSOverlayController.h:128
void resetUI()
Resets the scan screen user interface to its initial state.
#define SBS_DEPRECATED
Definition: SBSCommon.h:9
Protocol cancel events.
Definition: SBSOverlayController.h:39
BOOL vibrateEnabled()
Whether the device should vibrate when a code was recognized.
Definition: SBSOverlayController.h:68
Definition: SBSOverlayController.h:79
Definition: SBSOverlayController.h:65
SBSCameraSwitchVisibility
Definition: SBSOverlayController.h:63
#define SBS_ENUM_BEGIN(name)
Definition: SBSCommon.h:16