class CSS2BackgroundPosition

The CSS2BackgroundPosition interface represents the 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 CSS2BackgroundPosition interface represents the background-position 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 CSS_PERCENTAGE , CSS_EMS , CSS_EXS , CSS_PX , CSS_CM , CSS_MM , CSS_IN , CSS_PT , CSS_PC , CSS_IDENT , CSS_INHERIT . If one of horizontal or vertical is CSS_IDENT or CSS_INHERIT , 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 : CSS_PERCENTAGE , CSS_EMS , CSS_EXS , CSS_PX , CSS_CM , CSS_MM , CSS_IN , CSS_PT , CSS_PC , CSS_IDENT , CSS_INHERIT . If one of horizontal or vertical is CSS_IDENT or CSS_INHERIT , it's guaranteed that the other is the same.

DOM::DOMString  horizontalIdentifier ()

horizontalIdentifier

[const]

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

DOM::DOMString  verticalIdentifier ()

verticalIdentifier

[const]

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

float  getHorizontalPosition ( const float horizontalType )

getHorizontalPosition

This method is used to get the float value in a specified unit if the horizontalPosition 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 DOMException 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 verticalPosition 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 DOMException is raised. The value is 50% 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 50% .

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 50% .

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 ( "center" ). If the first identfier is "inherit , the second identifier is ignored and is set to "inherit" .

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: dfaure on faure on Tue Apr 16 08:50:42 2002, using kdoc 2.0a53.