#include <component_dragger.hpp>
|
| std::function< void(Rect)> | on_drag |
| | Optional callbacks for tests / app glue.
|
| std::function< void()> | on_end |
◆ ComponentDragger()
| pulp::view::ComponentDragger::ComponentDragger |
( |
| ) |
|
|
default |
◆ bounds_start()
| Rect pulp::view::ComponentDragger::bounds_start |
( |
| ) |
const |
|
inline |
◆ constrain_to_parent()
| bool pulp::view::ComponentDragger::constrain_to_parent |
( |
| ) |
const |
|
inline |
◆ drag_view()
| void pulp::view::ComponentDragger::drag_view |
( |
View & | view, |
|
|
Point | mouse_local ) |
|
inline |
Continue a drag gesture.
Moves the view's bounds so the press position stays under the cursor. Honors constrain_to_parent(). No-op when not currently dragging.
◆ end_dragging()
| void pulp::view::ComponentDragger::end_dragging |
( |
| ) |
|
|
inline |
◆ is_dragging()
| bool pulp::view::ComponentDragger::is_dragging |
( |
| ) |
const |
|
inline |
◆ mouse_start()
| Point pulp::view::ComponentDragger::mouse_start |
( |
| ) |
const |
|
inline |
◆ set_constrain_to_parent()
| void pulp::view::ComponentDragger::set_constrain_to_parent |
( |
bool | yes | ) |
|
|
inline |
When true (the default), drag_view clamps the dragged view's origin so it stays fully inside the parent's local bounds.
◆ start_dragging()
| void pulp::view::ComponentDragger::start_dragging |
( |
View & | view, |
|
|
Point | mouse_local ) |
|
inline |
Begin a drag gesture.
mouse_local is the press position in the dragged view's LOCAL coordinate space (i.e. the same pos value you'd hand to View::on_mouse_down).
◆ on_drag
| std::function<void(Rect)> pulp::view::ComponentDragger::on_drag |
Optional callbacks for tests / app glue.
◆ on_end
| std::function<void()> pulp::view::ComponentDragger::on_end |
The documentation for this class was generated from the following file: