编辑器

优化查找体验
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 := array(e.lolparam,e.hilparam);//o1.screentoclient(e.lolparam,e.hilparam);
r := CreateComponent();
if not r then return MessageBoxA("控件放置位置不兼容!","提示",0,self);
o1 := r.Cwnd;
o1.setpublish("left",o1.left,nil);
o1.setpublish("top",o1.top,nil);

View File

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

View File

@ -6148,11 +6148,32 @@ begin
@param(maxm)(integer) 最大消息值 默认为空 %%
@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();
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
if FMSG.message=0x12 then
begin
@ -6162,12 +6183,16 @@ begin
API.TranslateMessage(ptr);
API.DispatchMessageA(ptr);
end
ct--;
end else
begin
if ct>3 then
begin
tslprocessmessages(false);
RunWorkerThreadLoop();
API.WaitMessage();
end
end
return -1;
//////////////////////////////////////////////////////
{r := API.GetMessageA(ptr, hwnd>0?hwnd:0, minm>0?minm:0, maxm>0?maxm:0);

View File

@ -3754,6 +3754,8 @@ type tgtkapis = class() //gtk
function gtk_get_micro_version ():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_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 gtk_main_level():integer;external 'libgtk-3.so';

View File

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