1 // Copyright (c) 2019 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _Aspect_ScrollDelta_HeaderFile
15 #define _Aspect_ScrollDelta_HeaderFile
17 #include <Aspect_VKeyFlags.hxx>
18 #include <NCollection_Vec2.hxx>
19 #include <Standard_Real.hxx>
21 //! Parameters for mouse scroll action.
22 struct Aspect_ScrollDelta
25 NCollection_Vec2<int> Point; //!< scale position
26 Standard_Real Delta; //!< delta in pixels
27 Aspect_VKeyFlags Flags; //!< key flags
29 //! Return true if action has point defined.
39 Point.SetValues (-1, -1);
42 //! Empty constructor.
44 : Point (-1, -1), Delta (0.0), Flags (Aspect_VKeyFlags_NONE) {}
47 Aspect_ScrollDelta (const NCollection_Vec2<int>& thePnt,
48 Standard_Real theValue,
49 Aspect_VKeyFlags theFlags = Aspect_VKeyFlags_NONE)
50 : Point (thePnt), Delta (theValue), Flags (theFlags) {}
52 //! Constructor with undefined point.
53 Aspect_ScrollDelta (Standard_Real theValue,
54 Aspect_VKeyFlags theFlags = Aspect_VKeyFlags_NONE)
55 : Point (-1, -1), Delta (theValue), Flags (theFlags) {}
59 #endif // _Aspect_ScrollDelta_HeaderFile