diff --git a/designer/ctl_mgr/resource.tfm/t_function_finder.tfm b/designer/ctl_mgr/resource.tfm/t_function_finder.tfm index f5d5a6d..92c3993 100644 --- a/designer/ctl_mgr/resource.tfm/t_function_finder.tfm +++ b/designer/ctl_mgr/resource.tfm/t_function_finder.tfm @@ -46,20 +46,20 @@ object functionfinder:t_function_finder object btfind:tbtn autosize=true caption="筛选" - height=21 + height=22 left=281 onclick=btfind_clk top=7 - width=38 + width=54 end object ck_prev:tcheckbtn autosize=true caption="从头匹配" - height=21 + height=22 left=370 top=7 visible=true - width=95 + width=111 end end object sbfind:tstatusbar diff --git a/designer/ctl_mgr/resource.tfm/t_shortcut_keys_view.tfm b/designer/ctl_mgr/resource.tfm/t_shortcut_keys_view.tfm new file mode 100644 index 0000000..c9907b0 --- /dev/null +++ b/designer/ctl_mgr/resource.tfm/t_shortcut_keys_view.tfm @@ -0,0 +1,65 @@ +object shortcut_keys_view:t_shortcut_keys_view + caption="快捷键浏览" + font=< + height=19 + width=9 + escapement=0 + orientation=0 + weight=400 + italic=0 + underline=0 + strikeout=0 + charset=134 + outprecision=3 + clipprecision=2 + quality=1 + pitchandfamily=49 + facename="新宋体" + color=0 + > + + height=684 + left=711 + minmaxbox=false + onclose=shortcut_keys_view_close + parentfont=false + top=459 + visible=false + width=590 + object panel1:tpanel + align=albottom + autosize=true + caption="panel1" + height=34 + left=0 + top=611 + width=574 + object fokbtn:tbtn + autosize=true + caption="确定" + height=22 + left=242 + onclick=fokbtn_clk + top=6 + width=54 + end + end + object shortcutview:tlistview + align=alclient + caption="listview1" + columns= [< + width=200 + text="快捷键" + > + < + width=500 + text="说明" + > + ] + height=611 + left=0 + parentfont=true + top=0 + width=574 + end +end \ No newline at end of file diff --git a/designer/ctl_mgr/t_shortcut_keys_view.tsf b/designer/ctl_mgr/t_shortcut_keys_view.tsf new file mode 100644 index 0000000..3dca5ae --- /dev/null +++ b/designer/ctl_mgr/t_shortcut_keys_view.tsf @@ -0,0 +1,68 @@ +type t_shortcut_keys_view=class(tdcreateform) + uses tslvcl; + panel1:tpanel; + fokbtn:tbtn; + shortcutview:tlistview; + function Create(AOwner);override; //构造 + begin + inherited; + shortcutview.AppendItems(init_shortcut_keys()); + end + + function shortcut_keys_view_close(o;e); + begin + e.skip := true; + Visible := false; + end + + function fokbtn_clk(o;e); + begin + Visible := false; + end + function Recycling();override; //回收变量 + begin + inherited; + ci := self.classinfo(); //将成员变量赋值为nil避免循环引用 + for i,v in ci["members"] do + begin + if v["const"] then continue; + if v["static"] then continue; + invoke(self,v["name"],nil); + end + end + function init_shortcut_keys(); + begin + return array(("ctrl+o","打开"), + ("ctrl+N","新建"), + ("ctrl+s","保存"), + ("ctrl+F","查找窗口"), + ("ctrl+R","替换窗口"), + ("ctrl+a","全选"), + ("ctrl+c","拷贝选择"), + ("ctrl+D","复制被插入当前行"), + ("ctrl+v","粘贴"), + ("ctrl+x","剪切选择"), + ("ctrl+G","定位到行"), + ("ctrl+L|Y", "删除当前行"), + ("tab | shift+tab","多行选中时缩进"), + ("ctrl+/","注释当前选择"), + ("ctrl+\\","取消当前注释"), + ("ctrl+U","反撤销"), + ("ctrl+z","撤销"), + ("ctrl+tab","切换标签"), + ("ctrl+J","打开tsl函数查找面板"), + ("F2","跳转到下一个断点行"), + ("F5","添加删除断点"), + ("Alt+F5","将选中字符串转换为大写"), + ("ctl+F5","将选中字符串转换为小写"), + ("F3","正向搜索先前搜索的字符"), + ("ctrl+F3","反向搜索先前搜索的字符"), + ("ctrl+tab","切换标签页"), + ("F9","执行当前页的代码"), + ("ctrl+F9","打开执行代码编辑器"), + ("F7","显示隐藏日志窗口"), + ("F1","对于tsl语言查找当前光标所在位置的帮助"), + ("alt+m","弹出tsl代码地图"));; + end + +end diff --git a/designer/ctl_mgr/vcldesginer.tpj b/designer/ctl_mgr/vcldesginer.tpj index 75b4d2c..df0357d 100644 --- a/designer/ctl_mgr/vcldesginer.tpj +++ b/designer/ctl_mgr/vcldesginer.tpj @@ -43,9 +43,14 @@ array( "name":"t_function_finder", "type":"form", "dir":"" + ), + "t_shortcut_keys_view":( + "name":"t_shortcut_keys_view", + "type":"form", + "dir":"" ) ), - "mainform":"textcompclassmgr", + "mainform":"t_shortcut_keys_view", "entryscript":"vcldesginer", "commandline":"\"$(TSL_EXE)\" \"$(FULL_CURRENT_PATH)\" -libpath \"$(SEARCH_PATH)\"" ) \ No newline at end of file diff --git a/designer/utslcodeeditor.tsf b/designer/utslcodeeditor.tsf index 9741630..092f737 100644 --- a/designer/utslcodeeditor.tsf +++ b/designer/utslcodeeditor.tsf @@ -1996,6 +1996,7 @@ type TEditer=class(TCustomcontrol) // CreateAFile(); end ffuncfind := new t_function_finder(self); + FShortCutshower := new t_shortcut_keys_view(self); end function PopUpAuxiliary(); begin @@ -3188,7 +3189,10 @@ type TEditer=class(TCustomcontrol) // end "快捷键说明": begin - s := ""; + if not FShortCutshower.Parent then FShortCutshower.Parent := self; + InitShowWndPos(FShortCutshower,"surcut",500,150,true); + FShortCutshower.Show(); + {s := ""; s += "ctrl+o 打开\r\n"; s += "ctrl+N 新建\r\n"; s += "ctrl+s 保存\r\n"; @@ -3219,7 +3223,7 @@ type TEditer=class(TCustomcontrol) // s += "F7 显示隐藏日志窗口\r\n"; s += "F1 对于tsl语言查找当前光标所在位置的帮助\r\n"; s += "alt+m 弹出tsl代码地图\r\n"; - messageboxa(s,"快捷键说明",0,self); + messageboxa(s,"快捷键说明",0,self);} end "撤销": begin @@ -3721,9 +3725,9 @@ type TEditer=class(TCustomcontrol) // begin FTslChmHelp.ShowTslLangChm(); end - function InitShowWndPos(wnd,n,ix,iy); //计算初始位置 + function InitShowWndPos(wnd,n,ix,iy,flg); //计算初始位置 begin - if not FFistShows[n]then + if flg or (not FFistShows[n])then begin FFistShows[n]:= true; xy := Clienttoscreen(ix,iy); @@ -4262,6 +4266,7 @@ type TEditer=class(TCustomcontrol) // FListPages; FFindWnd; ffuncfind; + FShortCutshower; FFindListWnd; FEchoWnd; FGotoLineWnd; diff --git a/designer/utslvcldcomponents.tsf b/designer/utslvcldcomponents.tsf index 7bd465c..ac8ad80 100644 --- a/designer/utslvcldcomponents.tsf +++ b/designer/utslvcldcomponents.tsf @@ -1004,11 +1004,10 @@ type TDVirutalWindow = class(TCustomControl) // function Create(AOwner);override; begin fminusfileds := array(); + FWindowFileds := array("left","top","height","width"); inherited; width := 30; - height := 30; - FWindowFileds := array("left","top","height","width"); - //ParentFont := true; + height := 30; end function paint();override; begin @@ -1569,10 +1568,17 @@ type TGraphicbevelWindow = class(TDVirutalWindow) **} function paint();override; begin - bd := BindComp; + cv := canvas; + bd := BindComp; + if not bd.Parentcolor then + begin + c := ClientRect; + cv.brush.color := bd.color; + cv.fillrect(c); + end bd.width := width; bd.height := height; - bd.canvas.Handle := canvas.Handle; + bd.canvas.Handle := cv.Handle; bd.paint(); end function FontChanged(o);override; @@ -1596,7 +1602,7 @@ type TGraphicbevelWindow = class(TDVirutalWindow) width := bd.width; height := bd.Height; BindComp := bd; - WindowFileds := array("left","top","width","height","color","parentcolor","font","parentfont","visible","align"); + WindowFileds := array("left","top","width","height","font","parentfont","visible","align");//,"parentcolor" minusfileds := array("caption","popupMenu","action","border","anchors"); end function DesigningSizer();override; diff --git a/editor-install.exe b/editor-install.exe index c7da34b..2d3dbf4 100644 Binary files a/editor-install.exe and b/editor-install.exe differ diff --git a/funcext/tvclib/tcontrol.tsf b/funcext/tvclib/tcontrol.tsf index acfe309..d2a83c1 100644 --- a/funcext/tvclib/tcontrol.tsf +++ b/funcext/tvclib/tcontrol.tsf @@ -1503,8 +1503,8 @@ type tcontrol = class(tcomponent) if ft then begin c := caption; - w := ft.Width*(max(2,length(c)))+2; - h := ft.Height+2; + w := ft.Width*(length(c)+2); + h := ft.Height+3; end end protected diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index 59f6630..47d522d 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -574,7 +574,7 @@ type TPanel=class(TScrollingWinControl) // return frclient; end published - property borderwidth read fborderwidth write setborderwidth; + property borderwidth:natural read fborderwidth write setborderwidth; property bevelinner:tbevelcut read fbevelinner write setbevelinner; property bevelouter:tbevelcut read fbevelouter write setbevelouter; property bevelwidth:integer read fbevelwidth write setbevelwidth; diff --git a/funcext/tvclib/utslvclstdctl.tsf b/funcext/tvclib/utslvclstdctl.tsf index c4085fa..2545fe6 100644 --- a/funcext/tvclib/utslvclstdctl.tsf +++ b/funcext/tvclib/utslvclstdctl.tsf @@ -2426,10 +2426,12 @@ type tcustombevel = class(TGraphicControl) function create(AOwner); begin inherited; + Color := clMenu; + transparent := false; caption := ""; fshape := bsbox; fstyle := bsLowered; - end + end function paint();override; begin if iffuncptr(OnPaint) then call(OnPaint,self(true)); diff --git a/tsleditor.exe b/tsleditor.exe index 1e54ee0..a333768 100644 Binary files a/tsleditor.exe and b/tsleditor.exe differ diff --git a/tslvcltool.exe b/tslvcltool.exe index 26751f1..9433e45 100644 Binary files a/tslvcltool.exe and b/tslvcltool.exe differ