CFx SDK Documentation  2023 SP0
DbAbstractViewportData.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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_DBABSTRACTVIEWPORTDATA_H
25 #define OD_DBABSTRACTVIEWPORTDATA_H
26 
27 #include "AbstractViewPE.h"
28 
29 class OdGsView;
30 
49 {
50 public:
52 
58  virtual void setProps(OdRxObject* pViewport, const OdRxObject* pSourceView) const;
59 
60  // OdAbstractViewPE-inherited methods
61 
68  virtual void setUcs(OdRxObject* pDestinationView, const OdRxObject* pSourceView) const;
73  virtual bool hasViewOffset(const OdRxObject* pViewport) const;
80  virtual bool applyPlotSettings(OdRxObject* pDestinationView, const OdRxObject* pSourceView) const;
81 
88  virtual OdDbStub* compatibleCopyObject(const OdRxObject* pViewport, OdDbStub* pCopyObject) const;
89 
90  //
91 
98  virtual bool isUcsSavedWithViewport(const OdRxObject* pViewport) const = 0;
99 
107  virtual void setUcsPerViewport( OdRxObject* pViewport, bool ucsPerViewport) const = 0;
108 
114  virtual bool isUcsFollowModeOn(const OdRxObject* pViewport) const = 0;
115 
122  virtual void setUcsFollowModeOn(OdRxObject* pViewport, bool ucsFollowMode) const = 0;
123 
129  virtual OdUInt16 circleSides(const OdRxObject* pViewport) const = 0;
135  virtual void setCircleSides(OdRxObject* pViewport, OdUInt16 circleSides) const = 0;
136 
141  virtual bool isGridOn(const OdRxObject* pViewport) const = 0;
147  virtual void setGridOn(OdRxObject* pViewport, bool gridOn) const = 0;
148 
153  virtual OdGeVector2d gridIncrement(const OdRxObject* pViewport) const = 0;
159  virtual void setGridIncrement(OdRxObject* pViewport, const OdGeVector2d& gridIncrement) const = 0;
160 
165  virtual bool isGridBoundToLimits(const OdRxObject* pViewport) const = 0;
171  virtual void setGridBoundToLimits(OdRxObject* pViewport, bool gridDispFlag) const = 0;
172 
177  virtual bool isGridAdaptive(const OdRxObject* pViewport) const = 0;
183  virtual void setGridAdaptive(OdRxObject* pViewport, bool gridDispFlag) const = 0;
184 
189  virtual bool isGridSubdivisionRestricted(const OdRxObject* pViewport) const = 0;
195  virtual void setGridSubdivisionRestricted(OdRxObject* pViewport, bool gridDispFlag) const = 0;
196 
201  virtual bool isGridFollow(const OdRxObject* pViewport) const = 0;
207  virtual void setGridFollow(OdRxObject* pViewport, bool gridDispFlag) const = 0;
208 
213  virtual OdInt16 gridMajor(const OdRxObject* pViewport) const = 0;
219  virtual void setGridMajor(OdRxObject* pViewport, OdInt16 nMajor) const = 0;
220 
225  virtual bool isUcsIconVisible(const OdRxObject* pViewport) const = 0;
232  virtual void setUcsIconVisible(OdRxObject* pViewport, bool iconVisible) const = 0;
233 
238  virtual bool isUcsIconAtOrigin(const OdRxObject* pViewport) const = 0;
249  virtual void setUcsIconAtOrigin(OdRxObject* pViewport, bool atOrigin) const = 0;
250 
255  virtual bool isSnapOn(const OdRxObject* pViewport) const = 0;
261  virtual void setSnapOn(OdRxObject* pViewport, bool snapOn) const = 0;
262 
267  virtual bool isSnapIsometric(const OdRxObject* pViewport) const = 0;
273  virtual void setSnapIsometric(OdRxObject* pViewport, bool snapIsometric) const = 0;
274 
279  virtual double snapAngle(const OdRxObject* pViewport) const = 0;
286  virtual void setSnapAngle(OdRxObject* pViewport, double snapAngle) const = 0;
287 
292  virtual OdGePoint2d snapBase(const OdRxObject* pViewport) const = 0;
298  virtual void setSnapBase(OdRxObject* pViewport, const OdGePoint2d& snapBase) const = 0;
299 
304  virtual OdGeVector2d snapIncrement(const OdRxObject* pViewport) const = 0;
310  virtual void setSnapIncrement(OdRxObject* pViewport, const OdGeVector2d& snapIncrement) const = 0;
311 
326  virtual OdUInt16 snapIsoPair(const OdRxObject* pViewport) const = 0;
341  virtual void setSnapIsoPair(OdRxObject* pViewport, OdUInt16 snapIsoPair) const = 0;
342 
347  virtual double brightness(const OdRxObject* pViewport) const = 0;
353  virtual void setBrightness(OdRxObject* pViewport, double brightness) const = 0;
354 
359  virtual double contrast(const OdRxObject* pViewport) const = 0;
365  virtual void setContrast(OdRxObject* pViewport, double contrast) const = 0;
366 
371  virtual OdCmColor ambientLightColor(const OdRxObject* pViewport) const = 0;
377  virtual void setAmbientLightColor(OdRxObject* pViewport, const OdCmColor& color) const = 0;
378 
383  virtual OdDbStub *sunId(const OdRxObject* pViewport) const = 0;
389  virtual OdDbStub *setSun(OdRxObject* pViewport, OdRxObject* pSun) const = 0;
390 
396  virtual void toneOperatorParameters(const OdRxObject* pViewport, OdGiToneOperatorParameters &params) const = 0;
402  virtual void setToneOperatorParameters(OdRxObject* pViewport, const OdGiToneOperatorParameters &params) const = 0;
403 
408  virtual OdGsView* gsView(const OdRxObject* pViewport) const = 0;
409 
415  virtual void setGsView(OdRxObject* pViewport, OdGsView* pGsView) const = 0;
416 
421  virtual int navvcubedisplay(const OdRxObject* pViewport) const;
427  virtual OdResult setNavvcubedisplay(OdRxObject* pViewport, int nVal) const;
428 
435  virtual void setView(OdRxObject* pDestinationView, const OdRxObject* pSourceView) const;
436 };
437 
442 
443 
444 /* { Secret } */
446 {
447  OdDbObjectPtr m_pObj;
448 public:
450  {
451  if ((m_pObj = OdDbObject::cast(pRxObj)).isNull())
452  return;
453  if (m_pObj->isWriteEnabled())
454  m_pObj = NULL;
455  else
456  m_pObj->upgradeOpen(); // standard way for set method impl of PE
457  }
459  {
460  if (m_pObj.get())
461  m_pObj->downgradeOpen();
462  }
463 };
464 
465 #endif //#ifndef OD_DBABSTRACTVIEWPORTDATA_H
OdSmartPtr< OdDbAbstractViewportData > OdDbAbstractViewportDataPtr
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
#define NULL
Definition: GsProperties.h:177
short OdInt16
unsigned short OdUInt16
OdResult
Definition: OdResult.h:29
virtual bool setUcs(OdRxObject *pViewport, OdDb::OrthographicView orthoUcs, const OdDbBaseDatabase *pDb=0) const
virtual void setView(OdRxObject *pViewport, const OdGePoint3d &target, const OdGeVector3d &direction, const OdGeVector3d &upVector, double fieldWidth, double fieldHeight, bool isPerspective, const OdGeVector2d &viewOffset=OdGeVector2d::kIdentity) const =0
virtual bool isGridFollow(const OdRxObject *pViewport) const =0
virtual void setSnapIsoPair(OdRxObject *pViewport, OdUInt16 snapIsoPair) const =0
virtual double brightness(const OdRxObject *pViewport) const =0
virtual int navvcubedisplay(const OdRxObject *pViewport) const
virtual void setGridBoundToLimits(OdRxObject *pViewport, bool gridDispFlag) const =0
virtual void setGridSubdivisionRestricted(OdRxObject *pViewport, bool gridDispFlag) const =0
virtual void setUcsIconVisible(OdRxObject *pViewport, bool iconVisible) const =0
virtual void setGridIncrement(OdRxObject *pViewport, const OdGeVector2d &gridIncrement) const =0
virtual void setGridOn(OdRxObject *pViewport, bool gridOn) const =0
virtual double contrast(const OdRxObject *pViewport) const =0
virtual OdDbStub * setSun(OdRxObject *pViewport, OdRxObject *pSun) const =0
virtual OdUInt16 snapIsoPair(const OdRxObject *pViewport) const =0
virtual void setProps(OdRxObject *pViewport, const OdRxObject *pSourceView) const
virtual OdCmColor ambientLightColor(const OdRxObject *pViewport) const =0
virtual OdGeVector2d gridIncrement(const OdRxObject *pViewport) const =0
virtual void setUcs(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
virtual OdUInt16 circleSides(const OdRxObject *pViewport) const =0
virtual double snapAngle(const OdRxObject *pViewport) const =0
virtual void setSnapBase(OdRxObject *pViewport, const OdGePoint2d &snapBase) const =0
virtual bool isUcsSavedWithViewport(const OdRxObject *pViewport) const =0
virtual void setGridMajor(OdRxObject *pViewport, OdInt16 nMajor) const =0
virtual bool isUcsFollowModeOn(const OdRxObject *pViewport) const =0
virtual void toneOperatorParameters(const OdRxObject *pViewport, OdGiToneOperatorParameters &params) const =0
virtual OdDbStub * compatibleCopyObject(const OdRxObject *pViewport, OdDbStub *pCopyObject) const
virtual void setView(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
virtual void setSnapOn(OdRxObject *pViewport, bool snapOn) const =0
virtual void setGridFollow(OdRxObject *pViewport, bool gridDispFlag) const =0
virtual void setAmbientLightColor(OdRxObject *pViewport, const OdCmColor &color) const =0
virtual void setBrightness(OdRxObject *pViewport, double brightness) const =0
TD_USING(OdAbstractViewPE::setUcs)
virtual void setSnapIncrement(OdRxObject *pViewport, const OdGeVector2d &snapIncrement) const =0
virtual void setContrast(OdRxObject *pViewport, double contrast) const =0
virtual void setUcsIconAtOrigin(OdRxObject *pViewport, bool atOrigin) const =0
virtual void setUcsPerViewport(OdRxObject *pViewport, bool ucsPerViewport) const =0
ODRX_DECLARE_MEMBERS(OdDbAbstractViewportData)
virtual OdInt16 gridMajor(const OdRxObject *pViewport) const =0
virtual bool applyPlotSettings(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
virtual bool isSnapIsometric(const OdRxObject *pViewport) const =0
virtual bool hasViewOffset(const OdRxObject *pViewport) const
virtual OdGsView * gsView(const OdRxObject *pViewport) const =0
virtual void setToneOperatorParameters(OdRxObject *pViewport, const OdGiToneOperatorParameters &params) const =0
virtual bool isUcsIconVisible(const OdRxObject *pViewport) const =0
virtual void setUcsFollowModeOn(OdRxObject *pViewport, bool ucsFollowMode) const =0
virtual void setSnapIsometric(OdRxObject *pViewport, bool snapIsometric) const =0
virtual OdResult setNavvcubedisplay(OdRxObject *pViewport, int nVal) const
virtual OdGePoint2d snapBase(const OdRxObject *pViewport) const =0
virtual bool isGridBoundToLimits(const OdRxObject *pViewport) const =0
virtual OdGeVector2d snapIncrement(const OdRxObject *pViewport) const =0
virtual void setCircleSides(OdRxObject *pViewport, OdUInt16 circleSides) const =0
virtual bool isGridOn(const OdRxObject *pViewport) const =0
virtual void setSnapAngle(OdRxObject *pViewport, double snapAngle) const =0
virtual bool isUcsIconAtOrigin(const OdRxObject *pViewport) const =0
virtual void setGridAdaptive(OdRxObject *pViewport, bool gridDispFlag) const =0
virtual void setGsView(OdRxObject *pViewport, OdGsView *pGsView) const =0
virtual OdDbStub * sunId(const OdRxObject *pViewport) const =0
TD_USING(OdAbstractViewPE::setView)
virtual bool isSnapOn(const OdRxObject *pViewport) const =0
virtual bool isGridSubdivisionRestricted(const OdRxObject *pViewport) const =0
virtual bool isGridAdaptive(const OdRxObject *pViewport) const =0
void upgradeOpen()
void downgradeOpen()
bool isWriteEnabled() const
Definition: Gs.h:133
static OdRxObjectPtr cast(const OdRxObject *pointer)
Definition: RxObject.h:659
const T * get() const
Definition: SmartPtr.h:326
SavePeWriteEnabler(OdRxObject *pRxObj)
GLenum GLint * params
Definition: gles2_ext.h:184