ALBA
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
albaInteractorCompositorMouse Class Reference

#include <albaInteractorCompositorMouse.h>

Inheritance diagram for albaInteractorCompositorMouse:
Inheritance graph
[legend]
Collaboration diagram for albaInteractorCompositorMouse:
Collaboration graph
[legend]

Public Member Functions

 albaTypeMacro (albaInteractorCompositorMouse, albaInteractor)
 
virtual int StartInteraction (albaDeviceButtonsPadMouse *mouse)
 
virtual void OnEvent (albaEventBase *event)
 
virtual albaInteractorGenericMouseCreateBehavior (MMI_ACTIVATOR activator)
 
albaInteractorGenericMouseGetBehavior (MMI_ACTIVATOR activator)
 
- Public Member Functions inherited from albaInteractor
 albaInteractor ()
 
virtual ~albaInteractor ()
 
 ALBA_ID_DEC (INTERACTION_STARTED)
 
 ALBA_ID_DEC (INTERACTION_STOPPED)
 
 ALBA_ID_DEC (BUTTON_DOWN)
 
 ALBA_ID_DEC (BUTTON_UP)
 
 albaAbstractTypeMacro (albaInteractor, albaAgent)
 
virtual void SetRendererAndView (vtkRenderer *ren, albaView *view)
 
vtkRenderer * GetRenderer ()
 
albaViewGetView ()
 
albaDeviceGetDevice ()
 
virtual void SetDevice (albaDevice *)
 
virtual void SetVME (albaVME *vme)
 
void SetProp (vtkProp3D *prop)
 
void SetIgnoreTriggerEvents (bool flag)
 
int GetIgnoreTriggerEvents (bool flag)
 
void IgnoreTriggerEventsOn ()
 
void IgnoreTriggerEventsOff ()
 
void SetStartInteractionEvent (albaID event)
 
albaID GetStartInteractionEvent ()
 
void SetStopInteractionEvent (albaID event)
 
albaID GetStopInteractionEvent ()
 
void SetStartButton (int btn)
 
int GetStartButton ()
 
void SetModifiers (int mod)
 
int GetModifiers ()
 
int GetCurrentButton ()
 
unsigned long GetCurrentModifier ()
 
virtual int StartInteraction (albaDevice *device)
 
virtual int StopInteraction (albaDevice *device)
 
virtual bool IsInteracting ()
 
virtual bool IsInteracting (albaDevice *device)
 
void SetButtonMode (int mode)
 
int GetButtonMode ()
 
void SetButtonModeToSingleButton ()
 
void SetButtonModeToMultiButton ()
 
virtual void OnEvent (albaEventBase *event)
 
void TestModeOn ()
 
void TestModeOff ()
 
bool GetTestMode ()
 
- Public Member Functions inherited from albaAgent
 albaAbstractTypeMacro (albaAgent, albaReferenceCounted)
 
 ALBA_ID_DEC (AGENT_INITIALIZE)
 
void AddObserver (albaObserver *listener, albaID channel=MCH_UP)
 
void RemoveObserver (albaObserver *listener)
 
void RemoveAllObservers ()
 
virtual void OnEvent (albaEventBase *event)
 
bool HasObservers (albaID channel)
 
void GetObservers (albaID channel, std::vector< albaObserver * > &olist)
 
int Initialize ()
 
void Shutdown ()
 
int IsInitialized ()
 
virtual void SetName (const char *name)
 
const char * GetName ()
 
- Public Member Functions inherited from albaReferenceCounted
 albaReferenceCounted ()
 
virtual ~albaReferenceCounted ()
 
 albaAbstractTypeMacro (albaReferenceCounted, albaObject)
 
virtual void Delete ()
 
void Register (void *obj)
 
virtual void UnRegister (void *obj)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
- Public Member Functions inherited from albaObject
 albaObject ()
 
virtual ~albaObject ()
 
virtual void Delete ()
 
virtual const char * GetTypeName () const
 
virtual bool IsA (const char *type_name) const
 
virtual bool IsA (const albaTypeID &type_id) const
 
virtual albaObjectNewObjectInstance () const =0
 
virtual const albaTypeIDGetTypeId () const
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObject (const albaObject &c)
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 
- Public Member Functions inherited from albaEventBroadcaster
 albaEventBroadcaster (void *owner=NULL)
 
virtual ~albaEventBroadcaster ()
 
 albaEventBroadcaster (const albaEventBroadcaster &c)
 
void AddObserver (albaObserver *obj)
 
void AddObserver (albaObserver &obj)
 
albaObserverCallbackAddObserverCallback (void(*f)(void *sender, albaID eid, void *clientdata, void *calldata))
 
bool RemoveObserver (albaObserver *obj)
 
void RemoveAllObservers ()
 
bool IsObserver (albaObserver *obj)
 
bool HasObservers ()
 
