IEvent Interface
Namespace: NextDesign.Desktop
Description
Provides event definition information.
You can refer to the event definition information defined in the manifest file.
Property
Name | Description |
---|---|
Area | Event area name - application: Application - project: Project - models: Models - commands: Commands - editors: Editors - pages: Pages - navigators: Navigators - informations: Information window |
EventName | Event name You can get the event name defined in the manifest. The first letter will be converted to uppercase. Example: OnAfterStart/OnBeforeQuit |
FuncName | Handler function name You can get the function name defined in the manifest. |
Annotation
Example of event definition information
For example, if the following events are defined in the extension point definition of 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 start 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";