![]() |
Max OS 0.3
|
A template class that allows you to move and resize a widget. More...
#include <widget.h>
Public Member Functions | |
| WidgetMoverResizer (Widget *widget) | |
| void | on_mouse_move_event (int8_t x, int8_t y) override |
Public Member Functions inherited from MaxOS::drivers::peripherals::MouseEventHandler | |
| common::Event< MouseEvents > * | on_event (common::Event< MouseEvents > *) override |
| Handles the triggered event and calls the appropriate function. | |
| virtual void | on_mouse_down_event (uint8_t button) |
| Called when the mouse is pressed. | |
| virtual void | on_mouse_up_event (uint8_t button) |
| Called when the mouse is released. | |
Public Member Functions inherited from MaxOS::common::EventHandler< MouseEvents > | |
| virtual Event< MouseEvents > * | on_event (Event< MouseEvents > *event) |
| This function is called when an event is raised. | |
A template class that allows you to move and resize a widget.
| Left | Left |
| Top | Top |
| Width | Width |
| Height | Height |
| MaxOS::gui::WidgetMoverResizer< Left, Top, Width, Height >::WidgetMoverResizer | ( | Widget * | target | ) |
WidgetMoverResizer is a template class that allows you to move and resize a widget
| Left | The left edge of the widget |
| Top | The top edge of the widget |
| Width | The m_width of the widget |
| Height | The m_height of the widget |
| target | The widget to move and resize |
Definition at line 161 of file widget.h.
|
overridevirtual |
OnMouseMoved is called when the mouse is moved. Resizes and moves the widget when this happens.
| x | The x m_position of the mouse |
| y | The y m_position of the mouse |
Reimplemented from MaxOS::drivers::peripherals::MouseEventHandler.
Definition at line 174 of file widget.h.
References MaxOS::common::Rectangle< Type >::height, MaxOS::common::Rectangle< Type >::left, MaxOS::gui::Widget::m_position, MaxOS::gui::Widget::move(), MaxOS::gui::Widget::resize(), MaxOS::common::Rectangle< Type >::top, and MaxOS::common::Rectangle< Type >::width.