0032308: Configuration - make Xlib dependency optional
[occt.git] / src / AIS / AIS_ManipulatorOwner.hxx
1 // Created on: 2015-12-23
2 // Created by: Anastasia BORISOVA
3 // Copyright (c) 2015 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _AIS_ManipulatorOwner_HeaderFile
17 #define _AIS_ManipulatorOwner_HeaderFile
18
19 #include <AIS_Manipulator.hxx>
20
21 #include <SelectMgr_EntityOwner.hxx>
22 #include <SelectMgr_SelectableObject.hxx>
23
24 DEFINE_STANDARD_HANDLE(AIS_ManipulatorOwner, SelectMgr_EntityOwner)
25
26 //! Entity owner for selection management of AIS_Manipulator object.
27 class AIS_ManipulatorOwner : public SelectMgr_EntityOwner
28 {
29 public:
30
31   DEFINE_STANDARD_RTTIEXT(AIS_ManipulatorOwner, SelectMgr_EntityOwner)
32
33   Standard_EXPORT AIS_ManipulatorOwner (const Handle(SelectMgr_SelectableObject)& theSelObject,
34                                         const Standard_Integer theIndex,
35                                         const AIS_ManipulatorMode theMode,
36                                         const Standard_Integer thePriority = 0);
37
38   Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePM,
39                                                  const Handle(Prs3d_Drawer)& theStyle,
40                                                  const Standard_Integer theMode) Standard_OVERRIDE;
41
42   Standard_EXPORT Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& thePM,
43                                                 const Standard_Integer theMode) const Standard_OVERRIDE;
44
45   Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePM, const Standard_Integer theMode) Standard_OVERRIDE;
46
47   AIS_ManipulatorMode Mode() const { return myMode; }
48
49   //! @return index of manipulator axis.
50   Standard_Integer Index() const { return myIndex; }
51
52 protected:
53
54   Standard_Integer myIndex; //!< index of manipulator axis.
55   AIS_ManipulatorMode myMode;//!< manipulation (highlight) mode.
56 };
57
58 #endif // _AIS_ManipulatorOwner_HeaderFile