您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 国内外标准规范 > 附录A_使用OPENTOOLS API的Delphi扩展示例
AOPENTOOLSAPIDelphiA1111AOpenToolsAPIDelphiDelphiObjectInspectorTChartDaveBernedaDelphiDelphiRationalRoseOpenToolsAPIRayLischnerHiddenPathsofDelphi3:Experts,Wizards,andtheOpenToolsAPIDelphiInpriseDelphiOpenToolsAPIDelphiDelphiCompleteclassatcursorDelphiA.1OpenToolsAPIOpenToolsAPIDelphiDelphiDelphiSource\ToolsAPIToolsAPI.pasCOMAOPENTOOLSAPIDelphiDelphiCOMA.1.1OpenToolsOpenToolsSource\ToolsAPI\ToolsAPI.pasCOMDelphiA.1ToolsAPIDelphiA.1DelphiToolsAPIToolsAPI.pasCOMDelphitoolsapi.pasCOMvcsintf.pasCOMdsgnintf.pasRegisterComponentEditoreditintf.pas*Delphiexptintf.pas*TIExpertToolsAPICOMfileintf.pas*istreams.pas*toolintf.pas*DelphiToolServicesToolsAPIBorlandIDEServicesCOMIOTAMenuWizardvirtinft.pas*TInterfaceDelphiCOMIUnknownDelphi502Delphi6A.1.2DelphiIOTAWizardIOTAMenuWizardToolsAPIIOTAWizardIOTAMenuWizardIOTAWizardIOTAMenuWizardIOTAWizardIOTAMenuWizardHelpHelloWorldIOTAWizardIOTAMenuWizardHelpIOTAWizardGetIDStringGetNameGetStateExecuteIOTAWizardIOTANotifierIOTANotifierTNotifierObjectIOTANotifierIOTANotifierAfterSaveBeforeSaveDestroyedModifiedIOTAMenuWizardIOTAWizardIOTAMenuWizardGetMenuTextHelpIOTAWizard=interface(IOTANotifier)['{B75C0CE0-EEA6-11D1-9504-00608CCBF153}']{ExpertUIstrings}functionGetIDString:string;functionGetName:string;functionGetState:TWizardState;{LaunchtheAddIn}procedureExecute;end;IOTAMenuWizard=interface(IOTAWizard)['{B75C0CE2-EEA6-11D1-9504-00608CCBF153}']functionGetMenuText:string;end;TDummyWizardTNotifierObjectIOTAWizardIOTAMenuWizardAOPENTOOLSAPIDelphiunitUDummyWizard;//UDummyWizard.pas-Demonstratesbasicwizardinterface//Copyright(c)2000.AllRightsReserved.//BySoftwareConceptions,Inc.=class(TNotifierObject,IOTAWizard,IOTAMenuWizard)publicfunctionGetIDString:String;functionGetName:String;functionGetState:TWizardState;procedureExecute;functionGetMenuText:String;end;procedureRegister;implementationusesDialogs;procedureRegister;beginRegisterPackageWizard(TDummyWizard.Create);end;{TDummyWizard}procedureTDummyWizard.Execute;beginMessageDlg('BuildingDelphi6Applications',mtInformation,[mbOk],0);end;functionTDummyWizard.GetIDString:String;beginresult:='SoftConcepts.DummyWizard';end;functionTDummyWizard.GetMenuText:String;beginresult:='DummyWizard';504Delphi6end;functionTDummyWizard.GetName:String;beginresult:='DummyWizard';end;functionTDummyWizard.GetState:TWizardState;beginresult:=[wsEnabled];end;end.RegisterTDummyWizardRegisterPackageWizardDelphiComponent|InstallComponentExecuteTDummyWizardTMessageDlgExecuteGetIDStringIDSoftwareConcepts,IncSoftConceptsGetMenuTextDelphiHelpGetNameGetStateTWizardStateTWizardState=setof[wsEnabled,wsChecked];wsEnablewsCheckedHelpDelphiDummyWizardExecuteTMessageDlgBuildingDelphi6ApplicationsA.1A.2AOPENTOOLSAPIDelphiA.1DummyWizardDelphiHelpA.2DummyWizardTMessageDlgExecuteDelphiBPLRegisterRegisterPackageWizardRegisterPackageWizardToolsAPI.pasIOTAWizardprocedureRegisterPackageWizard(constWizard:IOTAWizard);1.DelphiComponent|InstallComponent2.InstallComponentUnitfilenameBrowse3.OKIntonewpackageA.3506Delphi6A.3InstallComponent4.OKA.4CompileA.45.Install18A.4A.2NewComponentWizardAOPENTOOLSAPIDelphiDelphiNewExpertNewComponentNewExpertA.2.1NewExpertWizardNewExpertDummyWizardNewExpertComponentNewComponentComponentIOTACreatorIOTAModuleCreateBorlandIDEServicesINTAServices40INTAServices40DelphiTNewExpertWizardComponent|NewExpertA.5TDummyWizardExecuteA.5NewExpertINTAServices40unitUNewExpertWizard;//UNewExpertWizard.pas-Anexampleofawizardthatgeneratesthecodeforawizard//Copyright(c)2000.AllRightsReserved.//BySoftwareConceptions,Inc.=class(TNotifierObject,IOTAWizard,IOTACreator,IOTAModuleCreator)privateFNewClassName:string;FMenuText:string;508Delphi6FExpertIDString:string;FExpertName:string;FUnitName:String;FWizardState:TWizardState;FMenuItem:TMenuItem;procedureAddMenuItem;procedureOnClick(Sender:TObject);procedureGenerateCode;publicconstructorCreate;virtual;destructorDestroy;override;{IOTAWizard}functionGetIDString:String;functionGetName:String;functionGetState:TWizardState;procedureExecute;{IOTACreator}functionGetCreatorType:string;functionGetExisting:Boolean;functionGetFileSystem:string;functionGetOwner:IOTAModule;functionGetUnnamed:Boolean;{IOTAModuleCreator}functionGetAncestorName:string;functionGetImplFileName:string;functionGetIntfFileName:string;functionGetFormName:string;functionGetMainForm:Boolean;functionGetShowForm:Boolean;functionGetShowSource:Boolean;functionNewFormFile(constFormIdent,AncestorIdent:string):IOTAFile;functionNewImplSource(constModuleIdent,FormIdent,AncestorIdent:string):IOTAFile;functionNewIntfSource(constModuleIDent,FormIdent,AncestorIdent:string):IOTAFile;procedureFormCreated(constFormEditor:IOTAFormEditor);end;procedureRegister;implementationusesUFormMain,Dialogs,UExpertUnit;{$R*.RES}procedureRegister;AOP
本文标题:附录A_使用OPENTOOLS API的Delphi扩展示例
链接地址:https://www.777doc.com/doc-1085343 .html