NAME
Mozilla::DOM::Window
DESCRIPTION
Mozilla::DOM::Window is a wrapper around an instance of Mozilla's nsIDOMWindow interface. This class inherits from Supports.
* The nsIDOMWindow interface is the primary interface for a DOM
* window object. It represents a single window object that may
* contain child windows if the document in the window contains a
* HTML frameset document or if the document contains iframe elements.
*
* This interface is not officially defined by any standard bodies, it
* originates from the defacto DOM Level 0 standard.
Note: the GetScrollbars is not wrapped (non-trivial to do)
CLASS METHODS
$iid = Mozilla::DOM::Window->GetIID()
Pass this to QueryInterface.
METHODS
$document = $window->GetDocument()
* Accessor for the document in this window.
$window_collection = $window->GetFrames()
* Accessor for the child windows in this window.
In scalar context, returns a Mozilla::DOM::WindowCollection.
In list context, returns a list of Mozilla::DOM::Window (I think... whatever $window_collection->Item($n) is.)
$name = $window->GetName()
Get the name of this window.
This corresponds to window.name in JavaScript.
$window = $window->GetParent()
* Accessor for this window's parent window, or the window itself if
* there is no parent, or if the parent is of different type
* (i.e. this does not cross chrome-content boundaries).
$selection = $window->GetSelection()
* Method for accessing this window's selection object.
$num = $window->GetTextZoom()
* Set/Get the document scale factor as a multiplier on the default
* size. When setting this attribute, a NS_ERROR_NOT_IMPLEMENTED
* error may be returned by implementations not supporting
* zoom. Implementations not supporting zoom should return 1.0 all
* the time for the Get operation. 1.0 is equals normal size,
* i.e. no zoom.
$window = $window->GetTop()
* Accessor for the root of this hierarchy of windows. This root may
* be the window itself if there is no parent, or if the parent is
* of different type (i.e. this does not cross chrome-content
* boundaries).
*
* This property is "replaceable" in JavaScript */
$window->SetName($name)
$name (string)
Set the name of this window.
"This attribute is 'replaceable' in JavaScript"; where it corresponds to window.name.
$window->SetTextZoom($zoom)
$zoom (double)
$window->SizeToContent()
* Method for sizing this window to the content in the window.
XXX: doesn't seem to work. Maybe window resize is disabled, or maybe Gtk2 prevents it.
$x = $window->GetScrollX()
* Accessor for the current x scroll position in this window in
* pixels.
*
* This attribute is "replaceable" in JavaScript
$x (double)
$y = $window->GetScrollY()
* Accessor for the current y scroll position in this window in
* pixels.
*
* This attribute is "replaceable" in JavaScript
$y (double)
$window->ScrollTo($xScroll, $yScroll)
* Method for scrolling this window to an absolute pixel offset.
$xScroll (double)
$yScroll (double)
$window->ScrollBy($xScrollDif, $yScrollDif)
* Method for scrolling this window to a pixel offset relative to
* the current scroll position.
$xScrollDif (double)
$yScrollDif (double)
$window->ScrollByLines($numLines)
* Method for scrolling this window by a number of lines.
$numLines (double)
$window->ScrollByPages($numPages)
* Method for scrolling this window by a number of pages.
$numPages (double)
SEE ALSO
COPYRIGHT
Copyright (C) 2005-2007, Scott Lanning
This software is licensed under the LGPL. See Mozilla::DOM for a full notice.