diff --git a/designer/tslvcldesigner.tsf b/designer/tslvcldesigner.tsf index 46924b5..829b975 100644 --- a/designer/tslvcldesigner.tsf +++ b/designer/tslvcldesigner.tsf @@ -14,6 +14,7 @@ type TVclDesigner = class(tvcform) @explan(说明) 控件设计器 对象 %% **} private + Foh ; fcwindowinfo; //当前窗口文件对象 fwindowinfos; //窗口文件节点存储对象 fcutcopyinfo;//复制的信息 @@ -384,9 +385,52 @@ type TVclDesigner = class(tvcform) FProjectsManager.CreateTpjFomFile(f); end end + + function WMSYSCOMMAND(o,e);override; + begin + case e.wparam of + SC_MAXIMIZE: + begin + Foh := o.height; + _send_(WM_USER,123,123,1); + return ; + end + SC_MINIMIZE: + begin + e.skip := true; + return ; + end + SC_DEFAULT: + begin + end + SC_ZOOM: + begin + end + SC_MOUSEMENU: + begin + end + SC_RESTORE: + begin + end + end; + + return ; + return inherited; + end function db(o,e): WM_NCLBUTTONDBLCLK;virtual;//最大化处理 begin - e.skip := true; + //e.skip := true; + Foh := o.height; + _send_(WM_USER,123,123,1); + end + function WMUSER(o,e):WM_USER;override; + begin + if e.wparam = 123 and e.lparam=123 then + begin + if o.height>Foh then + o.height := Foh; + + end end function openclassfile(); //打开编辑器 begin diff --git a/designer/udesignerproject.tsf b/designer/udesignerproject.tsf index d59acdf..fe6e3bc 100644 --- a/designer/udesignerproject.tsf +++ b/designer/udesignerproject.tsf @@ -1714,6 +1714,38 @@ BD141CA912494F502D48D224F45050274A21E03806FF2C7CA7516022D7D000000 end _send_(WM_SETICON,1,FIco.handle,1); end + {Foh ; + function WMSYSCOMMAND(o,e);override; + begin + if e.wparam=SC_MAXIMIZE then + begin + Foh := o.height; + _send_(WM_USER,123,123,1); + return ; + end else + if e.wparam=SC_RESTORE then + begin + end + return inherited; + end + function db(o,e): WM_NCLBUTTONDBLCLK;virtual;//最大化处理 + begin + Foh := o.height; + _send_(WM_USER,123,123,1); + end + function WMUSER(o,e):WM_USER;override; + begin + if e.wparam = 123 and e.lparam=123 then + begin + if o.height>foh then + begin + h := o.height; + w := o.width; + l :=left; + o.SetBoundsRect(array(l,140,w+l,h)); + end + end + end } function Create(AOwner);override; begin inherited; diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index 1c5f193..8fc7ee1 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -215,10 +215,10 @@ type tapplication=class(tcomponent) **} initialize(); {$ifdef linuxgtk} - //idledata :=(new tcbytearray(4))._getptr_(); - //id := tsl_gtk_idle_interface(idledata);//_wapi.tsl_gtk_idle_interface(idledata); //构造idle + idledata :=(new tcbytearray(4))._getptr_(); + id := tsl_gtk_idle_interface(idledata);//_wapi.tsl_gtk_idle_interface(idledata); //构造idle _wapi.gtk_main(); - //_Wapi.g_idle_remove_by_data(idledata); //删除idle + _Wapi.g_idle_remove_by_data(idledata); //删除idle return 1; {$endif} if not FMessageObj then FMessageObj := new TTagMSG(); diff --git a/funcext/tvclib/ugtkinterface.tsf b/funcext/tvclib/ugtkinterface.tsf index d47bf4a..0115d30 100644 --- a/funcext/tvclib/ugtkinterface.tsf +++ b/funcext/tvclib/ugtkinterface.tsf @@ -6189,7 +6189,8 @@ type tgtk_ctl_scroll_window = class(tgtk_ctl_object) end dosetchange := false; ////移动到公用 之前在 page change - if (rgchanged or pgchanged) and ((gsi.nmax-gsi.npage)<=0) {and osi.npos>0} then //还原 + //////////////暂时屏蔽/////////////////// + (* if (rgchanged or pgchanged) and ((gsi.nmax-gsi.npage)<=0) {and osi.npos>0} then //还原 begin w := makelong(_const.SB_TOP,0); //osi.ntrackpos := 0; @@ -6203,7 +6204,8 @@ type tgtk_ctl_scroll_window = class(tgtk_ctl_object) CallTslVclProc(_const.WM_VSCROLL,w,0,1); end //dosetchange := true; - end + end *) + ////////////////////////////////////// if msk .& _const.SIF_TRACKPOS then begin @@ -6641,12 +6643,9 @@ type tGtkMessageQueue=class // function Add(h,m,l,w,obj); begin lock(); - FData[FLen]:= array(h,m,l,w,obj); - if FCurrent=FLen then - begin - createidle(); - end + FData[FLen]:= array(h,m,l,w,obj); FLen++; + //createidle(); unlock(); end function Feach(); @@ -6695,18 +6694,27 @@ type tGtkMessageQueue=class // idx++; end end + property idleworked write fidleworked; private + fidleworked; + FData; + FCurrent; + FLen; + FLock; + FMainContext; + function createidle(); + begin + if fidleworked then return ; + idledata :=(new tcbytearray(4))._getptr_(); + id := tsl_gtk_idle_interface(idledata); + fidleworked := true; + end function Clean(); begin FData := array(); FLen := 0; FCurrent :=0; end - FData; - FCurrent; - FLen; - FLock; - FMainContext; function lock() begin return; @@ -6838,11 +6846,7 @@ begin _wapi.cairo_destroy(cr); _wapi.gtk_object_set_data(cr); end -function createidle(); -begin - idledata :=(new tcbytearray(4))._getptr_(); - id := tsl_gtk_idle_interface(idledata); -end + function _gtkidledo_(); //回调 begin d := FeachMessageFromGtkMessageQueue(); @@ -6875,8 +6879,7 @@ begin AddMessageToGtkMessageQueue(h,d[1],h,d[3],true); end return 1; - end - + end return 1; //r end else @@ -6892,7 +6895,10 @@ begin //sleep(10);//休息一下 end unit(uvclthreadworker).RunThreadWorkerHost(); - return r; + GLobal G_GTK_MESSAGE_QUEUE_A; + if r=0 then sleep(1); + //G_GTK_MESSAGE_QUEUE_A.idleworked := r; + return true; end procedure tslprocessmessages()begin end; function InitGtkWindowClass(); //初始化窗口类 diff --git a/funcext/tvclib/utslvclstdctl.tsf b/funcext/tvclib/utslvclstdctl.tsf index 4d8e4f5..06e417d 100644 --- a/funcext/tvclib/utslvclstdctl.tsf +++ b/funcext/tvclib/utslvclstdctl.tsf @@ -6770,8 +6770,8 @@ function uinit(); begin {$ifdef linux} class(tUIglobalData).uisetdata("G_T_TTIMER_",class(TCustomTimer)); - o := new TSLUIBASE(); - o._wapi.SetTimer(nil,10000,100,getwinprocptr(2)); + //o := new TSLUIBASE(); + //o._wapi.SetTimer(nil,10000,200,getwinprocptr(2)); {$endif} end initialization