API  1.0.0
CPView(TrackingAreaAdditions) Category Reference

Instance Methods

(void) - addTrackingArea:
 
(void) - removeTrackingArea:
 
(void) - updateTrackingAreas
 

Detailed Description

Definition at line 3550 of file CPView.j.

Method Documentation

◆ addTrackingArea:()

- (void) addTrackingArea: (CPTrackingArea trackingArea
implementation

Extends class CPView.

Definition at line 3552 of file CPView.j.

◆ removeTrackingArea:()

- (void) removeTrackingArea: (CPTrackingArea trackingArea
implementation

Extends class CPView.

Definition at line 3570 of file CPView.j.

◆ updateTrackingAreas()

- (void) updateTrackingAreas
implementation

Invoked automatically when the view’s geometry changes such that its tracking areas need to be recalculated.

You should override this method to remove out of date tracking areas, add recomputed tracking areas and then call super;

Cocoa calls this on every view, whereas they have tracking area(s) or not. Cappuccino behaves differently :

  • updateTrackingAreas is called during initWithFrame
  • updateTrackingAreas is also called when placing a view in the view hierarchy (that is in a window)
  • if you have only CPTrackingInVisibleRect tracking areas attached to a view, it will not be called again (until you move the view in the hierarchy)
  • if you have at least one non-CPTrackingInVisibleRect tracking area attached, it will be called every time the view geometry could be modified You don't have to touch to CPTrackingInVisibleRect tracking areas, they will be automatically updated

Please note that it is the owner of a tracking area who is called for updateTrackingAreas. But, if a view without any tracking area is inserted in the view hierarchy (that is, in a window), the view is called for updateTrackingAreas. This enables you to use updateTrackingArea to initially attach your tracking areas to the view.

Extends class CPView.

Definition at line 3599 of file CPView.j.


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