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):
21 void Button::set_text(const std::string &t)
26 void Button::button_press(int x, int y, unsigned btn)
28 if(geom.is_inside(x, y) && btn==1)
32 void Button::button_release(int x, int y, unsigned btn)
36 if(geom.is_inside(x, y))
38 signal_clicked.emit();
46 void Button::pointer_enter()
51 void Button::pointer_leave()
56 void Button::render_part(const Part &part) const
58 if(part.get_name()=="text")
59 render_text(part, text);
61 Widget::render_part(part);
65 Button::Loader::Loader(Button &btn):
68 add("text", &Button::text);
71 Button &Button::Loader::get_object() const
73 return static_cast<Button &>(wdg);