parent
b78f2d8bfd
commit
f5c545746f
|
|
@ -4096,40 +4096,7 @@ function CreateATslMemoUndoItem(AReason,AStart,AEnd,ChangeText,SelMode);
|
||||||
begin
|
begin
|
||||||
return new TTslMemoUndoItem(AReason,AStart,AEnd,ChangeText,SelMode);
|
return new TTslMemoUndoItem(AReason,AStart,AEnd,ChangeText,SelMode);
|
||||||
end
|
end
|
||||||
type TCanvsRgnClipAutoSave=class
|
|
||||||
{**
|
|
||||||
@expan(说明) 裁剪canvas区域,销毁时还原 %%
|
|
||||||
**}
|
|
||||||
function Create(cvs,rec);
|
|
||||||
begin
|
|
||||||
{**
|
|
||||||
@explan(说明)构造裁剪对象 %%
|
|
||||||
@param(cvs)(tcustomcanvas) canvas 对象 %%
|
|
||||||
@param(rec)(array(左上右下))区域 %%
|
|
||||||
**}
|
|
||||||
if(cvs is class(tcustomcanvas))and cvs.HandleAllocated()and ifarray(rec)then
|
|
||||||
begin
|
|
||||||
FW32api := cvs._wapi;
|
|
||||||
FCvsHandle := cvs.Handle;
|
|
||||||
FCrg := FW32api.CreateRectRgn(rec[0],rec[1],rec[2],rec[3]);
|
|
||||||
FBKrg := FW32api.SelectClipRgn(FCvsHandle,FCrg); //裁剪区域
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function Destroy();
|
|
||||||
begin
|
|
||||||
if FW32api and FCvsHandle and FBKrg and FCrg then
|
|
||||||
begin
|
|
||||||
FW32api.SelectClipRgn(FCvsHandle,FBKrg); //恢复区域
|
|
||||||
FW32api.DeleteObject(FCrg); //销毁区域
|
|
||||||
end
|
|
||||||
FW32api := nil;
|
|
||||||
end
|
|
||||||
private
|
|
||||||
FBKrg;
|
|
||||||
FCrg;
|
|
||||||
FCvsHandle;
|
|
||||||
FW32api;
|
|
||||||
end
|
|
||||||
InitialIzation
|
InitialIzation
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2047,6 +2047,40 @@ type TIniFileExter=class()
|
||||||
ffilename;
|
ffilename;
|
||||||
finiobj;
|
finiobj;
|
||||||
end
|
end
|
||||||
|
type TCanvsRgnClipAutoSave=class
|
||||||
|
{**
|
||||||
|
@expan(说明) 裁剪canvas区域,销毁时还原 %%
|
||||||
|
**}
|
||||||
|
function Create(cvs,rec);
|
||||||
|
begin
|
||||||
|
{**
|
||||||
|
@explan(说明)构造裁剪对象 %%
|
||||||
|
@param(cvs)(tcustomcanvas) canvas 对象 %%
|
||||||
|
@param(rec)(array(左上右下))区域 %%
|
||||||
|
**}
|
||||||
|
if(ifobj(cvs))and cvs.HandleAllocated()and ifarray(rec)then
|
||||||
|
begin
|
||||||
|
FW32api := cvs._wapi;
|
||||||
|
FCvsHandle := cvs.Handle;
|
||||||
|
FCrg := FW32api.CreateRectRgn(rec[0],rec[1],rec[2],rec[3]);
|
||||||
|
FBKrg := FW32api.SelectClipRgn(FCvsHandle,FCrg); //裁剪区域
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function Destroy();
|
||||||
|
begin
|
||||||
|
if FW32api and FCvsHandle and FBKrg and FCrg then
|
||||||
|
begin
|
||||||
|
FW32api.SelectClipRgn(FCvsHandle,FBKrg); //恢复区域
|
||||||
|
FW32api.DeleteObject(FCrg); //销毁区域
|
||||||
|
end
|
||||||
|
FW32api := nil;
|
||||||
|
end
|
||||||
|
private
|
||||||
|
FBKrg;
|
||||||
|
FCrg;
|
||||||
|
FCvsHandle;
|
||||||
|
FW32api;
|
||||||
|
end
|
||||||
implementation
|
implementation
|
||||||
function includestate(u,s);
|
function includestate(u,s);
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -932,64 +932,21 @@ type TcustomGridCtl = class(tcustomscrollcontrol) //
|
||||||
FCurrentSizeId;
|
FCurrentSizeId;
|
||||||
FCurrentSizePos;
|
FCurrentSizePos;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type TCanvsRgnClipAutoSave=class()//canvas 裁剪
|
|
||||||
{**
|
|
||||||
@expan(说明) 裁剪canvas区域,销毁时还原 %%
|
|
||||||
**}
|
|
||||||
function Create(cvs,rec);
|
|
||||||
begin
|
|
||||||
{**
|
|
||||||
@explan(说明)构造裁剪对象 %%
|
|
||||||
@param(cvs)(tcustomcanvas) canvas 对象 %%
|
|
||||||
@param(rec)(array(左上右下))区域 %%
|
|
||||||
**}
|
|
||||||
if(cvs is class(tcustomcanvas))and cvs.HandleAllocated()and ifarray(rec)then
|
|
||||||
begin
|
|
||||||
FW32api := cvs._wapi;
|
|
||||||
FCvsHandle := cvs.Handle;
|
|
||||||
FCrg := FW32api.CreateRectRgn(rec[0],rec[1],rec[2],rec[3]);
|
|
||||||
FBKrg := FW32api.SelectClipRgn(FCvsHandle,FCrg); //裁剪区域
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function Destroy();
|
|
||||||
begin
|
|
||||||
if FW32api and FCvsHandle and FBKrg and FCrg then
|
|
||||||
begin
|
|
||||||
FW32api.SelectClipRgn(FCvsHandle,FBKrg); //恢复区域
|
|
||||||
FW32api.DeleteObject(FCrg); //销毁区域
|
|
||||||
end
|
|
||||||
FW32api := nil;
|
|
||||||
end
|
|
||||||
private
|
|
||||||
FBKrg;
|
|
||||||
FCrg;
|
|
||||||
FCvsHandle;
|
|
||||||
FW32api;
|
|
||||||
end
|
|
||||||
implementation
|
implementation
|
||||||
type TPAINTCOUNT=class
|
type TPAINTCOUNT=class()//绘制标记
|
||||||
{**
|
|
||||||
@explan(说明) 绘制计数 %%
|
|
||||||
**}
|
|
||||||
function create(v);
|
function create(v);
|
||||||
begin
|
begin
|
||||||
if v is class(TControl)then
|
FPainter := v;
|
||||||
begin
|
v.IncPaintLock();
|
||||||
FPainter := v;
|
|
||||||
v.IncPaintLock();
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
function Destroy();
|
function Destroy();
|
||||||
begin
|
begin
|
||||||
if FPainter then FPainter.DecPaintLock();
|
FPainter.DecPaintLock();
|
||||||
FPainter := nil;
|
FPainter := nil;
|
||||||
end
|
end
|
||||||
FPainter;
|
FPainter;
|
||||||
end
|
end
|
||||||
type TMerger=class
|
type TMerger=class()//合并单元格类型
|
||||||
public
|
public
|
||||||
FCells;
|
FCells;
|
||||||
function Create();
|
function Create();
|
||||||
|
|
@ -1000,12 +957,12 @@ type TMerger=class
|
||||||
begin
|
begin
|
||||||
return length(FCells);
|
return length(FCells);
|
||||||
end
|
end
|
||||||
function mergeid(i,j);
|
function mergeid(i,j);//是否合并
|
||||||
begin
|
begin
|
||||||
i := FCells[0];
|
i := FCells[0];
|
||||||
j := FCells[1];
|
j := FCells[1];
|
||||||
end
|
end
|
||||||
function CellInMerge(i,j);
|
function CellInMerge(i,j);//是属于某个合并
|
||||||
begin
|
begin
|
||||||
if isok()then
|
if isok()then
|
||||||
begin
|
begin
|
||||||
|
|
@ -1013,7 +970,7 @@ type TMerger=class
|
||||||
end
|
end
|
||||||
return false;
|
return false;
|
||||||
end
|
end
|
||||||
function GetRange();
|
function GetRange();//获得合并的区域
|
||||||
begin
|
begin
|
||||||
r := array();
|
r := array();
|
||||||
if isok()then
|
if isok()then
|
||||||
|
|
@ -1022,46 +979,11 @@ type TMerger=class
|
||||||
end
|
end
|
||||||
return r;
|
return r;
|
||||||
end
|
end
|
||||||
function SetMergeCells(rec);
|
function SetMergeCells(rec);//合并区域
|
||||||
begin
|
begin
|
||||||
FCells := array();
|
FCells := array();
|
||||||
if not ifarray(rec)then return;
|
if not ifarray(rec)then return;
|
||||||
if(rec[2]>= rec[0]and rec[3]>rec[1])or(rec[2]>rec[0]and rec[3]>= rec[1])then FCells := rec;
|
if(rec[2]>= rec[0]and rec[3]>rec[1])or(rec[2]>rec[0]and rec[3]>= rec[1])then FCells := rec;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
type TCanvsRgnClipAutoSave=class()//canvas 裁剪
|
|
||||||
{**
|
|
||||||
@expan(说明) 裁剪canvas区域,销毁时还原 %%
|
|
||||||
**}
|
|
||||||
function Create(cvs,rec);
|
|
||||||
begin
|
|
||||||
{**
|
|
||||||
@explan(说明)构造裁剪对象 %%
|
|
||||||
@param(cvs)(tcustomcanvas) canvas 对象 %%
|
|
||||||
@param(rec)(array(左上右下))区域 %%
|
|
||||||
**}
|
|
||||||
if(cvs is class(tcustomcanvas))and cvs.HandleAllocated()and ifarray(rec)then
|
|
||||||
begin
|
|
||||||
FW32api := cvs._wapi;
|
|
||||||
FCvsHandle := cvs.Handle;
|
|
||||||
FCrg := FW32api.CreateRectRgn(rec[0],rec[1],rec[2],rec[3]);
|
|
||||||
FBKrg := FW32api.SelectClipRgn(FCvsHandle,FCrg); //裁剪区域
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function Destroy();
|
|
||||||
begin
|
|
||||||
if FW32api and FCvsHandle and FBKrg and FCrg then
|
|
||||||
begin
|
|
||||||
FW32api.SelectClipRgn(FCvsHandle,FBKrg); //恢复区域
|
|
||||||
FW32api.DeleteObject(FCrg); //销毁区域
|
|
||||||
end
|
|
||||||
FW32api := nil;
|
|
||||||
end
|
|
||||||
private
|
|
||||||
FBKrg;
|
|
||||||
FCrg;
|
|
||||||
FCvsHandle;
|
|
||||||
FW32api;
|
|
||||||
end
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
Loading…
Reference in New Issue