CFx SDK Documentation  2020SP3
DbGsManager.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 __DBGSMANAGER_H_INCLUDED_
25 #define __DBGSMANAGER_H_INCLUDED_
26 
27 class OdDbObjectId;
28 class OdDbViewport;
29 class OdDbDatabase;
31 
32 #include "Gs/Gs.h"
33 #include "DbExport.h"
34 
35 #include "TD_PackPush.h"
36 
42 {
43 public:
48  virtual OdDbObjectId layoutId() const = 0;
52  virtual OdGsViewPtr activeView() const = 0;
57  virtual void makeViewActive(OdGsView* pView) = 0;
61  virtual OdGsModel* gsModel() = 0;
62 
66  virtual OdGsDevicePtr underlyingDevice() const = 0;
67 
72  virtual bool setActiveViewport(const OdGePoint2d& screenPt) = 0;
73 
77  virtual bool setActiveViewport(const OdDbObjectId& id) = 0;
78 
82  virtual void restoreGsViewDbLinkState() = 0;
83 
87  virtual bool supportLayoutGsStateSaving() const = 0;
93  virtual bool storeLayoutGsState(OdStreamBuf* pStream, OdUInt32 nFlags = 0) const = 0;
101  static bool extractLayoutIdForGsState(OdStreamBuf* pStream, OdDbDatabase *pDb, OdDbObjectId &layoutObjId, OdUInt32 nFlags = 0);
108  virtual bool restoreLayoutGsState(OdStreamBuf* pStream, OdUInt32 nFlags = 0) = 0;
109 };
110 
112 
113 
119 {
120 public:
122 
123  virtual OdGsViewPtr overallView() const = 0;
124  virtual void makeViewOverall(OdGsView* pView) = 0;
125  virtual void initGsView(OdGsView* pView, const OdDbViewport* pVp) = 0;
126 
127  virtual OdGsViewPtr addViewport(const OdDbViewport* pVp);
128  virtual OdGsViewPtr insertViewport(int viewIndex, const OdDbViewport* pVp);
129 };
130 
132 
133 
140 {
141 public:
143 };
144 
146 
147 
152 namespace OdDbGsManager
153 {
159  OdGiContextForDbDatabase* pGiCtx);
160 
166  OdGiContextForDbDatabase* pGiCtx);
167 
172  OdDbStub* layoutId = 0, ODCOLORREF palBackground = ODRGBA(0,0,0,0));
173 }
174 
175 #include "TD_PackPop.h"
176 
177 #endif // __DBGSMANAGER_H_INCLUDED_
178 
OdGsPaperLayoutHelper::initGsView
virtual void initGsView(OdGsView *pView, const OdDbViewport *pVp)=0
DbExport.h
OdDbDatabase
Definition: DbDatabase.h:421
OdGsModelLayoutHelperPtr
OdSmartPtr< OdGsModelLayoutHelper > OdGsModelLayoutHelperPtr
Definition: DbGsManager.h:145
OdGsLayoutHelper::extractLayoutIdForGsState
static bool extractLayoutIdForGsState(OdStreamBuf *pStream, OdDbDatabase *pDb, OdDbObjectId &layoutObjId, OdUInt32 nFlags=0)
OdGsView
Definition: Gs.h:133
OdGsPaperLayoutHelper::addViewport
virtual OdGsViewPtr addViewport(const OdDbViewport *pVp)
OdDbGsManager
Definition: DbGsManager.h:153
OdGsLayoutHelper::setActiveViewport
virtual bool setActiveViewport(const OdGePoint2d &screenPt)=0
OdDbGsManager::setupActiveLayoutViews
TOOLKIT_EXPORT OdGsLayoutHelperPtr setupActiveLayoutViews(OdGsDevice *pDevice, OdGiContextForDbDatabase *pGiCtx)
OdDbGsManager::setupLayoutViews
TOOLKIT_EXPORT OdGsLayoutHelperPtr setupLayoutViews(OdDbObjectId layoutId, OdGsDevice *pDevice, OdGiContextForDbDatabase *pGiCtx)
OdGsModelLayoutHelper::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGsModelLayoutHelper)
OdGsLayoutHelper::storeLayoutGsState
virtual bool storeLayoutGsState(OdStreamBuf *pStream, OdUInt32 nFlags=0) const =0
OdGsLayoutHelper::layoutId
virtual OdDbObjectId layoutId() const =0
OdDbObjectId
Definition: DbObjectId.h:99
OdGsLayoutHelper
Definition: DbGsManager.h:42
OdGsDevice
Definition: Gs.h:1061
OdGsModelLayoutHelper
Definition: DbGsManager.h:140
TD_PackPop.h
OdGsLayoutHelperPtr
OdSmartPtr< OdGsLayoutHelper > OdGsLayoutHelperPtr
Definition: DbGsManager.h:111
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGsLayoutHelper::supportLayoutGsStateSaving
virtual bool supportLayoutGsStateSaving() const =0
OdGsLayoutHelper::underlyingDevice
virtual OdGsDevicePtr underlyingDevice() const =0
OdGsLayoutHelper::activeView
virtual OdGsViewPtr activeView() const =0
OdGsLayoutHelper::restoreGsViewDbLinkState
virtual void restoreGsViewDbLinkState()=0
OdSmartPtr
Definition: SmartPtr.h:58
OdGsPaperLayoutHelper::makeViewOverall
virtual void makeViewOverall(OdGsView *pView)=0
OdGsLayoutHelper::makeViewActive
virtual void makeViewActive(OdGsView *pView)=0
Gs.h
OdGsPaperLayoutHelperPtr
OdSmartPtr< OdGsPaperLayoutHelper > OdGsPaperLayoutHelperPtr
Definition: DbGsManager.h:131
OdDbViewport
Definition: DbViewport.h:49
OdDbGsManager::setupPalette
TOOLKIT_EXPORT void setupPalette(OdGsDevice *device, OdGiContextForDbDatabase *giContext, OdDbStub *layoutId=0, ODCOLORREF palBackground=ODRGBA(0, 0, 0, 0))
TD_PackPush.h
OdGsPaperLayoutHelper
Definition: DbGsManager.h:119
OdGsPaperLayoutHelper::insertViewport
virtual OdGsViewPtr insertViewport(int viewIndex, const OdDbViewport *pVp)
OdGiContextForDbDatabase
Definition: GiContextForDbDatabase.h:52
OdStreamBuf
Definition: OdStreamBuf.h:67
ODRGBA
#define ODRGBA(r, g, b, a)
Definition: OdPlatform.h:885
ODCOLORREF
#define ODCOLORREF
Definition: OdPlatform.h:883
OdGsPaperLayoutHelper::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGsPaperLayoutHelper)
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdGsLayoutHelper::setActiveViewport
virtual bool setActiveViewport(const OdDbObjectId &id)=0
OdGsPaperLayoutHelper::overallView
virtual OdGsViewPtr overallView() const =0
OdGsLayoutHelper::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGsLayoutHelper)
OdGsModel
Definition: GsModel.h:77
OdGsLayoutHelper::restoreLayoutGsState
virtual bool restoreLayoutGsState(OdStreamBuf *pStream, OdUInt32 nFlags=0)=0
OdGsLayoutHelper::gsModel
virtual OdGsModel * gsModel()=0
OdGePoint2d
Definition: GePoint2d.h:60