Public Member Functions | |
_style_fragment (fragment *_contents, const style &_st) | |
fragment_contents | layout (size_t firstw, size_t restw, const style &st2) |
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 |
size_t | trailing_width (size_t first_indent, size_t rest_indent) const |
bool | final_newline () const |
bool cwidget::_style_fragment::final_newline | ( | ) | const [inline, virtual] |
Implements cwidget::fragment.
References cwidget::fragment::final_newline().
fragment_contents cwidget::_style_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.
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. |
Implements cwidget::fragment.
References cwidget::fragment::layout().
size_t cwidget::_style_fragment::max_width | ( | size_t | first_indent, | |
size_t | rest_indent | |||
) | const [inline, virtual] |
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. |
Implements cwidget::fragment.
References cwidget::fragment::max_width().
size_t cwidget::_style_fragment::trailing_width | ( | size_t | first_indent, | |
size_t | rest_indent | |||
) | const [inline, virtual] |
first_indent | the indentation of the first line. | |
rest_indent | the indentation of any other lines. |
Implements cwidget::fragment.
References cwidget::fragment::trailing_width().