EtsT_Tool_Close_Check_Callback
Note: Requires OPNET Development Kit
Abstract
Callback: Called to check whether or not it is safe to close a tool window.
Syntax
<close_check_callback_proc_name> ()
| Argument | Type | Description |
|---|---|---|
| no arguments |
Return Type
int
Non-zero if the tool window can be closed, or zero if it should be saved first.
Header
ets_api_tool.h
Details
When an application tool window (such as a project editor) is to be closed, if a callback function of type EtsT_Tool_Close_Check_Callback has been previously registered (by passing it to Ets_Tool_Close_Check_Callback_Register()), the callback function is called instead of the normal system behavior. This allows Ets client code to indicate whether its private data associated with a tool window has been saved or not.
For example, an Ets action might store data about a specific model outside the model's data structure. If this data were modified but the underlying model had not changed, then if the user closed the tool window, the application would not attempt to save the model and the changes to the private data would be lost. This callback allows the Ets client code to interrupt this sequence of operations by indicating that the model's data has not really been saved to disk.