summaryrefslogtreecommitdiff
path: root/src/user/include/cxx/raleigh/widget.h
diff options
context:
space:
mode:
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;
};
}