Changeset 15 for trunk/StudioCommon/ULDStudioAPI.pas
- Timestamp:
- Aug 6, 2012, 2:35:22 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/StudioCommon/ULDStudioAPI.pas
r14 r15 7 7 uses 8 8 Classes, SysUtils, UModularSystem, ActnList, Menus, Forms, USource, 9 SpecializedList ;9 SpecializedList, URegistry; 10 10 11 11 type … … 19 19 TUnregisterMainMenuItemEvent = procedure (MenuItem: TMenuItem) of object; 20 20 TDockFormEvent = procedure (Form: TForm; Target: TDockTarget) of object; 21 TGetRegistryContextEvent = function: TRegistryContext of object; 22 TRegisterFileTemplateEvent = procedure (Template: TFileTemplate) of object; 21 23 22 24 { TLDStudioAPI } … … 25 27 private 26 28 FOnDockForm: TDockFormEvent; 29 FOnGetRegistryContext: TGetRegistryContextEvent; 27 30 FOnOpenFile: TOpenFileEvent; 28 31 FOnRegisterAction: TRegisterActionEvent; 32 FOnRegisterFileTemplate: TRegisterFileTemplateEvent; 29 33 FOnRegisterFileType: TRegisterFileTypeEvent; 30 34 FOnRegisterForm: TRegisterFormEvent; 31 35 FOnRegisterMainMenuItem: TRegisterMainMenuItemEvent; 32 36 FOnUnregisterAction: TRegisterActionEvent; 37 FOnUnregisterFileTemplate: TRegisterFileTemplateEvent; 33 38 FOnUnregisterFileType: TRegisterFileTypeEvent; 34 39 FOnUnregisterForm: TRegisterFormEvent; … … 42 47 procedure RegisterFileType(FileType: TSourceType); 43 48 procedure UnregisterFileType(FileType: TSourceType); 49 procedure RegisterFileTemplate(Template: TFileTemplate); 50 procedure UnregisterFileTemplate(Template: TFileTemplate); 44 51 procedure RegisterForm(Form: TForm); 45 52 procedure UnregisterForm(Form: TForm); … … 50 57 procedure UnregisterMainMenuItem(MenuItem: TMenuItem); 51 58 procedure DockForm(Form: TForm; Target: TDockTarget); 52 59 function GetRegistryContext: TRegistryContext; 53 60 published 54 61 // API handling … … 71 78 read FOnUnregisterMainMenuItem write FOnUnregisterMainMenuItem; 72 79 property OnDockForm: TDockFormEvent read FOnDockForm write FOnDockForm; 80 property OnGetRegistryContext: TGetRegistryContextEvent 81 read FOnGetRegistryContext write FOnGetRegistryContext; 82 property OnRegisterFileTemplate: TRegisterFileTemplateEvent 83 read FOnRegisterFileTemplate write FOnRegisterFileTemplate; 84 property OnUnregisterFileTemplate: TRegisterFileTemplateEvent 85 read FOnUnregisterFileTemplate write FOnUnregisterFileTemplate; 73 86 end; 74 87 … … 110 123 if Assigned(FOnUnregisterFileType) then 111 124 FOnUnregisterFileType(FileType); 125 end; 126 127 procedure TLDStudioAPI.RegisterFileTemplate(Template: TFileTemplate); 128 begin 129 if Assigned(FOnRegisterFileTemplate) then 130 FOnRegisterFileTemplate(Template); 131 end; 132 133 procedure TLDStudioAPI.UnregisterFileTemplate(Template: TFileTemplate); 134 begin 135 if Assigned(FOnUnregisterFileTemplate) then 136 FOnUnregisterFileTemplate(Template); 112 137 end; 113 138 … … 155 180 end; 156 181 182 function TLDStudioAPI.GetRegistryContext: TRegistryContext; 183 begin 184 if Assigned(FOnGetRegistryContext) then 185 Result := FOnGetRegistryContext(); 186 end; 187 157 188 end. 158 189
Note:
See TracChangeset
for help on using the changeset viewer.