Locks the focus to the receiver atomically if drawing can occur in the specified graphics context.
Original signature is '- (BOOL)lockFocusIfCanDrawInContext:(NSGraphicsContext *)context'
Available in Mac OS X v10.4 and later.

C# | Visual Basic | Visual C++ |
public virtual bool LockFocusIfCanDrawInContext( NSGraphicsContext context )
Public Overridable Function LockFocusIfCanDrawInContext ( _ context As NSGraphicsContext _ ) As Boolean
public: virtual bool LockFocusIfCanDrawInContext( NSGraphicsContext^ context )

- context (NSGraphicsContext)
- The graphics context in which drawing might occur. See the discussion for the implications of the type of context.

YES if successful; otherwise, returns NO.

- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)