0031459: Visualization, AIS_TextLabel - add missing getters
[occt.git] / src / AIS / AIS_DimensionOwner.hxx
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
6// This file is part of Open CASCADE Technology software library.
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.
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
17#ifndef _AIS_DimensionOwner_HeaderFile
18#define _AIS_DimensionOwner_HeaderFile
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
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>
f838dac4 29
42cf5bc1 30class SelectMgr_SelectableObject;
31class PrsMgr_PresentationManager;
42cf5bc1 33DEFINE_STANDARD_HANDLE(AIS_DimensionOwner, SelectMgr_EntityOwner)
35//! The owner is the entity which makes it possible to link
36//! the sensitive primitives and the reference shapes that
37//! you want to detect. It stocks the various pieces of
38//! information which make it possible to find objects. An
39//! owner has a priority which you can modulate, so as to
40//! make one entity more selectable than another. You
41//! might want to make edges more selectable than
42//! faces, for example. In that case, you could attribute sa
43//! higher priority to the one compared to the other. An
44//! edge, could have priority 5, for example, and a face,
45//! priority 4. The default priority is 5.
46class AIS_DimensionOwner : public SelectMgr_EntityOwner
f838dac4 48 DEFINE_STANDARD_RTTIEXT(AIS_DimensionOwner, SelectMgr_EntityOwner)
42cf5bc1 49public:
42cf5bc1 51 //! Initializes the dimension owner, theSO, and attributes it
52 //! the priority, thePriority.
53 Standard_EXPORT AIS_DimensionOwner(const Handle(SelectMgr_SelectableObject)& theSelObject, const AIS_DimensionSelectionMode theSelMode, const Standard_Integer thePriority = 0);
55 Standard_EXPORT AIS_DimensionSelectionMode SelectionMode() const;
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 //! Returns true if an object with the selection mode
62 //! aMode is highlighted in the presentation manager aPM.
63 Standard_EXPORT virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& thePM, const Standard_Integer theMode = 0) const Standard_OVERRIDE;
42cf5bc1 65 //! Removes highlighting from the selected part of dimension.
66 Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePM, const Standard_Integer theMode = 0) Standard_OVERRIDE;
42cf5bc1 68private:
42cf5bc1 70 AIS_DimensionSelectionMode mySelectionMode;
42cf5bc1 72};
42cf5bc1 74#endif // _AIS_DimensionOwner_HeaderFile