File indexing completed on 2025-01-18 10:05:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _TDataXtd_Presentation_HeaderFile
0017 #define _TDataXtd_Presentation_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_GUID.hxx>
0021
0022 #include <gp_Pnt.hxx>
0023 #include <TDF_Attribute.hxx>
0024 #include <Quantity_NameOfColor.hxx>
0025 #include <TColStd_ListOfInteger.hxx>
0026
0027 class TDF_Label;
0028 class TDF_RelocationTable;
0029
0030
0031 class TDataXtd_Presentation;
0032 DEFINE_STANDARD_HANDLE(TDataXtd_Presentation, TDF_Attribute)
0033
0034
0035
0036
0037 class TDataXtd_Presentation : public TDF_Attribute
0038 {
0039 public:
0040
0041
0042
0043 Standard_EXPORT TDataXtd_Presentation();
0044
0045
0046 Standard_EXPORT static Handle(TDataXtd_Presentation) Set(const TDF_Label& theLabel, const Standard_GUID& theDriverId);
0047
0048
0049 Standard_EXPORT static void Unset(const TDF_Label& theLabel);
0050
0051
0052 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0053
0054
0055 Standard_EXPORT static const Standard_GUID& GetID();
0056
0057
0058
0059 Standard_EXPORT virtual void Restore (const Handle(TDF_Attribute)& anAttribute) Standard_OVERRIDE;
0060
0061
0062
0063 Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
0064
0065
0066
0067
0068
0069
0070
0071
0072 Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& intoAttribute,
0073 const Handle(TDF_RelocationTable)& aRelocTationable) const Standard_OVERRIDE;
0074
0075 Standard_EXPORT Handle(TDF_Attribute) BackupCopy() const Standard_OVERRIDE;
0076
0077 DEFINE_STANDARD_RTTIEXT(TDataXtd_Presentation,TDF_Attribute)
0078
0079 public:
0080
0081
0082
0083 Standard_EXPORT Standard_GUID GetDriverGUID() const;
0084
0085
0086 Standard_EXPORT void SetDriverGUID(const Standard_GUID& theGUID);
0087
0088 Standard_EXPORT Standard_Boolean IsDisplayed() const;
0089
0090 Standard_EXPORT Standard_Boolean HasOwnMaterial() const;
0091
0092 Standard_EXPORT Standard_Boolean HasOwnTransparency() const;
0093
0094 Standard_EXPORT Standard_Boolean HasOwnColor() const;
0095
0096 Standard_EXPORT Standard_Boolean HasOwnWidth() const;
0097
0098 Standard_EXPORT Standard_Boolean HasOwnMode() const;
0099
0100 Standard_EXPORT Standard_Boolean HasOwnSelectionMode() const;
0101
0102 Standard_EXPORT void SetDisplayed(const Standard_Boolean theIsDisplayed);
0103
0104 Standard_EXPORT void SetMaterialIndex(const Standard_Integer theMaterialIndex);
0105
0106 Standard_EXPORT void SetTransparency(const Standard_Real theValue);
0107
0108 Standard_EXPORT void SetColor(const Quantity_NameOfColor theColor);
0109
0110 Standard_EXPORT void SetWidth(const Standard_Real theWidth);
0111
0112 Standard_EXPORT void SetMode(const Standard_Integer theMode);
0113
0114
0115
0116 Standard_EXPORT Standard_Integer GetNbSelectionModes() const;
0117
0118
0119
0120
0121
0122
0123 Standard_EXPORT void SetSelectionMode(const Standard_Integer theSelectionMode, const Standard_Boolean theTransaction = Standard_True);
0124 Standard_EXPORT void AddSelectionMode(const Standard_Integer theSelectionMode, const Standard_Boolean theTransaction = Standard_True);
0125
0126 Standard_EXPORT Standard_Integer MaterialIndex() const;
0127
0128 Standard_EXPORT Standard_Real Transparency() const;
0129
0130 Standard_EXPORT Quantity_NameOfColor Color() const;
0131
0132 Standard_EXPORT Standard_Real Width() const;
0133
0134 Standard_EXPORT Standard_Integer Mode() const;
0135
0136 Standard_EXPORT Standard_Integer SelectionMode(const int index = 1) const;
0137
0138 Standard_EXPORT void UnsetMaterial();
0139
0140 Standard_EXPORT void UnsetTransparency();
0141
0142 Standard_EXPORT void UnsetColor();
0143
0144 Standard_EXPORT void UnsetWidth();
0145
0146 Standard_EXPORT void UnsetMode();
0147
0148 Standard_EXPORT void UnsetSelectionMode();
0149
0150 public:
0151
0152
0153 Standard_EXPORT static Quantity_NameOfColor getColorNameFromOldEnum (Standard_Integer theOld);
0154
0155
0156 Standard_EXPORT static Standard_Integer getOldColorNameFromNewEnum (Quantity_NameOfColor theNew);
0157
0158 private:
0159 Standard_GUID myDriverGUID;
0160 Quantity_NameOfColor myColor;
0161 Standard_Integer myMaterialIndex;
0162 Standard_Integer myMode;
0163 TColStd_ListOfInteger mySelectionModes;
0164 Standard_Real myTransparency;
0165 Standard_Real myWidth;
0166 Standard_Boolean myIsDisplayed;
0167 Standard_Boolean myHasOwnColor;
0168 Standard_Boolean myHasOwnMaterial;
0169 Standard_Boolean myHasOwnTransparency;
0170 Standard_Boolean myHasOwnWidth;
0171 Standard_Boolean myHasOwnMode;
0172 Standard_Boolean myHasOwnSelectionMode;
0173
0174
0175 Standard_Boolean HasSelectionMode(const Standard_Integer theSelectionMode) const;
0176 };
0177
0178 #endif