summaryrefslogtreecommitdiff
path: root/src/user/include/cxx/raleigh/widget.h
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-05 18:07:48 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-05 18:07:48 -0500
commit76e39eac8cee2175ec62a191f7c91ca53857e80c (patch)
tree156946f6e8f491235453aa3cbecfda43d6baa2a7 /src/user/include/cxx/raleigh/widget.h
parent5e5e524f08ad653a7bf5d6e97f3a49f6c27d08fa (diff)
downloadportland-os-76e39eac8cee2175ec62a191f7c91ca53857e80c.tar.gz
more raleigh, including button and vbox widgets
Diffstat (limited to 'src/user/include/cxx/raleigh/widget.h')
-rw-r--r--src/user/include/cxx/raleigh/widget.h9
1 files changed, 9 insertions, 0 deletions
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;
};
}