This was removed with event handling changes a while back, because other
changes needed to be made in libmspgui before reimplementation was
possible.
Widget::render(renderer);
}
Widget::render(renderer);
}
-void Root::button_press_event(unsigned btn)
+bool Root::button_press_event(unsigned btn)
+ Widget *old_focus = pointer_focus;
+
int x, y;
get_pointer(x, y);
button_press(x, y, btn);
int x, y;
get_pointer(x, y);
button_press(x, y, btn);
+
+ if(pointer_focus || old_focus)
+ return true;
-void Root::button_release_event(unsigned btn)
+bool Root::button_release_event(unsigned btn)
+ Widget *old_focus = pointer_focus;
+
int x, y;
get_pointer(x, y);
button_release(x, y, btn);
int x, y;
get_pointer(x, y);
button_release(x, y, btn);
+
+ if(pointer_focus || old_focus)
+ return true;
-void Root::axis_motion_event(unsigned, float, float)
+bool Root::axis_motion_event(unsigned, float, float)
lbl_tooltip->set_visible(false);
tooltip_target = 0;
}
lbl_tooltip->set_visible(false);
tooltip_target = 0;
}
+
+ if(pointer_focus)
+ return true;
-void Root::key_press_event(unsigned key)
+bool Root::key_press_event(unsigned key)
{
// XXX Modifiers
if(visible)
{
// XXX Modifiers
if(visible)
+ {
+ Widget *old_focus = input_focus;
+
+
+ if(input_focus || old_focus)
+ return true;
+ }
+
+ return false;
-void Root::key_release_event(unsigned key)
+bool Root::key_release_event(unsigned key)
+ {
+ Widget *old_focus = input_focus;
+
+
+ if(input_focus || old_focus)
+ return true;
+ }
+
+ return false;
-void Root::character_event(StringCodec::unichar ch)
+bool Root::character_event(StringCodec::unichar ch)
+ {
+ Widget *old_focus = input_focus;
+
+
+ if(input_focus || old_focus)
+ return true;
+ }
+
+ return false;
}
void Root::get_pointer(int &x, int &y)
}
void Root::get_pointer(int &x, int &y)
void render() const;
private:
void render() const;
private:
- void button_press_event(unsigned);
- void button_release_event(unsigned);
- void axis_motion_event(unsigned, float, float);
- void key_press_event(unsigned);
- void key_release_event(unsigned);
- void character_event(StringCodec::unichar);
+ bool button_press_event(unsigned);
+ bool button_release_event(unsigned);
+ bool axis_motion_event(unsigned, float, float);
+ bool key_press_event(unsigned);
+ bool key_release_event(unsigned);
+ bool character_event(StringCodec::unichar);
void get_pointer(int &, int &);
};
void get_pointer(int &, int &);
};