#include <CSSUnit.hpp>
Inheritance diagram for CSS::RelativeLength:
Public Types | |
enum | RelativeUnit { em, ex, percent } |
The relative unit. More... | |
Public Member Functions | |
virtual int32 | getAsPixels (const uint32 currentIteration=0) const |
Get this length in pixels. | |
virtual const int32 | getComputedValue () const |
Get the computed value. | |
virtual bool | isAbsolute () const |
Is this length absolute (for performance reason) ? | |
virtual bool | isAuto () const |
Is this length auto ? | |
RelativeLength (const RelativeLength &other) | |
Copy constructor. | |
RelativeLength (const float value, const RelativeUnit &relUnit, Length &relativeTo) | |
Constructor. | |
virtual void | setComputedValue (const int32 _value, const uint32 _iter) |
Set the computed value. | |
void | setValue (const float val) |
Set the declared value. | |
virtual void | setZero () |
Zero this object. | |
Protected Attributes | |
int32 | computedValue |
The last computed value (in pixels). | |
uint32 | iteration |
The current rendering iteration (can only increase). | |
const Length & | to |
The length this unit is relative to. | |
RelativeUnit | unit |
The relative unit. | |
float | value |
The value. |
CSS::RelativeLength::RelativeLength | ( | const float | value, | |
const RelativeUnit & | relUnit, | |||
Length & | relativeTo | |||
) | [inline] |
Constructor.
CSS::RelativeLength::RelativeLength | ( | const RelativeLength & | other | ) | [inline] |
Copy constructor.
virtual int32 CSS::RelativeLength::getAsPixels | ( | const uint32 | currentIteration = 0 |
) | const [inline, virtual] |
virtual const int32 CSS::Length::getComputedValue | ( | ) | const [inline, virtual, inherited] |
virtual bool CSS::Length::isAbsolute | ( | ) | const [inline, virtual, inherited] |
Is this length absolute (for performance reason) ?
Reimplemented in CSS::AbsoluteLength, and CSS::LineHeight.
virtual bool CSS::Length::isAuto | ( | ) | const [inline, virtual, inherited] |
virtual void CSS::Length::setComputedValue | ( | const int32 | _value, | |
const uint32 | _iter | |||
) | [inline, virtual, inherited] |
void CSS::Length::setValue | ( | const float | val | ) | [inline, inherited] |
Set the declared value.
virtual void CSS::Length::setZero | ( | ) | [inline, virtual, inherited] |
int32 CSS::Length::computedValue [mutable, protected, inherited] |
The last computed value (in pixels).
uint32 CSS::Length::iteration [mutable, protected, inherited] |
The current rendering iteration (can only increase).
const Length& CSS::RelativeLength::to [protected] |
The length this unit is relative to.
RelativeUnit CSS::RelativeLength::unit [protected] |
The relative unit.
float CSS::Length::value [protected, inherited] |
The value.