Avaya Client Services API Reference (OS X)

- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

Instance Methods | Properties | List of all members
CSWhiteboardSurface Class Reference

The CSWhiteboardSurface object represents independent whiteboard surface containing all shapes drawn on given whiteboard surface. More...

`#import <CSWhiteboardSurface.h>`

Inherits NSObject.

Inherited by CSSlide.

## Instance Methods
(void) | - setAsActiveWithCompletionHandler:
| Selects this surface as the active whiteboard surface. More...
(CSShape *) | - addShapeWithPoints:color:width:isFilled:isFinished:completionHandler:
| Adds a shape to the whiteboard surface. More...
(void) | - finishShape:completionHandler:
| Marks shape as finished. More...
(CSCircleShape *) | - addCircleWithTopLeft:bottomRight:color:width:isFilled:completionHandler:
| Adds a circle to the whiteboard surface. More...
(CSWhiteboardText *) | - addText:atPosition:fontSize:color:completionHandler:
| Adds a text to the whiteboard surface. More...
(void) | - updateShape:completionHandler:
| Updates given shape. More...
(void) | - deleteShape:completionHandler:
| Deletes a shape from surface. More...
(void) | - clearContentWithCompletionHandler:
| Removes all content from the drawing surface. More...

## Properties
id< CSWhiteboardSurfaceDelegate > | delegate
| The delegate used to handle events related to whiteboard surface. More...
NSString * | surfaceId
| The whiteboard surface ID associated with the particular CSWhiteboardSurface object. More...
CSParticipant * | addedBy
| Data of participant who added whiteboard surface. More...
CSParticipant * | removedBy
| Data of participant who removed whiteboard surface. More...
NSArray * | shapes
| Array containing all shapes belonging to this whiteboard surface as objects of class CSBasicShape. More...
CSCapability * | setAsActiveCapability
| CSCapability object indicating whether the local user is allowed to set given whiteboard surface active. More...

## Detailed Description

The CSWhiteboardSurface object represents independent whiteboard surface containing all shapes drawn on given whiteboard surface.

Whiteboard surface content is displayed on CSWhiteboardCanvas. Client can obtain objects of this class using methods of class CSWhiteboard. Methods related to adding/modifying/removing particular shapes shouldn't be invoked by client explicitly unless custom whiteboard canvas is developed. Methods NSObject::isEqual and NSObject::hash are implemented for this class.

See also
  CSWhiteboard

## Method Documentation

- (CSCircleShape *) addCircleWithTopLeft: |  | (CSShapePoint *) | topLeft
bottomRight: |  | (CSShapePoint *) | bottomRight
color: |  | (NSUInteger) | color
width: |  | (NSUInteger) | width
isFilled: |  | (BOOL) | filled
completionHandler: |  | (void(^)(CSBasicShape *shape, NSError *error)) | handler

Adds a circle to the whiteboard surface.

Method is deprecated. Use addCircleWithTopLeft:bottomRight:color:width:isFilled:completionHandler: instead.

Parameters

  topLeft | Top left point of circle
  bottomRight | Bottom right point of circle.
  color | Color of circle.
  width | Width of circle.
  filled | True if circle is filled.
  handler | A block to be called when the operation is completed. `shape` Added circle as CSBasicShape object. `error` If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

Returns
  CSCircleShape object made with given parameters

- (CSShape *) addShapeWithPoints: |  | (NSArray *) | points
color: |  | (NSUInteger) | color
width: |  | (NSUInteger) | width
isFilled: |  | (BOOL) | filled
isFinished: |  | (BOOL) | finished
completionHandler: |  | (void(^)(CSBasicShape *shape, NSError *error)) | handler

Adds a shape to the whiteboard surface.

Parameters

  points | Array of CSShapePoint points.
  color | Color of shape.
  width | Width of shape.
  filled | True if shape is filled.
  finished | Set to true when shape is finished / closed
  handler | A block to be called when the operation is completed. `shape` CSBasicShape object made with given points. `error` If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

Returns
  CSShape object made with given points

