nsIHTMLAbsPosEditor
IID: | 91375f52-20e6-4757-9835-eb04fabe5498 |
Inherits From: | nsISupports |
Properties
readonly nsIDOMElement absolutelyPositionedSelectionContainer
Returns the deepest absolutely positioned container of the selection if it exists or null.
PRBool absolutePositioningEnabled
True if Absolute Positioning handling is enabled in the editor
PRUint32 gridSize
Sets the grid size in pixels.
readonly nsIDOMElement positionedElement
This contains the absolutely positioned element currently edited or null
readonly PRBool selectionContainerAbsolutelyPositioned
True if the selection container is absolutely positioned
PRBool snapToGridEnabled
True if Snap To Grid is enabled in the editor.
Methods
void absolutelyPositionElement ( nsIDOMElement element , PRBool enabled )
void absolutePositionSelection ( PRBool enabled )
PRInt32 getElementZIndex ( nsIDOMElement element )
void hideGrabber ( )
void refreshGrabber ( )
PRInt32 relativeChangeElementZIndex ( nsIDOMElement element , PRInt32 change )
void relativeChangeZIndex ( PRInt32 change )
void setElementPosition ( nsIDOMElement element , PRInt32 aX , PRInt32 aY )
void setElementZIndex ( nsIDOMElement element , PRInt32 zorder )
void showGrabberOnElement ( nsIDOMElement element )
void absolutelyPositionElement ( nsIDOMElement element , PRBool enabled )
Extracts an element from the normal flow of the document and positions it, and puts it back in the normal flow.
- Arguments:
- element: [IN] the element
- enabled: [IN] true to absolutely position the element, false to put it back in the normal flow
void absolutePositionSelection ( PRBool enabled )
Extracts the selection from the normal flow of the document and positions it.
- Arguments:
- enabled: [IN] true to absolutely position the selection, false to put it back in the normal flow
PRInt32 getElementZIndex ( nsIDOMElement element )
Returns the absolute z-index of a positioned element. Never returns 'auto'.
- Arguments:
- element: [IN] the element.
- Returns:
- the z-index of the element
Refreshes the grabber if it shown, possibly updating its position or even hiding it.
PRInt32 relativeChangeElementZIndex ( nsIDOMElement element , PRInt32 change )
Adds change to the z-index of an arbitrary element.
- Arguments:
- element: [IN] the element
- change: [IN] relative change to apply to current z-index of the element
- Returns:
- the new z-index of the element
void relativeChangeZIndex ( PRInt32 change )
Adds change to the z-index of the currently positioned element.
- Arguments:
- change: [IN] relative change to apply to current z-index
void setElementPosition ( nsIDOMElement element , PRInt32 aX , PRInt32 aY )
Sets the position of an element; warning it does NOT check if the element is already positioned or not and that's on purpose.
- Arguments:
- element: [IN] the element
- aX: [IN] the x position in pixels.
- aY: [IN] the y position in pixels.
void setElementZIndex ( nsIDOMElement element , PRInt32 zorder )
Sets the z-index of an element.
- Arguments:
- element: [IN] the element
- zorder: [IN] the z-index
void showGrabberOnElement ( nsIDOMElement element )
Shows a grabber attached to an arbitrary element. The grabber is an image positioned on the left hand side of the top border of the element. Dragging and dropping it allows to change the element's absolute position in the document. See chrome://editor/content/images/grabber.gif
- Arguments:
- element: [IN] the element
Reference documentation is generated from Mozilla's source.