File indexing completed on 2025-01-18 10:02:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _Aspect_ScrollDelta_HeaderFile
0015 #define _Aspect_ScrollDelta_HeaderFile
0016
0017 #include <Aspect_VKeyFlags.hxx>
0018 #include <NCollection_Vec2.hxx>
0019
0020
0021 struct Aspect_ScrollDelta
0022 {
0023
0024 NCollection_Vec2<int> Point;
0025 Standard_Real Delta;
0026 Aspect_VKeyFlags Flags;
0027
0028
0029 bool HasPoint() const
0030 {
0031 return Point.x() >= 0
0032 && Point.y() >= 0;
0033 }
0034
0035
0036 void ResetPoint()
0037 {
0038 Point.SetValues (-1, -1);
0039 }
0040
0041
0042 Aspect_ScrollDelta()
0043 : Point (-1, -1), Delta (0.0), Flags (Aspect_VKeyFlags_NONE) {}
0044
0045
0046 Aspect_ScrollDelta (const NCollection_Vec2<int>& thePnt,
0047 Standard_Real theValue,
0048 Aspect_VKeyFlags theFlags = Aspect_VKeyFlags_NONE)
0049 : Point (thePnt), Delta (theValue), Flags (theFlags) {}
0050
0051
0052 Aspect_ScrollDelta (Standard_Real theValue,
0053 Aspect_VKeyFlags theFlags = Aspect_VKeyFlags_NONE)
0054 : Point (-1, -1), Delta (theValue), Flags (theFlags) {}
0055
0056 };
0057
0058 #endif