编辑器

修正函数名
This commit is contained in:
JianjunLiu 2023-10-10 15:38:37 +08:00
parent eebcbe897f
commit c4b38686ed
4 changed files with 43 additions and 17 deletions

View File

@ -86,11 +86,11 @@ begin
g_dotsavehistory := true;
end
app := initializeapplication();
app.createform(class(TRunEditerForm),fm);
app.createform(class(TRunEditorForm),fm);
fm.OpenAndGotoFileByName(ops);
fm.show();
app.run();
type TRunEditerForm = class(TEditerForm)
type TRunEditorForm = class(TEditorForm)
function Create(AOwner);override;
begin
inherited;

View File

@ -1,4 +1,4 @@
type TEditerForm = class(TVCform) //编辑器主窗口
type teditorform = class(TVCform) //编辑器主窗口
uses utslvclauxiliary,tslvcl,UTslSynMemo,UtslCodeEditor;
function WMACTIVATE(o,e):WM_ACTIVATE;override; //¼¤»î
begin

View File

@ -1,3 +1,3 @@
//tsl代码编辑器-天软-ljj
//20201019
return GetTslEditerStart();
return gettsleditorstart();

View File

@ -4671,9 +4671,10 @@ type TApplicationProperties=class(TComponent)
FTrayData := new TNOTIFYICONDATAA();
end
published
property TrayMenu:tpopupmenu read FPopupMenu write SetPopupMenu;
property TrayIcon:icondata read FTrayIcon write FTrayIcon;
property ShowTray:bool read FShowTray write SetShowTray;
//ÆÁ±Î±ÜÃâ´íÎó
//property TrayMenu:tpopupmenu read FPopupMenu write SetPopupMenu;
//property TrayIcon:icondata read FTrayIcon write FTrayIcon;
//property ShowTray:bool read FShowTray write SetShowTray;
end
type TClipBoard = class(TcustomClipBoard)
@ -5761,17 +5762,32 @@ type Ttfm2Component = class(TTmfParser)
Loadinherited(owner); //µ¼Èë
end
private
function hastfmfile(phs,cn);
function hastfmfile(phs,o,cn);
begin
for i,v in phs do
begin
pi := v+cn+".tfm";
if fileexists("",pi) then
ph := v+cn+".tfm";
if fileexists("",ph) then
begin
return true;
size := filesize("",ph);
if readFile(rwraw(),"",ph,0,size,data)=1 then
begin
LoadFromTfmScript(o,data);
return true;
end
end
end
end
function hastfmresource(o,cn);
begin
global g_w_tfm_resource;
data := g_w_tfm_resource[cn+".tfm"];
if data then
begin
LoadFromTfmScript(o,data);
return true;
end
end
function Loadtfmtoform(o,phs,cn);
begin
for i,v in phs do
@ -5796,17 +5812,14 @@ type Ttfm2Component = class(TTmfParser)
o2 := o;
phs := static GetSourceDirs();
objs := array();
fssourdirs := phs;
//fssourdirs := phs;
while true do
begin
ci := o2.classinfo();
cn := ci["classname"];
if cn="tdcreateform" or cn="tdcreatepanel" then return ;
if hastfmfile(phs,cn) then
begin
Loadtfmtoform(o,phs,cn); //´Ó o2 ¸ÄΪo
return ;
end
if hastfmresource(o,cn) then return ;
if hastfmfile(phs,o,cn) then return ;
ic := ci["inherited"][0];
if ic then
o2 := findclass(ic,o2);
@ -6508,6 +6521,19 @@ end
/////////////////////////³õʼ»¯////////////////////////////////////
function initallib();
begin
global g_w_tfm_resource;
g_w_tfm_resource := array();
try
getglobalcache("@@tsl-resource@@",rs);
for i,v in rs do
begin
if ifstring(i) and ifstring(v) then
begin
g_w_tfm_resource[lowercase(i)] := v;
end
end
except
end
class(tUIglobalData).uisetdata("G_F_CONTROL_IS_CUSTOMPAINT",thisfunction(controlisCustomPaint));
class(tUIglobalData).uisetdata("G_F_TWIN_PROC_",thisfunction(_twinproc_));
class(tUIglobalData).uisetdata("G_F_TIME_PROC_",thisfunction(_timeproc_));