CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GiContextForDbDatabase.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 _ODGI_CONTEXTFORDBDATABASE_INCLUDED_
25#define _ODGI_CONTEXTFORDBDATABASE_INCLUDED_
26
27#include "GiDefaultContext.h"
28#include "DbExport.h"
29#include "OdPlatform.h"
30#include "StaticRxObject.h"
31#include "DbDatabase.h"
32#include "DbDatabaseReactor.h"
33#include "Ps/PlotStyles.h"
35#include "Gi/GiLinetyper.h"
36
37#include "TD_PackPush.h"
38
40class OdGsView;
42
52{
53private:
54 enum
55 {
56 kPlotGeneration = 1,
57 kUseGsModel = 2,
58 kOdGiZeroTextNormals = 4,
59 kDisableLayoutHelperLinkReactors = 8,
60 kTTFPolyDraw = 16,
61 kTrackDbDestroy = 32,
62 kManageContextualColors = 64,
63 kKeepPSLayoutHelperView = 128,
64 kErasePSLayoutHelperView = 256,
65 kConstantModelSpaceLineweights = 512,
66 kForceDisplaySilhouettes = 1024,
67 kUseTtfTriangleCache = 2048,
68 kVpGeomCSCompatibility = 4096,
69 kLastFlag = kVpGeomCSCompatibility
70 };
71
72 OdUInt32 m_fflags;
73
74 class TOOLKIT_EXPORT DatabaseHolder : public OdStaticRxObject<OdDbDatabaseReactor>
75 {
76 public:
77 DatabaseHolder();
78 ~DatabaseHolder();
79
80 OdDbDatabase* m_pDb;
81
82 void setDatabase( bool bWasTrackDbDestroy, OdDbDatabase* pDb, bool bTrackDbDestroy );
83
84 void goodbye(const OdDbDatabase* pDb);
85 }
86 m_DbHolder;
87
88protected:
91
93
94public:
95
97
99
100 // OdGiContext overridden functions
101
102 virtual OdDbBaseDatabase* database() const;
103 virtual OdGiDrawablePtr openDrawable(OdDbStub* drawableId);
104 virtual OdUInt32 numberOfIsolines() const;
105 virtual double commonLinetypeScale() const;
107 virtual bool quickTextMode() const;
108 virtual OdUInt32 textQuality() const;
109 virtual bool useTtfTriangleCache() const;
110 virtual ImageQuality imageQuality() const;
111
122 virtual bool ttfPolyDraw() const;
124
136 void setDatabase( OdDbDatabase* pDb, bool bTrackDbDestroy = true );
137
142
148 virtual void fillGsClientViewInfo(const OdDbObjectId& vpId, OdGsClientViewInfo& viewInfo);
149
155 virtual OdDbStub* getStubByID( OdUInt64 objectId ) const;
156
157 virtual OdDbStub* getStubByMatName(OdDbBaseDatabase *pDb, const OdString& strMatName) const;
158
159 virtual OdDbStub* getStubByMaterialId(OdDbBaseDatabase *pDb, const OdUInt64& materialId) const;
160
161 virtual void getDefaultTextStyle(OdGiTextStyle& textStyle);
162
163 unsigned int circleZoomPercent(OdDbStub* viewportId) const;
164
165 virtual OdIntPtr drawableFilterFunctionId(OdDbStub* viewportId) const;
166 virtual OdUInt32 drawableFilterFunction(OdIntPtr functionId, const OdGiDrawable *pDrawable, OdUInt32 nFlags);
167
177 virtual OdUInt32 selectionStyle(OdUInt32 nStyle, OdGiSelectionStyle &selStyle) const;
178
188
197
201 bool useGsModel() const;
202
207 void enableGsModel(bool enable);
208
212 bool isPlotGeneration() const;
213
218 void setPlotGeneration(bool plotGeneration);
219
223 virtual bool isZeroTextNormals() const;
224
229 void setZeroTextNormals(bool bZeroTextNormals);
230
235
240 void disableLayoutHelperLinkReactors(bool bDisableLinkReactors);
241
246
252
257 virtual void updateContextualColors(OdGsView *pView);
258
264
269 void setTtfPolyDrawMode(bool bPolyDraw);
270
275 void setUseTtfTriangleCache(bool bUseCache);
276
281
287
292
298
303
309
314
320
324 bool fillTtf() const;
325
329 bool fillMode() const;
330
334 ODCOLORREF paletteBackground() const { return m_paletteBackground; }
339 void setPaletteBackground(ODCOLORREF paletteBackground) { m_paletteBackground = paletteBackground; }
340
346
350 virtual PStyleType plotStyleType() const;
351
357 virtual void plotStyle(int penNumber, OdPsPlotStyleData& plotStyleData) const;
358
365 virtual void plotStyle(OdDbStub* psNameId, OdPsPlotStyleData& plotStyleData) const;
366
371
375 virtual OdUInt32 antiAliasingMode() const;
376
380 virtual bool xrefPropertiesOverride() const;
381
386
392
396 virtual bool forceSortents() const { return false;}
397};
398
403
404
405#include "TD_PackPop.h"
406
407#endif //_ODGI_CONTEXTFORDBDATABASE_INCLUDED_
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdGiContextForDbDatabase > OdGiContextForDbDatabasePtr
@ kTTFPolyDraw
#define ODCOLORREF
Definition: OdPlatform.h:933
unsigned int OdUInt32
ptrdiff_t OdIntPtr
bool isContextualColorsManagementEnabled() const
virtual OdUInt32 numberOfIsolines() const
OdDbDatabase * getDatabase() const
bool isForceDisplaySilhouettesEnabled() const
ODCOLORREF paletteBackground() const
unsigned int circleZoomPercent(OdDbStub *viewportId) const
void enableConstantModelSpaceLineweights(bool bEnable)
virtual OdGiDrawablePtr openDrawable(OdDbStub *drawableId)
bool isPlotGeneration() const
virtual OdUInt32 fadingIntensityPercentage(FadingType fadingType) const
virtual OdUInt32 displaySilhouettes() const
virtual OdUInt32 textQuality() const
virtual OdDb::LineWeight defaultLineWeight() const
virtual OdDbBaseDatabase * database() const
virtual bool ttfPolyDraw() const
virtual ImageQuality imageQuality() const
void setForceDisplaySilhouettes(bool bOn)
virtual OdUInt32 imageSelectionBehavior() const
virtual bool useTtfTriangleCache() const
virtual void fillGsClientViewInfo(const OdDbObjectId &vpId, OdGsClientViewInfo &viewInfo)
void disableLayoutHelperLinkReactors(bool bDisableLinkReactors)
virtual bool forceSortents() const
void enableContextualColorsManagement(bool bEnable)
virtual bool xrefPropertiesOverride() const
virtual PStyleType plotStyleType() const
virtual CoordinatesSystem customViewportGeometryCS(CoordinatesSystem csType) const
virtual void updateContextualColors(OdGsView *pView)
bool isKeepPSLayoutHelperViewEnabled() const
virtual OdUInt32 antiAliasingMode() const
virtual OdIntPtr drawableFilterFunctionId(OdDbStub *viewportId) const
virtual OdDbStub * getStubByMatName(OdDbBaseDatabase *pDb, const OdString &strMatName) const
OdPsPlotStyleTablePtr m_pPlotStyleTable
virtual void plotStyle(int penNumber, OdPsPlotStyleData &plotStyleData) const
void loadPlotStyleTable(OdStreamBuf *pStreamBuf)
void setHatchAsPolygon(SolidHatchAsPolygonMode mode)
virtual void plotStyle(OdDbStub *psNameId, OdPsPlotStyleData &plotStyleData) const
void setErasePSLayoutHelperView(bool bOn)
ODRX_DECLARE_MEMBERS(OdGiContextForDbDatabase)
void enableKeepPSLayoutHelperView(bool bEnable)
void setZeroTextNormals(bool bZeroTextNormals)
void setViewportGeomCSCompatibility(bool bEnable)
void setPaletteBackground(ODCOLORREF paletteBackground)
void setPlotGeneration(bool plotGeneration)
void enableGsModel(bool enable)
void setDatabase(OdDbDatabase *pDb, bool bTrackDbDestroy=true)
virtual OdGiSectionGeometryManagerPtr getSectionGeometryManager()
virtual OdDbStub * getStubByMaterialId(OdDbBaseDatabase *pDb, const OdUInt64 &materialId) const
virtual bool isZeroTextNormals() const
virtual OdUInt32 drawableFilterFunction(OdIntPtr functionId, const OdGiDrawable *pDrawable, OdUInt32 nFlags)
bool erasePSLayoutHelperView() const
virtual void getDefaultTextStyle(OdGiTextStyle &textStyle)
void setTtfPolyDrawMode(bool bPolyDraw)
SolidHatchAsPolygonMode hatchAsPolygon() const
virtual bool quickTextMode() const
virtual double commonLinetypeScale() const
virtual void fillContextualColors(OdGiContextualColorsImpl *pCtxColors)
virtual OdDbStub * getStubByID(OdUInt64 objectId) const
bool isLayoutHelperLinkReactorsDisabled() const
virtual OdUInt32 selectionStyle(OdUInt32 nStyle, OdGiSelectionStyle &selStyle) const
bool isConstantModelSpaceLineweightsEnabled() const
void setUseTtfTriangleCache(bool bUseCache)
Definition: Gs.h:140
LineWeight
Definition: OdaDefs.h:386