curvedraw

view src/widgets.h @ 11:099fd7adb900

curve parser works
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 19 Dec 2015 22:39:18 +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_