void GetObservers (std::vector< albaObserver * > &olist)
 
void InvokeEvent (albaEventBase &e)
 
void InvokeEvent (albaEventBase *e)
 
void InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL)
 
void SetChannel (albaID ch)
 
albaID GetChannel ()
 
virtual void SetListener (albaObserver *o)
 
- Public Member Functions inherited from albaEventSender
 albaEventSender ()
 
virtual void SetListener (albaObserver *o)
 
virtual albaObserverGetListener ()
 
virtual bool HasListener ()
 
virtual void InvokeEvent (albaEventBase &e)
 
virtual void InvokeEvent (albaEventBase *e)
 
virtual void InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL)
 

Protected Types

typedef std::map< int, albaAutoPointer< albaInteractorGenericMouse > > mmuActivatorMap
 
- Protected Types inherited from albaEventBroadcaster
typedef std::list< albaObserver * > albaObserversList
 

Protected Member Functions

 albaInteractorCompositorMouse ()
 
 ~albaInteractorCompositorMouse ()
 
virtual void OnButtonDown (albaEventInteraction *e)
 
virtual void OnButtonUp (albaEventInteraction *e)
 
void OnLeftButtonDown (albaEventInteraction *e)
 
void OnLeftButtonUp (albaEventInteraction *e)
 
void OnMiddleButtonDown (albaEventInteraction *e)
 
void OnMiddleButtonUp (albaEventInteraction *e)
 
void OnMouseMove ()
 
void OnRightButtonDown (albaEventInteraction *e)
 
void OnRightButtonUp (albaEventInteraction *e)
 
void InitInteraction (int buttonPressed, albaEventInteraction *e)
 
int MouseToActivator (int mouseButton, int shift, int ctrl)
 
- Protected Member Functions inherited from albaInteractor
virtual int OnStartInteraction (albaEventInteraction *e)
 
virtual int OnStopInteraction (albaEventInteraction *e)
 
virtual void OnButtonDown (albaEventInteraction *e)
 
virtual void OnButtonUp (albaEventInteraction *e)
 
void ComputeDisplayToWorld (double x, double y, double z, double worldPt[4])
 
void ComputeWorldToDisplay (double x, double y, double z, double displayPt[3])
 
- Protected Member Functions inherited from albaAgent
 albaAgent ()
 
virtual ~albaAgent ()
 
virtual int InternalInitialize ()
 
virtual void InternalShutdown ()
 
void InvokeEvent (albaEventBase &event, albaID channel=-1)
 
void InvokeEvent (albaEventBase *event, albaID channel=-1)
 
void InvokeEvent (void *sender, int id, albaID channel=MCH_UP, void *data=NULL)
 

Protected Attributes

mmuActivatorMap m_ActivatorMap
 
albaInteractorGenericMousem_ActiveMMIGeneric
 
- Protected Attributes inherited from albaInteractor
albaDevicem_Device
 
bool m_DeviceIsSet
 
albaID m_StartInteractionEvent
 
albaID m_StopInteractionEvent
 
int m_IgnoreTriggerEvents
 
int m_InteractionFlag
 
int m_StartButton
 
unsigned long m_Modifiers
 
int m_CurrentButton
 
unsigned long m_CurrentModifier
 
int m_ButtonMode
 
int m_ButtonsCounter
 
albaVMEm_VME
 
albaViewm_View
 
vtkALBASmartPointer< vtkRenderer > m_Renderer
 
vtkALBASmartPointer< vtkProp3D > m_Prop
 
bool m_TestMode
 
- Protected Attributes inherited from albaAgent
albaString m_Name
 
bool m_Initialized
 
std::vector< albaEventBroadcaster * > m_Channels
 
- Protected Attributes inherited from albaReferenceCounted
int m_ReferenceCount
 
- Protected Attributes inherited from albaObject
bool m_HeapFlag
 
- Protected Attributes inherited from albaEventBroadcaster
albaObserversList m_Observers
 
albaID m_Channel
 
- Protected Attributes inherited from albaEventSender
albaObserverm_Listener
 

Friends

class albaInteractorCompositorMouseTest
 

Additional Inherited Members

- Public Types inherited from albaInteractor
enum  modalities { SINGLE_BUTTON_MODE =0 , MULTI_BUTTON_MODE }
 
- Static Public Member Functions inherited from albaObject
static const char * GetStaticTypeName ()
 
static bool IsStaticType (const char *type_name)
 
static bool IsStaticType (const albaTypeID &type_id)
 
static const albaTypeIDGetStaticTypeId ()
 
static albaObjectSafeDownCast (albaObject *o)
 

Detailed Description

Associates instances of albaInteractorGenericMouse to mouse buttons and ctrl/shift keys combinations.

Associates instances of albaInteractorGenericMouse to mouse buttons and ctrl/shift keys combinations. For example:

Create the compositor: behaviorCompositor = albaInteractorCompositorMouse::New();

