IEvent interface ¶
Namespace: NextDesign.Desktop
Description¶
Provides event definition information. You can refer to the event definition information defined in the manifest file.
Affiliation area¶
Name | Description |
---|---|
Event | APIs that access the events received by the event handler are explained for each area. |
Property¶
Name | Description |
---|---|
Area | Event area name -application: Application -project: Project -models: Model -commands: Command -editors : Editors -pages: Pages -navigators: Navigators -informations: Information windows |
EventName | Event name You can get the event name defined in the manifest. The first letter is 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 event is defined in the manifest extension point definition,
{
//~ (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 the corresponding event occurs, the event definition information is expanded as follows.
//Contents of event when the project is opened
IEvent projectOpen;
projectOpen.Area = "project";
projectOpen.EventName = "OnAfterOpen"; //The event name is capitalized at the beginning
projectOpen.FuncName = "Project_OnAfterOpen";
//Expanded content of new model creation event
IEvent modelNewAll;
modelNewAll.Area = "models";
modelNewAll.EventName = "OnAfterNew";
modelNewAll.FuncName = "Model_OnNew";
//Expanded content of Actor new creation event
IEvent modelNewActor;
modelNewActor.Area = "models";
modelNewAll.EventName = "OnAfterNew";
modelNewAll.FuncName = "Model_Actor_OnNew";