Move widget tree painting to ui::Painter.

Still doesn't seem like the right place, but better than the event dispatcher!
This commit is contained in:
Jared Boone 2015-08-14 21:27:46 -07:00
parent a9bb7c96e5
commit 872c998ff1
3 changed files with 32 additions and 25 deletions

View file

@ -37,6 +37,8 @@ struct Style {
Style invert() const;
};
class Widget;
class Painter {
public:
Painter() { };
@ -51,6 +53,8 @@ public:
void draw_rectangle(const Rect r, const Color c);
void fill_rectangle(const Rect r, const Color c);
void paint_widget(Widget* const w);
private:
void draw_hline(Point p, size_t width, const Color c);
void draw_vline(Point p, size_t height, const Color c);