Objective-C API Library Reference  4.3.0-42-g45f162a
 All Classes Functions Typedefs Properties Pages
Public Functions | Properties | List of all members
PWAcetateToolBase Class Reference

The PWAcetateToolBase class manages an acetate tool delegate that does the actual work of creating and rendering markup. For more information on the acetate functionality, see PWAcetateToolDelegate.

Public Functions

(void) - activate:
 
(void) - cancelMode
 
(BOOL) - canGenerateMarkup
 
(void) - deactivate:
 
(void) - draw:sessionId:instanceId:markup:defaultColor:inContext:
 
(void) - finishMarkup:
 
(BOOL) - isMarkupInstanceStarted
 
(void) - removeMarkup
 
(void) - startMarkup:forceNewInstance:
 
(void) - updateMarkup:
 
(void) - updatePendingMarkup
 

Properties

PWCollaborationManagercollaborationManager
 
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.

- (BOOL) canGenerateMarkup

Returns a Boolean value that indicates whether this instance can generate 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.

Parameters
layerThe layer.
sessionIdThe session's unique identifier.
instanceIdThe instance's unique identifier.
markupThe markup.
defaultColorThe default color.
ctxThe graphics context used to draw acetate.
- (void) finishMarkup: (PWXmlElement *)  markup

Finishes any markup in the specified markup instance, forcing PWCollaborationManager to be updated. May only be called on the UI thread.

- (BOOL) isMarkupInstanceStarted

Returns a Boolean value that indicates whether a markup instance is started.

- (void) removeMarkup

Removes markup for the current markup instance, if any. May only be called from the UI thread.

- (void) startMarkup: (PWXmlElement *)  initialMarkup
forceNewInstance: (BOOL)  forceNewInstance 

Starts a new markup; PWCollaborationManager will be updated. May only be called on the UI thread.

Parameters
initialMarkupThe initial markup.
forceNewInstanceSet to true to force a new markup instance to be created.
- (void) updateMarkup: (PWXmlElement *)  markup

Updates the specified markup. PWCollaborationManager may not be updated immediately. A reference to the markup is stored, not a copy, so any changes to the referenced value will be captured when PWCollaborationManager is eventually updated. May only be called on the UI thread.

- (void) updatePendingMarkup
requiredinherited

Causes the provider to publish any pending markup to the PWCollaborationManager.

Properties Descriptions

- (PWCollaborationManager*) collaborationManager
readnonatomicunsafe_unretained

The PWCollaborationManager instance associated with the active view.

- (BOOL) isMutuallyExclusive
readnonatomicassign

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

- (BOOL) isOneShot
readnonatomicassign

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
readnonatomicstrong

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.