VR-Exchange 2.5 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pVrvMouseEvent.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/dllExport.h>
13 #include <portal/pInteraction.h>
14 
15 namespace MAKVrExchange
16 {
17 
18  class DtPortalConnection;
19 
23  : public DtPortalInteraction
24  {
25  public:
26 
28  typedef void (*functionCallback_type) (
29  const DtPortalVrvMouseEventInteraction &interaction, void *userData);
30 
33 
36 
38  static void addCallback( DtPortalConnection* connection,
39  functionCallback_type callbackFunction, void* userData );
40 
42  static void removeCallback( DtPortalConnection* connection,
43  functionCallback_type callbackFunction, void* userData );
44 
47 
48  DtDEC_ATTRIBUTE( DtString, ObserverName, observerName )
49  DtDEC_ATTRIBUTE( DtString, EventType, eventType );
50  DtDEC_ATTRIBUTE( double, X, x );
51  DtDEC_ATTRIBUTE( double, Y, y );
52  DtDEC_ATTRIBUTE( double, Wheel, wheel );
53  DtDEC_ATTRIBUTE( bool, Left, left );
54  DtDEC_ATTRIBUTE( bool, Middle, middle );
55  DtDEC_ATTRIBUTE( bool, Right, right );
56  DtDEC_ATTRIBUTE( bool, Shift, shift );
57  DtDEC_ATTRIBUTE( bool, Ctrl, ctrl );
58  DtDEC_ATTRIBUTE( bool, Alt, alt );
60 
62  public:
63 
64  static const DtPortalMessageKind theKind;
65 
66  static DtPortalMessage* create();
67 
68  virtual unsigned int netSize() const;
69  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
70  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
71 
72  virtual std::ostream& printDataToStream( std::ostream& stream ) const;
73 
74  private:
75 
78 
80  bool operator == ( const DtPortalVrvMouseEventInteraction& ) const;
81 
83  bool operator != ( const DtPortalVrvMouseEventInteraction& ) const;
84 
85  };
86 
87 
88  inline DtPortalMessage* DtPortalVrvMouseEventInteraction::create()
89  {
90  return new DtPortalVrvMouseEventInteraction();
91  }
92 
93 }

Document ID: Generated on Wed Dec 21 15:05:11 EST 2016 from SVN revision 171891
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)