FMLiveSwitchLayoutPreset Class Reference

A layout preset. More...

Instance Methods

(FMLiveSwitchLayoutAlignment) - alignment
 Gets the alignment of the layout. More...
 
(void) - applyPreset:
 Applies a preset. More...
 
(int) - blockHeight
 Gets the height of block elements in pixels. More...
 
(double) - blockHeightPercent
 Gets the height of block elements as a percent of the container height between 0.0 and 1.0. More...
 
(int) - blockMarginX
 Gets the X-margin between block elements and the layout edge in pixels. More...
 
(double) - blockMarginXPercent
 Gets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0. More...
 
(int) - blockMarginY
 Gets the Y-margin between block elements and the layout edge in pixels. More...
 
(double) - blockMarginYPercent
 Gets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0. More...
 
(int) - blockWidth
 Gets the width of block elements in pixels. More...
 
(double) - blockWidthPercent
 Gets the width of block elements as a percent of the container width between 0.0 and 1.0. More...
 
(FMLiveSwitchLayout *) - calculateLayoutWithLayoutWidth:layoutHeight:local:remoteCount:origin:localVideoSize:remoteVideoSizes:
 Gets a video frame layout. More...
 
(FMLiveSwitchLayout *) - calculateLayoutWithLayoutWidth:layoutHeight:remoteCount:origin:
 Gets a video frame layout. More...
 
(void) - copyToPreset:
 Copies this preset's properties to another preset. More...
 
(FMLiveSwitchLayoutDirection) - direction
 Gets the direction of the layout flow. More...
 
(int) - floatHeight
 Gets the height of floating elements in pixels. More...
 
(double) - floatHeightPercent
 Gets the height of floating elements as a percent of the container height between 0.0 and 1.0. More...
 
(int) - floatMarginX
 Gets the X-margin between floating elements and the layout edge in pixels. More...
 
(double) - floatMarginXPercent
 Gets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0. More...
 
(int) - floatMarginY
 Gets the Y-margin between floating elements and the layout edge in pixels. More...
 
(double) - floatMarginYPercent
 Gets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0. More...
 
(int) - floatWidth
 Gets the width of floating elements in pixels. More...
 
(double) - floatWidthPercent
 Gets the width of floating elements as a percent of the container width between 0.0 and 1.0. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchLayoutPreset class. More...
 
(int) - inlineMargin
 Gets the size of the margin in pixels to use between inline elements. More...
 
(FMLiveSwitchLayoutMode) - mode
 Gets the mode used by the layout engine. More...
 
(void) - setAlignment:
 Sets the alignment of the layout. More...
 
(void) - setBlockHeight:
 Sets the height of block elements in pixels. More...
 
(void) - setBlockHeightPercent:
 Sets the height of block elements as a percent of the container height between 0.0 and 1.0. More...
 
(void) - setBlockMarginX:
 Sets the X-margin between block elements and the layout edge in pixels. More...
 
(void) - setBlockMarginXPercent:
 Sets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0. More...
 
(void) - setBlockMarginY:
 Sets the Y-margin between block elements and the layout edge in pixels. More...
 
(void) - setBlockMarginYPercent:
 Sets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0. More...
 
(void) - setBlockWidth:
 Sets the width of block elements in pixels. More...
 
(void) - setBlockWidthPercent:
 Sets the width of block elements as a percent of the container width between 0.0 and 1.0. More...
 
(void) - setDirection:
 Sets the direction of the layout flow. More...
 
(void) - setFloatHeight:
 Sets the height of floating elements in pixels. More...
 
(void) - setFloatHeightPercent:
 Sets the height of floating elements as a percent of the container height between 0.0 and 1.0. More...
 
(void) - setFloatMarginX:
 Sets the X-margin between floating elements and the layout edge in pixels. More...
 
(void) - setFloatMarginXPercent:
 Sets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0. More...
 
(void) - setFloatMarginY:
 Sets the Y-margin between floating elements and the layout edge in pixels. More...
 
(void) - setFloatMarginYPercent:
 Sets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0. More...
 
(void) - setFloatWidth:
 Sets the width of floating elements in pixels. More...
 
(void) - setFloatWidthPercent:
 Sets the width of floating elements as a percent of the container width between 0.0 and 1.0. More...
 
(void) - setInlineMargin:
 Sets the size of the margin in pixels to use between inline elements. More...
 
(void) - setMode:
 Sets the mode used by the layout engine. More...
 
- Instance Methods inherited from FMLiveSwitchDynamic
(NSMutableDictionary< NSString *, id > *) - dynamicProperties
 Gets all dynamic properties on this instance. More...
 
