class CSS2BackgroundPosition

The <code> CSS2BackgroundPosition </code> interface represents the <a href="http://www. More...

Full nameDOM::CSS2BackgroundPosition
Definition#include <css_extensions.h>
InheritsDOM::CSSValue [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

The <code> CSS2BackgroundPosition </code> interface represents the <a href="http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-position"> background-position </a> CSS Level 2 property.

 CSS2BackgroundPosition ()

CSS2BackgroundPosition

 CSS2BackgroundPosition (const CSS2BackgroundPosition &other)

CSS2BackgroundPosition

 CSS2BackgroundPosition (CSS2BackgroundPositionImpl *impl)

CSS2BackgroundPosition

CSS2BackgroundPosition &  operator = (const CSS2BackgroundPosition &other)

operator =

Reimplemented from CSSValue.

 ~CSS2BackgroundPosition ()

~CSS2BackgroundPosition

unsigned short  horizontalType ()

horizontalType

[const]

A code defining the type of the horizontal value. It would be one <code> CSS_PERCENTAGE </code> , <code> CSS_EMS </code> , <code> CSS_EXS </code> , <code> CSS_PX </code> , <code> CSS_CM </code> , <code> CSS_MM </code> , <code> CSS_IN </code> , <code> CSS_PT </code> , <code> CSS_PC </code> , <code> CSS_IDENT </code> , <code> CSS_INHERIT </code> . If one of horizontal or vertical is <code> CSS_IDENT </code> or <code> CSS_INHERIT </code> , it's guaranteed that the other is the same.

unsigned short  verticalType ()

verticalType

[const]

A code defining the type of the horizontal value. The code can be one of the following units : <code> CSS_PERCENTAGE </code> , <code> CSS_EMS </code> , <code> CSS_EXS </code> , <code> CSS_PX </code> , <code> CSS_CM </code> , <code> CSS_MM </code> , <code> CSS_IN </code> , <code> CSS_PT </code> , <code> CSS_PC </code> , <code> CSS_IDENT </code> , <code> CSS_INHERIT </code> . If one of horizontal or vertical is <code> CSS_IDENT </code> or <code> CSS_INHERIT </code> , it's guaranteed that the other is the same.

DOM::DOMString  horizontalIdentifier ()

horizontalIdentifier

[const]

If <code> horizontalType </code> is <code> CSS_IDENT </code> or <code> CSS_INHERIT </code> , this attribute contains the string representation of the ident, otherwise it contains an empty string.

DOM::DOMString  verticalIdentifier ()

verticalIdentifier

[const]

If <code> verticalType </code> is <code> CSS_IDENT </code> or <code> CSS_INHERIT </code> , this attribute contains the string representation of the ident, otherwise it contains an empty string. The value is <code> "center" </code> if only the horizontalIdentifier has been set. The value is <code> "inherit" </code> if the horizontalIdentifier is <code> "inherit" </code> .

float  getHorizontalPosition ( const float horizontalType )

getHorizontalPosition

This method is used to get the float value in a specified unit if the <code> horizontalPosition </code> represents a length or a percentage. If the float doesn't contain a float value or can't be converted into the specified unit, a <code> DOMException </code> is raised.

Parameters:
horizontalTypeThe specified unit.

Returns: The float value.

Throws: DOMException, INVALID_ACCESS_ERR:, Raises, if, the, property, doesn't, contain, a, float, or, the, value, can't, be, converted.

float  getVerticalPosition ( const float verticalType )

getVerticalPosition

This method is used to get the float value in a specified unit if the <code> verticalPosition </code> represents a length or a percentage. If the float doesn't contain a float value or can't be converted into the specified unit, a <code> DOMException </code> is raised. The value is <code> 50% </code> if only the horizontal value has been specified.

Parameters:
verticalTypeThe specified unit.

Returns: The float value.

Throws: DOMException, INVALID_ACCESS_ERR:, Raises, if, the, property, doesn't, contain, a, float, or, the, value, can't, be, converted.

void  setHorizontalPosition ( const unsigned short horizontalType, const float value )

setHorizontalPosition

This method is used to set the horizontal position with a specified unit. If the vertical value is not a percentage or a length, it sets the vertical position to <code> 50% </code> .

NO_MODIFICATION_ALLOWED_ERR: Raises if this property is readonly.

Parameters:
horizontalTypeThe specified unit (a length or a percentage).
valueThe new value.

Throws: DOMException, INVALID_ACCESS_ERR:, Raises, if, the, specified, unit, is, not, a, length, or, a, percentage.

void  setVerticalPosition ( const unsigned short verticalType, const float value )

setVerticalPosition

This method is used to set the vertical position with a specified unit. If the horizontal value is not a percentage or a length, it sets the vertical position to <code> 50% </code> .

NO_MODIFICATION_ALLOWED_ERR: Raises if this property is readonly.

Parameters:
verticalTypeThe specified unit (a length or a percentage).
valueThe new value.

Throws: DOMException, INVALID_ACCESS_ERR:, Raises, if, the, specified, unit, is, not, a, length, or, a, percentage.

void  setPositionIdentifier ( const DOM::DOMString &horizontalIdentifier, const DOM::DOMString &verticalIdentifier )

setPositionIdentifier

Sets the identifiers. If the second identifier is the empty string, the vertical identifier is set to his default value ( <code> "center" </code> ). If the first identfier is <code> "inherit </code> , the second identifier is ignored and is set to <code> "inherit" </code> .

NO_MODIFICATION_ALLOWED_ERR: Raises if this property is readonly.

Parameters:
horizontalIdentifierThe new horizontal identifier.
verticalIdentifierThe new vertical identifier.

Throws: DOMException, SYNTAX_ERR:, Raises, if, the, identifiers, have, a, syntax, error, and, is, unparsable.


Generated by: root@daffy.perf.redhat.com on Mon Jul 14 13:28:10 2003, using kdoc 2.0a53.