Objective-C API Library Reference  4.3.0-42-g45f162a
 All Classes Functions Typedefs Properties Pages
Public Functions | Properties | List of all members
<PWAcetateToolDelegate> Protocol Reference

The PWAcetateToolDelegate protocol defines the interface supported by all acetate tool instances, and must be implemented by all acetate tools.

About Acetate Tools
PureWeb's acetate functionality allows you to display an overlay over views for markup purposes; this can enhance the collaboration experience by allowing each participant to see what the other participants are doing. The API provides two tools by default, cursor (PWCursorPositionTool) and polyline (PWPolylineTool). The cursor tool displays an arrow indicating where a user's mouse is pointing. The polyline tool displays a user's free-form drawings over a view (if the user is collaborating from a desktop device).

By default, acetate tools are not mutually exclusive: you can display cursors and polyline drawings (or any other markups from custom tools) simultaneously in the same view, although this is customizable by setting the PWAcetateToolBase.isMutuallyExclusive property. The PWAcetateToolset class is responsible for managing which tools are active in a view at any given time and for broadcasting to the view the event raised in the acetate. To clear markups once they are no longer needed, you would use the methods provided in PWClearMarkupTool.

Public Functions

(void) - activate:
(void) - cancelMode
(void) - deactivate:
(void) - draw:sessionId:instanceId:markup:defaultColor:inContext:


BOOL isMutuallyExclusive
BOOL isOneShot
NSString * markupType

Methods Descriptions

- (void) activate: (PWView *)  view

Activates the tool for the specified view. The tool should connect to any view events and other information sources.

- (void) cancelMode

Cancels any mode that the tool is in, and ends its current markup.

- (void) deactivate: (PWView *)  view

Deactivates the tool for the specified view. The tool should disconnect from any view events and other information sources.

- (void) draw: (PWCollaborationLayer *)  layer
sessionId: (PWGuid *)  sessionId
instanceId: (PWGuid *)  instanceId
markup: (PWXmlElement *)  markup
defaultColor: (PWColor *)  defaultColor
inContext: (CGContextRef)  ctx 

Draws any data specified in markup. The drawing context will not retain and markup between draw invocations. To avoid creating new draw objects on each call, you may consider using a CoreGraphics CGLayer, which can prerender drawn objects to an offscreen buffer. The drawing operation is carried out independently of any view that the tool is currently activated for, so the tool should not base drawing on the current activation context.

layerThe layer.
sessionIdThe session's unique identifier.
instanceIdThe instance's unique identifier.
markupThe markup.
defaultColorThe default color.
ctxThe graphics context used to draw acetate.

Properties Descriptions

- (BOOL) isMutuallyExclusive

A Boolean value that indicates whether this tool is mutually exclusive with others.

- (BOOL) isOneShot

A Boolean value that indicates whether this instance is a one-shot tool. A one-shot tool does not stay activated; it is immediately deactivated after activation.

- (NSString*) markupType

The markup type handled by this acetate drawing tool. This must be unique for each type of tool, and identifies the schema of the draw data consumed and generated by this tool.