CFx SDK Documentation  2023 SP0
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 
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdGsPaperLayoutHelper > OdGsPaperLayoutHelperPtr
Definition: DbGsManager.h:131
OdSmartPtr< OdGsModelLayoutHelper > OdGsModelLayoutHelperPtr
Definition: DbGsManager.h:145
OdSmartPtr< OdGsLayoutHelper > OdGsLayoutHelperPtr
Definition: DbGsManager.h:111
#define ODCOLORREF
Definition: OdPlatform.h:883
#define ODRGBA(r, g, b, a)
Definition: OdPlatform.h:885
unsigned int OdUInt32
virtual bool supportLayoutGsStateSaving() const =0
virtual bool storeLayoutGsState(OdStreamBuf *pStream, OdUInt32 nFlags=0) const =0
virtual bool setActiveViewport(const OdDbObjectId &id)=0
virtual void restoreGsViewDbLinkState()=0
virtual bool restoreLayoutGsState(OdStreamBuf *pStream, OdUInt32 nFlags=0)=0
static bool extractLayoutIdForGsState(OdStreamBuf *pStream, OdDbDatabase *pDb, OdDbObjectId &layoutObjId, OdUInt32 nFlags=0)
virtual bool setActiveViewport(const OdGePoint2d &screenPt)=0
virtual OdGsModel * gsModel()=0
virtual OdGsDevicePtr underlyingDevice() const =0
virtual void makeViewActive(OdGsView *pView)=0
virtual OdGsViewPtr activeView() const =0
ODRX_DECLARE_MEMBERS(OdGsLayoutHelper)
virtual OdDbObjectId layoutId() const =0
ODRX_DECLARE_MEMBERS(OdGsModelLayoutHelper)
virtual OdGsViewPtr overallView() const =0
virtual void makeViewOverall(OdGsView *pView)=0
virtual OdGsViewPtr insertViewport(int viewIndex, const OdDbViewport *pVp)
ODRX_DECLARE_MEMBERS(OdGsPaperLayoutHelper)
virtual void initGsView(OdGsView *pView, const OdDbViewport *pVp)=0
virtual OdGsViewPtr addViewport(const OdDbViewport *pVp)
Definition: Gs.h:133
TOOLKIT_EXPORT OdGsLayoutHelperPtr setupLayoutViews(OdDbObjectId layoutId, OdGsDevice *pDevice, OdGiContextForDbDatabase *pGiCtx)
TOOLKIT_EXPORT void setupPalette(OdGsDevice *device, OdGiContextForDbDatabase *giContext, OdDbStub *layoutId=0, ODCOLORREF palBackground=ODRGBA(0, 0, 0, 0))
TOOLKIT_EXPORT OdGsLayoutHelperPtr setupActiveLayoutViews(OdGsDevice *pDevice, OdGiContextForDbDatabase *pGiCtx)