26 #include "fragment_contents.h" 28 #include <cwidget/style.h> 71 virtual size_t max_width(
size_t first_indent,
72 size_t rest_indent)
const=0;
82 size_t rest_indent)
const=0;
101 fragment *text_fragment(
const std::wstring &s);
112 fragment *text_fragment(
const std::wstring &s,
123 fragment *text_fragment(
const std::string &s,
124 const char *encoding=NULL);
129 fragment *text_fragment(
const std::string &s,
131 const char *encoding=NULL);
144 return text_fragment(std::string(s), st);
173 fragment *sequence_fragment(
const std::vector<fragment *> &fragments);
195 fragment *join_fragments(
const std::vector<fragment *> &fragments,
196 const std::wstring &between);
300 enum align {top,
center, bottom};
325 size_t _width, align _vert_align,
327 :proportional(_proportional),
328 expandable(_expandable),
330 vert_align(_vert_align)
337 size_t _width, align _vert_align,
338 const std::vector<fragment *> &_lines)
339 :proportional(_proportional),
340 expandable(_expandable),
342 vert_align(_vert_align),
348 :proportional(
false), width(0), vert_align(top)
364 fragment *fragment_columns(
const std::vector<fragment_column_entry> &columns);
bool expandable
If proportional is false and the fragment is not NULL, then setting this to true means that the width...
Definition: fragment.h:292
This class represents the formatted contents of a fragment.
Definition: fragment_contents.h:30
std::vector< fragment * > lines
The vertical components of this column.
Definition: fragment.h:320
Stores information on a single column of fragments.
Definition: fragment.h:280
bool proportional
If true, this column is allocated space proportionally; otherwise, its width is exactly what is speci...
Definition: fragment.h:285
align vert_align
The vertical alignment of the column.
Definition: fragment.h:308
size_t width
If proportional is true, this is a number giving the relative size of this column compared to other p...
Definition: fragment.h:298
fragment_column_entry(bool _proportional, bool _expandable, size_t _width, align _vert_align, fragment *f)
Create a fragment column that has a single line.
Definition: fragment.h:323