📄 wizards_2.htm
字号:
function OpenFile(const FileName: string): Boolean; virtual; export; <br>
abstract; <br>
function ReloadFile(const FileName: string): Boolean; virtual; export; <br>
abstract; <br>
function ModalDialogBox(Instance: THandle; TemplateName: PChar; <br>
WndParent: HWnd; <br>
DialogFunc: TFarProc; InitParam: LongInt): Integer; virtual; export; <br>
abstract; <br>
function CreateModule(const ModuleName: string; Source, Form: TIStream;
<br>
CreateFlags: TCreateModuleFlags): Boolean; virtual; export; abstract;
<br>
<br>
{ Project/UI information } <br>
function GetParentHandle: HWND; virtual; export; abstract;
<br>
function GetProjectName: string; virtual; export; abstract;
<br>
function GetUnitCount: Integer; virtual; export; abstract;
<br>
function GetUnitName(Index: Integer): string; virtual; export; abstract;
<br>
function GetFormCount: Integer; virtual; export; abstract;
<br>
function GetFormName(Index: Integer): string; virtual; export; abstract;
<br>
function GetCurrentFile: string; virtual; export; abstract;
<br>
function IsFileOpen(const FileName: string): Boolean; virtual; export; <br>
abstract; <br>
function GetNewModuleName(var UnitIdent, FileName: string): Boolean;
<br>
virtual; export; abstract;
<br>
<br>
{ Component Library interface } <br>
function GetModuleCount: Integer; virtual; export; abstract;
<br>
function GetModuleName(Index: Integer): string; virtual; export; <br>
abstract; <br>
function GetComponentCount(ModIndex: Integer): Integer; virtual; export; <br>
abstract; <br>
function GetComponentName(ModIndex,CompIndex: Integer): string; virtual; <br>
export; abstract; <br>
<br>
{function InstallModule(const ModuleName: string): Boolean; virtual; <br>
export; abstract; <br>
function CompileLibrary: Boolean; virtual; export; abstract;
<br>
} <br>
<br>
{ Error handling } <br>
procedure RaiseException(const Message: string); virtual; export; <br>
abstract; <br>
end; <br>
<br>
implementation <br>
<br>
The Tool services object is created on the application (Delphi/C++Builder) <br>
side, and is passed to the VCS/Expert Manager DLL during initialization. Note <br>
that the application (Delphi/C++Builder) is responsible for creating and <br>
freeing the interface object, and the client should never free the interface. <br>
<br>
The following ToolServices functions are available to the client (for Delphi <br>
1.0 as well as 2.0x and 3): <br>
<br>
<br>
Actions <br>
CloseProject <br>
returns True if no project open, or if the currently open project can be <br>
closed. <br>
OpenProject <br>
returns True if the named project can be opened. You have to pass an empty <br>
string to create a new project and main form.
<br>
OpenProjectInfo <br>
returns True if the named project file can be opened. This routine bypasses <br>
all the normal project load features (such as loading a desktop file, showing <br>
the source code, etc), and simply opens the .DPR and .OPT files.
<br>
SaveProject <br>
returns True if the project is unmodified, if there is no project open, or if <br>
the open project can be saved. <br>
CloseFile <br>
returns True if the specified file is not currently open, or if it can be <br>
closed. <br>
OpenFile <br>
returns True if the specified file is already open or can be opened.
<br>
ReloadFile <br>
returns True if the file is already open and was reloaded from disk. (NOTE: <br>
This will not perform any checking of the current editor state).
<br>
RefreshBuffers <br>
causes the IDE to check the time/date stamp of each open file to determine if <br>
the file has changed on disk. If so, the file is re-read.
<br>
ModalDialogBox <br>
used by non-VCL DLL's to present a dialog box which is modal. Note that DLLs <br>
written using VCL can simply call a form's ShowModal function.
<br>
CreateModule <br>
Will create new module from memory images of the source and, optionally, the <br>
form file. <br>
The TCreateModuleFlags are: <br>
cmAddToProject: Add the new module to the currently open project.
<br>
cmShowSource: Show the source file in the top-most editor window.
<br>
cmShowForm: If a form is created, show it above the source.
<br>
cmUnNamed: Will mark the module as unnamed which will cause the SaveAs dialog <br>
to show the first time the user attempts to save the file.
<br>
cmNewUnit: Creates a new unit and adds it to the current project. NOTE: all <br>
other parameters are ignored. <br>
cmNewForm: Creates a new form and adds it to the current project. NOTE: all <br>
other parameters are ignored. <br>
cmMainForm: If the module includes a form, make it the main form of the <br>
currently open project. Only valid with the cmAddToProject option.
<br>
cmMarkModified: Will insure that the new module is marked as modified.
<br>
Informational <br>
<br>
GetParentHandle <br>
returns a HWND which should be used as the parent for windows created by the <br>
client. <br>
GetProjectName <br>
returns a fully qualified path name of the currently open project file, or an <br>
empty string if no project is open. <br>
GetUnitCount <br>
returns the current number of units belonging to the project.
<br>
GetUnitName <br>
returns a fully qualified name of the specified unit.
<br>
GetFormCount <br>
returns the current number of forms belonging to the project.
<br>
GetFormName <br>
returns a fully qualified name of the specified form file.
<br>
GetCurrentFile <br>
returns a fully qualified name of the current file, which could either be a <br>
form or unit (.PAS). Returns a blank string if no file is currently selected. <br>
<br>
IsFileOpen </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -