Rocket::Core::LayoutInlineBox Class Reference
#include <LayoutInlineBox.h>
Detailed Description
- Author:
- Peter Curry
Constructor & Destructor Documentation
| Rocket::Core::LayoutInlineBox::LayoutInlineBox |
( |
Element * |
element, |
|
|
const Box & |
box | |
|
) |
| | |
Constructs a new inline box for an element.
- Parameters:
-
| element[in] | The element this inline box is flowing. |
| box[in] | The extents of the inline box's element. |
Constructs a new inline box for a split box.
- Parameters:
-
| chain[in] | The box that has overflowed into us. |
Member Function Documentation
| void Rocket::Core::LayoutInlineBox::SetLine |
( |
LayoutLineBox * |
line |
) |
|
Sets the inline box's line.
- Parameters:
-
| line[in] | The line this inline box resides in. |
Sets the inline box's parent.
- Parameters:
-
| parent[in] | The parent this inline box resides in. |
| virtual LayoutInlineBox* Rocket::Core::LayoutInlineBox::FlowContent |
( |
bool |
first_box, |
|
|
float |
available_width, |
|
|
float |
right_spacing_width | |
|
) |
| | [virtual] |
Flows the inline box's content into its parent line.
- Parameters:
-
| [in] | first_box | True if this box is the first box containing content to be flowed into this line. |
| [in] | available_width | The width available for flowing this box's content. This is measured from the left side of this box's content area. |
| [in] | right_spacing_width | The width of the spacing that must be left on the right of the element if no overflow occurs. If overflow occurs, then the entire width can be used. |
- Returns:
- The overflow box containing any content that spilled over from the flow. This must be NULL if no overflow occured.
Reimplemented in Rocket::Core::LayoutInlineBoxText.
| void Rocket::Core::LayoutInlineBox::CalculateBaseline |
( |
float & |
ascender, |
|
|
float & |
descender | |
|
) |
| | [virtual] |
Computes and sets the vertical position of this element, relative to its parent inline box (or block box, for an un-nested inline box).
- Parameters:
-
| ascender[out] | The maximum ascender of this inline box and all of its children. |
| descender[out] | The maximum descender of this inline box and all of its children. |
Reimplemented in Rocket::Core::LayoutInlineBoxText.
| void Rocket::Core::LayoutInlineBox::OffsetBaseline |
( |
float |
ascender |
) |
[virtual] |
Offsets the baseline of this box, and all of its children, by the ascender of the parent line box.
- Parameters:
-
| ascender[in] | The ascender of the line box. |
Reimplemented in Rocket::Core::LayoutInlineBoxText.
| bool Rocket::Core::LayoutInlineBox::CanOverflow |
( |
|
) |
const [virtual] |
Returns true if this box is capable of overflowing, or if it must be rendered on a single line.
- Returns:
- True if this box can overflow, false otherwise.
Reimplemented in Rocket::Core::LayoutInlineBoxText.
| bool Rocket::Core::LayoutInlineBox::IsLastChild |
( |
|
) |
const |
Returns true if this box's element is the last child of its parent.
- Parameters:
-
| True | if this box is a last child. |
| const Vector2f & Rocket::Core::LayoutInlineBox::GetPosition |
( |
|
) |
const |
Returns the inline box's offset from its line.
- Returns:
- The box's offset from its line.
| void Rocket::Core::LayoutInlineBox::SetHorizontalPosition |
( |
float |
position |
) |
|
Sets the inline box's horizontal offset from its parent's content area.
- Parameters:
-
| position[in] | The box's horizontal offset. |
| void Rocket::Core::LayoutInlineBox::SetVerticalPosition |
( |
float |
position |
) |
|
Sets the inline box's vertical offset from its parent's content area.
- Parameters:
-
| position[in] | The box's vertical offset. |
| void Rocket::Core::LayoutInlineBox::SizeElement |
( |
bool |
split |
) |
[virtual] |
| int Rocket::Core::LayoutInlineBox::GetVerticalAlignProperty |
( |
|
) |
const |
Returns the vertical align property of the box's element.
- Returns:
- the vertical align property, or -1 if it is set to a numerical value.
| Element * Rocket::Core::LayoutInlineBox::GetElement |
( |
|
) |
|
Returns the inline box's element.
- Returns:
- The inline box's element.
Returns the inline box's parent.
- Parameters:
-
| The | parent of this inline box. This will be NULL for a root-level inline box (ie, one that has a block element has a parent in the true hierarchy). |
| const Box & Rocket::Core::LayoutInlineBox::GetBox |
( |
|
) |
const |
Returns the inline box's dimension box.
- Returns:
- The inline box's dimension box.
| float Rocket::Core::LayoutInlineBox::GetHeight |
( |
|
) |
const |
Returns the height of the inline box. This is separate from the the box, as different types of inline elements generate different line heights. The possible types are: replaced elements (or inline-block elements), which use their entire box (including margins) as their height non-replaced elements, which use the maximum line-height of their children text elements, which use their line-height
| float Rocket::Core::LayoutInlineBox::GetBaseline |
( |
|
) |
const |
Returns the baseline of the inline box.
- Returns:
- The box's baseline.
| FontFaceHandle * Rocket::Core::LayoutInlineBox::GetParentFont |
( |
|
) |
const [protected] |
Returns our parent box's font face handle.
- Returns:
- The font face handle of our parent box.
| float Rocket::Core::LayoutInlineBox::GetParentLineHeight |
( |
|
) |
const [protected] |
Returns our parent box's line height.
- Returns:
- The line height of our parent box.
The documentation for this class was generated from the following files: