This commit is contained in:
2025-04-10 17:02:24 +08:00
parent ab8b5bb6a5
commit ef1986a030
49 changed files with 188 additions and 1723 deletions
+8 -2
View File
@@ -44,6 +44,7 @@ type teditorform = class(TVCform) //
const c_m_editor = "默认";
const c_m_exer = "当前执行程序";
const c_m_help = "帮助";
const c_m_manu = "使用手册";
const c_m_tsl_help = "tsl语言帮助";
const c_m_about = "关于";
function WMACTIVATE(o,e):WM_ACTIVATE;override; //激活
@@ -400,7 +401,7 @@ type teditorform = class(TVCform) //
FHelpMenu := new TMenu(self);
FHelpMenu.Caption := c_m_help;
FHelpMenus := array();
for i,v in array(c_m_tsl_help,c_m_about) do
for i,v in array(c_m_manu,c_m_tsl_help,c_m_about) do
begin
vi := new TMenu(self);
vi.Caption := v;
@@ -538,6 +539,10 @@ type teditorform = class(TVCform) //
function HelpClick(o,e);
begin
case o.Caption of
c_m_manu:
begin
return FEdter.showeditorchm();
end
c_m_tsl_help:
begin
return FEdter.ShowTslLangChm();
@@ -1106,7 +1111,7 @@ type TBlockManager=class(TVCForm)
bi.parent := self;
end
FList := new TListView(self);
FList.Columns := array(("text":"前缀","width":40),("text":"名称","width":130),("text":"","width":200),("text":"扩展","width":430));
FList.Columns := array(("text":"前缀","width":40),("text":"显示","width":130),("text":"提示关键字","width":200),("text":"插入代码块","width":430));
FList.ColumnAsBool(0);
{
r := array();
@@ -1572,6 +1577,7 @@ type tdirviewer = class(tcustomcontrol)
addtoolbar();
fnodes := array();
FEdit := new tedit(self);
FEdit.autosize := true;
FEdit.parent := self;
FEdit.Align := alTop;
FTree := new TTreeView(self);
+22
View File
@@ -1752,10 +1752,15 @@ type TTslChmHelp=class()
begin
if fapi then return fapi.open_chm((FTSLinterpPath+FChmName));
end
function showeditorchm();
begin
if fapi then return fapi.open_chm((FTSLinterpPath+FeditorChmName));
end
function Create(p);
begin
fapi := p;
FChmName := "help"$ioFileseparator()$"LANGUAGEGUIDE.CHM";
FeditorChmName := "help"$ioFileseparator()$"EDITORGUIDE.CHM";
FTSLinterpPath := TS_ModulePath();
end
property ChmName read FChmName write FChmName;
@@ -1764,6 +1769,7 @@ type TTslChmHelp=class()
FTSLinterpPath;
FHanle;
FChmName;
FeditorChmName;
end
type TEditer=class(TCustomcontrol) //包括工具栏,状态栏,输出,查找
@@ -3735,6 +3741,10 @@ type TEditer=class(TCustomcontrol) //
begin
FTslChmHelp.ShowTslLangChm();
end
function showeditorchm();
begin
FTslChmHelp.showeditorchm();
end
function InitShowWndPos(wnd,n,ix,iy,flg); //计算初始位置
begin
if flg or (not FFistShows[n])then
@@ -4698,6 +4708,17 @@ type TEditerEchoWnd=class(TSynMemoNorm) //
ClearAll();
AppendString("ctrl+z 停止;ctrl+c 复制选择\r\n");
end;
fmcp := new TMenu(self);
fmcp.Caption := "复制";
fmcp.parent := m;
fmcp.OnClick := function(o,e)
begin
self.ExecuteCommand(self.ecCopy);
end;
OnPopupMenu := function(o,e);
begin
if fmcp then fmcp.Enabled := SelAvail;
end
FProcess := new tcustomprocess(self);
FProcess.OnEcho := thisfunction(TEchoToString);
FProcess.onended := thisfunction(onprocend);
@@ -4811,6 +4832,7 @@ type TEditerEchoWnd=class(TSynMemoNorm) //
FDoLockTime;
F_Highlighter;
private
[weakref]fmcp;
function format_build_params(d);
begin
r := d["build"]+"="+format('"%s" ',d["buildfile"]);
+5 -6
View File
@@ -1505,17 +1505,16 @@ type TxmlSynHighLighter = class(tcustomsynhighlighter)
end
function SetTToken(tokens,ttk,idx,ext);override;
begin
st := ExecuteCommand("getcurrentpairstate",">");
st1 := st.state;
d := inherited;
if not d then return ;
if st1=1 and st.state=1 then
st := ExecuteCommand("getcurrentpairstate",">");
if st then st1 := st.state;
if st1=1 {and st.state=1} then
begin
st.subitemadd();
if st.subitemcount()>1 then
begin
end else
begin
@@ -1532,7 +1531,7 @@ type TxmlSynHighLighter = class(tcustomsynhighlighter)
d.FFColor := sysfuncolor;
end
end
end;
end
return d;
//echo "\r\n>>>",st1,"====",st2;
+11
View File
@@ -720,12 +720,19 @@ type TTslDebuga=class(TCustomControl)
FShowText.Border := true;
pmenu := new TPopUpMenu(self);
cmu := new TMenu(self);
cmu2 := new TMenu(self);
cmu.OnClick := function(o,e)
begin
FShowText.Text := "";
end;
cmu.Caption := "清除";
cmu2.Caption := "复制";
cmu.Parent := pmenu;
cmu2.Parent := pmenu;
cmu2.onClick := function(o,e)
begin
FShowText.ExecuteCommand(FShowText.ecCopy);
end
FShowText.PopUpMenu := pmenu;
dbwnd.addwnds(FStackList,FVaraiblesList,FCommandtext,FShowText);
ExecuteCommand("clearall");
@@ -2702,6 +2709,10 @@ type TGroupGridA=class(TDrawGrid)
o.Visible := false;
callDatafunction(FCelledit,o._Tag,o.text);
end
VK_ESCAPE:
begin
o.Visible := false;
end
end;
end
function SetNodeData(d,ncls); //设置数据
+7 -2
View File
@@ -579,11 +579,12 @@ type TVclDesigner = class(tvcform)
)),
("type":"menu","caption":"帮助","items":(
("type":"menu","caption":"关于","onclick":thisfunction(openabout)),
("type":"menu","caption":"使用手册","onclick":thisfunction(OpenHelp),
("type":"menu","caption":"使用手册","onclick":thisfunction(OpenHelp)),
("type":"menu","caption":"tsl语言","onclick":thisfunction(OpenHelp),
"bitmap":getmanubmpinfo()),
("type":"menu","caption":"控件详情","onclick":thisfunction(OpenHelp),
"bitmap":getctlsbmpinfo()),
("type":"menu","caption":"范例..","onclick":thisfunction(OpenExaple),
("type":"menu","caption":"范例","onclick":thisfunction(OpenExaple),
"bitmap":getexamplesbmpinfo())
),
@@ -662,6 +663,10 @@ type TVclDesigner = class(tvcform)
FChmHelper := new unit(UtslCodeEditor).TTslChmHelp(_wapi);
end
case o.caption of
"tsl语言":
begin
FChmHelper.ChmName := "help"$ioFileseparator()$"LANGUAGEGUIDE.CHM";
end
"使用手册":
begin
FChmHelper.ChmName := "help"$ioFileseparator()$"designerUserGuid.CHM";
+13 -1
View File
@@ -1386,7 +1386,11 @@ type TTSLDataGrid=class(TDrawGrid)
function EditKeyPress(o,e);
begin
k := e.wparam;
if k=VK_ESCAPE or k=13 then
if k=VK_ESCAPE then
begin
o.visible := false;
end else
if k=13 then
begin
info := o._tag;
if ifarray(info)then
@@ -1525,6 +1529,10 @@ type TGridCellNaturalEdit = class(TGridPropertyRender,TPropertyNatural)
end
function EditKeyPress(o,e);virtual;
begin
if VK_ESCAPE=e.wparam then
begin
o.visible := false;
end else
if 13 = e.wparam then
begin
try
@@ -1661,6 +1669,10 @@ type TGridCellStringEdit = class(TGridCellNaturalEdit)
end
function EditKeyPress(o,e);override;
begin
if e.wparam=VK_ESCAPE then
begin
o.visible := false;
end else
if e.wparam <>13 then
begin
end else inherited;