Rocket::Core::LayoutInlineBoxText Class Reference

#include <LayoutInlineBoxText.h>

Inheritance diagram for Rocket::Core::LayoutInlineBoxText:
Collaboration diagram for Rocket::Core::LayoutInlineBoxText:

Public Member Functions

 LayoutInlineBoxText (Element *element, int line_begin=0)
virtual bool CanOverflow () const
virtual LayoutInlineBoxFlowContent (bool first_box, float available_width, float right_spacing_width)
virtual void CalculateBaseline (float &ascender, float &descender)
virtual void OffsetBaseline (float ascender)
virtual void PositionElement ()
 Positions the inline box's element.
virtual void SizeElement (bool split)
 Sizes the inline box's element.
void * operator new (size_t size)
void operator delete (void *chunk)

Detailed Description

Author:
Peter Curry

Constructor & Destructor Documentation

Rocket::Core::LayoutInlineBoxText::LayoutInlineBoxText ( Element element,
int  line_begin = 0 
)

Constructs a new inline box for a text element.

Parameters:
[in] element The element this inline box is flowing.
[in] line_begin The index of the first character of the element's string this text box will render.


Member Function Documentation

bool Rocket::Core::LayoutInlineBoxText::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 from Rocket::Core::LayoutInlineBox.

LayoutInlineBox * Rocket::Core::LayoutInlineBoxText::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.
available_width[in] The width available for flowing this box's content. This is measured from the left side of this box's content area.
right_spacing_width[in] 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 from Rocket::Core::LayoutInlineBox.

void Rocket::Core::LayoutInlineBoxText::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 from Rocket::Core::LayoutInlineBox.

void Rocket::Core::LayoutInlineBoxText::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 from Rocket::Core::LayoutInlineBox.


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