cwidget::_sequence_fragment Class Reference

A fragment generated by composing a sequence of other fragments. More...

Inheritance diagram for cwidget::_sequence_fragment:

cwidget::fragment_container cwidget::fragment

List of all members.

Public Member Functions

 _sequence_fragment (const vector< fragment * > &_contents)
fragment_contents layout (size_t firstw, const size_t restw, const style &st)
 Return all the lines of this fragment, given the "shape" of the fragment.
size_t calc_max_width (size_t first_indent, size_t rest_indent) const
 Actually calculate the maximum width.
size_t calc_trailing_width (size_t first_indent, size_t rest_indent) const
 Actually calculate the trailing width.
bool calc_final_newline () const
 Actually calculate the final-nl status.


Detailed Description

A fragment generated by composing a sequence of other fragments.


Member Function Documentation

fragment_contents cwidget::_sequence_fragment::layout ( size_t  firstw,
const size_t  w,
const style st 
) [inline, virtual]

Return all the lines of this fragment, given the "shape" of the fragment.

Note that some fragments ignore the given widths, so the caller is expected to either put everything in a formatting box (one that forces its contents to stay "in bounds") or manually clip the return value.

Parameters:
firstw the width to which the first line of the fragment should be formatted.
w the width to which subsequent lines of the fragment should be formatted.
s the enclosing style of this fragment. The fragment's size is guaranteed to be independent of s.
Returns:
the lines of this fragment; the caller is responsible for deleting it.

Implements cwidget::fragment.

References cwidget::fragment_contents::back(), cwidget::fragment_contents::begin(), cwidget::fragment_contents::end(), cwidget::fragment_contents::get_final_nl(), cwidget::fragment_contents::push_back(), cwidget::fragment_contents::set_final_nl(), and cwidget::fragment_contents::size().

size_t cwidget::_sequence_fragment::calc_max_width ( size_t  first_indent,
size_t  rest_indent 
) const [inline, virtual]

Actually calculate the maximum width.

Implements cwidget::fragment_container.

size_t cwidget::_sequence_fragment::calc_trailing_width ( size_t  first_indent,
size_t  rest_indent 
) const [inline, virtual]

Actually calculate the trailing width.

Implements cwidget::fragment_container.

bool cwidget::_sequence_fragment::calc_final_newline (  )  const [inline, virtual]

Actually calculate the final-nl status.

Implements cwidget::fragment_container.


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

Generated on Wed Jan 28 07:23:53 2009 for cwidget by  doxygen 1.5.6