1 #ifndef MSP_GLTK_WIDGET_H_
2 #define MSP_GLTK_WIDGET_H_
18 class Loader: public Msp::DataFile::Loader
26 void position(int, int);
27 void size(unsigned, unsigned);
28 void style(const std::string &);
32 void set_position(int, int);
33 void set_size(unsigned, unsigned);
34 void set_geometry(const Geometry &);
35 void set_style(const std::string &);
36 const Geometry &get_geometry() const { return geom; }
38 virtual void button_press(int, int, unsigned) { }
39 virtual void button_release(int, int, unsigned) { }
40 virtual void pointer_motion(int, int) { }
41 virtual void pointer_enter() { }
42 virtual void pointer_leave() { }
43 virtual void key_press(unsigned, unsigned, wchar_t) { }
44 virtual void key_release(unsigned, unsigned) { }
45 virtual void focus_in() { }
46 virtual void focus_out() { }
50 std::string style_name;
54 Widget(const Resources &);
55 virtual const char *get_class() const { return "widget"; }
57 virtual void render_part(const Part &) const;
58 void render_graphic(const Part &) const;
59 void render_text(const Part &, const std::string &) const;