Interface for objects that can grab hands and fingers. More...
#include <MultiWidgets/InputGrabber.hpp>
Valuable Attributes | |
|
Radiant::FlagsT < MultiTouch::TrackedObjectType > | grab-flags = MultiTouch::TYPE_ALL |
| Returns which object types are grabbed. More... | |
Public Member Functions | |
| bool | checkGrabFlags (Radiant::FlagsT< MultiTouch::TrackedObjectType > flags) const |
| Check the state of the given grab flags. More... | |
| void | clearGrabFlags (Radiant::FlagsT< MultiTouch::TrackedObjectType > flags) |
| Disable grabbing for the selected object types. More... | |
| bool | grab (GrabManager &gm, MultiTouch::TrackedObject::Id id) |
| Grabs the object with the given id. More... | |
| unsigned | grabbedCount () const |
| unsigned | grabbedCount (MultiTouch::TrackedObjectType type) const |
| TrackedObjectIds | grabbedObjects (MultiTouch::TrackedObjectType type) const |
| TrackedObjectIds | grabbedObjects () const |
| Radiant::FlagsT < MultiTouch::TrackedObjectType > | grabFlags () const |
| Returns which object types are grabbed. More... | |
| bool | grabsFingers () const |
| Return true if the object grabs fingers. | |
| bool | grabsHands () const |
| Return true if the object grabs hands. | |
| bool | grabsMarkers () const |
| Return true if the object grabs markers. | |
| bool | grabsObjectType (MultiTouch::TrackedObjectType type) const |
| Return true if the object grabs. | |
| bool | grabsPens () const |
| Return true if the object grabs pens. | |
| bool | hasGrabbedObjects (Radiant::FlagsT< MultiTouch::TrackedObjectType > types) const |
| Checks if any objects of the given type are grabbed. More... | |
| Valuable::Node & | host () |
| Return a reference to the host object The host object owns this InputGrabber and is responsible for creating and deleting it. More... | |
| InputGrabber (Valuable::Node &host, InputGrabListener &listener) | |
| Constructs a new input grabber. More... | |
| bool | isGrabbed (MultiTouch::TrackedObject::Id id) const |
| Return true if the given object id is grabbed. | |
| void | raiseGrabFlags (Radiant::FlagsT< MultiTouch::TrackedObjectType > flags) |
| Enable grabbing for the selected object types. More... | |
| void | setGrabFlags (Radiant::FlagsT< MultiTouch::TrackedObjectType > flags) |
| Sets which object types are grabbed. More... | |
| void | setGrabsFingers (bool v) |
| Sets whether the grabber grabs fingers. | |
| void | setGrabsHands (bool v) |
| Sets whether the grabber grabs hands. | |
| void | setGrabsMarkers (bool v) |
| Sets whether the grabber grabs markers. | |
| void | setGrabsPens (bool v) |
| Sets whether the grabber grabs hands. | |
| bool | transferGrab (GrabManager &gm, InputGrabber &to, MultiTouch::TrackedObject::Id id) |
| Transfers a grabbed object from this grabber to another. More... | |
| size_t | transferGrabs (GrabManager &gm, InputGrabber &to, Radiant::FlagsT< MultiTouch::TrackedObjectType > types) |
| Transfers all grabbed objects of a specific type from this grabber to another. More... | |
| bool | ungrab (GrabManager &gm, MultiTouch::TrackedObject::Id id) |
| Releases the grab on the object by given id. More... | |
| void | ungrabAll (GrabManager &gm) |
| Ungrabs all currently grabbed objects. | |
| void | update (GrabManager &gm, TrackedObjects &objs, bool includeGrabbed=false) |
| Updates the list of grabbed objects. More... | |
Interface for objects that can grab hands and fingers.
| MultiWidgets::InputGrabber::InputGrabber | ( | Valuable::Node & | host, |
| InputGrabListener & | listener | ||
| ) |
Constructs a new input grabber.
| host | Host that owns the grabber |
| listener | Listener object that listens for grabs |
| bool MultiWidgets::InputGrabber::checkGrabFlags | ( | Radiant::FlagsT< MultiTouch::TrackedObjectType > | flags | ) | const |
Check the state of the given grab flags.
| flags | flags to check |
| void MultiWidgets::InputGrabber::clearGrabFlags | ( | Radiant::FlagsT< MultiTouch::TrackedObjectType > | flags | ) |
Disable grabbing for the selected object types.
| flags | flags to clear |
| bool MultiWidgets::InputGrabber::grab | ( | GrabManager & | gm, |
| MultiTouch::TrackedObject::Id | id | ||
| ) |
Grabs the object with the given id.
| unsigned MultiWidgets::InputGrabber::grabbedCount | ( | ) | const |
| unsigned MultiWidgets::InputGrabber::grabbedCount | ( | MultiTouch::TrackedObjectType | type | ) | const |
| TrackedObjectIds MultiWidgets::InputGrabber::grabbedObjects | ( | MultiTouch::TrackedObjectType | type | ) | const |
| TrackedObjectIds MultiWidgets::InputGrabber::grabbedObjects | ( | ) | const |
| Radiant::FlagsT< MultiTouch::TrackedObjectType > MultiWidgets::InputGrabber::grabFlags | ( | ) | const |
Returns which object types are grabbed.
| bool MultiWidgets::InputGrabber::hasGrabbedObjects | ( | Radiant::FlagsT< MultiTouch::TrackedObjectType > | types | ) | const |
Checks if any objects of the given type are grabbed.
| types | Bitmask of types to check |
| Valuable::Node& MultiWidgets::InputGrabber::host | ( | ) |
Return a reference to the host object The host object owns this InputGrabber and is responsible for creating and deleting it.
| void MultiWidgets::InputGrabber::raiseGrabFlags | ( | Radiant::FlagsT< MultiTouch::TrackedObjectType > | flags | ) |
Enable grabbing for the selected object types.
| flags | flags to set |
| void MultiWidgets::InputGrabber::setGrabFlags | ( | Radiant::FlagsT< MultiTouch::TrackedObjectType > | flags | ) |
Sets which object types are grabbed.
Setter for attribute grab-flags.
| flags | bitmask that is usually created by bitwise OR of MultiTouch::TrackedObjectType flags. |
| flags | new attribute value |
| bool MultiWidgets::InputGrabber::transferGrab | ( | GrabManager & | gm, |
| InputGrabber & | to, | ||
| MultiTouch::TrackedObject::Id | id | ||
| ) |
Transfers a grabbed object from this grabber to another.
| gm | GrabManager instance |
| to | Grabber to transfer grab to |
| id | Id of the grabbed object to transfer |
| size_t MultiWidgets::InputGrabber::transferGrabs | ( | GrabManager & | gm, |
| InputGrabber & | to, | ||
| Radiant::FlagsT< MultiTouch::TrackedObjectType > | types | ||
| ) |
Transfers all grabbed objects of a specific type from this grabber to another.
| gm | GrabManager instance |
| to | Grabber to transfer grabs to |
| types | Bitmask of types that specifies which object types to transfer |
| bool MultiWidgets::InputGrabber::ungrab | ( | GrabManager & | gm, |
| MultiTouch::TrackedObject::Id | id | ||
| ) |
Releases the grab on the object by given id.
| void MultiWidgets::InputGrabber::update | ( | GrabManager & | gm, |
| TrackedObjects & | objs, | ||
| bool | includeGrabbed = false |
||
| ) |
Updates the list of grabbed objects.
This function should not be called without proper reason.
| gm | Grabmanager instance |
| objs | output variable that contains the objects that are currently tracked by this grabber |
| includeGrabbed | specifies if already grabbed objects should be included in the list of tracked objects |