nsIContentViewManager

Manages the content views contained in a browser
1.0
28
Introduced
Gecko 2.0
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Mobile Only in Gecko 2.0
Available only in Firefox Mobile as of Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

To obtain a reference to the view manager for a document, you can QueryInterface() the nsIFrameLoader object to nsIContentViewManager. See Getting access to content views for details. Once you have the view manager, you can call getContentViewsIn() to get a list of the content views for a given portion of the browser display, then use those nsIContentView objects to manipulate the content views.

Method overview

void getContentViewsIn(in float aXPx, in float aYPx, in float aTopSize, in float aRightSize, in float aBottomSize, in float aLeftSize, [optional] out unsigned long aLength, [retval, array, size_is(aLength)] out nsIContentView aResult);

Attributes

Attribute Type Description
rootContentView nsIContentView The root content view. Read only.

Methods

getContentViewsIn()

Returns an array of nsIContentView objects representing all of the content views that intersect with the specified rectangle in the browser.

Note: The rectangle is specified using an anchor point, then four distances to indicate how far in each direction to expand the rectangle. This lets you, for example, take the coordinates at which the user clicked (or touched) the screen, and expand outward to create a rectangle from that point.

Pixels are in chrome device pixels and are relative to the browser element.

void getContentViewsIn(
  in float aXPx,
  in float aYPx,
  in float aTopSize,
  in float aRightSize,
  in float aBottomSize,
  in float aLeftSize,
  out unsigned long aLength, Optional
  [retval, array, size_is(aLength)] out nsIContentView aResult
);
Parameters
aXPx
The X coordinate of the anchor point of the rectangle, in CSS pixels.
aYPx
The Y coordinate of the anchor point of the rectangle, in CSS pixels.
aTopSize
The distance upward from the Y anchor to expand the rectangle.
aRightSize
The distance to the right from the X anchor to expand the rectangle.
aBottomSize
The distance downward from the Y anchor to expand the rectangle.
aLeftSize
The distance to the left from the X anchor to expand the rectangle.
aLength Optional
If specified, on return this parameter indicates the number of nsIContentView objects returned in the aResult array.
aResult
On return, an array of nsIContentView objects representing the content views in the specified rectangle.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, fscholz
 Last updated by: Sheppy,