summaryrefslogtreecommitdiff
path: root/src/user/include/cxx/raleigh/w
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-08 16:46:22 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-08 16:46:22 -0500
commit920f1f010284d59bad86f78355ed90ac2f3e1d2c (patch)
tree19e2abcf6f546e251151582c700cfce312224eb1 /src/user/include/cxx/raleigh/w
parentaf52ddac750311ace3bd997245771b26119e1659 (diff)
downloadportland-os-920f1f010284d59bad86f78355ed90ac2f3e1d2c.tar.gz
mouse movement in raleigh, with colorpicker dragging example
Diffstat (limited to 'src/user/include/cxx/raleigh/w')
-rw-r--r--src/user/include/cxx/raleigh/w/button.h1
-rw-r--r--src/user/include/cxx/raleigh/w/colorpicker.h3
-rw-r--r--src/user/include/cxx/raleigh/w/padding.h1
-rw-r--r--src/user/include/cxx/raleigh/w/vbox.h1
4 files changed, 6 insertions, 0 deletions
diff --git a/src/user/include/cxx/raleigh/w/button.h b/src/user/include/cxx/raleigh/w/button.h
index 71ccae2..0e40f81 100644
--- a/src/user/include/cxx/raleigh/w/button.h
+++ b/src/user/include/cxx/raleigh/w/button.h
@@ -14,6 +14,7 @@ namespace raleigh {
void handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) override;
void notify_child_size_change(widget &child, coord old_size) override;
void notify_has_opaque_parent(widget *parent) override;
+ void on_mouse_move(coord window_coords) override;
private:
widget &inner;
void (*on_click)(button &);
diff --git a/src/user/include/cxx/raleigh/w/colorpicker.h b/src/user/include/cxx/raleigh/w/colorpicker.h
index c33288e..a282c9e 100644
--- a/src/user/include/cxx/raleigh/w/colorpicker.h
+++ b/src/user/include/cxx/raleigh/w/colorpicker.h
@@ -12,11 +12,14 @@ namespace raleigh {
void paint(_pixel_t *pixbuf, uint32_t pitch) override;
void handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) override;
void notify_has_opaque_parent(widget *parent) override;
+ void on_mouse_move(coord window_coords) override;
private:
_pixel_t picked_color;
uint8_t resolution;
uint8_t inv_res;
+
+ enum {NO, R, G, B} selected;
};
}
diff --git a/src/user/include/cxx/raleigh/w/padding.h b/src/user/include/cxx/raleigh/w/padding.h
index 1bdb9ee..ab732f1 100644
--- a/src/user/include/cxx/raleigh/w/padding.h
+++ b/src/user/include/cxx/raleigh/w/padding.h
@@ -13,6 +13,7 @@ namespace raleigh {
void handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) override;
void notify_has_opaque_parent(widget *parent) override;
void notify_child_size_change(widget &child, coord old_size) override;
+ void on_mouse_move(coord window_coords) override;
private:
widget &inner;
uint32_t pad_by;
diff --git a/src/user/include/cxx/raleigh/w/vbox.h b/src/user/include/cxx/raleigh/w/vbox.h
index f715f95..39f89e9 100644
--- a/src/user/include/cxx/raleigh/w/vbox.h
+++ b/src/user/include/cxx/raleigh/w/vbox.h
@@ -15,6 +15,7 @@ namespace raleigh {
void handle_click(coord window_coords, enum mouse_packet::mouse_button click_type, bool up) override;
void notify_has_opaque_parent(widget *parent) override;
void notify_child_size_change(widget &from, coord old_size) override;
+ void on_mouse_move(coord window_coords) override;
private:
dllist<widget &> widgets;
};