curvedraw
view src/widgets.h @ 2:ce7aa9a0594c
improved curve editing
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 17 Dec 2015 05:13:25 +0200 |
parents | |
children | 7f795f7fecd6 |
line source
1 #ifndef WIDGETS_H_
2 #define WIDGETS_H_
4 #include <vmath/vmath.h>
6 class Widget {
7 protected:
8 Vector2 pos;
9 char *text;
11 public:
12 Widget();
13 virtual ~Widget();
15 virtual void set_position(const Vector2 &p);
16 virtual const Vector2 &get_position() const;
18 virtual void set_text(const char *str);
19 virtual void set_textf(const char *str, ...);
20 virtual const char *get_text() const;
22 virtual void draw() const = 0;
23 };
25 class Label : public Widget {
26 public:
27 virtual void draw() const;
28 };
30 #endif // WIDGETS_H_