- (CSWhiteboardText *) addText: |  | (NSString *) | text
atPosition: |  | (CSShapePoint *) | position
fontSize: |  | (NSUInteger) | fontSize
color: |  | (NSUInteger) | color
completionHandler: |  | (void(^)(CSBasicShape *shape, NSError *error)) | handler

Adds a text to the whiteboard surface.

Method is deprecated. Use addText:atPosition:fontSize:color:completionHandler: instead.

Parameters

  text | Content of the whiteboard text object.
  position | Position of the text on the whiteboard surface.
  fontSize | Font size of the text.
  color | Color of the text.
  handler | A block to be called when the operation is completed. `shape` Added text as CSBasicShape object. `error` If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

Returns
  CSWhiteboardText object made with given parameters.

- (void) clearContentWithCompletionHandler: |  | (void(^)(CSWhiteboardSurface *surface, NSError *error)) | handler |

Removes all content from the drawing surface.

It shouldn't be used by client unless custom whiteboard canvas is developed. See clearWhiteboardWithCompletionHandler: (CSWhiteboardCanvas) and CSIOSWhiteboardCanvas::clearWhiteboardWithCompletionHandler.

Parameters

  handler | A block to be called when the operation is completed. `surface` Shape that was cleared if operation was successful. `error` If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

See also
  - clearWhiteboardWithCompletionHandler: (CSWhiteboardCanvas)
  CSIOSWhiteboardCanvas::clearWhiteboardWithCompletionHandler:

- (void) deleteShape: |  | (CSBasicShape *) | shape
completionHandler: |  | (void(^)(CSBasicShape *shape, NSError *error)) | handler

Deletes a shape from surface.

Parameters

  shape | CSBasicShape object to be deleted from whiteboard surface.
  handler | A block to be called when the operation is completed. `shape` Deleted shape. `error` If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

- (void) finishShape: |  | (CSBasicShape *) | shape
completionHandler: |  | (void(^)(CSBasicShape *shape, NSError *error)) | handler

Marks shape as finished.

Parameters

  shape | CSBasicShape to be marked as finished.
  handler | A block to be called when the operation is completed. `shape` CSBasicShape object marked as finished. `error` If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

See also
  - finishShape:completionHandler:

- (void) setAsActiveWithCompletionHandler: |  | (void(^)(CSWhiteboardSurface *surface, CSParticipant *participant, NSError *error)) | handler |

Selects this surface as the active whiteboard surface.

Only one surface can be active during a collaboration session.

Parameters

  handler | A block to be called when the operation is completed. `surface` CSWhiteboardSurface object set as active. `participant` CSParticipant object providing information about collaboration participant who set surface as active (local user in case of this method). `error` If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

- (void) updateShape: |  | (CSBasicShape *) | shape
completionHandler: |  | (void(^)(CSBasicShape *shape, NSError *error)) | handler

Updates given shape.

Can be used to continue drawing or to move given shape.

Parameters

  shape | CSBasicShape to be updated or moved.
  handler | A block to be called when the operation is completed. `shape` Updated/moved shape. `error` If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.

## Property Documentation

- (CSParticipant*) addedBy
| read nonatomic assign

Data of participant who added whiteboard surface.

- (id<CSWhiteboardSurfaceDelegate>) delegate
| read write nonatomic weak

The delegate used to handle events related to whiteboard surface.

- (CSParticipant*) removedBy
| read nonatomic assign

Data of participant who removed whiteboard surface.

- (CSCapability*) setAsActiveCapability
| read nonatomic copy

CSCapability object indicating whether the local user is allowed to set given whiteboard surface active.

To do so, the local user needs to be moderator, presenter or panel model mode has to be enabled.

See also
  - setAsActiveWithCompletionHandler:

- (NSArray*) shapes
| read nonatomic assign

Array containing all shapes belonging to this whiteboard surface as objects of class CSBasicShape.

See also
  CSBasicShape

- (NSString*) surfaceId
| read nonatomic assign

The whiteboard surface ID associated with the particular CSWhiteboardSurface object.

The documentation for this class was generated from the following file:

- CSWhiteboardSurface.h