优化最大化最小化 等消息
This commit is contained in:
JianjunLiu 2022-12-12 14:00:43 +08:00
parent e72ecfeab2
commit 328da041da
3 changed files with 49 additions and 16 deletions

View File

@ -554,7 +554,7 @@ type TEditerForm = class(TVCform) //
end
d := FEdter.GetHistoryFiles();
if ifarray(d) and d then
begin
begin
Exportfile(ftstream(),"",FHistoryPath,d);
end
d := FEdter.GetFindHistory();

View File

@ -387,7 +387,7 @@ type TVclDesigner = class(tvcform)
end
function WMSYSCOMMAND(o,e);override;
begin
begin
case e.wparam of
SC_MAXIMIZE:
begin
@ -795,6 +795,13 @@ type TVclDesigner = class(tvcform)
if e then e.skip := true;
end
private //节点点击
function windowactive(o,e);
begin
if e.wparam then
begin
ClickComponent(o,e);
end
end
function ClickComponent(o,e); //点击组件选择
begin
{**
@ -903,7 +910,8 @@ type TVclDesigner = class(tvcform)
e.skip := true;
CloseShowForm(); //并保存窗口信息
end ;
wnd.bindmessage(wnd.WM_NCLBUTTONDOWN,thisfunction(ClickComponent));
//wnd.bindmessage(wnd.WM_NCLBUTTONDOWN,thisfunction(ClickComponent));
wnd.bindmessage(wnd.WM_ACTIVATE,thisfunction(windowactive));
//WM_NCLBUTTONUP wnd.
if (wnd is class(TVCForm)) then
begin

View File

@ -4926,15 +4926,42 @@ type tgtk_ctl_object = class(_gtkeventtype)
case e.ttype of
GDK_WINDOW_STATE:
begin
{st := gdk_window_get_state(e.window);//.& 0xffff;
if (st .& 32) = 32 then
obj := new _GdkEventWindowState(c);
msk := obj.new_window_state;
//st := obj.changed_mask;
if msk .& 4 then
begin
echo "\r\n above";
end else
if (st .& 64) = 64 then
return CallTslVclProc(_const.WM_SYSCOMMAND ,_const.SC_MAXIMIZE,0);
end
if msk .& 2 then
begin
echo "\r\n blowe";
end }
return CallTslVclProc(_const.WM_SYSCOMMAND ,_const.SC_MINIMIZE,0);
end
if msk .& (2^4) then
begin
//echo "\r\n full screen";
end
if msk .& (2^5) then
begin
//echo "\r\n above";
end
if msk .& (2^6) then
begin
//echo "\r\n below";
end
if msk .& (2^7) then
begin
CallTslVclProc(_const.WM_SETFOCUS ,0,0);
CallTslVclProc(_const.WM_ACTIVATE ,2,0,0);
end
{GDK_WINDOW_STATE_WITHDRAWN = 1 << 0,
GDK_WINDOW_STATE_ICONIFIED = 1 << 1,
GDK_WINDOW_STATE_MAXIMIZED = 1 << 2,
GDK_WINDOW_STATE_STICKY = 1 << 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
GDK_WINDOW_STATE_BELOW = 1 << 6}
end
GDK_BUTTON_PRESS:
begin
@ -5046,10 +5073,6 @@ type tgtk_ctl_object = class(_gtkeventtype)
end ;
return CanignoreBtnpress();
end
32:
begin
//echo tostn(new _GdkEventWindowState(c)._getdata_());
end
8,9: //key
begin
kud := e.ttype;
@ -6841,7 +6864,8 @@ begin
"clicked":13,
"value-changed":14,
"delete-event":15,
"event":16 );
"event":16 ,
"window-sate-event":17);
for i,v in G_E_ID_Name_1 do
begin
G_E_ID_Name_2[v] := i;
@ -7222,7 +7246,7 @@ begin
"dodeleteevents": return mgnr.get(thisfunction(dodeleteevents));
"tsl_gtk_normal_event_cb": return mgnr.get(thisfunction(tsl_gtk_normal_event_cb));
"tsl_gtk_normal_event_bc": return mgnr.get(thisfunction(tsl_gtk_normal_event_bc));
"tsl_gtk_idle":return mgnr.get(thisfunction(tsl_gtk_idle));
"tsl_gtk_idle": return mgnr.get(thisfunction(tsl_gtk_idle));
end ;
end
function tsl_gtk_idle(dlg:pointer):integer;
@ -7266,6 +7290,7 @@ function tsl_gtk_activate_event(a:pointer;b:pointer):integer;
begin
return dodeleteevents(a, "activate");
end
function tsl_gtk_destroy_event(a:pointer; b:pointer;c:pointer):integer;
begin
return _gtkeventcall_(a,b,c);