(id- getDynamicValueWithKey:
 Gets a property value from the local cache. More...
 
(void) - setDynamicValueWithKey:value:
 Sets a property value in the local cache. More...
 
(bool) - unsetDynamicValueWithKey:
 Removes a property value from the local cache. More...
 

Class Methods

(FMLiveSwitchLayoutPreset *) + facetime
 Gets a Facetime-style layout preset. More...
 
(FMLiveSwitchLayoutPreset *) + googleHangouts
 Gets a Google Hangouts-style layout preset. More...
 
(FMLiveSwitchLayoutPreset *) + layoutPreset
 Initializes a new instance of the FMLiveSwitchLayoutPreset class. More...
 
(FMLiveSwitchLayoutPreset *) + skype
 Gets a Skype-style layout preset. More...
 
- Class Methods inherited from FMLiveSwitchDynamic
(FMLiveSwitchDynamic *) + dynamic
 
- Class Methods inherited from FMLiveSwitchSerializable
(FMLiveSwitchSerializable *) + serializable
 Initializes a new instance of the FMLiveSwitchSerializable class. More...
 

Detailed Description

A layout preset.

Method Documentation

◆ alignment

- (FMLiveSwitchLayoutAlignment) alignment

Gets the alignment of the layout.

Defaults to FMLiveSwitchLayoutAlignmentBottomRight.

◆ applyPreset:

- (void) applyPreset: (FMLiveSwitchLayoutPreset *)  preset

Applies a preset.

Parameters
presetThe preset to apply.

◆ blockHeight

- (int) blockHeight

Gets the height of block elements in pixels.

Overrides blockHeightPercent.

◆ blockHeightPercent

- (double) blockHeightPercent

Gets the height of block elements as a percent of the container height between 0.0 and 1.0.

Overrides blockHeight.

◆ blockMarginX

- (int) blockMarginX

Gets the X-margin between block elements and the layout edge in pixels.

Overrides blockMarginXPercent.

◆ blockMarginXPercent

- (double) blockMarginXPercent

Gets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0.

Overrides blockMarginX.

◆ blockMarginY

- (int) blockMarginY

Gets the Y-margin between block elements and the layout edge in pixels.

Overrides blockMarginYPercent.

◆ blockMarginYPercent

- (double) blockMarginYPercent

Gets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0.

Overrides blockMarginY.

◆ blockWidth

- (int) blockWidth

Gets the width of block elements in pixels.

Overrides blockWidthPercent.

◆ blockWidthPercent

- (double) blockWidthPercent

Gets the width of block elements as a percent of the container width between 0.0 and 1.0.

Overrides blockWidth.

◆ calculateLayoutWithLayoutWidth:layoutHeight:local:remoteCount:origin:localVideoSize:remoteVideoSizes:

- (FMLiveSwitchLayout*) calculateLayoutWithLayoutWidth: (int)  layoutWidth
layoutHeight: (int)  layoutHeight
local: (bool)  local
remoteCount: (int)  remoteCount
origin: (FMLiveSwitchLayoutOrigin)  origin
localVideoSize: (FMLiveSwitchSize *)  localVideoSize
remoteVideoSizes: (NSMutableArray *)  remoteVideoSizes 

Gets a video frame layout.

Parameters
layoutWidthThe total width of the layout.
layoutHeightThe total height of the layout.
localWhether a local frame is needed.
remoteCountThe number of remote frames.
originThe layout origin.
localVideoSizeThe local video size.
remoteVideoSizesThe remote video sizes.
Returns
The video frame layout.

◆ calculateLayoutWithLayoutWidth:layoutHeight:remoteCount:origin:

- (FMLiveSwitchLayout*) calculateLayoutWithLayoutWidth: (int)  layoutWidth
layoutHeight: (int)  layoutHeight
remoteCount: (int)  remoteCount
origin: (FMLiveSwitchLayoutOrigin)  origin 

Gets a video frame layout.

Parameters
layoutWidthThe total width of the layout.
layoutHeightThe total height of the layout.
remoteCountThe number of remote frames.
originThe layout origin.
Returns
The video frame layout.

◆ copyToPreset:

- (void) copyToPreset: (FMLiveSwitchLayoutPreset *)  preset

Copies this preset's properties to another preset.

Parameters
presetThe target preset.

◆ direction

- (FMLiveSwitchLayoutDirection) direction

Gets the direction of the layout flow.

Defaults to FMLiveSwitchLayoutDirectionHorizontal.

◆ facetime

+ (FMLiveSwitchLayoutPreset*) facetime

Gets a Facetime-style layout preset.

◆ floatHeight

- (int) floatHeight

Gets the height of floating elements in pixels.

Overrides floatHeightPercent.

◆ floatHeightPercent

- (double) floatHeightPercent

Gets the height of floating elements as a percent of the container height between 0.0 and 1.0.

Overrides floatHeight.

◆ floatMarginX

- (int) floatMarginX

Gets the X-margin between floating elements and the layout edge in pixels.

Overrides floatMarginXPercent.

◆ floatMarginXPercent

- (double) floatMarginXPercent

Gets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0.

Overrides floatMarginX.

◆ floatMarginY

- (int) floatMarginY

Gets the Y-margin between floating elements and the layout edge in pixels.

Overrides floatMarginYPercent.

◆ floatMarginYPercent

- (double) floatMarginYPercent

Gets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0.

Overrides floatMarginY.

◆ floatWidth

- (int) floatWidth

Gets the width of floating elements in pixels.

Overrides floatWidthPercent.

◆ floatWidthPercent

- (double) floatWidthPercent

Gets the width of floating elements as a percent of the container width between 0.0 and 1.0.

Overrides floatWidth.

◆ googleHangouts

+ (FMLiveSwitchLayoutPreset*) googleHangouts

Gets a Google Hangouts-style layout preset.

Note that this will present differently on mobile devices.

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchLayoutPreset class.

Implements FMLiveSwitchDynamic.

◆ inlineMargin

- (int) inlineMargin

Gets the size of the margin in pixels to use between inline elements.

◆ layoutPreset

+ (FMLiveSwitchLayoutPreset*) layoutPreset

Initializes a new instance of the FMLiveSwitchLayoutPreset class.

◆ mode

- (FMLiveSwitchLayoutMode) mode

Gets the mode used by the layout engine.

Defaults to FMLiveSwitchLayoutModeFloatLocal.

◆ setAlignment:

- (void) setAlignment: (FMLiveSwitchLayoutAlignment)  value

Sets the alignment of the layout.

Defaults to FMLiveSwitchLayoutAlignmentBottomRight.

◆ setBlockHeight:

- (void) setBlockHeight: (int)  value

Sets the height of block elements in pixels.

Overrides blockHeightPercent.

◆ setBlockHeightPercent:

- (void) setBlockHeightPercent: (double)  value

Sets the height of block elements as a percent of the container height between 0.0 and 1.0.

Overrides blockHeight.

◆ setBlockMarginX:

- (void) setBlockMarginX: (int)  value

Sets the X-margin between block elements and the layout edge in pixels.

Overrides blockMarginXPercent.

◆ setBlockMarginXPercent:

- (void) setBlockMarginXPercent: (double)  value

Sets the X-margin between block elements and the layout edge as a percent of the container width between 0.0 and 1.0.

Overrides blockMarginX.

◆ setBlockMarginY:

- (void) setBlockMarginY: (int)  value

Sets the Y-margin between block elements and the layout edge in pixels.

Overrides blockMarginYPercent.

◆ setBlockMarginYPercent:

- (void) setBlockMarginYPercent: (double)  value

Sets the Y-margin between block elements and the layout edge as a percent of the container height between 0.0 and 1.0.

Overrides blockMarginY.

◆ setBlockWidth:

- (void) setBlockWidth: (int)  value

Sets the width of block elements in pixels.

Overrides blockWidthPercent.

◆ setBlockWidthPercent:

- (void) setBlockWidthPercent: (double)  value

Sets the width of block elements as a percent of the container width between 0.0 and 1.0.

Overrides blockWidth.

◆ setDirection:

- (void) setDirection: (FMLiveSwitchLayoutDirection)  value

Sets the direction of the layout flow.

Defaults to FMLiveSwitchLayoutDirectionHorizontal.

◆ setFloatHeight:

- (void) setFloatHeight: (int)  value

Sets the height of floating elements in pixels.

Overrides floatHeightPercent.

◆ setFloatHeightPercent:

- (void) setFloatHeightPercent: (double)  value

Sets the height of floating elements as a percent of the container height between 0.0 and 1.0.

Overrides floatHeight.

◆ setFloatMarginX:

- (void) setFloatMarginX: (int)  value

Sets the X-margin between floating elements and the layout edge in pixels.

Overrides floatMarginXPercent.

◆ setFloatMarginXPercent:

- (void) setFloatMarginXPercent: (double)  value

Sets the X-margin between floating elements and the layout edge as a percent of the container width between 0.0 and 1.0.

Overrides floatMarginX.

◆ setFloatMarginY:

- (void) setFloatMarginY: (int)  value

Sets the Y-margin between floating elements and the layout edge in pixels.

Overrides floatMarginYPercent.

◆ setFloatMarginYPercent:

- (void) setFloatMarginYPercent: (double)  value

Sets the Y-margin between floating elements and the layout edge as a percent of the container height between 0.0 and 1.0.

Overrides floatMarginY.

◆ setFloatWidth:

- (void) setFloatWidth: (int)  value

Sets the width of floating elements in pixels.

Overrides floatWidthPercent.

◆ setFloatWidthPercent:

- (void) setFloatWidthPercent: (double)  value

Sets the width of floating elements as a percent of the container width between 0.0 and 1.0.

Overrides floatWidth.

◆ setInlineMargin:

- (void) setInlineMargin: (int)  value

Sets the size of the margin in pixels to use between inline elements.

◆ setMode:

- (void) setMode: (FMLiveSwitchLayoutMode)  value

Sets the mode used by the layout engine.

Defaults to FMLiveSwitchLayoutModeFloatLocal.

◆ skype

Gets a Skype-style layout preset.

Note that this will present differently on mobile devices.