1 #ifndef TERMOX_WIDGET_WIDGET_SLOTS_HPP
2 #define TERMOX_WIDGET_WIDGET_SLOTS_HPP
3 #include <signals_light/signal.hpp>
5 #include <termox/painter/color.hpp>
6 #include <termox/system/key.hpp>
7 #include <termox/system/mouse.hpp>
8 #include <termox/widget/point.hpp>
16 [[nodiscard]]
auto enable(Widget& w) -> sl::Slot<void()>;
18 [[nodiscard]]
auto disable(Widget& w) -> sl::Slot<void()>;
20 [[nodiscard]]
auto update(Widget& w) -> sl::Slot<void()>;
22 [[nodiscard]]
auto click(Widget& w) -> sl::Slot<void(Point, Mouse::Button)>;
24 [[nodiscard]]
auto click(Widget& w, Point p) -> sl::Slot<void(Mouse::Button)>;
26 [[nodiscard]]
auto click(Widget& w, Mouse::Button b) -> sl::Slot<void(Point)>;
28 [[nodiscard]]
auto click(Widget& w, Point p, Mouse::Button b)
31 [[nodiscard]]
auto keypress(Widget& w) -> sl::Slot<void(Key)>;
33 [[nodiscard]]
auto keypress(Widget& w, Key k) -> sl::Slot<void()>;
35 [[nodiscard]]
auto set_background(Widget& w) -> sl::Slot<void(Color)>;
37 [[nodiscard]]
auto set_background(Widget& w, Color c) -> sl::Slot<void()>;
39 [[nodiscard]]
auto set_foreground(Widget& w) -> sl::Slot<void(Color)>;
41 [[nodiscard]]
auto set_foreground(Widget& w, Color c) -> sl::Slot<void()>;
43 [[nodiscard]]
auto toggle_cursor(Widget& w) -> sl::Slot<void()>;