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/vbox.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/user/raleigh/w/vbox.cpp') diff --git a/src/user/raleigh/w/vbox.cpp b/src/user/raleigh/w/vbox.cpp index 51b87ed..08c2539 100644 --- a/src/user/raleigh/w/vbox.cpp +++ b/src/user/raleigh/w/vbox.cpp @@ -27,16 +27,16 @@ namespace raleigh { n->d.paint(pixbuf, pitch); } - bool vbox::try_handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) { + void vbox::handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) { uint32_t h = window_offset.y; dllist::node *n = widgets.first; while (h + n->d.size.y <= window_coords.y) { h += n->d.size.y; n = n->next; } - return (window_coords.x >= n->d.window_offset.x) && - (window_coords.x < n->d.window_offset.x + n->d.size.x) && - n->d.try_handle_click(window_coords, click_type, up); + if ((window_coords.x >= n->d.window_offset.x) && + (window_coords.x < n->d.window_offset.x + n->d.size.x)) + n->d.handle_click(window_coords, click_type, up); } void vbox::notify_has_opaque_parent(widget *parent) { @@ -44,4 +44,8 @@ namespace raleigh { for (dllist::node *n = widgets.first; n; n = n->next) n->d.notify_has_opaque_parent(parent); } + + void vbox::handle_key(struct key_packet kp) {}; + void vbox::on_focus() {}; + void vbox::on_unfocus() {}; } \ No newline at end of file -- cgit v1.2.3