From 1a5ece4f52ef17c7c868e95eb26e98137d5cab6f Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 7 Mar 2021 23:19:48 -0500 Subject: keyboard support in raleigh, word wrap and more in entry widget --- src/user/raleigh/w/padding.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/user/raleigh/w/padding.cpp') diff --git a/src/user/raleigh/w/padding.cpp b/src/user/raleigh/w/padding.cpp index 0f93216..87167c3 100644 --- a/src/user/raleigh/w/padding.cpp +++ b/src/user/raleigh/w/padding.cpp @@ -17,16 +17,20 @@ namespace raleigh { inner.paint(pixbuf, pitch); } - bool padding::try_handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) { - return (window_coords.x >= inner.window_offset.x) && - (window_coords.y >= inner.window_offset.y) && - (window_coords.x < inner.window_offset.x + inner.size.x) && - (window_coords.y < inner.window_offset.y + inner.size.y) && - inner.try_handle_click(window_coords, click_type, up); + void padding::handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) { + if ((window_coords.x >= inner.window_offset.x) && + (window_coords.y >= inner.window_offset.y) && + (window_coords.x < inner.window_offset.x + inner.size.x) && + (window_coords.y < inner.window_offset.y + inner.size.y)) + inner.handle_click(window_coords, click_type, up); } void padding::notify_has_opaque_parent(widget *parent) { closest_opaque = parent; inner.notify_has_opaque_parent(parent); } + + void padding::handle_key(struct key_packet kp) {}; + void padding::on_focus() {}; + void padding::on_unfocus() {}; } \ No newline at end of file -- cgit v1.2.3