42cf5bc1 |
1 | // Created on: 2003-10-10 |
2 | // Created by: Alexander SOLOVYOV |
3 | // Copyright (c) 2003-2014 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 _MeshVS_MeshEntityOwner_HeaderFile |
17 | #define _MeshVS_MeshEntityOwner_HeaderFile |
18 | |
42cf5bc1 |
19 | #include <MeshVS_EntityType.hxx> |
42cf5bc1 |
20 | #include <SelectMgr_EntityOwner.hxx> |
42cf5bc1 |
21 | #include <PrsMgr_PresentationManager3d.hxx> |
22 | #include <Quantity_NameOfColor.hxx> |
23 | class PrsMgr_PresentationManager; |
24 | |
25 | |
26 | class MeshVS_MeshEntityOwner; |
27 | DEFINE_STANDARD_HANDLE(MeshVS_MeshEntityOwner, SelectMgr_EntityOwner) |
28 | |
29 | //! The custom owner. This class provides methods to store owner information: |
30 | //! 1) An address of element or node data structure |
31 | //! 2) Type of node or element owner assigned |
32 | //! 3) ID of node or element owner assigned |
33 | class MeshVS_MeshEntityOwner : public SelectMgr_EntityOwner |
34 | { |
35 | |
36 | public: |
37 | |
38 | |
7f24b768 |
39 | Standard_EXPORT MeshVS_MeshEntityOwner(const SelectMgr_SelectableObject* SelObj, const Standard_Integer ID, const Standard_Address MeshEntity, const MeshVS_EntityType& Type, const Standard_Integer Priority = 0, const Standard_Boolean IsGroup = Standard_False); |
42cf5bc1 |
40 | |
41 | //! Returns an address of element or node data structure |
42 | Standard_EXPORT Standard_Address Owner() const; |
43 | |
44 | //! Returns type of element or node data structure |
45 | Standard_EXPORT MeshVS_EntityType Type() const; |
46 | |
47 | //! Returns ID of element or node data structure |
48 | Standard_EXPORT Standard_Integer ID() const; |
49 | |
50 | //! Returns true if owner represents group of nodes or elements |
51 | Standard_EXPORT Standard_Boolean IsGroup() const; |
52 | |
53 | //! Returns true if owner is hilighted |
54 | Standard_EXPORT virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) const Standard_OVERRIDE; |
55 | |
42cf5bc1 |
56 | //! Hilights owner with the certain color |
8e5fb5ea |
57 | Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM, |
f838dac4 |
58 | const Handle(Prs3d_Drawer)& theStyle, |
8e5fb5ea |
59 | const Standard_Integer theMode = 0) Standard_OVERRIDE; |
42cf5bc1 |
60 | |
61 | //! Strip hilight of owner |
62 | Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) Standard_OVERRIDE; |
63 | |
64 | Standard_EXPORT virtual void Clear (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) Standard_OVERRIDE; |
65 | |
66 | |
67 | |
68 | |
92efcf78 |
69 | DEFINE_STANDARD_RTTIEXT(MeshVS_MeshEntityOwner,SelectMgr_EntityOwner) |
42cf5bc1 |
70 | |
71 | protected: |
72 | |
73 | |
74 | |
75 | |
76 | private: |
77 | |
78 | |
79 | Standard_Address myAddr; |
80 | MeshVS_EntityType myType; |
81 | Standard_Integer myID; |
82 | Standard_Boolean myIsGroup; |
83 | |
84 | |
85 | }; |
86 | |
87 | |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | #endif // _MeshVS_MeshEntityOwner_HeaderFile |