diff --git a/designer/tslvcldesigner.tsf b/designer/tslvcldesigner.tsf index f159f20..1518205 100644 --- a/designer/tslvcldesigner.tsf +++ b/designer/tslvcldesigner.tsf @@ -1795,6 +1795,9 @@ type TVclDesigner = class(tvcform) FProjectsManager.parent := self; FProjectManager := new TProjectView(self); + FProjectManager.height := rect[3]-top-height-20; + FProjectManager.left := left; + FProjectManager.top := top+height; ico := new tbitmap(); ico.Readvcon(HexFormatStrToTsl(GetWindowMgrBmp())); FProjectManager.FormICon := ico.ToIcon(); @@ -1958,7 +1961,7 @@ type TVclDesigner = class(tvcform) if FObjInspector.Visible then begin FObjInspector.left := width+ Left-FObjInspector.width; - FObjInspector.top := top+height+20; + FObjInspector.top := top+height; end if o then begin diff --git a/funcext/tvclib/tcontrol.tsf b/funcext/tvclib/tcontrol.tsf index 9299a06..8b5189a 100644 --- a/funcext/tvclib/tcontrol.tsf +++ b/funcext/tvclib/tcontrol.tsf @@ -169,7 +169,7 @@ type tcontrol = class(tcomponent) bds := UnAlignBounds; FAlign := Value; //调其兄弟节点的位置 %% - if FParent is getparenttype() and FParent.HandleAllocated()then + if (FParent is getparenttype()) and FParent.HandleAllocated()then begin if FAlign=alNone then begin diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index 441cf74..bb69d2c 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -915,6 +915,7 @@ type TPanel=class(TScrollingWinControl) // "onmousewheel","onsize","onmove","onmousemove","onpopupmenu", "onmousedown","onmouseup", "onactivate","onclose", + "onsetfocus","onkillfocus", "onkeyup","onkeydown","onkeypress" ); end @@ -1464,6 +1465,7 @@ type TVCForm = class(TScrollingWinControl) "onsize","onmove","onmousemove", "onmousedown","onmouseup", "onactivate","onclose", + "onsetfocus","onkillfocus", "onkeyup","onkeydown","onkeypress" ); end @@ -1554,7 +1556,8 @@ type tbtn = class(tcustombtn) function publishs();override; begin return array("name","action","left","top","width","height", - "align","anchors","caption","font","enabled","visible","bkbitmap","color","tabstop","onclick","onmousemove","onsetfocus","onkillfocus"); + "align","anchors","caption","font","enabled","visible","bkbitmap","color","tabstop", + "onclick","onmousemove","onsetfocus","onkillfocus","onkeyup","onkeydown","onkeypress"); end end @@ -2895,7 +2898,7 @@ type TTreeView=class(TTreeCtl) return array("name", "left","top","width","height","caption","align","anchors", "checkbox","visible","itemheght","imagelist","hasline","singleexpand", - "lazyitems","onselchanged"); + "lazyitems","onselchanged","onmousedown","onsetfocus","onkillfocus","onkeyup","onkeydown"); end //property OnDeleteItem read FOnDeleteItem write FOnDeleteItem; //property OnItemExpand:eventhandler read FOnItemExpand write FOnItemExpand; @@ -3216,10 +3219,12 @@ type TPairSplitter=class(tcustomcontrol) // rc := GetClientRect(); pz := GetPosition(); pbdr := 0; - {if (csDesigning in ComponentState) then + {$ifdef linux} + if (csDesigning in ComponentState) then begin pbdr := 2; - end } + end + {$endif} if sd1 and sd1.HandleAllocated()then begin if FSplitterType=pstHorizontal then sd1.setboundsrect(array(rc[0]+pbdr,rc[1]+pbdr,rc[0]+pz,rc[3]-pbdr)); @@ -5230,8 +5235,8 @@ type TSavefileADlg = class(tcustomfsdlg) end function publishs();override; begin - return array("name","caption","filter","filterindex","filename","defaultfileextension","initialdlg", - "showhidden","multiselected","overwriteprompt","linkfilepath","filemustexist","createprompt"); + return array("name","caption","filter","filterindex","filename","defaultfileextension", + "showhidden","multiselected","overwriteprompt","filemustexist"); //"linkfilepath" "createprompt" end end diff --git a/funcext/tvclib/ugtkinterface.tsf b/funcext/tvclib/ugtkinterface.tsf index 3564031..324f812 100644 --- a/funcext/tvclib/ugtkinterface.tsf +++ b/funcext/tvclib/ugtkinterface.tsf @@ -95,9 +95,9 @@ type tsgtkapi = class(tgtkapis) h := g_object_get_data(hwd,"gtk_layout_height"); global g_w_c_width; pcd := gtk_object_get_data(hwd,"gtk_wnd_hs_caption")?g_w_c_width:0; - gtk_window_move(hwd,x,y-pcd); + gtk_window_move(hwd,x,max(0,y-pcd)); if w>=0 and h>=0 then - gtk_widget_set_size_request(hwd,w,h-pcd); + gtk_widget_set_size_request(hwd,w,max(0,h-pcd)); end if f=0x4 then begin @@ -232,7 +232,7 @@ type tsgtkapi = class(tgtkapis) pcd := gtk_object_get_data(h,"gtk_wnd_hs_caption")?g_w_c_width:0; y0 := g_object_get_data(h,"gtk_layout_height")-pcd; end - rec := array(0,0,x0, y0); + rec := array(0,0,x0, max(0,y0)); return true; end function GetWindowRect(hwnd :pointer;var rec:array of integer):integer; @@ -243,7 +243,7 @@ type tsgtkapi = class(tgtkapis) w := g_object_get_data(hwnd,"gtk_layout_width"); global g_w_c_width; pcd := gtk_object_get_data(hwnd,"gtk_wnd_hs_caption")?g_w_c_width:0; - rec := array(xy[0],xy[1],xy[0]+w,xy[1]+h-pcd); + rec := array(xy[0],xy[1],xy[0]+w,max(0,xy[1]+h-pcd)); end function GetWindowInfo(hwnd :pointer;f:pointer):integer; begin @@ -270,7 +270,7 @@ type tsgtkapi = class(tgtkapis) y0 := g_object_get_data(h,"gtk_layout_y"); if (x>=0 and y>=0) and (x<>x0 or y<>y0) then //窗口位置 begin - gtk_window_move(h,x,y-pcd); + gtk_window_move(h,x,max(0,y-pcd)); g_object_set_data(h,"gtk_layout_x",x); g_object_set_data(h,"gtk_layout_y",y); flg .|=2; @@ -284,16 +284,16 @@ type tsgtkapi = class(tgtkapis) gtk_widget_get_size_request(h,cx0,cy0); //改小一点 if cx0>cx or cy0>cy then begin - gtk_widget_set_size_request(h,cx,cy-pcd); + gtk_widget_set_size_request(h,cx,max(0,cy-pcd)); end - gtk_window_resize(h,cx,cy-pcd); + gtk_window_resize(h,cx,max(0,cy-pcd)); end else begin //gtk_widget_get_size_request(h,cx0,cy0); //echo "\r\noldsize:",cx0,"====",cy0; //gtk_window_resize(wh,cx,cy); - gtk_widget_set_size_request(h,cx,cy-pcd); + gtk_widget_set_size_request(h,cx,max(0,cy-pcd)); //gtk_window_set_decorated(h,true); //gtk_window_set_resizable(h,true); @@ -330,7 +330,7 @@ type tsgtkapi = class(tgtkapis) h0 := g_object_get_data(h,"gtk_layout_height"); if (cx>=0 and cy>=0) and ( cx<>w0 or cy<>h0) then begin - gtk_widget_set_size_request(h,cx,cy-pcd); + gtk_widget_set_size_request(h,cx,max(0,cy-pcd)); g_object_set_data(h,"gtk_layout_width",cx); g_object_set_data(h,"gtk_layout_height",cy); //lbl := g_object_get_data(h,"gtk_layout_lable"); @@ -503,7 +503,7 @@ type tsgtkapi = class(tgtkapis) begin global g_w_c_width; pcd := gtk_object_get_data(h,"gtk_wnd_hs_caption")?g_w_c_width:0; - gtk_widgetsizechanged(h,AHeight-pcd,AWidth); + gtk_widgetsizechanged(h,max(0,AHeight-pcd),AWidth); end {if SizeChanged then begin @@ -1248,7 +1248,7 @@ type tsgtkapi = class(tgtkapis) w :=g_object_get_data(hwd,"gtk_layout_width"); global g_w_c_width; pcd := gtk_object_get_data(hwnd,"gtk_wnd_hs_caption")?g_w_c_width:0; - gtk_widgetsizechanged(hwd,h-pcd,w); + gtk_widgetsizechanged(hwd,max(0,h-pcd),w); end Function SetMenu(hwd:pointer;hmenu:pointer):integer; //设置菜单栏 begin @@ -1287,7 +1287,7 @@ type tsgtkapi = class(tgtkapis) w :=g_object_get_data(hwd,"gtk_layout_width"); global g_w_c_width; pcd := gtk_object_get_data(hwnd,"gtk_wnd_hs_caption")?g_w_c_width:0; - gtk_widgetsizechanged(hwd,h-pcd,w); + gtk_widgetsizechanged(hwd,max(0,h-pcd),w); //移除原有窗口 //menubar 添加到窗口 end @@ -1790,7 +1790,7 @@ type tsgtkapi = class(tgtkapis) h := g_object_get_data(hwnd,"gtk_layout_height"); global g_w_c_width; pcd := gtk_object_get_data(hwnd,"gtk_wnd_hs_caption")?g_w_c_width:0; - gtk_widgetsizechanged(hwnd,h-pcd,w); + gtk_widgetsizechanged(hwnd,max(0,h-pcd),w); return true; end function ClipCursor(rec:array of integer):integer; @@ -4770,22 +4770,22 @@ type tgtk_ctl_object = class(_gtkeventtype) _wapi.GetCursorPos(cxy); dx := cxy[0]-ogps[0]; dy := cxy[1]-ogps[1]; - case FHitwidgetposition of + case FHitwidgetposition of //0 修改为 -1 110: begin - if dx<>0 then _wapi.SetWindowPos(a.handle,0,xy[0]+dx,xy[1],xy[2]-dx,xy[3],0); + if dx<>0 then _wapi.SetWindowPos(a.handle,-1,xy[0]+dx,xy[1],xy[2]-dx,xy[3],0); end 111: begin - if dx<>0 then _wapi.SetWindowPos(a.handle,0,xy[0],xy[1],xy[2]+dx,xy[3],0); + if dx<>0 then _wapi.SetWindowPos(a.handle,-1,xy[0],xy[1],xy[2]+dx,xy[3],0); end 112: begin - if dy<>0 then _wapi.SetWindowPos(a.handle,0,xy[0],xy[1]+dy,xy[2],xy[3]-dy,0); + if dy<>0 then _wapi.SetWindowPos(a.handle,-1,xy[0],xy[1]+dy,xy[2],xy[3]-dy,0); end 115: begin - if dy<>0 then _wapi.SetWindowPos(a.handle,0,xy[0],xy[1],xy[2],xy[3]+dy,0); + if dy<>0 then _wapi.SetWindowPos(a.handle,-1,xy[0],xy[1],xy[2],xy[3]+dy,0); end @@ -6500,10 +6500,10 @@ type tgtk_ctl_window_PoPup = class(tgtk_ctl_scroll_window) InitWidgetSize(h,x,y,nwidth,nheight); - _wapi.gtk_window_move(h,x,y-pcd); + _wapi.gtk_window_move(h,x,max(0,y-pcd)); if nwidth>0 and nheight>0 then begin - _wapi.gtk_window_resize(h,nwidth,nheight-pcd); + _wapi.gtk_window_resize(h,nwidth,max(0,nheight-pcd)); end _wapi.gtk_widget_show_all(vbox); InitContainerList(h); //容器list diff --git a/funcext/tvclib/utslvcldlg.tsf b/funcext/tvclib/utslvcldlg.tsf index 71aa463..36fb81d 100644 --- a/funcext/tvclib/utslvcldlg.tsf +++ b/funcext/tvclib/utslvcldlg.tsf @@ -519,7 +519,7 @@ type tcustomfsdlg = class(TCommDlg) property LinkFilePath:bool read fIsLinkFilePath write setLinkFilePath; property FileMustExist:bool read fIsFileMustExist write setFileMustExist; property CreatePrompt:bool read fIsCreatePrompt write setCreatePrompt; - + {** @param(filter)(array) array("所有文件":"*.*","tsl流文件":"*.stm")%% @param(FileName)(string) 文件名,不成功返回上一次的结果。 %% diff --git a/funcext/tvclib/utslvclstdctl.tsf b/funcext/tvclib/utslvclstdctl.tsf index 26f4823..038582d 100644 --- a/funcext/tvclib/utslvclstdctl.tsf +++ b/funcext/tvclib/utslvclstdctl.tsf @@ -3160,10 +3160,11 @@ type TcustomListBox=class(TCustomListBoxbase) end return; end - if not isValidIndex(n)or n=FSelBegin then return; + if not(isValidIndex2(n)) or n=FSelBegin then return; SelRange(false); FSelBegin := FSelEnd := n; SelRange(true); + SetYpos(n); CallMessgeFunction(FselectionChange,self(true),new tuieventbase(0,0,0,0)); end function getItemSelectedState(n); @@ -3451,6 +3452,10 @@ type TcustomListBox=class(TCustomListBoxbase) begin return(n >= 0)and n= -1)and n= FMinValue then begin - CallMessgeFunction(FOnDecrease,o,e); + CallMessgeFunction(FOnIncrease,o,e); if not e.skip then begin FValue := nv; @@ -5143,7 +5163,7 @@ type TCustomSpinEdit = class(TCustomControl) DrawItem(CI_UP,CIS_NONE); DrawItem(CI_DOWN,CIS_NONE); end - property OnIncrease:eventhandler read FOnIncrease write FOnDecrease; + property OnIncrease:eventhandler read FOnIncrease write FOnIncrease; property OnDecrease:eventhandler read FOnDecrease write FOnDecrease; property Increment:integer read FIncrement write SetIncrement; property MinValue:integer read FMinValue write SetMinValue; diff --git a/funcext/tvclib/utslvcltree.tsf b/funcext/tvclib/utslvcltree.tsf index a294043..c52e1ff 100644 --- a/funcext/tvclib/utslvcltree.tsf +++ b/funcext/tvclib/utslvcltree.tsf @@ -1655,6 +1655,7 @@ type TcustomTreeCtl = class(TVirtualList) function WMKEYUP(o,e):WM_KEYUP;virtual; begin if not FCurrentNode then return; + if e.skip then return ; case e.charcode of VK_UP,VK_DOWN: begin