• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • DOM
  • CSS2BackgroundPosition
Public Member Functions | List of all members
DOM::CSS2BackgroundPosition Class Reference

#include <css_extensions.h>

Inheritance diagram for DOM::CSS2BackgroundPosition:
Inheritance graph
[legend]

Public Member Functions

 CSS2BackgroundPosition ()
 
 CSS2BackgroundPosition (const CSS2BackgroundPosition &other)
 
 CSS2BackgroundPosition (CSS2BackgroundPositionImpl *impl)
 
 ~CSS2BackgroundPosition ()
 
float getHorizontalPosition (const float horizontalType)
 
float getVerticalPosition (const float verticalType)
 
DOM::DOMString horizontalIdentifier () const
 
unsigned short horizontalType () const
 
CSS2BackgroundPosition & operator= (const CSS2BackgroundPosition &other)
 
void setHorizontalPosition (const unsigned short horizontalType, const float value)
 
void setPositionIdentifier (const DOM::DOMString &horizontalIdentifier, const DOM::DOMString &verticalIdentifier)
 
void setVerticalPosition (const unsigned short verticalType, const float value)
 
DOM::DOMString verticalIdentifier () const
 
unsigned short verticalType () const
 
- Public Member Functions inherited from DOM::CSSValue
 CSSValue ()
 
 CSSValue (const CSSValue &other)
 
 CSSValue (CSSValueImpl *impl)
 
 ~CSSValue ()
 
DOM::DOMString cssText () const
 
unsigned short cssValueType () const
 
CSSValueImpl * handle () const
 
bool isCSSPrimitiveValue () const
 
bool isCSSValueList () const
 
bool isNull () const
 
CSSValue & operator= (const CSSValue &other)
 
void setCssText (const DOM::DOMString &)
 

Additional Inherited Members

- Public Types inherited from DOM::CSSValue
enum  UnitTypes {
  CSS_INHERIT = 0, CSS_PRIMITIVE_VALUE = 1, CSS_VALUE_LIST = 2, CSS_CUSTOM = 3,
  CSS_INITIAL = 4, CSS_SVG_VALUE = 1001
}
 
- Protected Attributes inherited from DOM::CSSValue
CSSValueImpl * impl
 

Detailed Description

The CSS2BackgroundPosition interface represents the background-position CSS Level 2 property.

Definition at line 145 of file css_extensions.h.

Constructor & Destructor Documentation

CSS2BackgroundPosition::CSS2BackgroundPosition ( )

Definition at line 90 of file css_extensions.cpp.

CSS2BackgroundPosition::CSS2BackgroundPosition ( const CSS2BackgroundPosition &  other)

Definition at line 94 of file css_extensions.cpp.

CSS2BackgroundPosition::CSS2BackgroundPosition ( CSS2BackgroundPositionImpl *  impl)

Definition at line 98 of file css_extensions.cpp.

CSS2BackgroundPosition::~CSS2BackgroundPosition ( )

Definition at line 108 of file css_extensions.cpp.

Member Function Documentation

float CSS2BackgroundPosition::getHorizontalPosition ( const float  horizontalType)

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.
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the property doesn't contain a float or the value can't be converted.

Definition at line 136 of file css_extensions.cpp.

float CSS2BackgroundPosition::getVerticalPosition ( const float  verticalType)

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.
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the property doesn't contain a float or the value can't be converted.

Definition at line 142 of file css_extensions.cpp.

DOMString CSS2BackgroundPosition::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.

Definition at line 124 of file css_extensions.cpp.

unsigned short CSS2BackgroundPosition::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.

Definition at line 112 of file css_extensions.cpp.

CSS2BackgroundPosition & CSS2BackgroundPosition::operator= ( const CSS2BackgroundPosition &  other)

Definition at line 102 of file css_extensions.cpp.

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

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

Parameters
horizontalTypeThe specified unit (a length or a percentage).
valueThe new value.
Returns
Exceptions
DOMExceptionINVALID_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 148 of file css_extensions.cpp.

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

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 \c "inherit" .

Parameters
horizontalIdentifierThe new horizontal identifier.
verticalIdentifierThe new vertical identifier.
Returns
Exceptions
DOMExceptionSYNTAX_ERR: Raises if the identifiers have a syntax error and is unparsable.

NO_MODIFICATION_ALLOWED_ERR: Raises if this property is readonly.

Definition at line 160 of file css_extensions.cpp.

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

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

Parameters
verticalTypeThe specified unit (a length or a percentage).
valueThe new value.
Returns
Exceptions
DOMExceptionINVALID_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 154 of file css_extensions.cpp.

DOMString CSS2BackgroundPosition::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" .

Definition at line 130 of file css_extensions.cpp.

unsigned short CSS2BackgroundPosition::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.

Definition at line 118 of file css_extensions.cpp.


The documentation for this class was generated from the following files:
  • css_extensions.h
  • css_extensions.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal