khtml Library API Documentation

DOM::CSS2PageSize Class Reference

The CSS2Cursor interface represents the size CSS Level 2 descriptor. More...

#include <css_extensions.h>

Inheritance diagram for DOM::CSS2PageSize:

DOM::CSSValue List of all members.

Public Methods

unsigned short widthType () const
unsigned short heightType () const
DOM::DOMString identifier () const
float getWidth (const float widthType)
float getHeightSize (const float heightType)
void setWidthSize (const unsigned short widthType, const float value)
void setHeightSize (const unsigned short heightType, const float value)
void setIdentifier (const DOM::DOMString &identifier)

Detailed Description

The CSS2Cursor interface represents the size CSS Level 2 descriptor.

Definition at line 740 of file css_extensions.h.


Member Function Documentation

unsigned short CSS2PageSize::widthType  
 

A code defining the type of the width of the page.

It would be one of CSS_EMS , CSS_EXS , CSS_PX , CSS_CM , CSS_MM , CSS_IN , CSS_PT , CSS_PC , CSS_IDENT , CSS_INHERIT . If one of width or height is CSS_IDENT or CSS_INHERIT , it's guaranteed that the other is the same.

Definition at line 503 of file css_extensions.cpp.

Referenced by getWidth(), and setWidthSize().

unsigned short CSS2PageSize::heightType  
 

A code defining the type of the height of the page.

It would be one of CSS_EMS , CSS_EXS , CSS_PX , CSS_CM , CSS_MM , CSS_IN , CSS_PT , CSS_PC , CSS_IDENT , CSS_INHERIT . If one of width or height is CSS_IDENT or CSS_INHERIT , it's guaranteed that the other is the same.

Definition at line 509 of file css_extensions.cpp.

Referenced by getHeightSize(), and setHeightSize().

DOMString CSS2PageSize::identifier  
 

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

Definition at line 515 of file css_extensions.cpp.

float CSS2PageSize::getWidth const float    widthType
 

This method is used to get the float value in a specified unit if the widthType represents a length.

If the float doesn't contain a float value or can't be converted into the specified unit, a DOMException is raised.

Parameters:
widthType  The specified unit.
Returns:
The float value.
Exceptions:
DOMException  INVALID_ACCESS_ERR: Raises if the property doesn't contain a float or the value can't be converted.

Definition at line 521 of file css_extensions.cpp.

References widthType().

float CSS2PageSize::getHeightSize const float    heightType
 

This method is used to get the float value in a specified unit if the heightType represents a length.

If the float doesn't contain a float value or can't be converted into the specified unit, a DOMException is raised. If only the width value has been specified, the height value is the same.

Parameters:
heightType  The specified unit.
Returns:
The float value.
Exceptions:
DOMException  INVALID_ACCESS_ERR: Raises if the property doesn't contain a float or the value can't be converted.

Definition at line 527 of file css_extensions.cpp.

References heightType().

void CSS2PageSize::setWidthSize const unsigned short    widthType,
const float    value
 

This method is used to set the width position with a specified unit.

If the heightType is not a length, it sets the height position to the same value.

Parameters:
widthType  The specified unit.
value  The new value.
Returns:
Exceptions:
DOMException  INVALID_ACCESS_ERR: Raises if the specified unit is not a length or a percentage.
NO_MODIFICATION_ALLOWED_ERR: Raises if this property is readonly.

Definition at line 533 of file css_extensions.cpp.

References widthType().

void CSS2PageSize::setHeightSize const unsigned short    heightType,
const float    value
 

This method is used to set the height position with a specified unit.

If the widthType is not a length, it sets the width position to the same value.

Parameters:
heightType  The specified unit.
value  The new value.
Returns:
Exceptions:
DOMException  INVALID_ACCESS_ERR: Raises if the specified unit is not a length or a percentage.
NO_MODIFICATION_ALLOWED_ERR: Raises if this property is readonly.

Definition at line 539 of file css_extensions.cpp.

References heightType().

void CSS2PageSize::setIdentifier const DOM::DOMString   identifier
 

Sets the identifier.

Parameters:
identifier  The new identifier.
Returns:
Exceptions:
DOMException  SYNTAX_ERR: Raises if the identifier has a syntax error and is unparsable.
NO_MODIFICATION_ALLOWED_ERR: Raises if this property is readonly.

Definition at line 545 of file css_extensions.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for khtml Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:37:23 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003