Linear Control Group

Defined in framework ScanditCaptureCore

enum LinearControlGroupOrientation

Added in version 6.14.0

The orientation in which a LinearControlGroup will render its child controls.

vertical

Added in version 6.14.0

Vertical orientation.

horizontal

Added in version 6.14.0

Horizontal orientation.

LinearControlGroup
open class LinearControlGroup : NSObject, Control

Added in version 6.14.0

A Control that contains multiple sub-controls allowing for spacing and orientation to be specified through initializer. This control will arrange child controls either horizontally in a single column or vertically in a single row. Use one of the initializers to build an instance of this control and add to a DataCaptureView by calling DataCaptureView.addControl().

For example, in Swift:

let torchControl = TorchSwitchControl()
let macroModeControl = MacroModeControl()
let linearControlGroup = LinearControlGroup(controls:[torchControl, macroModeControl], orientation:.horizontal);
captureView.addControl(linearControlGroup)

or, in Objective-C:

SDCTorchSwitchControl *torchControl = [[SDCTorchSwitchControl alloc] init];
SDCMacroModeControl *macroModeControl = [[SDCMacroModeControl alloc] init];
SDCLinearControlGroup *linearControlGroup = [[SDCLinearControlGroup alloc] initWithControls:@[torchControl, macroModeControl] orientation:SDCLinearControlGroupOrientationHorizontal];
[self.captureView addControl:linearControlGroup];

Note

The controls are added from top to bottom when vertical, from left to right when horizontal.

init
convenience init(controls: Array<any Control>)

Added in version 6.14.0

Initializes a new linear control group with controls which will be displayed inside the LinearControlGroup.

init
convenience init(controls: Array<any Control>, orientation: LinearControlGroupOrientation)

Added in version 6.14.0

Initializes a new linear control group with controls which will be displayed inside the LinearControlGroup and specified orientation.

init
convenience init(controls: Array<any Control>, spacing: FloatWithUnit)

Added in version 6.14.0

Initializes a new linear control group with controls which will be displayed inside the LinearControlGroup and specified spacing applied between controls inside the LinearControlGroup.

init
init(controls: Array<any Control>, orientation: LinearControlGroupOrientation, spacing: FloatWithUnit)

Added in version 6.14.0

Initializes a new linear control group with controls which will be displayed inside the LinearControlGroup, specified orientation and spacing applied between controls inside the LinearControlGroup.

init
convenience init(fromJSONString JSONString: String) throws

Added in version 6.15.0

Constructs a new linear control group with the provided JSON serialization.

orientation
open var orientation: LinearControlGroupOrientation { get }

Added in version 6.14.0

Get the orientation for the LinearControlGroup.

spacing
open var spacing: FloatWithUnit { get }

Added in version 6.14.0

Get the spacing applied between controls inside the LinearControlGroup being built.

controls
open var controls: Array<any Control> { get }

Added in version 6.14.0

Get the list of controls currently in this group.