编辑器
加速文件查找
This commit is contained in:
@@ -221,7 +221,8 @@ type tapplication=class(tcomponent)
|
||||
idledata := 123123+frundeep.length();
|
||||
frundeep.Push(idledata);
|
||||
r := _wapi.gtk_mainidle(idledata);
|
||||
frundeep.pop();
|
||||
frundeep.pop();
|
||||
exitloopdo();
|
||||
return r;
|
||||
{$endif}
|
||||
if not FMessageObj then FMessageObj := new TTagMSG();
|
||||
@@ -259,6 +260,7 @@ type tapplication=class(tcomponent)
|
||||
if FTerminated then break;
|
||||
|
||||
end
|
||||
exitloopdo();
|
||||
{while (_wapi.GetMessageA(ptr, 0, 0, 0)) do
|
||||
begin
|
||||
_wapi.TranslateMessage(ptr);
|
||||
@@ -289,10 +291,40 @@ type tapplication=class(tcomponent)
|
||||
begin
|
||||
CloseMainForm();
|
||||
end
|
||||
function addExitMessageLoopdo(f);
|
||||
begin
|
||||
if f then
|
||||
begin
|
||||
if not fexitdolist then fexitdolist := new tnumindexarray();
|
||||
fexitdolist.Push(f);
|
||||
end
|
||||
end
|
||||
property Visible read FVisible write SetVisible;
|
||||
property handle read FHandle;
|
||||
property IfDebug read FDebug write FDebug;
|
||||
property MainForm read Fmainform write SetMainForm;
|
||||
private
|
||||
fexitdolist;
|
||||
function exitloopdo();
|
||||
begin
|
||||
if fexitdolist then
|
||||
begin
|
||||
for i := 0 to fexitdolist.length()-1 do
|
||||
begin
|
||||
f := fexitdolist[i];
|
||||
if f then
|
||||
begin
|
||||
try
|
||||
//echo tostn(f.functioninfo());
|
||||
##f();
|
||||
except
|
||||
|
||||
end ;
|
||||
end
|
||||
end
|
||||
end
|
||||
fexitdolist := nil;
|
||||
end
|
||||
end
|
||||
|
||||
type TLabel = class(TcustomLabel)
|
||||
|
||||
@@ -872,7 +872,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
||||
src[2]:= src[0]+fCharWidth *(ee[1]-1);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
cvs.FillRect(src);
|
||||
end
|
||||
end
|
||||
|
||||
+395
-5623
File diff suppressed because it is too large
Load Diff
@@ -6712,7 +6712,35 @@ type tcustomprocess = class(tcomponent) //
|
||||
@return(pointer) 句柄 %%
|
||||
**}
|
||||
if fprocesshandle then return 0;
|
||||
if not parserasexeclevparam(exe,cmd,e,arg,envp) then return 0;
|
||||
if fexecstr then
|
||||
begin
|
||||
if not(ifstring(e) and e) then return 0;
|
||||
e := exe;
|
||||
arg := cmd;
|
||||
end else
|
||||
begin
|
||||
if not parserasexeclevparam(exe,cmd,e,arg,envp) then return 0;
|
||||
end
|
||||
//////////////处理linux启动路径/////////////////////
|
||||
{$ifdef linux}
|
||||
for i := length(e) downto 2 do
|
||||
begin
|
||||
if e[i]="/" then
|
||||
begin
|
||||
ph := e[1:i];
|
||||
break;
|
||||
end
|
||||
end
|
||||
envp := array();
|
||||
if ph then
|
||||
begin
|
||||
//envp[length(envp)] := "LD_LIBRARY_PATH=LD_LIBRARY_PATH:"+ph;
|
||||
envp[length(envp)] := "LD_LIBRARY_PATH="+ph;
|
||||
end
|
||||
//envp[length(envp)] := getgtkdisplay();
|
||||
Sysexecsetenvs(envp,1);
|
||||
{$endif}
|
||||
///////////////////////////处理管道////////////////////////
|
||||
Sysexecnewpipe(0);
|
||||
ferrinfo := nil;
|
||||
hd := sysexec(e,arg,nil,false,code);
|
||||
@@ -6769,6 +6797,7 @@ type tcustomprocess = class(tcomponent) //
|
||||
property OnEcho read FOnEcho write FOnEcho;
|
||||
property onstarted read fonprcstart write fonprcstart;
|
||||
property onended read fonprocended write fonprocended;
|
||||
property execstr read fexecstr write fexecstr;
|
||||
{**
|
||||
@param(OnEcho)(function[tcustomprocess,str]) 打印信息回调 %%
|
||||
@param(onstarted)(function[tcustomprocess,nil]) 启动回调 %%
|
||||
@@ -6776,6 +6805,7 @@ type tcustomprocess = class(tcomponent) //
|
||||
@param(handle)(pointer) 进程句柄 %%
|
||||
**}
|
||||
private //成员变量
|
||||
fexecstr;
|
||||
ferrinfo;
|
||||
fprocesshandle;
|
||||
weakref
|
||||
@@ -6823,24 +6853,7 @@ type tcustomprocess = class(tcomponent) //
|
||||
e := arg[0];
|
||||
end
|
||||
if not(ifstring(e) and e) then return 0;
|
||||
{$ifdef linux}
|
||||
for i := length(e) downto 2 do
|
||||
begin
|
||||
if e[i]="/" then
|
||||
begin
|
||||
ph := e[1:i];
|
||||
break;
|
||||
end
|
||||
end
|
||||
envp := array();
|
||||
if ph then
|
||||
begin
|
||||
//envp[length(envp)] := "LD_LIBRARY_PATH=LD_LIBRARY_PATH:"+ph;
|
||||
envp[length(envp)] := "LD_LIBRARY_PATH="+ph;
|
||||
end
|
||||
//envp[length(envp)] := getgtkdisplay();
|
||||
Sysexecsetenvs(envp,1);
|
||||
{$endif}
|
||||
//////////////将linux启动目录移入到上层,避免复杂的命令行参数////////////////
|
||||
return 1;
|
||||
end
|
||||
{function getgtkdisplay();
|
||||
|
||||
@@ -70,6 +70,17 @@ type twindowsapi = class()
|
||||
r := tslvclgetencoderclsid(n,ed);
|
||||
return r;
|
||||
end;
|
||||
function GetSystemDirectory(); //获得windowssystem目录
|
||||
begin
|
||||
s := "";
|
||||
n := 1024;
|
||||
setlength(s,n);
|
||||
c := GetSystemDirectoryA(s,n);
|
||||
if c>0 then
|
||||
return s[1:c];
|
||||
return "";
|
||||
end
|
||||
function GetSystemDirectoryA(var bf:string;sz:integer):integer;stdcall;external "Kernel32.dll" name "GetSystemDirectoryA";
|
||||
function drawbitmaptodc(bm,hdc,x,y,rc,flag,thdc);
|
||||
begin
|
||||
oldmp := SelectObject(thdc,bm);
|
||||
|
||||
Reference in New Issue
Block a user