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