CFx SDK Documentation  2020SP3
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
OdDbAbstractViewportData::setGridBoundToLimits
virtual void setGridBoundToLimits(OdRxObject *pViewport, bool gridDispFlag) const =0
OdDbAbstractViewportData::isGridBoundToLimits
virtual bool isGridBoundToLimits(const OdRxObject *pViewport) const =0
OdResult
OdResult
Definition: OdResult.h:29
AbstractViewPE.h
OdDbObject::downgradeOpen
void downgradeOpen()
NULL
#define NULL
Definition: GsProperties.h:177
OdDbAbstractViewportData::setUcs
virtual void setUcs(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
OdDbAbstractViewportData::setCircleSides
virtual void setCircleSides(OdRxObject *pViewport, OdUInt16 circleSides) const =0
OdDbAbstractViewportData::setGridAdaptive
virtual void setGridAdaptive(OdRxObject *pViewport, bool gridDispFlag) const =0
OdDbAbstractViewportData::snapBase
virtual OdGePoint2d snapBase(const OdRxObject *pViewport) const =0
OdGsView
Definition: Gs.h:133
OdDbAbstractViewportData::setGridMajor
virtual void setGridMajor(OdRxObject *pViewport, OdInt16 nMajor) const =0
OdDbAbstractViewportData::setSun
virtual OdDbStub * setSun(OdRxObject *pViewport, OdRxObject *pSun) const =0
OdDbAbstractViewportData::isUcsIconAtOrigin
virtual bool isUcsIconAtOrigin(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setUcsFollowModeOn
virtual void setUcsFollowModeOn(OdRxObject *pViewport, bool ucsFollowMode) const =0
OdDbAbstractViewportData::navvcubedisplay
virtual int navvcubedisplay(const OdRxObject *pViewport) const
OdRxObject
Definition: RxObject.h:564
OdDbAbstractViewportData::toneOperatorParameters
virtual void toneOperatorParameters(const OdRxObject *pViewport, OdGiToneOperatorParameters &params) const =0
OdDbAbstractViewportData::TD_USING
TD_USING(OdAbstractViewPE::setUcs)
OdDbAbstractViewportData::snapIsoPair
virtual OdUInt16 snapIsoPair(const OdRxObject *pViewport) const =0
SavePeWriteEnabler
Definition: DbAbstractViewportData.h:446
OdDbAbstractViewportData::gsView
virtual OdGsView * gsView(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setSnapOn
virtual void setSnapOn(OdRxObject *pViewport, bool snapOn) const =0
OdDbObject::upgradeOpen
void upgradeOpen()
OdDbAbstractViewportData::setGridSubdivisionRestricted
virtual void setGridSubdivisionRestricted(OdRxObject *pViewport, bool gridDispFlag) const =0
OdUInt16
unsigned short OdUInt16
Definition: OdPlatformSettings.h:760
OdInt16
short OdInt16
Definition: OdPlatformSettings.h:756
OdDbAbstractViewportData::isGridSubdivisionRestricted
virtual bool isGridSubdivisionRestricted(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::isUcsSavedWithViewport
virtual bool isUcsSavedWithViewport(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setGridFollow
virtual void setGridFollow(OdRxObject *pViewport, bool gridDispFlag) const =0
OdDbAbstractViewportData::isSnapOn
virtual bool isSnapOn(const OdRxObject *pViewport) const =0
SavePeWriteEnabler::SavePeWriteEnabler
SavePeWriteEnabler(OdRxObject *pRxObj)
Definition: DbAbstractViewportData.h:449
OdSmartPtr
Definition: SmartPtr.h:58
OdDbAbstractViewportData::setUcsIconAtOrigin
virtual void setUcsIconAtOrigin(OdRxObject *pViewport, bool atOrigin) const =0
OdDbAbstractViewportData::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdDbAbstractViewportData)
OdDbAbstractViewportData::snapAngle
virtual double snapAngle(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::gridIncrement
virtual OdGeVector2d gridIncrement(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setView
virtual void setView(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
OdDbAbstractViewportData
Definition: DbAbstractViewportData.h:49
OdSmartPtr::get
const T * get() const
Definition: SmartPtr.h:326
OdDbAbstractViewportData::hasViewOffset
virtual bool hasViewOffset(const OdRxObject *pViewport) const
OdDbAbstractViewportData::isGridOn
virtual bool isGridOn(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setUcsPerViewport
virtual void setUcsPerViewport(OdRxObject *pViewport, bool ucsPerViewport) const =0
OdDbAbstractViewportData::isUcsFollowModeOn
virtual bool isUcsFollowModeOn(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::isGridAdaptive
virtual bool isGridAdaptive(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setSnapAngle
virtual void setSnapAngle(OdRxObject *pViewport, double snapAngle) const =0
OdDbAbstractViewportData::gridMajor
virtual OdInt16 gridMajor(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::snapIncrement
virtual OdGeVector2d snapIncrement(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setGridIncrement
virtual void setGridIncrement(OdRxObject *pViewport, const OdGeVector2d &gridIncrement) const =0
OdGeVector2d
Definition: GeVector2d.h:51
OdDbAbstractViewportData::setProps
virtual void setProps(OdRxObject *pViewport, const OdRxObject *pSourceView) const
OdDbAbstractViewportData::isUcsIconVisible
virtual bool isUcsIconVisible(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::isGridFollow
virtual bool isGridFollow(const OdRxObject *pViewport) const =0
OdDbAbstractViewportDataPtr
OdSmartPtr< OdDbAbstractViewportData > OdDbAbstractViewportDataPtr
Definition: DbAbstractViewportData.h:441
OdDbAbstractViewportData::setContrast
virtual void setContrast(OdRxObject *pViewport, double contrast) const =0
OdGiToneOperatorParameters
Definition: GiViewportTraits.h:40
params
GLenum GLint * params
Definition: gles2_ext.h:184
OdDbAbstractViewportData::compatibleCopyObject
virtual OdDbStub * compatibleCopyObject(const OdRxObject *pViewport, OdDbStub *pCopyObject) const
OdDbAbstractViewportData::setGridOn
virtual void setGridOn(OdRxObject *pViewport, bool gridOn) const =0
OdDbAbstractViewportData::setSnapIncrement
virtual void setSnapIncrement(OdRxObject *pViewport, const OdGeVector2d &snapIncrement) const =0
OdAbstractViewPE::setView
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
OdRxObject::cast
static OdRxObjectPtr cast(const OdRxObject *pointer)
Definition: RxObject.h:640
OdDbAbstractViewportData::applyPlotSettings
virtual bool applyPlotSettings(OdRxObject *pDestinationView, const OdRxObject *pSourceView) const
OdDbAbstractViewportData::ambientLightColor
virtual OdCmColor ambientLightColor(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::circleSides
virtual OdUInt16 circleSides(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setAmbientLightColor
virtual void setAmbientLightColor(OdRxObject *pViewport, const OdCmColor &color) const =0
OdAbstractViewPE
Definition: AbstractViewPE.h:57
OdDbAbstractViewportData::setSnapIsoPair
virtual void setSnapIsoPair(OdRxObject *pViewport, OdUInt16 snapIsoPair) const =0
OdDbAbstractViewportData::TD_USING
TD_USING(OdAbstractViewPE::setView)
SavePeWriteEnabler::~SavePeWriteEnabler
~SavePeWriteEnabler()
Definition: DbAbstractViewportData.h:458
OdAbstractViewPE::setUcs
virtual bool setUcs(OdRxObject *pViewport, OdDb::OrthographicView orthoUcs, const OdDbBaseDatabase *pDb=0) const
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbAbstractViewportData::setNavvcubedisplay
virtual OdResult setNavvcubedisplay(OdRxObject *pViewport, int nVal) const
OdDbAbstractViewportData::setBrightness
virtual void setBrightness(OdRxObject *pViewport, double brightness) const =0
OdDbAbstractViewportData::sunId
virtual OdDbStub * sunId(const OdRxObject *pViewport) const =0
OdCmColor
Definition: CmColor.h:59
OdDbAbstractViewportData::contrast
virtual double contrast(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setSnapIsometric
virtual void setSnapIsometric(OdRxObject *pViewport, bool snapIsometric) const =0
OdDbAbstractViewportData::setSnapBase
virtual void setSnapBase(OdRxObject *pViewport, const OdGePoint2d &snapBase) const =0
OdDbAbstractViewportData::brightness
virtual double brightness(const OdRxObject *pViewport) const =0
OdDbAbstractViewportData::setGsView
virtual void setGsView(OdRxObject *pViewport, OdGsView *pGsView) const =0
OdDbAbstractViewportData::setToneOperatorParameters
virtual void setToneOperatorParameters(OdRxObject *pViewport, const OdGiToneOperatorParameters &params) const =0
OdDbObject::isWriteEnabled
bool isWriteEnabled() const
OdGePoint2d
Definition: GePoint2d.h:60
OdDbAbstractViewportData::setUcsIconVisible
virtual void setUcsIconVisible(OdRxObject *pViewport, bool iconVisible) const =0
OdDbAbstractViewportData::isSnapIsometric
virtual bool isSnapIsometric(const OdRxObject *pViewport) const =0