#include <dom2_range.h>
Public Types | |
enum | CompareHow { START_TO_START = 0, START_TO_END = 1, END_TO_END = 2, END_TO_START = 3 } |
Public Methods | |
Range () | |
Range (const Document rootContainer) | |
Range (const Range &other) | |
Range (const Node startContainer, const long startOffset, const Node endContainer, const long endOffset) | |
Range & | operator= (const Range &other) |
~Range () | |
Node | startContainer () const |
long | startOffset () const |
Node | endContainer () const |
long | endOffset () const |
bool | collapsed () const |
Node | commonAncestorContainer () |
void | setStart (const Node &refNode, long offset) |
void | setEnd (const Node &refNode, long offset) |
void | setStartBefore (const Node &refNode) |
void | setStartAfter (const Node &refNode) |
void | setEndBefore (const Node &refNode) |
void | setEndAfter (const Node &refNode) |
void | collapse (bool toStart) |
void | selectNode (const Node &refNode) |
void | selectNodeContents (const Node &refNode) |
short | compareBoundaryPoints (CompareHow how, const Range &sourceRange) |
bool | boundaryPointsValid () |
void | deleteContents () |
DocumentFragment | extractContents () |
DocumentFragment | cloneContents () |
void | insertNode (const Node &newNode) |
void | surroundContents (const Node &newParent) |
Range | cloneRange () |
DOMString | toString () |
DOMString | toHTML () |
DocumentFragment | createContextualFragment (const DOMString &html) |
void | detach () |
bool | isDetached () const |
RangeImpl * | handle () const |
bool | isNull () const |
Protected Methods | |
Range (RangeImpl *i) | |
Protected Attributes | |
RangeImpl * | impl |
Friends | |
class | DocumentImpl |
class | Document |
class | RangeImpl |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Node within which the range begins.
|
|
Offset within the starting node of the range.
|
|
Node within which the range ends.
|
|
Offset within the ending node of the range.
|
|
true if the range is collapsed
|
|
Gets the common ancestor container of the range's two end-points. Also sets it. |
|
Sets the attributes describing the start of the range.
refNode or an ancestor of refNode is an Attr, Entity, Notation, or DocumentType node.
If an offset is out-of-bounds, should it just be fixed up or should an exception be raised. |
|
Sets the attributes describing the end of a range.
refNode or an ancestor of refNode is an Attr, Entity, Notation, or DocumentType node. |
|
Sets the start position to be before a node.
|
|
Sets the start position to be after a node.
|
|
Sets the end position to be before a node.
|
|
Sets the end of a range to be after a node.
|
|
Collapse a range onto one of its end-points.
|
|
Select a node and its contents.
|
|
Select the contents within a node.
|
|
Compare the end-points of two ranges in a document.
|
|
|
|
Removes the contents of a range from the containing document or document fragment without returning a reference to the removed content.
|
|
Moves the contents of a range from the containing document or document fragment to a new DocumentFragment.
|
|
Duplicates the contents of a range.
|
|
Inserts a node into the document or document fragment at the start of the range.
newNode and the container of the start of the Range were not created from the same document.
HIERARCHY_REQUEST_ERR: Raised if the container of the start of the Range is of a type that does not allow children of the type of
|
|
Reparents the contents of the range to the given node and inserts the node at the position of the start of the range.
newParent and the container of the start of the Range were not created from the same document.
HIERARCHY_REQUEST_ERR: Raised if the container of the start of the Range is of a type that does not allow children of the type of
node is an Attr, Entity, DocumentType, Notation, Document, or DocumentFragment node. |
|
Produces a new range whose end-points are equal to the end-points of the range.
|
|
Returns the contents of a range as a string.
|
|
|
|
|
|
Called to indicate that the range is no longer in use and that the implementation may relinquish any resources associated with this range. Subsequent calls to any methods or attribute getters on this range will result in a DOMException being thrown with an error code of INVALID_STATE_ERR. |
|
not part of the DOM true if the range is detached
|
|
|
|
|
|
|
|
|
|
|
|
|