CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbModelDocViewStyle.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#ifndef OD_MODELDOCVIEWSTYLE_H
25#define OD_MODELDOCVIEWSTYLE_H
26
27#include "TD_PackPush.h"
28#include "DbObject.h"
29
36{
37protected:
38 // Default constructor is protected since OdDbModelDocViewStyle is an abstract class.
40
41public:
43
48 kAboveView = 0, // Label text is attached above the view.
49 kBelowView = 1, // Label text is attached below the view.
50 };
51
56 kTextAlignmentLeft = 0, // Left alignment is used for the view label text.
57 kTextAlignmentCenter = 1, // Center alignment is used for the view label text.
58 kTextAlignmentRight = 2, // Right alignment is used for the view label text.
59 };
60
61 // Default destructor.
63
67 virtual OdString getName() const;
68
74 virtual void setName(const OdString& name);
75
79 virtual OdString description() const;
80
86 virtual void setDescription(const OdString& description);
87
92
103 const OdString& styleName) = 0;
104
112
119
128 bool isViewNameValid(const OdString& name) const;
129
131 // Calculates a view label's position.
132 //
133 // \param offsetVector [out] Offset (vector) of the view label.
134 // \param textAlignment [out] Text alignment of the view label.
135 // \param attachment [in] Use with the offset argument to specify label position.
136 // \param offset [in] Use with the attachment argument to specify label position.
137 // \param minPt [in] Point located in the lower left corner of the view's bounding box.
138 // \param maxPt [in] Point located in the upper right corner of the view's bounding box.
139 //
140 // \returns
141 // Position of the view label.
142 //*/
143 //static OdGePoint3d calculateViewLabelPosition(OdGeVector2d& offsetVector,
144 // OdDbMText::AttachmentPoint& textAlignment,
145 // OdDbModelDocViewStyle::AttachmentPoint attachment,
146 // double offset,
147 // const OdGePoint3d& minPt,
148 // const OdGePoint3d& maxPt);
149
151 // Sets the position of a view label.
152 //
153 // \param pMText [in] Pointer to MText object to be positioned as a label.
154 // \param attachment [in] Use with the offset argument to specify label position.
155 // \param offset [in] Use with the attachment argument to specify label position.
156 // \param minPt [in] Point located in the lower left corner of the view's bounding box.
157 // \param maxPt [in] Point located in the upper right corner of the view's bounding box.
158 //
159 // \returns
160 // Position of the view label.
161 //*/
162 //static OdGeVector2d setViewLabelPosition(OdDbMText* pMText,
163 // OdDbModelDocViewStyle::AttachmentPoint attachment,
164 // double offset,
165 // const OdGePoint3d& minPt,
166 // const OdGePoint3d& maxPt);
167
169 // Updates the position of a view label.
170 //
171 // \param pMText [in] Pointer to MText object to be positioned as a label.
172 // \param attachment [in] Specifies whether the label is attached.
173 // \param minPt [in] Point located in the lower left corner of the view's bounding box.
174 // \param maxPt [in] Point located in the upper right corner of the view's bounding box.
175 //
176 // \returns
177 // Position of the view label.
178 //*/
179 //static OdGeVector2d updateViewLabelPosition(OdDbMText* pMText,
180 // OdDbModelDocViewStyle::AttachmentPoint attachment,
181 // const OdGePoint3d& minPt,
182 // const OdGePoint3d& maxPt);
183
186 bool canRename() const;
187 OdResult setCanRename(bool canRename);
188
189protected:
190 // OdDbObject overridden functions
192 virtual void dwgOutFields(OdDbDwgFiler* pFiler) const;
194 virtual void dxfOutFields(OdDbDxfFiler* pFiler) const;
195
196 enum
197 {
198 kCanRename = 1
199 };
200
201//protected:
202// // For internal use only
203// virtual OdDbObjectPtr subDeepClone(OdDbObject* pOwner,
204// OdDbIdMapping& idMap, bool isPrimary = true) const;
205// virtual OdDbObjectPtr subWblockClone(OdDbObject* pOwner,
206// OdDbIdMapping& idMap, bool isPrimary = true) const;
207//private:
208// friend class OdDbModelDocViewStyleImp;
209};
210
215
216#include "TD_PackPop.h"
217
218#endif // OD_MODELDOCVIEWSTYLE_H
#define DBENT_EXPORT
Definition: DbExport.h:67
OdSmartPtr< OdDbModelDocViewStyle > OdDbModelDocViewStylePtr
#define ODRX_ABSTRACT
OdResult
Definition: OdResult.h:29
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual OdString getName() const
virtual void setDescription(const OdString &description)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
bool isViewNameValid(const OdString &name) const
virtual void setName(const OdString &name)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdResult setDispayName(const OdString &name)
bool canRename() const
virtual OdString description() const
virtual void setDatabaseDefaults(OdDbDatabase *pDb)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual ~OdDbModelDocViewStyle()=0
bool isModifiedForRecompute() const
OdResult setCanRename(bool canRename)
virtual OdDbObjectId postViewStyleToDb(OdDbDatabase *pDb, const OdString &styleName)=0
ODDB_DECLARE_MEMBERS(OdDbModelDocViewStyle)
OdString getDisplayName() const
‍**
OdString defaultViewName(int index) const
GLuint index
Definition: gles2_ext.h:265
GLuint const GLchar * name
Definition: gles2_ext.h:265