ALBA
|
#include <albaDeviceButtonsPadMouse.h>
Public Member Functions | |
albaTypeMacro (albaDeviceButtonsPadMouse, albaDeviceButtonsPad) | |
virtual void | OnEvent (albaEventBase *event) |
void | SetLastPosition (double x, double y, unsigned long modifiers=0) |
const double * | GetLastPosition () |
void | GetLastPosition (double pos[2]) |
vtkRenderer * | GetRenderer () |
albaView * | GetView () |
vtkRenderWindowInteractor * | GetInteractor () |
albaRWIBase * | GetRWI () |
void | DisplayToNormalizedDisplay (double display[2]) |
void | NormalizedDisplayToDisplay (double normalized[2]) |
Public Member Functions inherited from albaDeviceButtonsPad | |
albaTypeMacro (albaDeviceButtonsPad, albaDevice) | |
void | SetButtonState (int num, bool value, unsigned long modifiers=0) |
bool | GetButtonState (int num) |
int | GetNumberOfButtons () |
void | SetNumberOfButtons (int num) |
Public Member Functions inherited from albaDevice | |
albaTypeMacro (albaDevice, albaAgentThreaded) | |
unsigned long | GetID () |
void | SetID (unsigned long id) |
virtual void | SetName (const char *name) |
void | SetAutoStart (bool flag) |
bool | GetAutoStart () |
void | AutoStartOn () |
void | AutoStartOff () |
virtual int | Start () |
virtual void | Stop () |
virtual int | StartUp () |
void | SetPersistentFlag (bool flag) |
bool | GetPersistentFlag () |
bool | IsPersistent () |
albaGUI * | GetGui () |
virtual void | UpdateGui () |
virtual void | OnEvent (albaEventBase *event) |
ALBA_ID_DEC (DEVICE_STARTED) | |
ALBA_ID_DEC (DEVICE_STOPPED) | |
Public Member Functions inherited from albaAgentThreaded | |
ALBA_ID_DEC (AGENT_ASYNC_DISPATCH) | |
albaTypeMacro (albaAgentThreaded, albaAgentEventQueue) | |
int | GetThreaded () |
void | SetThreaded (int flag) |
int | Update () |
virtual void | OnEvent (albaEventBase *event) |
void | AsyncSendEvent (albaObserver *target, albaEventBase *event, albaID channel=MCH_UP) |
void | AsyncSendEvent (albaObserver *target, void *sender, albaID id, albaID channel=MCH_UP, void *data=NULL) |
void | AsyncInvokeEvent (albaEventBase *event, albaID channel=MCH_UP) |
void | AsyncInvokeEvent (albaID id, albaID channel=MCH_UP, void *data=NULL) |
Public Member Functions inherited from albaAgentEventQueue | |
ALBA_ID_DEC (EVENT_DISPATCH) | |
albaTypeMacro (albaAgentEventQueue, albaAgent) | |
bool | PushEvent (albaEventBase &event) |
virtual bool | PushEvent (albaEventBase *event) |
bool | PushEvent (albaID event_id, void *sender, void *data=NULL) |
albaEventBase * | PeekEvent () |
albaEventBase * | PeekLastEvent () |
int | GetQueueSize () |
bool | IsQueueEmpty () |
virtual bool | DispatchEvents () |
void | SetDequeueMode (int mode) |
int | GetDequeueMode () |
void | SetDequeueModeToMultipleEvent () |
void | SetDequeueModeToSingleEvent () |
void | SetDispatchMode (int mode) |
int | GetDispatchMode () |
void | SetDispatchModeToSelfProcess () |
void | SetDispatchModeToBroadcast () |
void | SetPushMode (int mode) |
int | GetPushMode () |
void | SetPushModeToDispatchEvent () |
void | SetPushModeToPolling () |
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 albaObject * | NewObjectInstance () const =0 |
virtual const albaTypeID & | GetTypeId () 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) |
albaObserverCallback * | AddObserverCallback (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 albaObserver * | GetListener () |
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) |
Public Member Functions inherited from albaStorable | |
albaStorable () | |
int | Store (albaStorageElement *element) |
int | Restore (albaStorageElement *element) |
albaObject * | CastToObject () |
bool | IsStorable () |
Static Public Member Functions | |
static albaID | GetMouse2DMoveId () |
static albaID | GetMouseCharEventId () |
static albaID | GetMouseDClickId () |
Static Public Member Functions inherited from albaDeviceButtonsPad | |
static albaID | GetButtonDownId () |
static albaID | GetButtonUpId () |
static albaID | GetWheelId () |
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 albaTypeID & | GetStaticTypeId () |
static albaObject * | SafeDownCast (albaObject *o) |
Static Public Member Functions inherited from albaStorable | |
static albaStorable * | SafeCastToObject (albaObject *o) |
Protected Member Functions | |
albaDeviceButtonsPadMouse () | |
virtual | ~albaDeviceButtonsPadMouse () |
virtual void | SendButtonEvent (albaEventInteraction *event) |
Protected Member Functions inherited from albaDeviceButtonsPad | |
albaDeviceButtonsPad () | |
virtual | ~albaDeviceButtonsPad () |
virtual void | SendButtonEvent (albaEventInteraction *event) |
int | FlagCheck (bool event, bool &flag) |
Protected Member Functions inherited from albaDevice | |
albaDevice () | |
virtual | ~albaDevice () |
virtual int | InternalInitialize () |
virtual void | CreateGui () |
virtual int | InternalStore (albaStorageElement *node) |
virtual int | InternalRestore (albaStorageElement *node) |
Protected Member Functions inherited from albaAgentThreaded | |
albaAgentThreaded () | |
virtual | ~albaAgentThreaded () |
virtual void | RequestForDispatching () |
void | StopThread () |
virtual int | InternalInitialize () |
virtual void | InternalShutdown () |
virtual int | InternalUpdate () |
int | GetActiveFlag () |
void | SignalNewMessage () |
void | WaitForNewMessage () |
Protected Member Functions inherited from albaAgentEventQueue | |
albaAgentEventQueue () | |
virtual | ~albaAgentEventQueue () |
albaEventBase * | PopEvent () |
int | PopEvent (albaEventBase &event) |
virtual int | PopEvent (albaEventBase *&event) |
bool | GetDispatched () |
void | SetDispatched (bool value=true) |
virtual void | RequestForDispatching () |
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) |
virtual int | InternalStore (albaStorageElement *node)=0 |
virtual int | InternalRestore (albaStorageElement *node)=0 |
Additional Inherited Members | |
Public Types inherited from albaDevice | |
enum | DEVICE_MINIMUM_ID { MIN_DEVICE_ID =1000000 } |
enum | DEVICE_WIDGET_ID { ID_NAME =MINID , ID_ACTIVATE , ID_SHUTDOWN , ID_AUTO_START , ID_LAST } |
Public Types inherited from albaAgentEventQueue | |
enum | DispatchModalities { SelfProcessMode = 0 , BroadcastMode } |
enum | PopModalities { SingleEventMode = 0 , MultipleEventMode } |
enum | PushModalities { DispatchEventMode =0 , PollingMode } |
Protected Types inherited from albaEventBroadcaster | |
typedef std::list< albaObserver * > | albaObserversList |
Static Protected Member Functions inherited from albaAgentThreaded | |
static void | UpdateLoop (mmuThreadInfoStruct *data) |
Tracking 2D device, i.e.
"Mouse". albaDeviceButtonsPadMouse is a class implementing interface for a Mouse. Current implementation receive its inputs by means of ProcessEvent and forward to all listeners. Any widget or windows toolkit can inject events into this centralized mouse.
Definition at line 36 of file albaDeviceButtonsPadMouse.h.
|
protected |
|
protectedvirtual |
albaDeviceButtonsPadMouse::albaTypeMacro | ( | albaDeviceButtonsPadMouse | , |
albaDeviceButtonsPad | |||
) |
|
static |
return the mouse char event id
|
static |
return the mouse D click id
|
virtual |
Reimplemented to manage fusion of move events.
Reimplemented from albaDevice.
void albaDeviceButtonsPadMouse::SetLastPosition | ( | double | x, |
double | y, | ||
unsigned long | modifiers = 0 |
||
) |
Set the last mouse position and send a 2D MoveEvent.
|
inline |
Return the last position.
Definition at line 70 of file albaDeviceButtonsPadMouse.h.
|
inline |
Definition at line 71 of file albaDeviceButtonsPadMouse.h.
vtkRenderer * albaDeviceButtonsPadMouse::GetRenderer | ( | ) |
Return the renderer of the selected view.
albaView * albaDeviceButtonsPadMouse::GetView | ( | ) |
Return the selected view.
vtkRenderWindowInteractor * albaDeviceButtonsPadMouse::GetInteractor | ( | ) |
Return the Interactor.
albaRWIBase * albaDeviceButtonsPadMouse::GetRWI | ( | ) |
Return the RenderWindowInteractor used by mouse device.
void albaDeviceButtonsPadMouse::DisplayToNormalizedDisplay | ( | double | display[2] | ) |
void albaDeviceButtonsPadMouse::NormalizedDisplayToDisplay | ( | double | normalized[2] | ) |
|
protectedvirtual |
add position to the event
Reimplemented from albaDeviceButtonsPad.
|
protected |
stores the last position
Definition at line 95 of file albaDeviceButtonsPadMouse.h.
|
protected |
Definition at line 96 of file albaDeviceButtonsPadMouse.h.
|
protected |
store the selected view to perform the mouse picking
Definition at line 98 of file albaDeviceButtonsPadMouse.h.
|
protected |
Definition at line 99 of file albaDeviceButtonsPadMouse.h.