Skip to main content

IEvent interface

Namespace: NextDesign.Desktop

Description

Provides event definition information.
You can refer to the event definition information defined in the manifest file.

Property

NameDescription
AreaEvent area name
- application: application
- project: project
- models: model
- commands: commands
- editors: editors
- pages: pages
- navigators: navigators
- informations: info window
EventNameEvent name
You can get the event name defined in the manifest.
The beginning is converted to upper case.

Example:
OnAfterStart/OnBeforeQuit
FuncNameHandler function name
You can get the name of the function defined in the manifest.

Annotations

Example of event definition information

For example, if your manifest's extension point definition defines an event like:

{
//~ (omitted) ~
"extensionPoints": {
"events": {
"projects" : {
"onAfterNew" : "Project_OnAfterNew",
"onAfterOpen" : "Project_OnAfterOpen"
},
"models": [
{
"class" : "*",
"onAfterNew" : "Model_OnNew",
"OnFieldChanged" : "Model_OnFieldChanged",
},
{
"class" : "Actor",
"onAfterNew" : "Model_Actor_OnNew"
}
]
}
}
}

When each corresponding event occurs, the event definition information is expanded as follows.

//Contents of the event expansion when the project is opened
IEvent projectOpen;
projectOpen.Area = "project";
projectOpen.EventName = "OnAfterOpen"; //The event name is capitalized
projectOpen.FuncName = "Project_OnAfterOpen";

//Expansion contents of the new model creation event
IEvent modelNewAll;
modelNewAll.Area = "models";
modelNewAll.EventName = "OnAfterNew";
modelNewAll.FuncName = "Model_OnNew";

//Expanded contents of Actor's new creation event
IEvent modelNewActor;
modelNewActor.Area = "models";
modelNewAll.EventName = "OnAfterNew";
modelNewAll.FuncName = "Model_Actor_OnNew";