cwidget::_newline_fragment Class Reference

This fragment just expands to a newline. More...

Inheritance diagram for cwidget::_newline_fragment:

cwidget::fragment

List of all members.

Public Member Functions

fragment_contents layout (size_t firstw, size_t restw, const style &st)
 Return all the lines of this fragment, given the "shape" of the fragment.
size_t max_width (size_t first_indent, size_t rest_indent) const
 
Parameters:
first_indent the indentation of the first line, relative to a baseline (which may be outside this fragment).

size_t trailing_width (size_t first_indent, size_t rest_indent) const
 
Parameters:
first_indent the indentation of the first line.

bool final_newline () const
 
Returns:
true if this fragment ends in a newline.


Detailed Description

This fragment just expands to a newline.


Member Function Documentation

fragment_contents cwidget::_newline_fragment::layout ( size_t  firstw,
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.

size_t cwidget::_newline_fragment::max_width ( size_t  first_indent,
size_t  rest_indent 
) const [inline, virtual]

Parameters:
first_indent the indentation of the first line, relative to a baseline (which may be outside this fragment).

Parameters:
rest_indent the indentation of any other lines.
Returns:
the maximum length of any line in this fragment. Any call to layout() with a width greater than this maximum length will produce the same result.

Implements cwidget::fragment.

size_t cwidget::_newline_fragment::trailing_width ( size_t  first_indent,
size_t  rest_indent 
) const [inline, virtual]

Parameters:
first_indent the indentation of the first line.

Parameters:
rest_indent the indentation of any other lines.
Returns:
the length of any "trailing" line in the fragment, including indentation.

Implements cwidget::fragment.

bool cwidget::_newline_fragment::final_newline (  )  const [inline, virtual]

Returns:
true if this fragment ends in a newline.

Implements cwidget::fragment.


The documentation for this class was generated from the following file:
Generated on Fri Feb 8 12:54:57 2008 for cwidget by  doxygen 1.5.4