Rocket::Core::LayoutLineBox Class Reference

#include <LayoutLineBox.h>

Collaboration diagram for Rocket::Core::LayoutLineBox:

Public Member Functions

 LayoutLineBox (LayoutBlockBox *parent)
LayoutInlineBoxClose (LayoutInlineBox *overflow=NULL)
void CloseInlineBox (LayoutInlineBox *inline_box)
LayoutInlineBoxAddElement (Element *element, const Box &box)
LayoutInlineBoxAddBox (LayoutInlineBox *box)
void AddChainedBox (LayoutInlineBox *chained_box)
const Vector2fGetPosition () const
Vector2f GetRelativePosition () const
const Vector2fGetDimensions () const
LayoutInlineBoxGetOpenInlineBox ()
LayoutBlockBoxGetBlockBox ()
void * operator new (size_t size)
void operator delete (void *chunk)

Detailed Description

Author:
Peter Curry

Member Function Documentation

LayoutInlineBox * Rocket::Core::LayoutLineBox::Close ( LayoutInlineBox overflow = NULL  ) 

Closes the line box, positioning all inline elements within it.

Parameters:
overflow[in] The overflow box from a split inline box that caused this line to close. Leave this as NULL if we closed naturally.
Returns:
If there was any overflow, this will be the last element generated by the spilling content. Otherwise, this will be NULL.

void Rocket::Core::LayoutLineBox::CloseInlineBox ( LayoutInlineBox inline_box  ) 

Closes one of the line box's inline boxes.

Parameters:
inline_box[in] The inline box to close. This should always be the line box's open box.

LayoutInlineBox * Rocket::Core::LayoutLineBox::AddElement ( Element element,
const Box box 
)

Attempts to add a new element to this line box. If it can't fit, or needs to be split, new line boxes will be created. The inline box for the final section of the element will be returned.

Parameters:
element[in] The element to fit into this line box.
box[in] The element's extents.
Returns:
The inline box for the element.

LayoutInlineBox * Rocket::Core::LayoutLineBox::AddBox ( LayoutInlineBox box  ) 

Attempts to add a new inline box to this line. If it can't fit, or needs to be split, new line boxes will be created. The inline box for the final section of the element will be returned.

Parameters:
box[in] The inline box to be added to the line.
Returns:
The final inline box.

void Rocket::Core::LayoutLineBox::AddChainedBox ( LayoutInlineBox chained_box  ) 

Adds an inline box as a chained hierarchy overflowing to this line. The chain will be extended into this line box.

Parameters:
split_box[in] The box overflowed from a previous line.

const Vector2f & Rocket::Core::LayoutLineBox::GetPosition (  )  const

Returns the position of the line box, relative to its parent's block box's content area.

Returns:
The position of the line box.

Vector2f Rocket::Core::LayoutLineBox::GetRelativePosition (  )  const

Returns the position of the line box, relative to its parent's block box's offset parent.

Returns:
The relative position of the line box.

const Vector2f & Rocket::Core::LayoutLineBox::GetDimensions (  )  const

Returns the dimensions of the line box.

Returns:
The dimensions of the line box.

LayoutInlineBox * Rocket::Core::LayoutLineBox::GetOpenInlineBox (  ) 

Returns the line box's open inline box.

Returns:
The line's open inline box, or NULL if it currently has none.

LayoutBlockBox * Rocket::Core::LayoutLineBox::GetBlockBox (  ) 

Returns the line's containing block box.

Returns:
The line's block box.


The documentation for this class was generated from the following files: