CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #ifndef DBLAYERSTATEMANAGER_H
25 #define DBLAYERSTATEMANAGER_H
41 kDefMask = (long)0xFFFFFFFF,
47 kNewViewport = 0x0010,
52 kCurrentViewport = 0x0200,
55 kAll = kOn | kFrozen | kLocked | kPlot | kNewViewport |
56 kColor | kLineType | kLineWeight | kPlotStyle |
61 kLastRestored = 0x10000
67 kUndefDoNothing = 0x00,
70 kRestoreAsOverrides = 0x04
341 int includedLayersState = kOn,
int otherLayersState =
kNone);
345 class OdDbLayerStateManagerImpl;
366 kNewViewport = 0x0010,
369 kLineWeight = 0x0080,
371 kCurrentViewport = 0x0200,
373 kAll = kOn | kFrozen | kLocked | kPlot | kNewViewport |
374 kColor | kLineType | kLineWeight | kPlotStyle |
376 kStateIsHidden = 0x8000,
377 kLastRestored = 0x10000,
378 kDecomposition = kAll | 0x20000
385 kRestoreAsOverrides = 4
418 friend class OdDbLayerStateManagerImpl;
580 #endif //#ifndef DBLAYERSTATEMANAGER_H
static OdResult addLayerStateLayers(const OdString &sName, OdDbObjectIdArray layerIds)
virtual OdResult setActiveLayer(const OdString &layerStateName)=0
virtual OdResult setLineColor(const OdString &layerName, const OdCmColor &color)=0
ODRX_DECLARE_MEMBERS(OdDbLayerStateManagerReactor)
bool addReactor(OdDbLayerStateManagerReactor *pReactor)
OdResult getLayerStateMask(const OdString &sName, LayerStateMask &returnMask)
virtual void abortLayerStateRename(const OdString &oldLayerStateName, const OdString &newLayerStateName)
OdResult importLayerStateFromDb(const OdString &pStateName, OdDbDatabase *pDb)
virtual void layerStateDeleted(const OdString &layerStateName)
OdResult getLayerStateLayers(OdStringArray &layerArray, const OdString &sName, bool bInvert=false)
OdDbDatabase * getDatabase() const
OdResult exportLayerState(const OdString &sNameToExport, OdStreamBuf *pStreamBuf)
virtual OdResult setTransparency(const OdString &layerName, const OdCmTransparency &transparency)=0
virtual ~OdDbLegacyLayerStateImporter()
OdDbLegacyLayerStateImporter(OdDbDatabasePtr pDb)
virtual void layerStateCreated(const OdString &layerStateName, const OdDbObjectId &layerStateId)
static void exportData(OdDbDatabase *pDb, const OdString &layerStateName, OdStreamBuf *pStreamBuf)
virtual void abortLayerStateDelete(const OdString &layerStateName, const OdDbObjectId &layerStateId)
static void setDescription(OdDbDatabase *pDb, const OdString &layerStateName, const OdString &description)
virtual bool isFreezed(const OdString &layerName, OdDbObjectId id=NULL) const =0
virtual void layerStateRenamed(const OdString &oldLayerStateName, const OdString &newLayerStateName)
virtual void abortLayerStateRestore(const OdString &layerStateName, const OdDbObjectId &layerStateId)
static void setMask(OdDbDatabase *pDb, const OdString &layerStateName, int layerStateMask)
bool removeReactor(OdDbLayerStateManagerReactor *pReactor)
virtual OdDb::LineWeight getLineWeight(const OdString &layerName) const =0
virtual bool isOn(const OdString &layerName) const =0
virtual void layerStateToBeRenamed(const OdString &oldLayerStateName, const OdString &newLayerStateName)
bool hasLayerState(const OdString &sName)
OdResult setLayerStateMask(const OdString &sName, LayerStateMask mask)
virtual OdString getLayerStateName() const =0
virtual OdDbObjectId getLineType(const OdString &layerName) const =0
@ kNone
Light mode is inherited from the annotation.
OdResult importLegacyLayerStates()
virtual void layerStateRestored(const OdString &layerStateName, const OdDbObjectId &layerStateId)
OdDbObjectId layerStatesDictionaryId(bool bCreateIfNotPresent=false)
OdResult getLayerStateNames(OdStringArray &lsArray, bool bIncludeHidden=true, bool bIncludeXref=true)
TOOLKIT_EXPORT OdDbLayerStateProperties * fxGetLayerStateProperties(OdDbDatabase *pDb, const OdString &layerState)
virtual OdString getPlotStyle(const OdString &layerName) const =0
OdResult removeLayerStateLayers(const OdString &sName, const OdStringArray &layerNames)
static OdResult saveGroup(OdDbDatabase *pDb, const OdString &sName, const OdDbObjectIdArray &pLayers, int mask=kOn, int includedLayersState=kOn, int otherLayersState=kNone)
virtual OdResult setLineWeight(const OdString &layerName, const OdDb::LineWeight &lweight)=0
virtual bool isPlotable(const OdString &layerName) const =0
static bool has(OdDbDatabase *pDb, const OdString &layerStateName)
virtual OdString getActiveLayer() const =0
virtual OdDbDatabase * database() const =0
bool isDependentLayerState(const OdString &sName)
virtual void layerStateToBeDeleted(const OdString &layerStateName, const OdDbObjectId &layerStateId)
virtual OdResult setPlotStyle(const OdString &layerName, const OdString &plotStyle)=0
static OdDbObjectId dictionaryId(OdDbDatabase *pDb, bool createIfNotFound=false)
static TOOLKIT_EXPORT_STATIC const OdDbObjectId kNull
OdResult deleteLayerState(const OdString &sName)
virtual OdResult setPlotable(const OdString &layerName, const bool &bPlot)=0
bool hasLegacyLayerStates()
OdResult setLayerStateDescription(const OdString &sName, const OdString &sDesc)
OdResult saveLayerState(const OdString &sName, LayerStateMask mask)
virtual OdResult setNewVPFreeze(const OdString &layerName, const bool &bNewVPFreeze)=0
virtual OdCmColor getLineColor(const OdString &layerName) const =0
virtual ~OdDbLayerStateProperties()
OdResult saveLayerState(const OdString &sName, LayerStateMask mask, const OdDbObjectId &idVp)
static int mask(OdDbDatabase *pDb, const OdString &layerStateName)
virtual OdCmTransparency getTransparency(const OdString &layerName) const =0
static bool hasViewportData(OdDbDatabase *pDb, const OdString &layerStateName)
bool layerStateHasViewportData(const OdString &sName)
virtual void layerStateCompareFailed(const OdString &layerStateName, const OdDbObjectId &layerStateId)
OdResult restoreLayerState(const OdString &sName)
OdSmartPtr< OdDbLayerStateManagerReactor > OdDbLayerStateManagerReactorPtr
static void save(OdDbDatabase *pDb, const OdString &layerStateName, int layerStateMask, const OdDbObjectId &viewportId=OdDbObjectId::kNull)
bool compareLayerStateToDb(const OdString &sName, const OdDbObjectId &idVp)
static ImportResult importData(OdDbDatabase *pDb, OdStreamBuf *pStreamBuf, OdString *pName=0)
OdDbLayerStateManagerImpl * m_pImpl
OdResult importLayerState(OdStreamBuf *pStreamBuf)
static OdString description(OdDbDatabase *pDb, const OdString &layerStateName)
virtual bool isLocked(const OdString &layerName) const =0
virtual OdResult setLocked(const OdString &layerName, const bool &bLock)=0
OdResult addLayerStateLayers(const OdString &sName, const OdDbObjectIdArray &layerIds)
static void rename(OdDbDatabase *pDb, const OdString &oldName, const OdString &newName)
virtual OdResult setOn(const OdString &layerName, const bool &bOn)=0
virtual bool isNewVPFreeze(const OdString &layerName) const =0
OdResult renameLayerState(const OdString &sName, const OdString &sNewName)
virtual OdResult setLineType(const OdString &layerName, const OdDbObjectId <ype)=0
OdDbLayerStateManager(OdDbLayerStateManagerImpl *)
virtual OdResult setFreeze(const OdString &layerName, const bool &bFreeze, OdDbObjectId id=NULL)=0
OdDbLayerStateProperties()
static void remove(OdDbDatabase *pDb, const OdString &layerStateName)
OdResult importLayerState(OdStreamBuf *pStreamBuf, OdString &sName)
static void restore(OdDbDatabase *pDb, const OdString &layerStateName, int flags=kUndefDoNothing, const int layerStateMask=kDefMask, const OdDbObjectId &viewportId=OdDbObjectId::kNull)
OdResult getLastRestoredLayerState(OdString &sName, OdDbObjectId &restoredLSId)
virtual void layerStateToBeRestored(const OdString &layerStateName, const OdDbObjectId &layerStateId)
OdResult restoreLayerState(const OdString &sName, const OdDbObjectId &idVp, int nRestoreFlags=0, const LayerStateMask *pClientMask=NULL)
OdResult getLayerStateDescription(const OdString &sName, OdString &sDesc)
static OdResult removeLayerStateLayers(OdDbDatabase *pDb, const OdString sName, const OdStringArray &layerNames)
ODRX_DECLARE_MEMBERS(OdDbLayerStateManager)