]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/scout-gfx/lib/doc/item.cc
Inital import
[l4.git] / l4 / pkg / scout-gfx / lib / doc / item.cc
1
2 #include <l4/scout-gfx/box_layout>
3 #include <l4/scout-gfx/doc/item>
4 #include <l4/scout-gfx/style>
5
6 #include <l4/mag-gfx/canvas>
7
8
9 Scout_gfx::Item::Item(Style *style, const char *str, int indent)
10 : _indent(indent), _tag(str), _style(style)
11 {
12   set_child_layout(Box_layout::create_vert());
13 }
14
15
16 void
17 Scout_gfx::Item::draw(Canvas *c, Point const &p)
18 {
19   c->draw_string(p, _style->font, _style->color, _tag);
20   Parent_widget::draw(c, p);
21 }