3 * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
12 #include <l4/scout-gfx/widget>
13 #include <l4/scout-gfx/doc/token>
21 * A verbatim text block consists of a number of preformatted text lines.
22 * The text is printed in a monospaced font and the whole verbatim area
23 * has a shaded background.
25 class Verbatim : public Parent_widget
34 explicit Verbatim(Color bg);
37 * Append verbatim text line
39 void append_textline(const char *str, Style *style)
41 append(new Token(style, str, strlen(str)));
47 void draw(Canvas *c, Point const &p);
49 void append(Widget *e);
50 void remove(Widget *e);
52 Orientations expanding() const { return Mag_gfx::Horizontal; }
54 void set_geometry(Rect const &r)
59 child_layout()->set_geometry(Rect(_size));
63 { return Area(Area::Max_w, child_layout()->max_size().h()); }