编辑器

优化查找体验
This commit is contained in:
JianjunLiu 2022-12-09 16:02:21 +08:00
parent 32bd460b1d
commit a69fded109
5 changed files with 38 additions and 8 deletions

View File

@ -831,6 +831,7 @@ type TVclDesigner = class(tvcform)
FCurrentClikPos := o.ScreenToClient(xy[0],xy[1]); FCurrentClikPos := o.ScreenToClient(xy[0],xy[1]);
//FCurrentClikPos := array(e.lolparam,e.hilparam);//o1.screentoclient(e.lolparam,e.hilparam); //FCurrentClikPos := array(e.lolparam,e.hilparam);//o1.screentoclient(e.lolparam,e.hilparam);
r := CreateComponent(); r := CreateComponent();
if not r then return MessageBoxA("控件放置位置不兼容!","提示",0,self);
o1 := r.Cwnd; o1 := r.Cwnd;
o1.setpublish("left",o1.left,nil); o1.setpublish("left",o1.left,nil);
o1.setpublish("top",o1.top,nil); o1.setpublish("top",o1.top,nil);

View File

@ -3729,9 +3729,7 @@ type TEditer=class(TCustomcontrol) //
end end
function TryDispatch(); function TryDispatch();
begin begin
{$ifdef linux}
return;
{$endif}
t := now(); t := now();
if(t-FLastDispathTime)>0.25e-5 then if(t-FLastDispathTime)>0.25e-5 then
begin begin

View File

@ -6148,11 +6148,32 @@ begin
@param(maxm)(integer) 最大消息值 默认为空 %% @param(maxm)(integer) 最大消息值 默认为空 %%
@return(integer)0表示WM_QUIT ,-1表示错误,其他返回大于0 %% @return(integer)0表示WM_QUIT ,-1表示错误,其他返回大于0 %%
**} **}
API := gettswin32api();
{$ifdef linux}
dg := API.g_main_context_default();
if dg then
begin
ct := 5;
while ct>0 do
begin
if API.g_main_context_pending(dg) and ct>0 then
begin
API.g_main_context_iteration(dg,false);
end
ct--;
end
end
tslprocessmessages(false);
RunWorkerThreadLoop();
return;
{$endif}
FMSG := new TTagMSG(); FMSG := new TTagMSG();
ptr := FMSG._getptr_(); ptr := FMSG._getptr_();
API := gettswin32api();
/////////////////////////////////////////////// ///////////////////////////////////////////////
if(API.PeekMessageA(ptr,0,0,0,0x1))then ct:=5;
if(API.PeekMessageA(ptr,0,0,0,0x1)) and ct>0 then
begin begin
if FMSG.message=0x12 then if FMSG.message=0x12 then
begin begin
@ -6162,11 +6183,15 @@ begin
API.TranslateMessage(ptr); API.TranslateMessage(ptr);
API.DispatchMessageA(ptr); API.DispatchMessageA(ptr);
end end
ct--;
end else end else
begin begin
tslprocessmessages(false); if ct>3 then
RunWorkerThreadLoop(); begin
API.WaitMessage(); tslprocessmessages(false);
RunWorkerThreadLoop();
API.WaitMessage();
end
end end
return -1; return -1;
////////////////////////////////////////////////////// //////////////////////////////////////////////////////

View File

@ -3754,6 +3754,8 @@ type tgtkapis = class() //gtk
function gtk_get_micro_version ():integer;cdecl;external 'libgtk-3.so'; function gtk_get_micro_version ():integer;cdecl;external 'libgtk-3.so';
function gtk_get_binary_age ():integer;cdecl;external 'libgtk-3.so'; function gtk_get_binary_age ():integer;cdecl;external 'libgtk-3.so';
function g_main_context_default():pointer;cdecl;external 'libgtk-3.so'; function g_main_context_default():pointer;cdecl;external 'libgtk-3.so';
function g_main_context_pending(gc:pointer):integer;cdecl;external 'libgtk-3.so';
function g_main_context_iteration(gc:pointer;bk:integer):integer;cdecl;external 'libgtk-3.so';
function g_main_context_get_poll_func(d:pointer):pointer;cdecl;external 'libgtk-3.so'; function g_main_context_get_poll_func(d:pointer):pointer;cdecl;external 'libgtk-3.so';
function gtk_main_level():integer;external 'libgtk-3.so'; function gtk_main_level():integer;external 'libgtk-3.so';

View File

@ -637,6 +637,10 @@ type tcustomcheckbtn=class(tcustombtn) //checkbtn
1选中。 1选中。
@param(leftText)(bool)文本是否在左%% @param(leftText)(bool)文本是否在左%%
**} **}
protected
function PaintMouseDown();override;
begin
end
private private
FleftText; FleftText;
FcheckState; FcheckState;