nuclear@0: #ifndef WIDGETS_H_ nuclear@0: #define WIDGETS_H_ nuclear@0: nuclear@0: #include nuclear@0: nuclear@0: class Widget { nuclear@0: protected: nuclear@0: Vector2 pos; nuclear@0: char *text; nuclear@0: nuclear@0: public: nuclear@0: Widget(); nuclear@0: virtual ~Widget(); nuclear@0: nuclear@0: virtual void set_position(const Vector2 &p); nuclear@0: virtual const Vector2 &get_position() const; nuclear@0: nuclear@0: virtual void set_text(const char *str); nuclear@0: virtual void set_textf(const char *str, ...); nuclear@0: virtual const char *get_text() const; nuclear@0: nuclear@0: virtual void draw() const = 0; nuclear@0: }; nuclear@0: nuclear@0: class Label : public Widget { nuclear@0: public: nuclear@0: virtual void draw() const; nuclear@0: }; nuclear@0: nuclear@0: #endif // WIDGETS_H_