42cf5bc1 |
1 | // Created on: 1993-01-09 |
2 | // Created by: CKY / Contract Toubro-Larsen ( TCD ) |
3 | // Copyright (c) 1993-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 _IGESDraw_LabelDisplay_HeaderFile |
18 | #define _IGESDraw_LabelDisplay_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <IGESDraw_HArray1OfViewKindEntity.hxx> |
24 | #include <TColgp_HArray1OfXYZ.hxx> |
25 | #include <IGESDimen_HArray1OfLeaderArrow.hxx> |
26 | #include <TColStd_HArray1OfInteger.hxx> |
27 | #include <IGESData_HArray1OfIGESEntity.hxx> |
28 | #include <IGESData_LabelDisplayEntity.hxx> |
29 | #include <Standard_Integer.hxx> |
30 | class Standard_DimensionMismatch; |
31 | class Standard_OutOfRange; |
32 | class IGESData_ViewKindEntity; |
33 | class gp_Pnt; |
34 | class IGESDimen_LeaderArrow; |
35 | class IGESData_IGESEntity; |
36 | |
37 | |
38 | class IGESDraw_LabelDisplay; |
39 | DEFINE_STANDARD_HANDLE(IGESDraw_LabelDisplay, IGESData_LabelDisplayEntity) |
40 | |
41 | //! defines IGESLabelDisplay, Type <402> Form <5> |
42 | //! in package IGESDraw |
43 | //! |
44 | //! Permits one or more displays for the |
45 | //! entity labels of an entity |
46 | class IGESDraw_LabelDisplay : public IGESData_LabelDisplayEntity |
47 | { |
48 | |
49 | public: |
50 | |
51 | |
52 | Standard_EXPORT IGESDraw_LabelDisplay(); |
53 | |
54 | //! This method is used to set the fields of the class |
55 | //! LabelDisplay |
56 | //! - allViews : Pointers to View Entities |
57 | //! - allTextLocations : Coordinates of text locations in the views |
58 | //! - allLeaderEntities : Pointers to Leader Entities in the views |
59 | //! - allLabelLevels : Entity label level numbers in the views |
60 | //! - allDisplayedEntities : Pointers to the entities being displayed |
61 | //! raises exception if Lengths of allViews, allTextLocations, |
62 | //! allLeaderEntities, allLabelLevels and allDisplayedEntities are |
63 | //! not same. |
64 | Standard_EXPORT void Init (const Handle(IGESDraw_HArray1OfViewKindEntity)& allViews, const Handle(TColgp_HArray1OfXYZ)& allTextLocations, const Handle(IGESDimen_HArray1OfLeaderArrow)& allLeaderEntities, const Handle(TColStd_HArray1OfInteger)& allLabelLevels, const Handle(IGESData_HArray1OfIGESEntity)& allDisplayedEntities); |
65 | |
66 | //! returns the number of label placements in <me> |
67 | Standard_EXPORT Standard_Integer NbLabels() const; |
68 | |
69 | //! returns the View entity indicated by ViewIndex |
70 | //! raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
71 | Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewItem (const Standard_Integer ViewIndex) const; |
72 | |
73 | //! returns the 3d-Point coordinates of the text location, in the |
74 | //! view indicated by ViewIndex |
75 | //! raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
76 | Standard_EXPORT gp_Pnt TextLocation (const Standard_Integer ViewIndex) const; |
77 | |
78 | //! returns the Leader entity in the view indicated by ViewIndex |
79 | //! raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
80 | Standard_EXPORT Handle(IGESDimen_LeaderArrow) LeaderEntity (const Standard_Integer ViewIndex) const; |
81 | |
82 | //! returns the Entity label level number in the view indicated |
83 | //! by ViewIndex |
84 | //! raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
85 | Standard_EXPORT Standard_Integer LabelLevel (const Standard_Integer ViewIndex) const; |
86 | |
87 | //! returns the entity indicated by EntityIndex |
88 | //! raises an exception if EntityIndex <= 0 or EntityIndex > NbLabels(). |
89 | Standard_EXPORT Handle(IGESData_IGESEntity) DisplayedEntity (const Standard_Integer EntityIndex) const; |
90 | |
91 | //! returns the transformed 3d-Point coordinates of the text |
92 | //! location, in the view indicated by ViewIndex |
93 | //! raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
94 | Standard_EXPORT gp_Pnt TransformedTextLocation (const Standard_Integer ViewIndex) const; |
95 | |
96 | |
97 | |
98 | |
92efcf78 |
99 | DEFINE_STANDARD_RTTIEXT(IGESDraw_LabelDisplay,IGESData_LabelDisplayEntity) |
42cf5bc1 |
100 | |
101 | protected: |
102 | |
103 | |
104 | |
105 | |
106 | private: |
107 | |
108 | |
109 | Handle(IGESDraw_HArray1OfViewKindEntity) theViews; |
110 | Handle(TColgp_HArray1OfXYZ) theTextLocations; |
111 | Handle(IGESDimen_HArray1OfLeaderArrow) theLeaderEntities; |
112 | Handle(TColStd_HArray1OfInteger) theLabelLevels; |
113 | Handle(IGESData_HArray1OfIGESEntity) theDisplayedEntities; |
114 | |
115 | |
116 | }; |
117 | |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | #endif // _IGESDraw_LabelDisplay_HeaderFile |