cwidget::fragment_container Class Reference

A base class for fragment containers that supports caching information about the children. More...

Inheritance diagram for cwidget::fragment_container:

cwidget::fragment cwidget::_sequence_fragment

List of all members.

Public Member Functions

virtual size_t calc_max_width (size_t first_indent, size_t rest_indent) const =0
 Actually calculate the maximum width.
virtual size_t calc_trailing_width (size_t first_indent, size_t rest_indent) const =0
 Actually calculate the trailing width.
virtual bool calc_final_newline () const =0
 Actually calculate the final-nl status.
size_t max_width (size_t first_indent, size_t rest_indent) const
size_t trailing_width (size_t first_indent, size_t rest_indent) const
bool final_newline () const


Detailed Description

A base class for fragment containers that supports caching information about the children.

(yum, premature optimization)


Member Function Documentation

virtual size_t cwidget::fragment_container::calc_max_width ( size_t  first_indent,
size_t  rest_indent 
) const [pure virtual]

Actually calculate the maximum width.

Implemented in cwidget::_sequence_fragment.

virtual size_t cwidget::fragment_container::calc_trailing_width ( size_t  first_indent,
size_t  rest_indent 
) const [pure virtual]

Actually calculate the trailing width.

Implemented in cwidget::_sequence_fragment.

virtual bool cwidget::fragment_container::calc_final_newline (  )  const [pure virtual]

Actually calculate the final-nl status.

Implemented in cwidget::_sequence_fragment.

size_t cwidget::fragment_container::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).
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::fragment_container::trailing_width ( size_t  first_indent,
size_t  rest_indent 
) const [inline, virtual]

Parameters:
first_indent the indentation of the first line.
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::fragment_container::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 Wed Jan 28 07:23:52 2009 for cwidget by  doxygen 1.5.6