3 This file is part of libmspgltk
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
14 Button::Button(const Resources &r, const std::string &t):
22 void Button::set_text(const std::string &t)
27 void Button::button_press(int, int, unsigned btn)
36 void Button::button_release(int x, int y, unsigned btn)
40 if(geom.is_inside_relative(x, y))
41 signal_clicked.emit();
48 void Button::pointer_motion(int x, int y)
52 if(!geom.is_inside_relative(x, y))
59 void Button::render_special(const Part &part) const
61 if(part.get_name()=="text")
62 render_text(part, text);
66 Button::Loader::Loader(Button &btn):
69 add("text", &Button::text);
72 Button &Button::Loader::get_object() const
74 return static_cast<Button &>(wdg);