Improve the debug output for button events.

This commit is contained in:
Mark de Wever 2009-09-27 17:33:57 +00:00
parent 57140fb22b
commit cf98d3bbf7
2 changed files with 10 additions and 8 deletions

View File

@ -31,9 +31,9 @@ tbutton::tbutton()
, callback_mouse_left_click_(0)
{
connect_signal<event::MOUSE_ENTER>(boost::bind(
&tbutton::signal_handler_mouse_enter, this, _2));
&tbutton::signal_handler_mouse_enter, this, _1, _2));
connect_signal<event::MOUSE_LEAVE>(boost::bind(
&tbutton::signal_handler_mouse_leave, this, _2));
&tbutton::signal_handler_mouse_leave, this, _1, _2));
}
void tbutton::mouse_enter(tevent_handler&)
@ -100,17 +100,19 @@ const std::string& tbutton::get_control_type() const
return type;
}
void tbutton::signal_handler_mouse_enter(bool& handled)
void tbutton::signal_handler_mouse_enter(
const event::tevent event, bool& handled)
{
DBG_GUI_E << "Button: mouse enter.\n";
DBG_GUI_E << get_control_type() << "[" << id() << "]: " << event << ".\n";
set_state(FOCUSSED);
handled = true;
}
void tbutton::signal_handler_mouse_leave(bool& handled)
void tbutton::signal_handler_mouse_leave(
const event::tevent event, bool& handled)
{
DBG_GUI_E << "Button: mouse leave.\n";
DBG_GUI_E << get_control_type() << "[" << id() << "]: " << event << ".\n";
set_state(ENABLED);
handled = true;

View File

@ -98,9 +98,9 @@ private:
/***** ***** ***** signal handlers ***** ****** *****/
void signal_handler_mouse_enter(bool& handled);
void signal_handler_mouse_enter(const event::tevent event, bool& handled);
void signal_handler_mouse_leave(bool& handled);
void signal_handler_mouse_leave(const event::tevent event, bool& handled);
};