Rocket::Core::LayoutBlockBoxSpace Class Reference

#include <LayoutBlockBoxSpace.h>

Collaboration diagram for Rocket::Core::LayoutBlockBoxSpace:

Public Member Functions

 LayoutBlockBoxSpace (LayoutBlockBox *parent)
void ImportSpace (const LayoutBlockBoxSpace &space)
void PositionBox (Vector2f &box_position, float &box_width, float cursor, const Vector2f &dimensions) const
float PositionBox (float cursor, Element *element)
float ClearBoxes (float cursor, int clear_property)
const Vector2fGetOffset () const
Vector2f GetDimensions () const
void * operator new (size_t size)
void operator delete (void *chunk)

Data Structures

struct  SpaceBox

Detailed Description

Each block box has a space object for managing the space occupied by its floating elements, and those of its ancestors as relevant.

Author:
Peter Curry

Member Function Documentation

void Rocket::Core::LayoutBlockBoxSpace::ImportSpace ( const LayoutBlockBoxSpace space  ) 

Imports boxes from another block into this space.

Parameters:
[in] space The space to import boxes from.

void Rocket::Core::LayoutBlockBoxSpace::PositionBox ( Vector2f box_position,
float &  box_width,
float  cursor,
const Vector2f dimensions 
) const

Generates the position for a box of a given size within our block box.

Parameters:
[out] box_position The generated position for the box.
[out] box_width The available width for the box.
[in] cursor The ideal vertical position for the box.
[in] dimensions The minimum available space required for the box.

float Rocket::Core::LayoutBlockBoxSpace::PositionBox ( float  cursor,
Element element 
)

Generates and sets the position for a floating box of a given size within our block box. The element's box is then added into our list of floating boxes.

Parameters:
[in] cursor The ideal vertical position for the box.
[in] element The element to position.
Returns:
The offset of the bottom outer edge of the element.

float Rocket::Core::LayoutBlockBoxSpace::ClearBoxes ( float  cursor,
int  clear_property 
)

Determines the appropriate vertical position for an object that is choosing to clear floating elements to the left or right (or both).

Parameters:
[in] cursor The ideal vertical position.
[in] clear_property The value of the clear property of the clearing object.
Returns:
The appropriate vertical position for the clearing object.

const Vector2f & Rocket::Core::LayoutBlockBoxSpace::GetOffset (  )  const

Returns the top-left corner of the boxes within the space.

Returns:
The space's offset.

Vector2f Rocket::Core::LayoutBlockBoxSpace::GetDimensions (  )  const

Returns the dimensions of the boxes within the space.

Returns:
The space's dimensions.


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