1 #ifndef MSP_GLTK_WIDGET_H_
2 #define MSP_GLTK_WIDGET_H_
18 class Loader: public Msp::DataFile::Loader
25 Widget &get_object() const { return wdg; }
27 void position(int, int);
28 void size(unsigned, unsigned);
29 void style(const std::string &);
33 void set_position(int, int);
34 void set_size(unsigned, unsigned);
35 void set_geometry(const Geometry &);
36 void set_style(const std::string &);
37 const Geometry &get_geometry() const { return geom; }
38 bool is_visible() const { return visible; }
40 virtual void button_press(int, int, unsigned) { }
41 virtual void button_release(int, int, unsigned) { }
42 virtual void pointer_motion(int, int) { }
43 virtual void pointer_enter() { }
44 virtual void pointer_leave() { }
45 virtual void key_press(unsigned, unsigned, wchar_t) { }
46 virtual void key_release(unsigned, unsigned) { }
47 virtual void focus_in() { }
48 virtual void focus_out() { }
52 std::string style_name;
57 Widget(const Resources &);
58 virtual const char *get_class() const { return "widget"; }
60 virtual void render_part(const Part &) const;
61 void render_graphic(const Part &) const;
62 void render_text(const Part &, const std::string &) const;