0024023: Revamp the OCCT Handle -- downcast (automatic)
[occt.git] / src / AIS / AIS_DimensionOwner.cdl
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 class DimensionOwner from AIS inherits EntityOwner from SelectMgr
18
19   ---Purpose: The owner is the entity which makes it possible to link
20     -- the sensitive primitives and the reference shapes that
21     -- you want to detect. It stocks the various pieces of
22     -- information which make it possible to find objects. An
23     -- owner has a priority which you can modulate, so as to
24     -- make one entity more selectable than another. You
25     -- might want to make edges more selectable than
26     -- faces, for example. In that case, you could attribute sa
27     -- higher priority to the one compared to the other. An
28     -- edge, could have priority 5, for example, and a face,
29     -- priority 4. The default priority is 5.
30
31 uses
32
33     SelectableObject       from SelectMgr,
34     PresentationManager    from PrsMgr,
35     PresentationManager3d  from PrsMgr,
36     NameOfColor            from Quantity,
37     DimensionSelectionMode from AIS
38
39 is
40
41     Create (theSelObject  : SelectableObject;
42             theSelMode    : DimensionSelectionMode from AIS;
43             thePriority   : Integer from Standard = 0)
44     returns DimensionOwner from AIS;
45       ---Purpose:
46       -- Initializes the dimension owner, theSO, and attributes it
47       -- the priority, thePriority.
48
49     SelectionMode (me)
50     returns DimensionSelectionMode from AIS;
51
52     HilightWithColor (me       : mutable;
53                       thePM    : PresentationManager3d from PrsMgr;
54                       theColor : NameOfColor from Quantity;
55                       theMode  : Integer  from  Standard = 0)
56     is redefined virtual;
57
58     IsHilighted (me;
59                  thePM   : PresentationManager from PrsMgr;
60                  theMode : Integer  from  Standard  =0)
61     returns Boolean from Standard is redefined virtual;
62     ---Purpose: Returns true if an object with the selection mode
63     -- aMode is highlighted in the presentation manager aPM.
64
65     Hilight(me    : mutable;
66             thePM   : PresentationManager from PrsMgr;
67             theMode : Integer  from  Standard  =0) is redefined virtual;
68
69     Unhilight(me    : mutable;
70               thePM   : PresentationManager from PrsMgr;
71               theMode : Integer  from  Standard  =0) is redefined virtual;
72     ---Purpose: Removes highlighting from the selected part of dimension.
73
74 fields
75
76     mySelectionMode : DimensionSelectionMode from AIS;
77
78 end DimensionOwner;