14#include <AUI/Platform/AWindow.h>
17template<AInput::Key Button = AInput::LBUTTON>
24 void operator()(
const _<AView>& view) {
25 auto coords = view->getPositionInWindow() + (position ? *position : (view->getSize() / 2));
26 auto window = view->getWindow();
27 AInput::overrideStateForTesting(Button,
true);
33template<AInput::Key Button = AInput::LBUTTON>
40 void operator()(
const _<AView>& view) {
41 auto coords = view->getPositionInWindow() + (position ? *position : (view->getSize() / 2));
42 auto window = view->getWindow();
43 AInput::overrideStateForTesting(Button,
false);
50template<AInput::Key Button = AInput::LBUTTON>
57 void operator()(
const _<AView>& view) {
58 auto coords = view->getPositionInWindow() + (position ? *position : (view->getSize() / 2));
59 auto window = view->getWindow();
60 AInput::overrideStateForTesting(Button,
true);
63 AInput::overrideStateForTesting(Button,
false);
82 void operator()(
const _<AView>& view) {
83 auto coords = view->getPositionInWindow() + (position ? *position : (view->getSize() / 2));
84 auto window = view->getWindow();
85 window->onPointerPressed({coords, pointerIndex});
94 void operator()(
const _<AView>& view) {
95 auto coords = view->getPositionInWindow() + (position ? *position : (view->getSize() / 2));
96 auto window = view->getWindow();
97 window->onPointerReleased({coords, pointerIndex});
106 void operator()(
const _<AView>& view) {
107 auto coords = view->getPositionInWindow() + (position ? *position : (view->getSize() / 2));
108 auto window = view->getWindow();
109 window->onPointerMove(coords, {pointerIndex});
Utility wrapper implementing the stack-allocated (fast) optional idiom.
Definition: AOptional.h:32
Wrapper class that stores either mouse button index or finger index.
Definition: APointerIndex.h:21
AOptional< AInput::Key > button() const noexcept
Definition: APointerIndex.h:56
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177