API  0.9.10
CPView(TrackingAreaAdditions) Category Reference

Instance Methods

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

Detailed Description

Definition at line 3498 of file CPView.j.

Method Documentation

◆ addTrackingArea:()

- (void) addTrackingArea: (CPTrackingArea trackingArea
implementation

Extends class CPView.

Definition at line 3500 of file CPView.j.

◆ removeAllTrackingAreas()

- (void) removeAllTrackingAreas
implementation

This utility method is intended for CPView subclasses overriding updateTrackingAreas

Typical use would be :

  • (void)updateTrackingAreas { [self removeAllTrackingAreas];

    ... add your specific updated tracking areas ... }

Extends class CPView.

Definition at line 3564 of file CPView.j.

◆ removeTrackingArea:()

- (void) removeTrackingArea: (CPTrackingArea trackingArea
implementation

Extends class CPView.

Definition at line 3518 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 and add recomputed tracking areas;

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

  • updateTrackingAreas is 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 3546 of file CPView.j.


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