1 #ifndef MSP_GLTK_WIDGET_H_
2 #define MSP_GLTK_WIDGET_H_
19 void set_position(int, int);
20 void set_size(unsigned, unsigned);
21 void set_geometry(const Geometry &);
22 void set_style(const std::string &);
23 const Geometry &get_geometry() const { return geom; }
25 bool button_press(int, int, unsigned);
26 bool button_release(int, int, unsigned);
27 bool pointer_motion(int, int);
31 std::string style_name;
35 Widget(const Resources &);
36 virtual const char *get_class() const { return "widget"; }
38 virtual void render_part(const Part &) const;
39 void render_graphic(const Part &) const;
40 void render_text(const Part &, const std::string &) const;
41 virtual void on_button_press(int, int, unsigned) { }
42 virtual void on_button_release(int, int, unsigned) { }
43 virtual void on_pointer_motion(int, int, unsigned) { }
44 virtual void on_pointer_enter() { }
45 virtual void on_pointer_leave() { }