ProcessEditorEvent
The ProcessEditorEvent function informs plugins about different internal editor events.
int WINAPI ProcessEditorEvent( int Event, void *Param );
Parameters
Event
Event type.
Can be one of the following values (EDITOR_EVENTS enum):
Can be one of the following values (EDITOR_EVENTS enum):
Event | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
EE_CLOSE |
One of the internal editors is closing. Plugins can use this event to free internal data structures. Note that several editors can be active at the same time. Param points to an integer variable containing the EditorID parameter of the editor instance beeing closed. The EditorID of the current editor can be obtained earlier using the ECTL_GETINFO EditorControl command. But the plugin should not call the EditorControl function when processing this event, because the editor is already closed. Return value must be 0. Remark.
| ||||||||
EE_READ |
A new file has just been read. The plugin can use
EditorControl
commands to modify the read data. Param equals NULL. Return value must be 0. | ||||||||
EE_SAVE |
The file being edited is about to be saved. The plugin can use
EditorControl commands to modify
data before saving. Param equals NULL. Return value must be 0. | ||||||||
EE_REDRAW |
The editor screen is about to redraw. Plugin can use
EditorControl
ECTL_ADDCOLOR command
to set line colors. Param can be one of the following vslue:
| ||||||||
EE_KILLFOCUS | Editor has lost keyboard focus. Param points to a variable containing the EditorID of the editor that looses focus. Return value must be 0. | ||||||||
EE_GOTFOCUS | Editor received keyboard focus. Param points to a variable containing the EditorID of the editor that receives focus. Return value must be 0. |
Attention!
- When processing EE_REDRAW it is HIGLY UNDESIRABLE TO CALL Info.Message, Info.Menu, Info.Dialog and Info.DialogEx. Calling those function leads to recursive calling of EE_REDRAW.
Param
Points to data dependent on the event type.
Return value
Return value depends on the event type.
Return 0 for unknown event types.
Return 0 for unknown event types.