From 76e39eac8cee2175ec62a191f7c91ca53857e80c Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Fri, 5 Mar 2021 18:07:48 -0500 Subject: more raleigh, including button and vbox widgets --- src/user/include/cxx/raleigh/widget.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/user/include/cxx/raleigh/widget.h') diff --git a/src/user/include/cxx/raleigh/widget.h b/src/user/include/cxx/raleigh/widget.h index 1839333..de6c5a4 100644 --- a/src/user/include/cxx/raleigh/widget.h +++ b/src/user/include/cxx/raleigh/widget.h @@ -18,9 +18,18 @@ namespace raleigh { window *w; coord window_offset; + //fewest steps up that a widget can be redrawn without needing its parents + //if a widget is opaque, it will set this to a pointer to itself, and then call + // notify_has_opaque_parent on any children, passing itself as an argument. + //in notify_has_opaque_parent's handler, it should set this if it isn't already set, + // and then call notify_has_opaque_parent on any children (with the opaque parent). + widget *closest_opaque; + //called by window class (or parent widget) virtual void notify_window_change() = 0; virtual void paint(_pixel_t *pixbuf, uint32_t pitch) = 0; + virtual bool try_handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) = 0; + virtual void notify_has_opaque_parent(widget *parent) = 0; }; } -- cgit v1.2.3