Skip to main content

IEvent Interface

Namespace: NextDesign.Desktop

Description

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

Property

NameDescription
AreaEvent Area Name
- application: Application
- project: Project
- models: Models
- commands: Commands
- editors: Editors
- pages: Pages
- navigators: Navigators
- informations: Information Window
EventNameEvent Name
You can obtain the event name defined in the manifest.
The first letter will be converted to uppercase.

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

Annotation

Example of Event Definition Information

For example, if the following event is defined in the extension point definition in the manifest,

{
//~ (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:

//Event contents when a project is opened
IEvent projectOpen;
projectOpen.Area = "project";
projectOpen.EventName = "OnAfterOpen"; //Event names begin with a capital letter
projectOpen.FuncName = "Project_OnAfterOpen";

//Event contents when a new model is created
IEvent modelNewAll;
modelNewAll.Area = "models";
modelNewAll.EventName = "OnAfterNew";
modelNewAll.FuncName = "Model_OnNew";

//Event contents when a new actor is created
IEvent modelNewActor;
modelNewActor.Area = "models";
modelNewAll.EventName = "OnAfterNew";
modelNewAll.FuncName = "Model_Actor_OnNew";