mouseLeftBhavior = behaviorCompositor->CreateBehavior(MOUSE_LEFT); mouseMiddleShiftBehavior = behaviorCompositor->CreateBehavior(MOUSE_MIDDLE_SHIFT); ...

See also

Definition at line 82 of file albaInteractorCompositorMouse.h.

Member Typedef Documentation

◆ mmuActivatorMap

Definition at line 119 of file albaInteractorCompositorMouse.h.

Constructor & Destructor Documentation

◆ albaInteractorCompositorMouse()

albaInteractorCompositorMouse::albaInteractorCompositorMouse ( )
protected

◆ ~albaInteractorCompositorMouse()

albaInteractorCompositorMouse::~albaInteractorCompositorMouse ( )
protected

Member Function Documentation

◆ albaTypeMacro()

albaInteractorCompositorMouse::albaTypeMacro ( albaInteractorCompositorMouse  ,
albaInteractor   
)

◆ StartInteraction()

virtual int albaInteractorCompositorMouse::StartInteraction ( albaDeviceButtonsPadMouse mouse)
virtual

Start the interaction with the selected object; set m_CurrentCamera and Renderer ivar.

◆ OnEvent()

virtual void albaInteractorCompositorMouse::OnEvent ( albaEventBase event)
virtual

Process events coming from the mouse.

Reimplemented from albaInteractor.

Reimplemented in albaInteractorCompositorMouseFloatVME.

◆ CreateBehavior()

virtual albaInteractorGenericMouse * albaInteractorCompositorMouse::CreateBehavior ( MMI_ACTIVATOR  activator)
virtual

Create a behavior given the activator.

Reimplemented in albaInteractorCompositorMouseFloatVME.

◆ GetBehavior()

albaInteractorGenericMouse * albaInteractorCompositorMouse::GetBehavior ( MMI_ACTIVATOR  activator)

Get a behavior given the activator.

◆ OnButtonDown()

virtual void albaInteractorCompositorMouse::OnButtonDown ( albaEventInteraction e)
protectedvirtual

Reimplemented from albaInteractor.

Reimplemented in albaInteractorCompositorMouseFloatVME.

◆ OnButtonUp()

virtual void albaInteractorCompositorMouse::OnButtonUp ( albaEventInteraction e)
protectedvirtual

Reimplemented from albaInteractor.

Reimplemented in albaInteractorCompositorMouseFloatVME.

◆ OnLeftButtonDown()

void albaInteractorCompositorMouse::OnLeftButtonDown ( albaEventInteraction e)
protected

mouse driven events

◆ OnLeftButtonUp()

void albaInteractorCompositorMouse::OnLeftButtonUp ( albaEventInteraction e)
protected

◆ OnMiddleButtonDown()

void albaInteractorCompositorMouse::OnMiddleButtonDown ( albaEventInteraction e)
protected

◆ OnMiddleButtonUp()

void albaInteractorCompositorMouse::OnMiddleButtonUp ( albaEventInteraction e)
protected

◆ OnMouseMove()

void albaInteractorCompositorMouse::OnMouseMove ( )
protected

◆ OnRightButtonDown()

void albaInteractorCompositorMouse::OnRightButtonDown ( albaEventInteraction e)
protected

◆ OnRightButtonUp()

void albaInteractorCompositorMouse::OnRightButtonUp ( albaEventInteraction e)
protected

◆ InitInteraction()

void albaInteractorCompositorMouse::InitInteraction ( int  buttonPressed,
albaEventInteraction e 
)
protected

init the interactor for the corresponding pressed button.

◆ MouseToActivator()

int albaInteractorCompositorMouse::MouseToActivator ( int  mouseButton,
int  shift,
int  ctrl 
)
protected

conversion from mouse-keyboard combo to the corresponding activator value ie the value in the MMI_ACTIVATOR enum, if no activator is found -1 is returned

Friends And Related Function Documentation

◆ albaInteractorCompositorMouseTest

friend class albaInteractorCompositorMouseTest
friend

friend test class

Definition at line 159 of file albaInteractorCompositorMouse.h.

Member Data Documentation

◆ m_ActivatorMap

mmuActivatorMap albaInteractorCompositorMouse::m_ActivatorMap
protected
              ActivatorMap

|----------------------------------— | key activator | behavior |----------------------------------— | MOUSE_LEFT | pMMI_1 | MOUSE_LEFT_SHIFT | pMMI_2 | MOUSE_LEFT_CTRL | pMMI_3 | ........... | .......

map holding activator<->behavior association

Definition at line 132 of file albaInteractorCompositorMouse.h.

◆ m_ActiveMMIGeneric

albaInteractorGenericMouse* albaInteractorCompositorMouse::m_ActiveMMIGeneric
protected

Definition at line 145 of file albaInteractorCompositorMouse.h.


The documentation for this class was generated from the following file: