• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

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

#include <css_value.h>

Inheritance diagram for DOM::CSSPrimitiveValue:
DOM::CSSValue

Public Types

enum  UnitTypes {
  CSS_UNKNOWN = 0 , CSS_NUMBER = 1 , CSS_PERCENTAGE = 2 , CSS_EMS = 3 ,
  CSS_EXS = 4 , CSS_PX = 5 , CSS_CM = 6 , CSS_MM = 7 ,
  CSS_IN = 8 , CSS_PT = 9 , CSS_PC = 10 , CSS_DEG = 11 ,
  CSS_RAD = 12 , CSS_GRAD = 13 , CSS_MS = 14 , CSS_S = 15 ,
  CSS_HZ = 16 , CSS_KHZ = 17 , CSS_DIMENSION = 18 , CSS_STRING = 19 ,
  CSS_URI = 20 , CSS_IDENT = 21 , CSS_ATTR = 22 , CSS_COUNTER = 23 ,
  CSS_RECT = 24 , CSS_RGBCOLOR = 25 , CSS_PAIR = 100 , CSS_HTML_RELATIVE = 255
}
 
- 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
}
 

Public Member Functions

 CSSPrimitiveValue (const CSSPrimitiveValue &other)
 
 CSSPrimitiveValue (const CSSValue &other)
 
 CSSPrimitiveValue (CSSPrimitiveValueImpl *impl)
 
CSSPrimitiveValue & operator= (const CSSPrimitiveValue &other)
 
CSSPrimitiveValue & operator= (const CSSValue &other)
 
unsigned short primitiveType () const
 
void setFloatValue (unsigned short unitType, float floatValue)
 
float getFloatValue (unsigned short unitType)
 
void setStringValue (unsigned short stringType, const DOM::DOMString &stringValue)
 
DOM::DOMString getStringValue ()
 
Counter getCounterValue ()
 
Rect getRectValue ()
 
RGBColor getRGBColorValue ()
 
- Public Member Functions inherited from DOM::CSSValue
 CSSValue (const CSSValue &other)
 
 CSSValue (CSSValueImpl *impl)
 
CSSValue & operator= (const CSSValue &other)
 
DOM::DOMString cssText () const
 
void setCssText (const DOM::DOMString &)
 
unsigned short cssValueType () const
 
bool isCSSValueList () const
 
bool isCSSPrimitiveValue () const
 
CSSValueImpl * handle () const
 
bool isNull () const
 

Additional Inherited Members

- Protected Attributes inherited from DOM::CSSValue
CSSValueImpl * impl
 

Detailed Description

The CSSPrimitiveValue interface represents a single CSS value .

This interface may be used to determine the value of a specific style property currently set in a block or to set a specific style properties explicitly within the block. An instance of this interface can be obtained from the getPropertyCSSValue method of the CSSStyleDeclaration interface.

Definition at line 373 of file css_value.h.

Member Enumeration Documentation

◆ UnitTypes

enum DOM::CSSPrimitiveValue::UnitTypes

An integer indicating which type of unit applies to the value.

Definition at line 390 of file css_value.h.

Constructor & Destructor Documentation

◆ CSSPrimitiveValue() [1/4]

DOM::CSSPrimitiveValue::CSSPrimitiveValue ( )

Definition at line 304 of file css_value.cpp.

◆ CSSPrimitiveValue() [2/4]

DOM::CSSPrimitiveValue::CSSPrimitiveValue ( const CSSPrimitiveValue &  other)

Definition at line 308 of file css_value.cpp.

◆ CSSPrimitiveValue() [3/4]

DOM::CSSPrimitiveValue::CSSPrimitiveValue ( const CSSValue &  other)

Definition at line 312 of file css_value.cpp.

◆ CSSPrimitiveValue() [4/4]

DOM::CSSPrimitiveValue::CSSPrimitiveValue ( CSSPrimitiveValueImpl *  impl)

Definition at line 318 of file css_value.cpp.

◆ ~CSSPrimitiveValue()

DOM::CSSPrimitiveValue::~CSSPrimitiveValue ( )

Definition at line 347 of file css_value.cpp.

Member Function Documentation

◆ getCounterValue()

Counter DOM::CSSPrimitiveValue::getCounterValue ( )

This method is used to get the Counter value.

If this CSS value doesn't contain a counter value, a DOMException is raised. Modification to the corresponding style property can be achieved using the Counter interface.

Returns
The Counter value.
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a Counter value.

Definition at line 395 of file css_value.cpp.

◆ getFloatValue()

float DOM::CSSPrimitiveValue::getFloatValue ( unsigned short  unitType)

This method is used to get a float value in a specified unit.

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

Parameters
unitTypeA unit code to get the float value. The unit code can only be a float unit type (e.g. CSS_NUMBER , CSS_PERCENTAGE , CSS_EMS , CSS_EXS , CSS_PX , CSS_PX , CSS_CM , CSS_MM , CSS_IN , CSS_PT , CSS_PC , CSS_DEG , CSS_RAD , CSS_GRAD , CSS_MS , CSS_S , CSS_HZ , CSS_KHZ , CSS_DIMENSION ).
Returns
The float value in the specified unit.
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a float value or if the float value can't be converted into the specified unit.

Definition at line 368 of file css_value.cpp.

◆ getRectValue()

Rect DOM::CSSPrimitiveValue::getRectValue ( )

This method is used to get the Rect value.

If this CSS value doesn't contain a rect value, a DOMException is raised. Modification to the corresponding style property can be achieved using the Rect interface.

Returns
The Rect value.
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a Rect value.

Definition at line 401 of file css_value.cpp.

◆ getRGBColorValue()

RGBColor DOM::CSSPrimitiveValue::getRGBColorValue ( )

This method is used to get the RGB color.

If this CSS value doesn't contain a RGB color value, a DOMException is raised. Modification to the corresponding style property can be achieved using the RGBColor interface.

Returns
the RGB color value.
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the attached property can't return a RGB color value.

Definition at line 407 of file css_value.cpp.

◆ getStringValue()

DOMString DOM::CSSPrimitiveValue::getStringValue ( )

This method is used to get the string value in a specified unit.

If the CSS value doesn't contain a string value, a DOMException is raised.

Returns
The string value in the current unit. The current valueType can only be a string unit type (e.g. CSS_URI , CSS_IDENT and CSS_ATTR ).
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a string value.

Definition at line 389 of file css_value.cpp.

◆ operator=() [1/2]

CSSPrimitiveValue & DOM::CSSPrimitiveValue::operator= ( const CSSPrimitiveValue &  other)

Definition at line 322 of file css_value.cpp.

◆ operator=() [2/2]

CSSPrimitiveValue & DOM::CSSPrimitiveValue::operator= ( const CSSValue &  other)

Definition at line 332 of file css_value.cpp.

◆ primitiveType()

unsigned short DOM::CSSPrimitiveValue::primitiveType ( ) const

The type of the value as defined by the constants specified above.

Definition at line 351 of file css_value.cpp.

◆ setFloatValue()

void DOM::CSSPrimitiveValue::setFloatValue ( unsigned short  unitType,
float  floatValue 
)

A method to set the float value with a specified unit.

If the property attached with this value can not accept the specified unit or the float value, the value will be unchanged and a DOMException will be raised.

Parameters
unitTypeA unit code as defined above. The unit code can only be a float unit type (e.g. NUMBER , PERCENTAGE , CSS_EMS , CSS_EXS , CSS_PX , CSS_PX , CSS_CM , CSS_MM , CSS_IN , CSS_PT , CSS_PC , CSS_DEG , CSS_RAD , CSS_GRAD , CSS_MS , CSS_S , CSS_HZ , CSS_KHZ , CSS_DIMENSION ).
floatValueThe new float value.
Returns
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the attached property doesn't support the float value or the unit type.

NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Definition at line 357 of file css_value.cpp.

◆ setStringValue()

void DOM::CSSPrimitiveValue::setStringValue ( unsigned short  stringType,
const DOM::DOMString &  stringValue 
)

A method to set the string value with a specified unit.

If the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a DOMException will be raised.

Parameters
stringTypeA string code as defined above. The string code can only be a string unit type (e.g. CSS_URI , CSS_IDENT , CSS_INHERIT and CSS_ATTR ).
stringValueThe new string value. If the stringType is equal to CSS_INHERIT , the stringValue should be inherit .
Returns
Exceptions
DOMExceptionINVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a string value or if the string value can't be converted into the specified unit.

NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.

Definition at line 377 of file css_value.cpp.


The documentation for this class was generated from the following files:
  • css_value.h
  • css_value.cpp

tdehtml

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

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.9.4
This website is maintained by Timothy Pearson.