界面库

拆分
This commit is contained in:
JianjunLiu
2022-05-11 16:47:43 +08:00
parent 20d268ed0d
commit ab6488d42d
31 changed files with 33601 additions and 32969 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
type TEditerForm = class(TVCform) //编辑器主窗口
uses tslvcl,UTslSynMemo,UtslCodeEditor;
uses utslvclauxiliary,tslvcl,UTslSynMemo,UtslCodeEditor;
function WMACTIVATE(o,e):WM_ACTIVATE;override; //激活
begin
inherited;
+6 -7
View File
@@ -3,7 +3,7 @@ unit tslvclDesigner;
@explan(说明)设计器库 %%
**}
interface
uses tslvcl,cstructurelib,UVCPropertyTypesPersistence,utslmemo,UDesignerProject;
uses cstructurelib,utslvclauxiliary,utslvclbase,utslvclgdi,tslvcl,UVCPropertyTypesPersistence,utslmemo,UDesignerProject;
function initlib();
//*******设计控件基类**********************
@@ -272,7 +272,7 @@ type TDComponent = class()
ndp := nd.parent;
if ndp then
begin
dm := gettswin32api().MessageBoxA(nd.owner.handle,"¼´½«É¾³ý:"+nd.Caption,"ɾ³ý",0x1 .| 0x30);
dm := MessageBoxA("¼´½«É¾³ý:"+nd.Caption,"ɾ³ý",0x1 .| 0x30,nd.owner);//
if dm<>1 then exit;
wd := nd.Component.Cwnd;
ds := nd.owner.Designer;
@@ -5532,7 +5532,7 @@ type TGridCellBitmapEdit = class(TBtnCellDrawVTtype,TPropertyBitmap)
{**
@explan(说明) 绘制格子 %%
**}
if ifarray(d) and (d["value"] is class(tbitmap) )then inherited;
if ifarray(d) and (d["value"] is class(TcustomBitmap) )then inherited;
end
function create(AOwner);override;
@@ -5582,7 +5582,7 @@ type TGridCellIconEdit = class(TBtnCellDrawVTtype,TPropertyIcon)
{**
@explan(说明) 绘制格子 %%
**}
if ifarray(d) and (d["value"] is class(ticon)) then inherited;
if ifarray(d) and (d["value"] is class(tcustomicon)) then inherited;
end
function create(AOwner);override;
begin
@@ -7555,7 +7555,7 @@ type TDesigImageList = class(TControlImageList)
n := item.ClassName;
id := FIconMaps[n];
bmp := item.bitmap();
if (bmp is class(tbitmap)) and bmp.HandleAllocated() then
if (bmp is class(TcustomBitmap)) and bmp.HandleAllocated() then
begin
if id>=0 then
begin
@@ -8878,7 +8878,6 @@ F7A31439DD9B0EC80BCFCBD56CFE0506116665A7640DF50A54EEE2F8BDA750000
cwnd := cp.Cwnd;
cwnd.PopupMenu := mu;
xy := o.ClientToScreen(e.lolparamsigned,e.hilparamsigned);
//_send_(WM_CONTEXTMENU,self.handle,makeposition(xy[0],xy[1]),1);
_send_(WM_CONTEXTMENU,cwnd.handle,makeposition(xy[0],xy[1]),1);
return ;
uf := TPM_LEFTALIGN .| TPM_TOPALIGN .| TPM_RIGHTBUTTON;
@@ -9422,7 +9421,7 @@ type TBitmapGrid = class(TGridList)
public
function CheckItem(v);override;
begin
return (v is class(tbitmap)) and inherited;
return (v is class(TcustomBitmap)) and inherited;
end
function create(AOwner);override;
begin
+1 -1
View File
@@ -1,6 +1,6 @@
Unit UDesignerProject;
interface
uses tslvcl,utslmemo,UTslSynMemo,UVCPropertyTypesPersistence,tslvclDesigner,UtslCodeEditor;
uses utslvclauxiliary,tslvcl,utslmemo,UTslSynMemo,UVCPropertyTypesPersistence,tslvclDesigner,UtslCodeEditor;
function SetWndPostWithMouse(wnd,lft);
type TProjectManagerForm = class(TVCForm) //工程管理 TCustomControl
function Create(AOwner);override;
+7464 -7464
View File
File diff suppressed because it is too large Load Diff
+138 -14
View File
@@ -3,7 +3,7 @@ interface
{**
@explan(说明) tsl语法编辑器库
**}
uses TslVcl,UTslMemo;
uses utslvclauxiliary,UTslMemo,TslVcl;
function FileSaveThreader(o,d);
type TTSLCompletion= class(TSynCompletion)
{**
@@ -1555,6 +1555,7 @@ type TTsfFileParser = class //
//FFileWorker := new TThreadWorker("this.OnMessage :=findfunction('UTslSynMemo.FileSaveThreader') ;");
FFindDirs := array();
end
function DispatchMethod(o,d);//分发消息
begin
if not ifarray(d) then return ;
@@ -1608,7 +1609,8 @@ type TTsfFileParser = class //
end
if r then
begin
//echo "\r\nlodad";
//echo "\r\nlodad";
vmsg := r["msg"];
end else
begin
s := d["value"];
@@ -1618,32 +1620,53 @@ type TTsfFileParser = class //
cls := array();
ScriptDelBlocks(r["blcks"],str2array(s,"\n"),cls);
r["blcks"] := cls;
r["blcks"] := cls;
vmsg := getmsgd_Crc32(s);//GetMsgdigest(s,0);
end
ext := array();
FormatFunction(rti,r["functions"],rt,"",r["lines"],ext,1);
FormatBlocks(rti,r["blcks"],rt,"",nil,ext,1);
FormatWords(rti,r["words"],rt,"",ext,1);
dounits := array(vmsg);
uout := array();
for i,v in r["units"] do //单元
begin
begin
vfn := checknamespacename(v);
if m=(lowercase(vfn)+".tsf") then continue;
vi := LoadByName(vfn);
if vi then
begin
if vmsg=vi["msg"] then continue;
if vi["msg"] =vmsg then
begin
continue;
end
ext := array();
FormatFunction(rti,vi["functions"],rt,vfn,vi["lines"],ext,4);
FormatBlocks(rti,vi["blcks"],rt,vfn,nil,ext,4);
FormatWords(rti,vi["words"],rt,vfn,ext,4);
end
dounits[length(dounits)] := vi["msg"];
loadunits(vi["units"],dounits,uout);
end
end
//mtic;
for i,v in uout do
begin
vfn := checknamespacename(v);
if m=(lowercase(vfn)+".tsf") then continue;
vi := LoadByName(vfn);
if vi then
begin
if vi["msg"] =vmsg then
begin
continue;
end
ext := array();
FormatFunction(rti,vi["functions"],rt,vfn,vi["lines"],ext,4);
end
end
uout := array();
//echo "\r\n other time:",mtoc;
dounits := array(vmsg);
for i,v in r["class"] do //类
begin
vfn := checknamespacename(v);
@@ -1651,13 +1674,27 @@ type TTsfFileParser = class //
vi := LoadByName(vfn);
if vi then
begin
if vmsg=vi["msg"] then continue;
if vi["msg"] in dounits then continue;
ext:= array();
FormatFunction(rti,vi["functions"],rt,vfn,vi["lines"],ext,4);
FormatWords(rti,vi["words"],rt,vfn,ext,4);
//ident 文件名
loadclasses(vi["class"],dounits,uout);
end
end
for i,v in uout do
begin
vfn := checknamespacename(v);
if m=(lowercase(vfn)+".tsf") then continue;
vi := LoadByName(vfn);
if vi then
begin
if vi["msg"]=vmsg then continue;
ext:= array();
FormatFunction(rti,vi["functions"],rt,vfn,vi["lines"],ext,4);
FormatWords(rti,vi["words"],rt,vfn,ext,4);
end
end
//FormatFile(rti,FCacheS,rt,3,m);
return rt;
//return o.postmessage(r);
@@ -1665,6 +1702,74 @@ type TTsfFileParser = class //
end
end
private
function loadunitcalss(us,cs,dounits,uout,cout);
begin
if not ifarray(uout) then uout := array();
if not ifarray(cout) then cout := array();
for i,v in us do
begin
vfn := checknamespacename(v);
vi := LoadByName(vfn);
if vi then
begin
if vi["msg"] in dounits then continue;
dounits[length(dounits)] := vi["msg"];
uout[length(uout)] := vfn;
loadunitcalss(vi["units"],vi["class"],dounits,uout,cout);
end
end
for i,v in cs do
begin
vfn := checknamespacename(v);
if m=(lowercase(vfn)+".tsf") then continue;
vi := LoadByName(vfn);
if vi then
begin
if vi["msg"] in dounits then continue;
dounits[length(dounits)] := vi["msg"];
//ident 文件名
cout[length(cout)] := vfn;
loadunitcalss(vi["units"],vi["class"],dounits,uout,cout);
end
end
end
function loadunits(us,dounits,uout);
begin
if not ifarray(uout) then uout := array();
for i,v in us do
begin
vfn := checknamespacename(v);
vi := LoadByName(vfn);
if vi then
begin
if vi["msg"] in dounits then continue;
dounits[length(dounits)] := vi["msg"];
uout[length(uout)] := vfn;
loadunits(vi["units"],dounits,uout);
end
end
end
function loadclasses(cs,dounits,uout);
begin
if not ifarray(uout) then uout := array();
for i,v in cs do
begin
vfn := checknamespacename(v);
if m=(lowercase(vfn)+".tsf") then continue;
vi := LoadByName(vfn);
if vi then
begin
if vi["msg"] in dounits then continue;
dounits[length(dounits)] := vi["msg"];
//ident 文件名
uout[length(uout)] := vfn;
loadclasses(cs,dounits,uout);
end
end
end
function checknamespacename(v);
begin
for ii in FCacheS do
@@ -1782,7 +1887,7 @@ type TTsfFileParser = class //
end
ScriptDelBlocks(v["msub"],strs,r);
end
end
end
function FormatBlocks(idx,r,d,f,rr,ext,od);
begin
if not ifarray(ext) then ext := array();
@@ -1997,7 +2102,7 @@ type TTsfFileParser = class //
fn := FCacheDir+ioFileseparator()+ModifyFname(n)+".p";
if importfile(ftstream(),"",fn,d)=1 and ifarray(d) then
begin
FCacheS[lowercase(n)] := d;
FCacheS[lowercase(n)] := new tparserdobject(d);
FFilePaths[lowercase(n)] := d["fullpath"];
return d;
end
@@ -2049,4 +2154,23 @@ begin
end
end
type tparserdobject = class
function create(d);
begin
if ifarray(d) then
FData := d;
end
function operator[](idx);
begin
if FData then
return FData[idx];
end
function operator[1](idx,v);
begin
if FData then
FData[idx] := v;
end
private
FData ;
end
end.