1 -- Created on: 1995-01-23
2 -- Created by: Didier Piffault
3 -- Copyright (c) 1995-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 -- Full Copy of Select_Rectangle (Didier Piffault 94)
20 class SortAlgo from SelectBasics
22 ---Purpose: Quickly selection of a rectangle in a set of rectangles
25 uses Integer from Standard,
27 MapIteratorOfMapOfInteger from TColStd,
28 MapOfInteger from TColStd,
29 ListIteratorOfListOfInteger from TColStd,
31 HArray1OfBox2d from Bnd,
32 BoundSortBox2d from Bnd
36 ---Purpose: Empty rectangle selector.
37 returns SortAlgo from SelectBasics;
39 Create (ClippingRectangle : Box2d from Bnd;
40 sizeOfSensitiveArea : Real from Standard;
41 theRectangles : HArray1OfBox2d from Bnd)
42 ---Purpose: Creates a initialized selector.
43 returns SortAlgo from SelectBasics;
45 Initialize (me : in out;
46 ClippingRectangle : Box2d from Bnd;
47 sizeOfSensitiveArea : Real from Standard;
48 theRectangles : HArray1OfBox2d from Bnd)
49 ---Purpose: Clears and initializes the selector.
53 InitSelect (me : in out;
54 x, y : Real from Standard)
55 ---Purpose: Searchs the items on this position.
59 InitSelect (me : in out;
60 rect : Box2d from Bnd)
61 ---Purpose: Searchs the items in this rectangle.
67 ---Purpose: Returns true if there is something selected.
68 returns Boolean from Standard is static;
71 ---Purpose: Sets value on the next selected item.
75 ---Purpose: Returns the index of the selected rectangle.
76 returns Integer from Standard is static;
79 fields clipRect : Box2d from Bnd;
80 sizeArea : Real from Standard;
81 sortedRect : BoundSortBox2d from Bnd;
82 myMap : MapOfInteger from TColStd;
83 curResult : MapIteratorOfMapOfInteger from TColStd;