0027818: Visualization - provide an interface to define highlight presentation properties
[occt.git] / src / AIS / AIS_DimensionOwner.hxx
CommitLineData
42cf5bc1 1// Created on: 1996-12-05
2// Created by: Odile Olivier
3// Copyright (c) 1996-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _AIS_DimensionOwner_HeaderFile
18#define _AIS_DimensionOwner_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <AIS_DimensionSelectionMode.hxx>
24#include <SelectMgr_EntityOwner.hxx>
25#include <Standard_Integer.hxx>
26#include <PrsMgr_PresentationManager3d.hxx>
27#include <Quantity_NameOfColor.hxx>
28#include <Standard_Boolean.hxx>
29class SelectMgr_SelectableObject;
30class PrsMgr_PresentationManager;
31
32
33class AIS_DimensionOwner;
34DEFINE_STANDARD_HANDLE(AIS_DimensionOwner, SelectMgr_EntityOwner)
35
36//! The owner is the entity which makes it possible to link
37//! the sensitive primitives and the reference shapes that
38//! you want to detect. It stocks the various pieces of
39//! information which make it possible to find objects. An
40//! owner has a priority which you can modulate, so as to
41//! make one entity more selectable than another. You
42//! might want to make edges more selectable than
43//! faces, for example. In that case, you could attribute sa
44//! higher priority to the one compared to the other. An
45//! edge, could have priority 5, for example, and a face,
46//! priority 4. The default priority is 5.
47class AIS_DimensionOwner : public SelectMgr_EntityOwner
48{
49
50public:
51
52
53
54 //! Initializes the dimension owner, theSO, and attributes it
55 //! the priority, thePriority.
56 Standard_EXPORT AIS_DimensionOwner(const Handle(SelectMgr_SelectableObject)& theSelObject, const AIS_DimensionSelectionMode theSelMode, const Standard_Integer thePriority = 0);
57
58 Standard_EXPORT AIS_DimensionSelectionMode SelectionMode() const;
59
8e5fb5ea 60 Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
61 const Handle(Graphic3d_HighlightStyle)& theStyle,
62 const Standard_Integer theMode = 0) Standard_OVERRIDE;
42cf5bc1 63
64 //! Returns true if an object with the selection mode
65 //! aMode is highlighted in the presentation manager aPM.
66 Standard_EXPORT virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& thePM, const Standard_Integer theMode = 0) const Standard_OVERRIDE;
67
42cf5bc1 68 //! Removes highlighting from the selected part of dimension.
69 Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePM, const Standard_Integer theMode = 0) Standard_OVERRIDE;
70
71
72
73
92efcf78 74 DEFINE_STANDARD_RTTIEXT(AIS_DimensionOwner,SelectMgr_EntityOwner)
42cf5bc1 75
76protected:
77
78
79
80
81private:
82
83
84 AIS_DimensionSelectionMode mySelectionMode;
85
86
87};
88
89
90
91
92
93
94
95#endif // _AIS_DimensionOwner_HeaderFile