Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

burst.xml.HtmlBox Class Reference

List of all members.

Detailed Description

Scoping class holding static functions for manipulating html element size and position.


Static Public Member Functions

Number getDocumentWidth (DomDocument doc)
 pixel width of entire document, regardless of scrolling.

Number getBorderBoxLeft (Node el)
 Document-relative coordinate of border edge.

Number getBorderBoxTop (Node el)
Number getBorderBoxWidth (Node el)
 Width of the border box (a number in pixels).

Number getBorderBoxHeight (Node el)
 Height of the border box (a number in pixels).

Number getBorderLeftWidth (Node el)
 Width in pixels of the left, top, right, or bottom border.

Number getBorderTopWidth (Node el)
Number getBorderRightWidth (Node el)
Number getBorderBottomWidth (Node el)
Number getPaddingLeftWidth (Node el)
 Width in pixels of the left, top, right, or bottom padding.

Number getPaddingTopWidth (Node el)
Number getPaddingRightWidth (Node el)
Number getPaddingBottomWidth (Node el)
Number getPaddingBoxLeft (Node el)
 If the element has no scrolling, or if it has scrolling but has not scrolled anywhere, the document-relative coordinate of the padding box edge.

Number getPaddingBoxTop (Node el)
Number getPaddingBoxWidth (Node el)
 If the element has no scrolling, the pixel width of the padding box.

Number getPaddingBoxHeight (Node el)
Number getContentBoxLeft (Node el)
 If the element has no scrolling, or if it has scrolling but has not scrolled anywhere, the document-relative coordinate of the content box edge.

Number getContentBoxTop (Node el)
Number getContentBoxWidth (Node el)
 If the element has no scrolling, the pixel width of the content box.

Number getContentBoxHeight (Node el)
Array getContentBoxRect (Node el)
 Return [left, top, width, height].

Number getMarginBoxLeft (Node el)
 The document-relative position of the margin box edge.

Number getMarginBoxTop (Node el)
Number getMarginBoxWidth (Node el)
Number getMarginBoxHeight (Node el)
Number getScrollLeft (Node el)
Number getScrollTop (Node el)
Number getCanvasPaddingBoxWidth (Node el)
Number getCanvasPaddingBoxHeight (Node el)
void setContentBoxLeft (Node el, Number contentleft)
void setBorderBoxLeft (Node el, Number boxleft)
void setContentBoxTop (Node el, Number contenttop)
void setBorderBoxTop (Node el, Number boxtop)
void setContentBoxWidth (Node el, Number contentwidth)
void setBorderBoxWidth (Node el, Number boxwidth)
void setContentBoxHeight (Node el, Number contentheight)
void setBorderBoxHeight (Node el, Number boxheight)
void setStylePos (Node el, Number left, Number top)
 move to absolute document-relative position specified by numbers left and top (in pixels).

void incStylePos (Node el, Number left_delta, Number top_delta)
 increment existing values of style left and top by the amount specified.

void incStyleDims (Node el, Number width_delta, Number height_delta)
 increments style width and height by indicated number of pixels (negative for shrink).


Member Function Documentation

Number burst.xml.HtmlBox.getBorderBoxLeft Node  el  )  [static]
 

Document-relative coordinate of border edge.

Returns a number, in pixels.

Number burst.xml.HtmlBox.getBorderLeftWidth Node  el  )  [static]
 

Width in pixels of the left, top, right, or bottom border.

On IE, Mozilla, and Opera, getBorderRightWidth and getBorderBottomWidth include the width of any scrollbar.

Platforms: Works on IE, Opera, and Mozilla. Not on Safari (returns 0 if not specified via inline style; fails if not in px units.) Note that in IE, currentStyle.borderLeftWidth could be 'thin', '0.5cm', etc., but we use el.clientLeft instead.

Number burst.xml.HtmlBox.getContentBoxLeft Node  el  )  [static]
 

If the element has no scrolling, or if it has scrolling but has not scrolled anywhere, the document-relative coordinate of the content box edge.

Platforms: see getPaddingLeftWidth.

Number burst.xml.HtmlBox.getContentBoxWidth Node  el  )  [static]
 

If the element has no scrolling, the pixel width of the content box.

If the element has scrolling, this isn't very useful (it isn't even the visible content area, since the right and bottom padding may be hidden).

Implementation note: If getComputedStyle/currentStyle is available, we can use that. Otherwise, if style.width is set, we can trust that at least for position 'absolute' and CSS box model. (When not 'absolute', layout may not always choose to obey the style.)

Number burst.xml.HtmlBox.getDocumentWidth DomDocument  doc  )  [static]
 

pixel width of entire document, regardless of scrolling.

Unsupported on Opera7 (returns 0).

Number burst.xml.HtmlBox.getPaddingBoxLeft Node  el  )  [static]
 

If the element has no scrolling, or if it has scrolling but has not scrolled anywhere, the document-relative coordinate of the padding box edge.

Platforms: see getBorderLeftWidth.

Number burst.xml.HtmlBox.getPaddingBoxWidth Node  el  )  [static]
 

If the element has no scrolling, the pixel width of the padding box.

If the element has scrolling, the pixel width of the visible area inside the viewport.

Platforms: see getBorderLeftWidth.

Number burst.xml.HtmlBox.getPaddingLeftWidth Node  el  )  [static]
 

Width in pixels of the left, top, right, or bottom padding.

Platforms: Returns 0 on Safari and Opera if not specified via inline style. Fails on IE/Safari/Opera if not in px units.

void burst.xml.HtmlBox.incStyleDims Node  el,
Number  width_delta,
Number  height_delta
[static]
 

increments style width and height by indicated number of pixels (negative for shrink).

assumes there is already a value.

void burst.xml.HtmlBox.incStylePos Node  el,
Number  left_delta,
Number  top_delta
[static]
 

increment existing values of style left and top by the amount specified.

assumes element already has a numerical or number + 'px' value in el.style.left or computed style left.

void burst.xml.HtmlBox.setStylePos Node  el,
Number  left,
Number  top
[static]
 

move to absolute document-relative position specified by numbers left and top (in pixels).

This function does not attempt to adjust for whether IE box model or not.

Todo:
could set runtimeStyle in IE instead?

Opera want the 'px' or not?


The documentation for this class was generated from the following file:
Generated on Tue Nov 30 04:03:09 2004 for BurstProject by doxygen 1.3.4