oaDesignUndoObserverBase
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaDesignUndoObserverBase 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaDesignUndoObserverBase 当前在 oapy 中可用的 Python 接口。
详细说明
The oaDesignUndoObserver class implements an observer for actions associated with undo and redo functions。 Applications that need to receive notification of these actions should derive from this class and implement the appropriate observer functions。 See oaObserver for a general description of how callbacks are used。
构造函数
_design.oaDesignUndoObserverBase()
obj = _design.oaDesignUndoObserverBase()
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.onStartUndo(design) |
| ✅ | obj.onEndUndo(design) |
| ✅ | obj.onStartRedo(design) |
| ✅ | obj.onEndRedo(design) |
| ✅ | obj.onSetCp(design, cpID) |
| ✅ | obj.onUnsetCp(design) |
| ✅ | obj.isEnabled() |
| ✅ | obj.enable(enabledIn) |
方法说明
obj.onStartUndo(design)
绑定状态: 已绑定
Python 调用: obj.onStartUndo(design)
This function is called just before the undo mechanism undoes changes to the specified design。 The application's derived class should implement this function to receive notification when an undo event is about to occur。
Python 示例
from oapy._oa import _design
# assume obj is a oaDesignUndoObserverBase
obj.onStartUndo(design)
obj.onEndUndo(design)
绑定状态: 已绑定
Python 调用: obj.onEndUndo(design)
This function is called just after the undo mechanism finishes undoing changes to the specified design。 The application's derived class should implement this function to receive notification when an undo event occurs。
Python 示例
from oapy._oa import _design
# assume obj is a oaDesignUndoObserverBase
obj.onEndUndo(design)
obj.onStartRedo(design)
绑定状态: 已绑定
Python 调用: obj.onStartRedo(design)
This function is called just before the undo mechanism redoes changes to the specified design。 The application's derived class should implement this function to receive notification when a redo event is about to occur。
Python 示例
from oapy._oa import _design
# assume obj is a oaDesignUndoObserverBase
obj.onStartRedo(design)
obj.onEndRedo(design)
绑定状态: 已绑定
Python 调用: obj.onEndRedo(design)
This function is called just after the undo mechanism finishes redoing changes to the specified design。 The application's derived class should implement this function to receive notification when a redo event has occurred。
Python 示例
from oapy._oa import _design
# assume obj is a oaDesignUndoObserverBase
obj.onEndRedo(design)
obj.onSetCp(design, cpID)
绑定状态: 已绑定
Python 调用: obj.onSetCp(design, cpID)
This function is called when a checkpoint is set on a design。 The application's derived class should implement this function to receive notification when a design checkpoint is set。
Python 示例
from oapy._oa import _design
# assume obj is a oaDesignUndoObserverBase
obj.onSetCp(design, cpID)
obj.onUnsetCp(design)
绑定状态: 已绑定
Python 调用: obj.onUnsetCp(design)
This function is called when a checkpoint is unset on a design。 The application's derived class should implement this function to receive notification when a design checkpoint is unset。
Python 示例
from oapy._oa import _design
# assume obj is a oaDesignUndoObserverBase
obj.onUnsetCp(design)
obj.isEnabled()
绑定状态: 已绑定
Python 调用: obj.isEnabled()
This function returns a boolean value indicating whether this observer is active。
Python 示例
from oapy._oa import _design
# assume obj is a oaDesignUndoObserverBase
obj.isEnabled()
obj.enable(enabledIn)
绑定状态: 已绑定
Python 调用: obj.enable(enabledIn)
This function activates or deactivates this observer。
参数
enabledIn: Indicates whether to make this observer active or inactive。
Python 示例
from oapy._oa import _design
# assume obj is a oaDesignUndoObserverBase
obj.enable(enabledIn)