29 virtual int getX()
const = 0;
30 virtual int getY()
const = 0;
35 return touchEvCallback;
59 touchEnabled = enabled;
67 return propagateInteraction;
75 propagateInteraction = propagate;
80 bool touchEnabled =
true, propagateInteraction =
false;
void setPropagateInteraction(bool propagate)
Set wheter the object has to call the handlers of objects placed below, when touched.
Definition: TouchEnabledObject.h:73
std::function< void(void)> TouchCallback
The callback that will be called when the touch interaction happens.
Definition: TouchEnabledObject.h:20
virtual int getX() const =0
TouchCallback getTouchCallback() const
Definition: TouchEnabledObject.h:33
bool isPropagateInteraction() const
True if the object will call the handlers of object placed below when touched.
Definition: TouchEnabledObject.h:65
A base class that provides the methods needed for the object to react to touch input.
Definition: TouchEnabledObject.h:26
The GraphicsObject base class.
virtual int getHeight() const =0
void setTouchCallback(TouchCallback cb)
Set the touch interaction callback.
Definition: TouchEnabledObject.h:41
virtual int getY() const =0
virtual int getWidth() const =0
void setTouchEnabled(bool enabled)
Set if the object has to react to touch events.
Definition: TouchEnabledObject.h:57
bool isTouchEnabled() const
True if the object reacts to touch events.
Definition: TouchEnabledObject.h:49