X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInput%2FFGEventInput.hxx;h=7188c83813f112d844e0d2afae40a27c09465d34;hb=d0a2fbba990c07608b813fa026126fe7ce52c552;hp=973821bd0584452c7bb10a8ecfc3ed3edc150aa5;hpb=a6db6d89ff41a619569e6433409e8bf62ff98499;p=flightgear.git diff --git a/src/Input/FGEventInput.hxx b/src/Input/FGEventInput.hxx index 973821bd0..7188c8381 100644 --- a/src/Input/FGEventInput.hxx +++ b/src/Input/FGEventInput.hxx @@ -83,6 +83,7 @@ typedef vector setting_list_t; class FGInputDevice; class FGInputEvent : public SGReferenced,FGCommonInput { public: + /* * Constructor for the class. The arg node shall point * to the property corresponding to the node @@ -110,6 +111,7 @@ public: static FGInputEvent * NewObject( FGInputDevice * device, SGPropertyNode_ptr node ); protected: + virtual void fire( SGBinding * binding, FGEventData & eventData ); /* A more or less meaningfull description of the event */ string desc; @@ -143,6 +145,9 @@ protected: class FGAxisEvent : public FGInputEvent { public: FGAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ); + void SetMaxRange( double value ) { maxRange = value; } + void SetMinRange( double value ) { minRange = value; } + void SetRange( double min, double max ) { minRange = min; maxRange = max; } protected: virtual void fire( FGEventData & eventData ); double tolerance; @@ -155,6 +160,20 @@ protected: double lastValue; }; +class FGRelAxisEvent : public FGAxisEvent { +public: + FGRelAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ); +protected: + virtual void fire( SGBinding * binding, FGEventData & eventData ); +}; + +class FGAbsAxisEvent : public FGAxisEvent { +public: + FGAbsAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ) : FGAxisEvent( device, node ) {} +protected: + virtual void fire( SGBinding * binding, FGEventData & eventData ); +}; + typedef class SGSharedPtr FGInputEvent_ptr; /*