bc001a40 |
1 | // Created by: Ilya SEVRIKOV |
2 | // Copyright (c) 2016 OPEN CASCADE SAS |
3 | // |
4 | // This file is part of Open CASCADE Technology software library. |
5 | // |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
11 | // |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
14 | |
15 | #ifndef _AIS_TrihedronOwner_HeaderFile |
16 | #define _AIS_TrihedronOwner_HeaderFile |
17 | |
18 | #include <SelectMgr_EntityOwner.hxx> |
19 | #include <SelectMgr_SelectableObject.hxx> |
20 | #include <Prs3d_DatumParts.hxx> |
21 | |
22 | //! Entity owner for selection management of AIS_Trihedron object. |
23 | class AIS_TrihedronOwner : public SelectMgr_EntityOwner |
24 | { |
25 | DEFINE_STANDARD_RTTIEXT(AIS_TrihedronOwner, SelectMgr_EntityOwner) |
26 | public: |
27 | |
28 | //! Creates an owner of AIS_Trihedron object. |
29 | Standard_EXPORT AIS_TrihedronOwner (const Handle(SelectMgr_SelectableObject)& theSelObject, |
30 | const Prs3d_DatumParts theDatumPart, |
31 | const Standard_Integer thePriority); |
32 | |
33 | //! Returns the datum part identifier. |
34 | Prs3d_DatumParts DatumPart() const { return myDatumPart; } |
35 | |
36 | //! Highlights selectable object's presentation. |
decbff0d |
37 | Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePM, |
bc001a40 |
38 | const Handle(Prs3d_Drawer)& theStyle, |
39 | const Standard_Integer theMode) Standard_OVERRIDE; |
40 | |
41 | //! Returns true if the presentation manager thePM |
42 | //! highlights selections corresponding to the selection mode aMode. |
43 | Standard_EXPORT Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& thePM, |
44 | const Standard_Integer theMode) const Standard_OVERRIDE; |
45 | |
46 | //! Removes highlighting from the owner of a detected |
47 | //! selectable object in the presentation manager thePM. |
48 | Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePM, |
49 | const Standard_Integer theMode) Standard_OVERRIDE; |
50 | |
51 | protected: |
52 | Prs3d_DatumParts myDatumPart; //!< part of datum selected |
53 | }; |
54 | |
55 | DEFINE_STANDARD_HANDLE (AIS_TrihedronOwner, SelectMgr_EntityOwner) |
56 | |
57 | #endif // _AIS_TrihedronOwner_HeaderFile |