tslediter/designer/utslvcldcomponents.tsf

3709 lines
101 KiB
Plaintext

unit utslvcldcomponents;
interface
uses utslvcldesignerresource, tslvcl;
function registercomponenttodesigner(cls);
type TDComponent = class()
{**
@explan(说明) 设计控件基类
**}
public //注册设计控件
class function GetClassItem(n);
begin
if ifnil(n) then return fdcomponentobjects;
return fdcomponentobjects[n];
end
class function RegestorClassItems(its);
begin
{**
@explan(说明) 注册组件 %%
@param(its)(array of TDComponent) 组件数组 %%
**}
if not ifarray(fdcomponentobjects) then fdcomponentobjects := array();
for i,v in its do
begin
if (v is class(TDComponent) ) then
begin
o := createobject(v);
n := o.dclassname();
if n and ifstring(n) then
begin
n := lowercase(n);
fdcomponentobjects[n]:= o;
end
end
end
end
private
fisiherted;
finheritedparent;
static fdcomponentobjects;
protected
fiscontainerdcmp;
fcomponentclassname;
private //基础数据
feventnametable; //消息处理表
FTreeNode; //树结点
FCwnd; //对应控件
FMenus; //菜单
FBitmap;
FImgs;
function SetImgs(id);
begin
FImgs := id;
end
function GetImgs();
begin
return FImgs;
end
function SetName(v); //设置componentname
begin
SetComponentName(v);
end
function GetName(v); //获得componentname
begin
obj := GetTrueComponent();
if obj then return obj.Name;
end
function SetCwnd(v) //设置显示的窗口控件
begin
if ifnil(FCwnd) and (v is class(TWincontrol)) then FCwnd := v;
end
function SetTreeNode(v); //设置节点
begin
if FTreeNode<>v then
begin
if FTreeNode is class(TComponentTreeNode) then
begin
FTreeNode.Component := nil;
end
FTreeNode := V;
if FTreeNode is class(TComponentTreeNode) then
begin
FTreeNode.Component := self(true);
end
end
end
private //默认事件
FDefaultEvent;
function GetDefalutEvent();
begin
return feventnametable[FDefaultEvent];
end
function OpenClass(o,e);
begin
cp:=o.Component;
if not cp then exit;
nd := cp.TreeNode;
if nd then d := nd.owner.Designer;
if d then
begin
d.openclassfile();
end
end
function opentfm(o,e);
begin
cp:=o.Component;
if not cp then exit;
nd := cp.TreeNode;
if nd then d := nd.owner.Designer;
if d then
begin
d.opentfm();
end
end
public
function libs();virtual;
begin
{**
@explan(说明)关联的unit ;
**}
return array("tslvcl");
end
function InToolBar();virtual;
begin
{**
@explan(说明) 工具栏按钮是否可用
**}
return true;
end
function dclassname();virtual;
begin
{**
@explan(说明) 控件类名称 该函数必须override%%
**}
if fcomponentclassname then return fcomponentclassname;
fcomponentclassname := ComponentClass().classinfo()["classname"];
return fcomponentclassname;
end
function ComponentClass();virtual;
begin
{**
@explan(说明) 控件类 %%
**}
return WndClass();
end
function HitTip();virtual;
begin
{**
@explan(说明)工具栏提示 该函数必须override%%
**}
return dclassname();
return "tcomponent";
end
function classification();virtual;
begin
{**
@explan(说明) 分类 %%
**}
return "常用";
end
function DoControlAlign();virtual;
begin
{**
@explan(说明) 调整控件 %%
**}
if FCwnd is class(TWincontrol) then FCwnd.DoControlAlign();
end
function IsContainer(f);virtual;
begin
{**
@explan(说明) 是否可以容纳其他控件 %%
**}
return fiscontainerdcmp;
end
function bitmap();virtual;
begin
{**
@explan(说明) 图标信息接口 %%
**}
if not FBitmap then
begin
FBitmap := new tbitmap();
d := HexFormatStrToTsl( bitmapinfo());
FBitmap.Readvcon(d);
end
return FBitmap;
end
function bitmapinfo();virtual; //bitmap信息
begin
return getdefaultbmpinfo();
end
function WndClass();virtual;
begin
{**
@explan(说明) 返回显示的窗口类,该函数必须override %%
**}
return class(TWincontrol);
end
function CheckParentWnd(Pwnd);virtual;
begin
{**
@explan(说明) 判断父窗口是否有效 %%
**}
return Pwnd is class(Twincontrol);
end
function CheckParent(dcomp,Pwnd);virtual;
begin
{**
@explan(说明) 判断父节点 %%
@param(pwnd)(window) 返回值,窗口 %%
**}
if not (dcomp is class(TDComponent)) then return 0;
IF not dcomp.CheckChild(self(true)) then return 0;
if not dcomp.IsContainer() then return 0;
Pwnd := dcomp.Cwnd;
if not(CheckParentWnd(Pwnd) ) then return false;
return true;
end
function CheckChild(dcmp);virtual;
begin
{**
@explan(说明) 判断添加的子控件是否合法 %%
**}
return true;
end
function NodeOk(tnode,owner,tree,Pwnd);virtual;
begin
{**
@explan(说明) 节点判断,在此函数判断节点和owner是否合法
可以重写该函数判断是否构建新窗口
%%
@param(tnode)(TComponentTreeNode) 父节点 %%
@param(owner)(tcomponent) 所有者 %%
@param(tree)(TComponentTree) 返回值,从tnode 提取 %%
@param(Pwnd)(TWincontrol) 返回值,从tnode 提取 %%
@return(bool) 判断节点是否成功 %%
**}
if not( owner is class(TComponent)) then return 0;
if not( tnode is class(TComponentTreeNode)) then return 0;
tree := tnode.owner ;
if not(tree is class(TTreeView)) then return 0;
dcomp := tnode.Component;
if not CheckParent(dcomp,Pwnd) then return 0;
return true;
end
function CreateMenu();
begin
{**
@explan(说明) 构造控件菜单 %%
**}
if FMenus then return FMenus;
createmenubyarray(menus(),FMenus);
return FMenus;
end
function GetDCompObject(n);//获得节点设计器
begin
return GetClassItem(n);
end
function copyclick(o,e);virtual; //复制节点
begin
cp:=o.Component;
if not cp then exit;
nd := cp.TreeNode;
If not nd then exit;
d := nd.owner.Designer;
d.copynode(nd);
end
function deleteorcut(o,f);
begin
cp:=o.Component;
if not cp then exit;
nd := cp.TreeNode;
If not nd then exit;
ndp := nd.parent;
if ndp then
begin
if f then
begin
dm := MessageBoxA("即将剪切:"+nd.Caption,"删除",(0x1 .| 0x30),nd.owner);//
end else dm := MessageBoxA("即将删除:"+nd.Caption,"删除",(0x1 .| 0x30),nd.owner);//
if dm<>1 then exit;
d := nd.owner.Designer;
if f then
d.cutnode(nd);
wd := nd.Component.Cwnd;
ds := nd.owner.Designer;
ndp.deletenode(nd);
ns := array();
wds := array();
GetDeleteNames(nd,ns,wds); //处理删除名字
for i,nsv in ns do
ds.DeleFiledFromEdit(nsv,"");
ds.EditerCodeChanged();
nd.Recycling();
if wd then
begin
wd.Recycling();
end
o.Component := nil;
ndp.Owner.SetSel(ndp);
end
end
function cutclick(o,e);virtual; //剪切节点
begin
deleteorcut(o,1);
end
function pasteclick(o,e);virtual; //粘贴节点
begin
cp:=o.Component;
if not cp then exit;
nd := cp.TreeNode;
If not nd then exit;
d := nd.owner.Designer;
d.pasttonode(nd);
end
function deleteclick(o,e);virtual; //控件删除操作
begin
deleteorcut(o,0);
end
function GetDeleteNames(nd,ns,wds);
begin
ns[length(ns)] := nd.Component.GetName();
wds[length(wds)] := nd.Component;
for i:= 0 to nd.ItemCount-1 do
begin
GetDeleteNames(nd.GetNodeByIndex(i),ns,wds);
end
end
function MoveComponentUp(o,e);virtual; //控件上移
begin
cp:=o.Component;
if not cp then exit;
nd := cp.TreeNode;
If not nd then exit;
if nd.moveup() then
begin
wd := nd.Component.Cwnd;
if (wd is class(TWincontrol)) or (wd is class(tmenu)) then
begin
wd.zorder := wd.zorder -1;
end
nd.owner.SetSel(nd);
end
return ;
//旧方法是三次节点重新插入
end
function MoveComponentDown(o,e);virtual; //控件下移
begin
cp:=o.Component;
if not cp then exit;
nd := cp.TreeNode;
If not nd then exit;
if nd.movedown() then
begin
wd := nd.Component.Cwnd;
if (wd is class(TWincontrol)) or (wd is class(tmenu)) then wd.zorder := wd.zorder+1;
nd.owner.SetSel(nd);
end
return ;
//旧方法是三次节点重新插入
end
function createmenubyarray(ms,pm); //构造菜单
begin
if not(ifarray(ms) and ms) then exit;
if ms["type"]="menu" then
begin
if not pm then pm := new TPopUpmenu(FCwnd);
if ifstring(ms["caption"]) then
begin
mu := new TComponentMenu(FCwnd);
mu.caption := ms["caption"];
mu.onclick := ms["onclick"];
mu.Component := self(true);
mu.parent := pm;
call(thisfunction,ms["items"],mu);
end
end
else for i,v in ms do
begin
call(thisfunction,v,pm);
end
end
function menus();virtual; //菜单项
begin
r := array(
("type":"menu","caption":"打开tsf文件","onclick":thisfunction(OpenClass)),
("type":"menu","caption":"打开tfm文件","onclick":thisfunction(opentfm)),
("type":"menu","caption":"删除","id":"delete","onclick":thisfunction(deleteclick)),
("type":"menu","caption":"复制","id":"copy","onclick":thisfunction(copyclick)),
("type":"menu","caption":"剪切","id":"cut","onclick":thisfunction(cutclick)),
("type":"menu","caption":"粘贴","id":"paste","onclick":thisfunction(pasteclick)),
("type":"menu","caption":"上移","onclick":thisfunction(MoveComponentUp)),
("type":"menu","caption":"下移","onclick":thisfunction(MoveComponentDown))
);
if not IsContainer() then r := select * from r where ["caption"]<>"粘贴" end;
return r;
end
function CreateNode(tnode,owner,tree,Pwnd);virtual;
begin
{**
@explan(说明) 构造节点 %%
@return(TComponentTreeNode|false) 节点 %%
**}
if not NodeOk(tnode,owner,tree,Pwnd) then return false;
return tnode.insertnode(array("type":"treenode"),tnode.TVI_LAST);
end
function SetViewParent(wnd,pwnd);virtual;
begin
{**
@explan(说明)控件的父窗口%%
**}
wnd.parent := Pwnd;
end
function ComponentCreater(tnode,owner);virtual;
begin
{**
@explan(说明) 构建新节点窗口 %%
@param(tnode)(TComponentTreeNode) 父节点 %%
@param(owner)(TWincontrol) 窗口所有者 %%
@return(TDComponent|0)成功返回对象失返回0%%
**}
tn := CreateNode(tnode,owner,tree,Pwnd);
if not tn then return 0;
if Imgs >=0 then
begin
tn.ImgId := Imgs;
tn.SelImgId := Imgs;
end
o := createobject({ClassObject()}self(true).classinfo(1),owner);
if ifnil(o.dclassname()) then o.dclassname(self(true).dclassname());
o.imgs := imgs;
if not o then return 0;
o.TreeNode := tn;
SetViewParent(o.Cwnd,Pwnd);
o.Cwnd._tag := tn;
//tree.SetSel(tn);
return o;
end
function create(AOwner);virtual;
begin
{**
@explan(说明) 构造控件的构造函数 %%
**}
fiscontainerdcmp := true;
feventnametable := array();
ev := array(
"event":"onmouseup",
"name":"ms_up",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) 鼠标按下 %%
@param(o)(control)控件 %%
@param(e)(TMMouse) 鼠标消息对象 %%
**}
if e.button()=mbLeft then
begin
echo '\\r\\n:左键';
end else
if e.button()=mbRight then
begin
echo '\\r\\n:右键';
end else
if e.button()=mbMiddle then
begin
echo '\\r\\n:滚轮';
end
echo '\\r\\npos:',e.xpos,'===',e.ypos;
inherited;
"
);
SetDefalutEvent(ev,true);
ev := array(
"event":"onmousedown",
"name":"ms_down",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) 鼠标按下 %%
@param(o)(control)控件 %%
@param(e)(TMMouse) 鼠标消息对象 %%
**}
if e.button()=mbLeft then
begin
echo '\\r\\n:左键';
end else
if e.button()=mbRight then
begin
echo '\\r\\n:右键';
end else
if e.button()=mbMiddle then
begin
echo '\\r\\n:滚轮';
end
if e.shiftdouble() then
begin
echo '\\r\\n:双击';
end
echo '\\r\\npos:',e.xpos,'===',e.ypos;
inherited;
"
);
SetDefalutEvent(ev,true);
ev := array(
"event":"onmousemove",
"name":"ms_move",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) 鼠标移动 %%
@param(o)(control)控件 %%
@param(e)(TMMouse) 鼠标消息对象 %%
**}
echo '\\r\\npos:',e.xpos,'===',e.ypos;
inherited;
"
);
SetDefalutEvent(ev,true);
ev := array(
"event":"onkeyup",
"name":"keyup",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) 按键弹起 %%
@param(o)(control)控件 %%
@param(e)(TMKEY) 按键消息对象 %%
**}
echo '\\r\\nchar:',e.char;
echo '\\r\\nascii:',e.charcode;
if ssShift in e.shiftstate then
begin
echo '\\r\\nshift 按键';
end
if ssAlt in e.shiftstate then
begin
echo '\\r\\nalt 按键';
end
if ssCtrl in e.shiftstate then
begin
echo '\\r\\nctrl 按键';
end
inherited;"
);
SetDefalutEvent(ev,true);
ev := array(
"event":"onkeydown",
"name":"keydown",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) 按键按下 %%
@param(o)(control)控件 %%
@param(e)(TMKEY) 按键消息对象 %%
**}
echo '\\r\\nchar:',e.char;
echo '\\r\\nascii:',e.charcode;
if ssShift in e.shiftstate then
begin
echo '\\r\\nshift 按键';
end
if ssAlt in e.shiftstate then
begin
echo '\\r\\nalt 按键';
end
if ssCtrl in e.shiftstate then
begin
echo '\\r\\nctrl 按键';
end
inherited;"
);
SetDefalutEvent(ev,true);
ev := array(
"event":"onkeypress",
"name":"keypress",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) 字符消息 %%
@param(o)(control)控件 %%
@param(e)(TMKEY) 按键消息对象 %%
**}
echo '\\r\\nchar:',e.char;
echo '\\r\\nascii:',e.charcode;
if ssShift in e.shiftstate then
begin
echo '\\r\\nshift 按键';
end
if ssCtrl in e.shiftstate then
begin
echo '\\r\\nctrl 按键';
end
inherited;"
);
SetDefalutEvent(ev,true);
ev := array(
"event":"onnotification",
"name":"note",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) 通知消息 %%
@param(o)(control)控件 %%
@param(e)(tuieventbase) 消息对象,msg成员为通知内容,
该消息可以通过组件 relnotification(消息内容)
发送到所有组件,需要处理该消息的组件可以处理 %%
**}
inherited;"
);
SetDefalutEvent(ev,true);
ev :=array(
"event":"onclick",
"name":"clk",
"param":array("o","e"),
"virtual":true,
"body":
" {**
@explan(说明) 点击回调 %%
@param(o)(tcontrol)选择按钮 %%
@param(e)(tuievent) 消息对象 %%
**}
inherited;"
);
SetDefalutEvent(ev,true);
if not(AOwner is class(TComponent)) then exit;
c := WndClass();
if c is class(TComponent) then
begin
FCwnd := createobject(c,AOwner);
FCwnd.SetDesigning(true);
end
else raise "类型错误!";
end
function GetChangedPropertiesn(n);
begin
if FCwnd then return FCwnd.GetChangedPropertiesn(n);
return nil;
end
function GetChangedPublish(f);virtual;
begin
{**
@explan(说明)获得改变的属性%%
**}
if FCwnd then return FCwnd.GetChangedPublish(f);
return array();
end
function GetPublishProperties();virtual;
begin
{**
@explan(说明)获得所有的属性%%
**}
if FCwnd then return FCwnd.GetPublishProperties();
return array();
end
function GetPublishEvents();virtual;
begin
{**
@explan(说明)获得改变事件回调属性%%
**}
if FCwnd then return FCwnd.GetPublishEvents();
end
function DefaultAlign();virtual;
begin
return false;
end
function destroy();virtual;
begin
FTreeNode := nil;
FCwnd := nil;
end
function SetComponentProperties(n,v,pp);
begin
{**
@explan(说明)修改属性%%
**}
if FCwnd then
begin
if n="name" then
begin
return SetComponentName(v);
end else
return FCwnd.SetPublish(n,v,pp);
end
end
function GetTrueComponent();virtual;
begin
{**
@explan(说明) 获得真实的控件%%
**}
if FCwnd is class(TDVirutalWindow) then return FCwnd.BindComp;
return FCwnd;
end
function SetComponentName(v);
begin
{**
@explan(说明) 修改控件name %%
**}
obj := GetTrueComponent();
if obj and ifstring(v) then
begin
odn := obj.name;
v := lowercase(v);
if v=odn then return false;
if v in TemporaryNotName then return false;
cn := dclassname();
obj.name := v;
if v=(obj.name) then
begin
if TreeNode then
begin
if inheritedparent then
begin
pcn := "("+inheritedparent+")";
end else pcn := "";
TreeNode.caption := v+":"+cn+pcn;
end
if ifstring(odn) and v then
begin
ds := FTreeNode.owner.Designer;
ds.DeleFiledFromEdit(odn,(v+":"+cn));
ds.EditerCodeChanged();
end
return true;
end
end
end
function SelectedNode();virtual;
begin
{**
@explan(说明) 设置控件节点被选择时候的操作 %%
**}
if (FCwnd is class(TWincontrol)) and FCwnd.HandleAllocated() then
begin
FCwnd._wapi.BringWindowToTop(FCwnd.Handle);
end
end
static TemporaryNotName;
function CreateName();virtual;
begin
{**
@explan(说明)给无名控件构造一个名字%%
**}
obj := GetTrueComponent();
if obj then
begin
cn := dclassname();
cn1 := cn[1];
if cn1="t" and length(cn)>1 then
begin
cn := cn[2:];
end
i := 1;
oname := obj.name;
if ifstring(cn) and cn and not(oname) then
begin
while oname<>nn do
begin
nn := cn+inttostr(i++);
if nn in TemporaryNotName then continue;
obj.name := nn;
if obj.Name<>nn then continue;
SetComponentProperties("caption",nn);
oname := nn;//obj.name;
end
end
if TreeNode then TreeNode.caption := oname+":"+cn;
end
return nn;
end
function SetDefalutEvent(ev,ndf);
begin
if ifarray(ev) then
hs := createtslfunction(ev);
if not hs then
begin
FDefaultEvent := nil;
return ;
end
r := format("type ca = class\r\n%s \r\nend",hs);
if CheckTslCode(r,err) then
begin
feventnametable[ev["event"]] := ev;
if not ndf then
FDefaultEvent := ev["event"];
end
end
public
function geteventfunctionbyname(n);
begin
r := feventnametable[n] ;
if r and ifarray(r) then
begin
return r;
end else
begin
r := array();
r["name"] := n;
r["event"] := n;
r["virtual"] := true;
r["param"] := array("o","e");
r["body"] :=
format("
{**
@explan(说明) %s消息回调 %%
@param(o)(tcomponent) 组件 %%
@param(e)(tuievent) 消息对象 %%
**}
inherited;
",n);
end
return r;
end
property TreeNode read FTreeNode write SetTreeNode;
property Cwnd read FCwnd write SetCwnd;
property Name read GetName write SetName;
property Imgs read GetImgs write SetImgs;
property DefaultEvent read GetDefalutEvent write SetDefalutEvent;
{**
@param(TreeNode)(TComponentTreeNode) 树结点 %%
@param(Cwnd)(TWincontrol) 树结点 %%
@param(Name)(string) 变量名 %%
@param(TemporaryNotName)(array of string) 非法的变量名 %%
@param(Imgs)(integer) 图标序号,不需要使用 %%
**}
private
function createtslfunction(f);
begin
n := f["name"];
p := f["param"];
b := f["body"];
ps := "";
if ifarray(p) then
begin
len := length(p);
for i:= 0 to len-1 do
begin
v := p[i];
if ifstring(v) then ps+=v;
if i<len-1 then ps+=";";
end
end
hs := nil;
vt := "";
if f["virtual"] then vt := "virtual;";
if ifstring(n) and ifstring(b) then
hs := "\r\n\tfunction "+n+"("+ps+");"+vt+"\r\n\tbegin\r\n"+b+"\r\n\tend\r\n";
return hs;
end
published
property isinherited read fisiherted write fisiherted;//为继承做准备
property inheritedparent read finheritedparent write finheritedparent;
end
type TDRootComponent = class(TDComponent)
{**
@explan(说明) 只能作为主窗口子节点组件,比如菜单,文件选择,定时器等 %%
**}
function Create(AOwner);override;
begin
inherited;
end
function CheckParentWnd(Pwnd);override;
begin
return (Pwnd is class(tvcform)) or (Pwnd is class(tpanelform));
end
end
//************TImageList***********************
type TDVirutalWindow = class(TCustomControl) //无窗口控件的虚拟窗口
{**
@explan(说明) 非可视控件的窗口容器 %%
**}
private
FBitmap; //图标
FBindComponent;//绑定的设计控件
FWindowFileds; //窗口的属性
function SetBindComponent(v);
begin
if v is class(TComponent) then
begin
FBindComponent := v;
end
end
protected
function deletefiled(r);
begin
{**
@explan(说明)删除模拟窗口中的属性 %%
**}
rdx := array();
for i,v in FWindowFileds do rdx[v] := nil;
reindex(r,rdx);
return r;
end
function getnotnil(ra); //获得非空的属性
begin
r := array();
for i,v in FWindowFileds do
begin
if v="name" then continue;
rav := ra[v];
if not ifnil(ra[v]) then r[v] := rav;
end
return r;
end
public
function Create(AOwner);override;
begin
inherited;
width := 30;
height := 30;
FWindowFileds := array("left","top","height","width");
end
function paint();override;
begin
//canvas.draw("polyline",array((0,0),(20,0),(20,20),(0,20)));
canvas.StretchDraw(array(1,1,width-3,height-3),GetBitmap());
end
function GetBitmap();
begin
if not FBitmap then
begin
FBitmap := new tbitmap();
FBitmap.Readvcon(HexFormatStrToTsl(bitmapinfo()));
end
return FBitmap;
end
function bitmapinfo();override;
begin
return nil;
end
function GetPublishProperties();override; //获得属性
begin
r := inherited;
r := r[FWindowFileds];
if not FBindComponent then return r;
r2 := FBindComponent.GetPublishProperties();
if r2 then
begin
deletefiled(r2);
return (r union r2);
end
return r;
end
function GetPublishEvents();override; //获得消息处理函数
begin
r := array();
if FBindComponent then
begin
r := FBindComponent.GetPublishEvents();
return r;
end
return r;
end
function GetChangedPublish(f);override; //获得改变的属性
begin
r := getnotnil(inherited);
if not FBindComponent then exit;
r2 :=FBindComponent.GetChangedPublish(f);
if r2 then
begin
deletefiled(r2);
r union= r2;
end
return r;
end
function SetPublish(n,v,pp);override; //设置属性
begin
if n in FWindowFileds then
begin
return inherited;
end
if FBindComponent then
begin
return FBindComponent.SetPublish(n,v,pp);
end
end
function DesigningSizer();override; //鼠标改变大小
begin
return false;
end
function Recycling();override;
begin
inherited;
FBindComponent := nil;
end
property BindComp read FBindComponent write SetBindComponent;
property WindowFileds read FWindowFileds write FWindowFileds;
{**
@param(BindComp)(tcomponent) 绑定的控件 %%
@param(WindowFileds)(array of string) 容器控件替代的属性 %%
**}
end
//控件树节点
type TComponentTreeNode = class(TTreeNode)
{**
@explan(说明)树节点 %%
**}
private
FComponent;
public
function create(AOwner);override;
begin
inherited;
end
function Recycling();override;
begin
FComponent := nil;
inherited;
end
property Component read FComponent write FComponent;
end
type TComponentTree = class(TTreeView) //控件树
{**
@explan(说明)控件树 %%
**}
private
FEventGrid;
FProGrid;
FDesigner;
FLoading;
public
function hasFocus();override;
begin
return true;
end
function SetSel(item);override; //被选择
begin
if not FLoading then inherited;
end
function Recycling();override; //回收
begin
FDesigner := nil;
inherited;
end
function create(AOwner);override;
begin
inherited;
asdomain := true;
FDesigner := AOwner;
nodecreator := class(TComponentTreeNode);
end
function GetRootNode();override; //根节点
begin
r := inherited;
if not(r.Component) then
begin
c := new TDComponent();
c.Cwnd := owner;
r.Component := c;
end
return r;
end
//ContextMenu(o,e)
property EventGrid read FEventGrid write FEventGrid; //事件控件
property ProGrid read FProGrid write FProGrid; //属性控件
property Designer read FDesigner ; //设计器
property Loading read FLoading write FLoading; //正在加载
{**
@param(Designer)(TVclDesigner) 设计器 %%
**}
end
//************主窗口*******************
type TDForm = class(TDComponent)
{**
@explan(说明) 主窗口 %%
**}
private
function closecurrentform(o,e); //关闭当前窗口
begin
cp := o.Component;
cp.Cwnd._send_(o.WM_CLOSE,0,0,1);
end
function savecurrentform(o,e);//保存当前窗口
begin
cp:=o.Component;
if not cp then exit;
nd := cp.TreeNode;
if nd then d := nd.owner.Designer;
if d then
begin
d.saveCurrentForm();
end
end
public
function menus();override;
begin
r := array();
r := inherited;
r := select * from r where ["caption"] in array("打开tfm文件","打开tsf文件","粘贴") end;
idx := length(r);
//r[idx++] := array("type":"menu","caption":"打开tsf文件","onclick":thisfunction(OpenClass));
r[idx++] := array("type":"menu","caption":"关闭窗口","onclick":thisfunction(closecurrentform));
r[idx++] := array("type":"menu","caption":"保存窗口","onclick":thisfunction(savecurrentform));
//r[2] := array("type":"menu","caption":"打开工程目录","onclick":thisfunction(openProjectDir));
return r;
end
function CheckParent(dcomp,Pwnd);override;
begin
pwnd := 0;//initializeapplication().GetApplicationWindow();;
return 1;
end
function InToolBar();override;
begin
return false;
end
function ComponentCreater(tnode,owner);virtual;
begin
r := inherited;
return r;
end
function classification();override;
begin
return "隐藏";
end
function HitTip();override;
begin
return "主窗口\r\n在工具栏file\r\nfile manager中管理";
end
function dclassname(v);override;
begin
if ifstring(v) and v then
begin
fcomponentclassname := v;
end
return fcomponentclassname;
end
function bitmapinfo();override;
begin
return getformbitmapinfo();
end
function WndClass();override;
begin
return class(tdcreateform);
//return class(TDCreateForm);
end
function create(AOwner);override;
begin
inherited;
DefaultEvent := array(
"event":"onclose",
"name":"close",
"virtual":true,
"param":array("o","e"),
"body":
"
{**
@explan(说明) 主窗口关闭回调 %%
@param(e)(tuievent) 消息对象 %%
@param(o)(ttimer) 当前主窗口 %%
**}
if MessageBoxA('是否关闭当前窗口','关闭',MB_YESNO,o)<>IDYES then e.skip := true;
inherited;
");
end
end
type TDPanelForm = class(TDForm)
{**
@explan(说明) 主窗口 %%
**}
function WndClass();override;
begin
return class(TDCreatePanel);
//return class(TDCreatePanel);
end
function create(AOwner);override;
begin
inherited;
end
end
type TDMenu = class(TDMenuBase)
{**
@explan(说明) 普通菜单设计器控件 %%
**}
function HitTip();override;
begin
return inherited;
return "menu通过右键添加";
end
function classification();override;
begin
return "隐藏" ;
end
function InToolBar();override;
begin
return false;
end
function WndClass();override;
begin
return class(tmenu);
end
function Create(AOwner);override;
begin
inherited;
end
function CheckParent(p,pwnd);override;
begin
r := (p is class(TDMenu)) or
(p is class(TDMainMenu)) or
(p is class(TDPopUpMenu));
Pwnd := p.GetTrueComponent;
return r;
end
private
function ifmainmenunode(pwnd);
begin
if pwnd is class(tmainmenu) then return true;
if pwnd is class(tmenu) then
begin
return ifmainmenunode(pwnd.parent);
end
return false;
end
public
function SetViewParent(wnd,pwnd);override;
begin
if ifmainmenunode(pwnd) then wnd.parent := pwnd;
end
function ComponentCreater(node,owner);override;
begin
r := inherited;
node.owner.expand(node);
return r;
end
end
implementation
type TComponentMenu= class(tmenu) //设计器右键菜单
{**
@explan(说明) 设计控件菜单类 %%
**}
private
FComponent;
public
function Create(AOwner);override;
begin
inherited;
end
function Recycling();override;
begin
FComponent := nil;
inherited;
end
property Component read FComponent write FComponent;
{**
@param(Component)(TDComponent) 设计控件 %%
**}
end
type TDFileWindow = class(TDVirutalWindow)
{**
@explan(说明) 文件选择容器 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TOpenFileADlg(self);;
end
function GetPublishEvents();override;
begin
return array();//array(1:nil);
end
function bitmapinfo();override;
begin
return GetOpenFileBitmapInfo();
end
end
type TDFileSaveWindow = class(TDVirutalWindow)
{**
@explan(说明) 文件选择容器 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TSavefileADlg(self);;
end
function GetPublishEvents();override;
begin
return array();//array(1:nil);
end
function bitmapinfo();override;
begin
return GetSaveFileBitmapInfo();
end
end
type TDColorChooseWindow = class(TDVirutalWindow)
{**
@explan(说明) 颜色选择控件窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TColorChooseADlg(self);;
end
function GetPublishEvents();override;
begin
return array();//array(1:nil);
end
function bitmapinfo();override;
begin
return GetColorChooseBitmapInfo();
end
end
type TDFontChooseWindow = class(TDVirutalWindow)
{**
@explan(说明) 颜色选择控件窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TFontChooseADlg(self);;
end
function GetPublishEvents();override;
begin
return array();//array(1:nil);
end
function bitmapinfo();override;
begin
return GetFontChooseBitmapInfo();
end
end
type TDFolderChooseWindow = class(TDVirutalWindow)
{**
@explan(说明) 颜色选择控件窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TFolderChooseADlg(self);;
end
function GetPublishEvents();override;
begin
return array();//array(1:nil);
end
function bitmapinfo();override;
begin
return GetFolderChooseBitmapInfo();
end
end
type TImageListWindow = class(TDVirutalWindow)
{**
@explan(说明) imagelist 容器窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
WindowFileds := array("left","top","height","width");
BindComp := new TControlImageList(self);;
end
function bitmapinfo();override;
begin
return GetImageListBitmapInfo();
end
end
type TDImageList = class(TDRootComponent)
{**
@explan(说明)imagelist 设计控件 %%
**}
function HitTip();override;
begin
return inherited;
return "图像列表";
end
function bitmapinfo();override;
begin
return GetImageListBitmapInfo();
end
function IsContainer();override;
begin
return false;
end
function ComponentClass();override;
begin
return class(TControlImageList);
end
function WndClass();override;
begin
return Class(TImageListWindow);
end
function Create(AOwner);override;
begin
inherited;
end
function GetPublishProperties();override;
begin
r := inherited;
return r[ array("name","top","left","images","imgwidth","imgheight")];
end
end
//******************label*******************
type TGraphicLabelWindow = class(TDVirutalWindow)
{**
@explan(说明) label 控件替代窗口 %%
**}
function paint();override;
begin
canvas.Font := font;
al := BindComp.TextAlign;
BindComp.CanvasDrawAlignText(self.canvas,self.ClientRect,self.caption,al);
end
function SetPublish(n,v,pp);override;
begin
r := inherited;
if n="bkbitmap" then bkbitmap := v;
if (n="textalign" or n="caption" or n="font" or n="bkbitmap") then InvalidateRect(nil,true);
return r;
end
function Create(AOwner);override;
begin
inherited;
BindComp := new tlabel(self);
width := BindComp.width;
height := BindComp.Height;
WindowFileds := array("left","top","width","height","color","font","border","caption","visible","align","anchors");
end
function DesigningSizer();override;
begin
return true;
end
end
type TGraphicsplitterWindow = class(TDVirutalWindow)
{**
@explan(说明) label 控件替代窗口 %%
**}
function paint();override;
begin
//canvas.Font := font;
//al := BindComp.TextAlign;
//BindComp.CanvasDrawAlignText(self.canvas,self.ClientRect,self.caption,al);
dc := canvas;
r := ClientRect;
clr := 0x123232;
x := integer(r[0]+(r[2]-r[0])/2);
y := integer(r[1]+(r[3]-r[1])/2);
sz := 4;
sp := 5;
for j :=(0 -sz) to sz do
begin
for i:=(0 -sz) to sz do
begin
x1 := x+sp*i;
y1 := y+sp*j;
if x1>r[0] and x1<r[2] and y1>r[1] and y1<r[3] then
begin
dc.SetPixel(array(x1,y1),clr);
end
end
end
end
function SetPublish(n,v,pp);override;
begin
r := inherited;
//if n="color" then color := v;
//if n="bkbitmap" then bkbitmap := v;
//if (n="textalign" or n="caption" or n="font" or n="bkbitmap") then InvalidateRect(nil,true);
return r;
end
function Create(AOwner);override;
begin
inherited;
BindComp := new tsplitter(self);
width := BindComp.width;
height := BindComp.Height;
color := BindComp.color;
WindowFileds := array("left","top","width","height","color","parentcolor","visible","enabled","border","align");
end
function DesigningSizer();override;
begin
return true;
end
end
type TDLabel = class(TDComponent)
{**
@explan(说明) label控件 %%
**}
function HitTip();override;
begin
return inherited;
end
function IsContainer();override;
begin
return false;
end
function ComponentClass();override;
begin
return class(tlabel);
end
function WndClass();override;
begin
return Class(TGraphicLabelWindow);
end
function bitmapinfo();override;
begin
return getlabelbitmapinfo();
end
function Create(AOwner);override;
begin
inherited;
end
end
type tdsplitter = class(TDComponent)
{**
@explan(说明) label控件 %%
**}
function HitTip();override;
begin
return inherited;
end
function IsContainer();override;
begin
return false;
end
function ComponentClass();override;
begin
return class(tsplitter);
end
function WndClass();override;
begin
return Class(TGraphicsplitterWindow);
end
function bitmapinfo();override;
begin
return getsplitterbitmapinfo();
end
function Create(AOwner);override;
begin
inherited;
end
end
//****************timmer****************************
type TTimerWindow = class(TDVirutalWindow)
{**
@explan(说明)timmer 容器窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new Ttimer(self);
end
function bitmapinfo();override;
begin
return GetTimerBitmapInfo();
end
end
type TDTimer = class(TDRootComponent)
{**
@explan(说明) timmer 设计器控件 %%
**}
function HitTip();override;
begin
return inherited;
return "定时器";
end
function bitmapinfo();override;
begin
return GetTimerBitmapInfo();
end
function IsContainer();override;
begin
return false;
end
function ComponentClass();override;
begin
return class(TTimer);
end
function WndClass();override;
begin
return Class(TTimerWindow);
end
function Create(AOwner);override;
begin
inherited;
DefaultEvent := array(
"event":"ontimer",
"name":"time",
"virtual":true,
"param":array("o","e"),
"body":
"
{**
@explan(说明) 定时调 %%
@param(e)(tuievent) 消息对象 %%
@param(o)(ttimer) 定时器对象 %%
**}
inherited;
"
);
end
end
//**************FMainMenu********************************
type TMainMenuWindow = class(TDVirutalWindow)
{**
@explan(说明) 主菜单容器窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TMainmenu(self);
end
function bitmapinfo();override;
begin
return GetMainMenuBitmapInfo();
end
end
type ThighlighterWindow = class(TDVirutalWindow)
{**
@explan(说明) 主菜单容器窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new thighlighter(self);
end
function bitmapinfo();override;
begin
return gethighlighterbitmapinfo();
end
end
type TTrayWindow = class(TDVirutalWindow)
{**
@explan(说明) imagelist 容器窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TTray(self);;
end
function bitmapinfo();override;
begin
return GetTrayBitmapInfo();
end
end
//**********actionlistwindow**********************
type TActionListWindow = class(TDVirutalWindow)
{**
@explan(说明) actionlist 容器窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TActionList(self);
end
function bitmapinfo();override;
begin
return GetActionListBitmapInfo();
end
end
//***********opendlg*****************
type TDOpenFileADlg = class(TDRootComponent)
{**
@explan(说明) 文件打开控件 %%
**}
function HitTip();override;
begin
return inherited;
return "文件选择";
end
function classification();override;
begin
return "对话框";
end
function bitmapinfo();override;
begin
return GetOpenFileBitmapInfo();
end
function IsContainer();override;
begin
return false;
end
function ComponentClass();override;
begin
return class(TOpenFileADlg);
end
function WndClass();override;
begin
return Class(TDFileWindow); //
end
function Create(AOwner);override;
begin
inherited;
end
end
//***********savefile***************************
type TDSaveFileADlg = class(TDRootComponent)
{**
@explan(说明) 文件打开控件 %%
**}
function HitTip();override;
begin
return "文件保存选择";
end
function bitmapinfo();override;
begin
return GetSaveFileBitmapInfo();
end
function classification();override;
begin
return "对话框";
end
function ComponentClass();override;
begin
return class(TSavefileADlg);
end
function GetPublishProperties();override;
begin
r := inherited;
if r then
reindex(r,array("multiselected":nil));
return r;
end
function WndClass();override;
begin
return Class(TDFileSaveWindow); //
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//************querys**************************************
//***********colorchoose*******************************
type TDColorChoose = class(TDRootComponent)
{**
@explan(说明) 文件打开控件 %%
**}
function HitTip();override;
begin
return "颜色选择";
end
function bitmapinfo();override;
begin
return GetColorChooseBitmapInfo();
end
function classification();override;
begin
return "对话框";
end
function ComponentClass();override;
begin
return class(TColorChooseADlg);
end
function WndClass();override;
begin
return Class(TDColorChooseWindow); //
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//*************font choose **********************************
type TDFontChoose = class(TDRootComponent)
{**
@explan(说明) 文件打开控件 %%
**}
function HitTip();override;
begin
return "字体选择";
end
function classification();override;
begin
return "对话框";
end
function bitmapinfo();override;
begin
return GetFontChooseBitmapInfo();
end
function ComponentClass();override;
begin
return class(TFontChooseADlg);
end
function WndClass();override;
begin
return Class(TDFontChooseWindow); //
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//**************folder*********************
type TDFolderChoose = class(TDRootComponent)
{**
@explan(说明) 文件打开控件 %%
**}
function HitTip();override;
begin
return "目录选择";
end
function classification();override;
begin
return "对话框";
end
function bitmapinfo();override;
begin
return GetFolderChooseBitmapInfo();
end
function ComponentClass();override;
begin
return class(TFolderChooseADlg);
end
function WndClass();override;
begin
return Class(TDFolderChooseWindow); //
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//****************toolbar***********************************
type TDToolButton = class(TDComponent)
{**
@explan(说明) toolbar 按钮设计控件 %%
**}
function HitTip();override;
begin
return "toolbutton";
end
function classification();override;
begin
return "隐藏" ;
end
function InToolBar();override;
begin
return false;
end
function CheckParent(p,pwnd);override;
begin
if not(p is class(TDToolBar)) then return false;
pwnd := p.Cwnd;
return true;
end
function WndClass();override;
begin
return Class(TToolButton);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
function ComponentCreater(node,owner);override;
begin
r := inherited;
node.owner.expand(node);
return r;
end
end
type TDToolBar = class(TDComponent)
{**
@explan(说明) toolbar 设计器控件 %%
**}
private
function createabutton(o,n);
begin
cp := o.Component;
if not cp then exit;
if n=0 then
r := (GetDCompObject("ttoolbutton")).ComponentCreater(cp.TreeNode,cp.Cwnd);
if n=2 then
r := (GetDCompObject("ttoolsepbutton")).ComponentCreater(cp.TreeNode,cp.Cwnd);
if not r then exit;
r.CreateName();
tr := r.TreeNode.owner.Designer;
tr.VariableSelecter.additem(r);
end
public
function HitTip();override;
begin
return inherited;
return "工具栏";
end
function DefaultAlign();override;
begin
return true;
end
function addtoolbutton(o,e);
begin
createabutton(o,0);
end
function addtoolbutton2(o,e);
begin
createabutton(o,2);
end
function menus();override;
begin
r := inherited;
r[length(r)] := array("type":"menu","caption":"添加工具栏按钮","onclick":thisfunction(addtoolbutton));
return r;
end
function CheckChild(CD);override;
begin
return cd is class(TDToolButton);
end
function bitmapinfo();override;
begin
return gettoolbarbitmapinfo();
end
function WndClass();override;
begin
return Class(TToolBar);
end
function Create(AOwner);override;
begin
inherited;
end
function ComponentCreater(tnode,owner);override;
begin
r := inherited;
//r.Cwnd.align := r.Cwnd.alnone;
return r;
end
end
type TDcoolBar = class(TDComponent)
{**
@explan(说明) toolbar 设计器控件 %%
**}
public
function HitTip();override;
begin
return inherited;
end
function DefaultAlign();override;
begin
return true;
end
function menus();override;
begin
r := inherited;
return r;
end
function CheckChild(CD);override;
begin
return true;
//return cd is class(TDToolButton);
end
function bitmapinfo();override;
begin
return getcoolbarbitmapinfo();
end
function WndClass();override;
begin
return Class(TcoolBar);
end
function Create(AOwner);override;
begin
inherited;
end
function ComponentCreater(tnode,owner);override;
begin
r := inherited;
//r.Cwnd.align := r.Cwnd.alnone;
return r;
end
end
type TDStatusBar = class(TDComponent)
{**
@explan(说明) statusbar设计器控件 %%
**}
function HitTip();override;
begin
return inherited;
return "状态栏";
end
function ComponentCreater(tnode,owner);virtual;
begin
r := inherited;
//owner.DoControlAlign();
return r;
end
function menus();override;
begin
r := inherited;
//r[length(r)] := array("type":"menu","caption":"添加工具栏按钮","onclick":thisfunction(addtoolbutton));
return r;
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100025001000089504E470D0A1A0A0000000D4948445200000018000000180806
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000E549444154
484BDD8E5106846014856757B3AED941DB6847F39088881E22A2878888F4D4B88
77324535373FD0F33978FF3517DDD96C0F72781FBE3190C04E67906711C9BCABD
28304D136080EE4581711C0103742F0A0CC30018A07B51A0EF7BC000DD8B025DD
70106E85E1468DB163040BFCAF65D059AA6010CD0AF621745915C81BAAE0103F4
6FB000B70255550106E867583FBFDE860265590206E867B0B3BFDE6E4381A2280
003F4B3D847DF6D05F23C070CD0F7583FB3B70D05B22C030CD0F7B0B33F3DDA86
02699A0206E847D8873E6D059224010CD0BD286023140884BC5F0F2CCB0BD5861
2A5BA8CBF2E0000000049454E44AE42608200";
end
function WndClass();override;
begin
return Class(TStatusBar);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
type tdhighlighter = class(TDRootComponent)
{**
@explan(说明) 语法高亮设计器控件 %%
**}
function bitmapinfo();override;
begin
return gethighlighterbitmapinfo();
end
function ComponentClass();override;
begin
return class(thighlighter);
end
function WndClass();override;
begin
return Class(ThighlighterWindow);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
type TDTray = class(TDRootComponent)
{**
@explan(说明) 托盘设计器控件 %%
**}
function HitTip();override;
begin
return inherited;
return "托盘";
end
function menus();override;
begin
r := inherited;
//r[length(r)] := array("type":"menu","caption":"添加工具栏按钮","onclick":thisfunction(addtoolbutton));
return r;
end
function CheckParentWnd(Pwnd);override;
begin
return (Pwnd is class(TVCForm)) ;
end
function bitmapinfo();override;
begin
return GetTrayBitmapInfo();
end
function ComponentClass();override;
begin
return class(TTray);
end
function WndClass();override;
begin
return Class(TTrayWindow);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//*************菜单***********************
type TDMenuBase = class(TDRootComponent)
{**
@explan(说明) 菜单设计器控件基类 %%
**}
function CheckChild(cd);override;
begin
return cd is class(TDMenu);
end
function addmenu(o,e);
begin
{**
@explan(说明)添加菜单
**}
cp := o.Component;
r := (GetDCompObject("tmenu")).ComponentCreater(cp.TreeNode,cp.Cwnd);
r.CreateName();
tr := r.TreeNode.owner.Designer;
tr.BindCwndMessage(r.Cwnd);
tr.VariableSelecter.additem(r);
end
function menus();override;
begin
r := inherited;
r[length(r)] := array("type":"menu","caption":"添加子菜单","onclick":thisfunction(addmenu));
return r;
end
function Create(AOwner);override;
begin
inherited;
end
end
type TDMainMenu = class(TDMenuBase)
{**
@explan(说明) 主菜单设计器控件 %%
**}
function HitTip();override;
begin
return inherited;
return "主菜单";
end
function ComponentClass();override;
begin
return class(tmainmenu);
end
function bitmapinfo();override;
begin
return GetMainMenuBitmapInfo();
end
function CheckParentWnd(Pwnd);override;
begin
return (Pwnd is class(TVCForm)) ;
end
function WndClass();override;
begin
return Class(TMainMenuWindow);
end
function Create(AOwner);override;
begin
inherited;
end
end
type TDAction = class(TDComponent)
{**
@explan(说明) action设计器控件 %%
**}
function HitTip();override;
begin
return inherited;
return "taction通过右键添加";
end
function classification();override;
begin
return "隐藏" ;
end
function InToolBar();override;
begin
return false;
end
function CheckParent(dcomp,Pwnd);override;
begin
if dcomp is class(TDActionList) then return TRUE;
Pwnd := dcomp.Cwnd;
return false;
end
function WndClass();override;
begin
return Class(taction);
end
function ComponentCreater(node,owner);override;
begin
r := inherited;
node.owner.expand(node);
return r;
end
function create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
type TDActionList = class(TDRootComponent)
{**
@expand(说明)actionlist 设计器控件 %%
**}
function HitTip();override;
begin
return "actionlist";
end
function CheckChild(cd);override;
begin
return cd is class(TDAction);
end
function bitmapinfo();override;
begin
return GetActionListBitmapInfo();
end
function addaction(o,e);
begin
cp := o.Component;
r := (GetDCompObject("taction")).ComponentCreater(cp.TreeNode,cp.Cwnd);
r.CreateName();
tr := r.TreeNode.owner.Designer;
tr.VariableSelecter.additem(r);
end
function menus();override;
begin
r := inherited;
r[length(r)] := array("type":"menu","caption":"add action","onclick":thisfunction(addaction));
return r;
end
function ComponentClass();override;
begin
return class(tactionlist);
end
function WndClass();override;
begin
return Class(TActionListWindow);
end
function Create(AOwner);override;
begin
inherited;
end
end
//**************FMainMenu********************************
type TPopUpMenuWindow = class(TDVirutalWindow)
{**
@explan(说明) 弹出菜单虚拟窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TPopUpmenu(self);
end
function bitmapinfo();override;
begin
return GetPopUpMenuBitmapInfo();
end
end
type TClipBordWindow = class(TDVirutalWindow)
function Create(AOwner);override;
begin
inherited;
BindComp := new TClipBoard(self);
end
function bitmapinfo();override;
begin
return GetClipboardBitmapInfo();
end
end
//*********************
type TQuotationWindow = class(TDVirutalWindow)
function Create(AOwner);override;
begin
inherited;
BindComp := new TQuotations(self);
end
function bitmapinfo();override;
begin
return GetQuotationBitmapInfo();
end
end
type TLoginWindow = class(TDVirutalWindow)
function Create(AOwner);override;
begin
inherited;
BindComp := new tlogincontrol(self);
end
function bitmapinfo();override;
begin
return GetLoginBitmapInfo();
end
end
type TDPopUpMenu = class(TDMenuBase)
{**
@explan(说明) 弹出菜单控件 %%
**}
function HitTip();override;
begin
return inherited;
return "右键菜单";
end
function ComponentClass();override;
begin
return class(tpopupmenu);
end
function bitmapinfo();override;
begin
return GetPopUpMenuBitmapInfo();
end
function WndClass();override;
begin
return Class(TPopUpMenuWindow);
end
function Create(AOwner);override;
begin
inherited;
end
end
//*****************clipboard********************
type TDClipBoard = class(TDRootComponent)
function HitTip();override;
begin
return inherited;
return "剪切板";
end
function classification();override;
begin
return "常用";
end
function ComponentClass();override;
begin
return class(TClipBoard);
end
function bitmapinfo();override;
begin
return GetClipboardBitmapInfo();
end
function WndClass();override;
begin
return Class(TClipBordWindow);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//***********订阅************************
type TDQuotations = class(TDRootComponent)
function HitTip();override;
begin
return inherited;
return "行情订阅";
end
function ComponentClass();override;
begin
return class(TQuotations);
end
function classification();override;
begin
return "天软";
end
function bitmapinfo();override;
begin
return GetQuotationBitmapInfo();
end
function WndClass();override;
begin
return Class(TQuotationWindow);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//****************************
type TDtlogincontrol = class(TDRootComponent)
function HitTip();override;
begin
return "登陆天软";
end
function classification();override;
begin
return "天软";
end
function ComponentClass();override;
begin
return class(tlogincontrol);
end
function bitmapinfo();override;
begin
return GetLoginBitmapInfo();
end
function WndClass();override;
begin
return Class(TLoginWindow);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//*************TTreeView***************************
type TDTreeView = class (TDComponent)
{**
@explan(说明) 树形设计控件 %%
**}
function HitTip();override;
begin
return inherited;
return "树控件";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100027101000089504E470D0A1A0A0000000D4948445200000018000000180806
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA8640000010649444154
484BB595CB0D83400C05530725A44ADAE0C43DF55009FFCF61A387F422AFB3364
B084823451C668C7DC823DCFCEC81BAAE4355557F05CE4F002FB66D8B58D73562
599688799E23A6698A80F32B109AE7CE55F9388EE940F37A44FC2ACF0E4058144
516529E0C701D65595E9A3C2B40296F72563E0C831F207A65B972332057027400
C2D4FE819427035ACE75E04BCE4C0EFABEF703943340296F7224770352CE80751
34B6E06B41C53CB2FD00148F52DCC404ACE95E077CE5A48D7757EC09A3857EE06
28B7027A2544CACD80940308718333939B81945C0620E54D8EE46DDBFA01CA192
07A6596DC0D4839906BD10108F52DDC8027CF598B240ADCFEA77FDF13C21B71B1
C6D53F7109130000000049454E44AE42608200";
end
function WndClass();override;
begin
return Class(ttreeview);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
DefaultEvent := array(
"event":"onselchanged",
"name":"sel",
"virtual":true,
"param":array("o","e"),
"body":
"
{**
@explan(说明) item选择改变回调 %%
@param(e)(tuieventtree) 消息对象 %%
@param(o)(ttreeview)树控件 %%
**}
if e.itemold and e.itemnew then
begin
MessageBoxA(e.itemold.caption+' 切换到 '+e.itemnew.caption,'提示',0,o);
end
inherited;
"
);
end
end
//**************TSPinEdit*****************************
type TDSpinEdit = class(TDComponent)
{**
@explan(说明) spinedit 设计器控件 %%
**}
function HitTip();override;
begin
return "SpinEdit";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100026901000089504E470D0A1A0A0000000D4948445200000018000000180806
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000FE49444154
484B63F84F63306A0141401F0BEAE7EE240B83C0FCF9F3FFCF9C39132B06C9C12
D2015C0F4800C828113274E80310C80E4A866C1FEFDFBFF7371718131880D0244
5BB074EDEEFF21A9F5607CE5C67DB018BA05929292FF191818C018C40601A22D2
86D9EFEFFDCE55B501E04A05B800D106D415A690F182F5EB3EBFFDFBFFFC06230
3D5489E4874F5E80830614446BB61C048B11D203034459F0EBD76F30DDD8BBE0F
FECA55BC06CAAFA20B77AE2FFC0E4DAFFF1F9EDFF3F7FF9061683E90119840B80
E488B2001B40B7405A5A1A9E8A406C10A0AA0514E5036C00DD0210387EFC3818C
3008A05E46010202A926909462D200886BA05FFFF03002A9E4731011BC45B0000
000049454E44AE42608200";
end
function WndClass();override;
begin
return Class(TSpinEdit);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
//************tlistview******************************
type TDListView = class(TDComponent)
{**
@explan(说明) TTSLDataGrid 设计器控件 %%
**}
function HitTip();override;
begin
return inherited;
return "列表视图控件";
end
function bitmapinfo();override;
begin
return getlistviewbitmapinfo();
end
function WndClass();override;
begin
return Class(TListView);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
fiscontainerdcmp := false;
DefaultEvent := array(
"event":"onselchanged",
"name":"sel",
"param":array("o","e"),
"virtual":true,
"body":
"
{**
@explan(说明) 选择发生改变回调 %%
@param(o)(tlistview) tlistview对象 %%
**}
MessageBoxA('当前选中:'+tostn(o.selectedid),'提示',0,o);
inherited;
"
);
end
end
type TDgridctl = class(TDComponent)
{**
@explan(说明) 自绘制网格 设计器控件 %%
**}
function HitTip();override;
begin
return inherited;
end
function bitmapinfo();override;
begin
return getgridctlbitmapinfo();
end
function WndClass();override;
begin
return Class(TGridCtl);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
fiscontainerdcmp := false;
DefaultEvent := array(
"event":"ondrawcell",
"name":"drawcell",
"param":array("o","e"),
"virtual":true,
"body":
"
{**
@explan(说明) 绘制表格 %%
@param(o)(tlistview) grid对象 %%
@param(e)(tuieventbase) 消息对象包括,row,col,rec,cavas等属性提供绘制信息 %%
**}
//绘制表头
i := e.row;
j := e.col;
rec := e.rec;
cvs := e.canvas;
if i<o.FixedRows or j<o.FixedColumns then
begin
cvs.Draw('FrameControl',array(rec[0:1],rec[2:3]),DFC_BUTTON,DFCS_BUTTONPUSH); //DFCS_CHECKED DFCS_FLAT
end
//绘制网格线
cvs.moveto(rec[array(2,1)]);
cvs.LineTo(rec[array(2,3)]);
cvs.LineTo(rec[array(0,3)]);
if j=0 then
begin
cvs.LineTo(rec[array(0,1)]);
end
if i=0 then
begin
cvs.MoveTo(rec[array(0,1)]);
cvs.LineTo(rec[array(2,1)]);
end
//绘制文本
cvs.drawtext(format('%d,%d',i,j),rec,DT_VCENTER .| DT_SINGLELINE .| DT_CENTER .| DT_NOPREFIX);
inherited;
");
ev := array(
"event":"onhitcellsizer",
"name":"hitsizer",
"param":array("o","e"),
"virtual":true,
"body":
" {**
@explan(说明) 命中单元格调整大小边框 %%
@param(o)(tgridctl) grid对象 %%
@param(e)(tuieventbase) 消息对象包括,等wparam=1 表示行=2 表示列,lparam为命中的行或者列序号 %%
**}
//绘制表头
//if e.wparam=1 then echo '\\r\\nrow:',e.lparam;
//if e.wparam=2 then echo '\\r\\ncol:',e.lparam;
if e.lparam<o.FixedRows or e.lparam<o.FixedColumns then //行列标不能调整宽度高度
begin
e.skip := true;//忽略调整宽度
end
inherited;"
);
SetDefalutEvent(ev,true);
end
end
type TDedit= class(TDComponent)
function HitTip();override;
begin
return inherited;
return "文本框控件";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
10002D201000089504E470D0A1A0A0000000D4948445200000018000000180806
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA8640000016749444154
484BED93B18AC2401445D30BDAA51214044997C6D680A2A435D8DB59FA0D0BFE4
26C52588B9FB06065C02A453A0B9580A50A12B5D03477796F278B59571CC16CE5
8107F74E60CE304314A4CC5BF090FF117C0C3F539984E0D53C2598CD6668B7DBA
225511485E7777E4A309D4E619AA6687F136F1C735710451156AB1576BB9D5849
0A96CB25C230E47C8D9460B15840D775B45A2D94CB650C06035E2741B55A85655
93C854201B66DF3B71829C17EBFC7F178E44CB252A9C49904994C06411070DF6C
36505515DBED963B2125A0EB711C079D4E874F9CCBE5789D048661708EA9D56A7
05D57344941AFD743B7DBC57C3EC7E1704808EAF53AE7984AA502DFF7459314D0
29279309E7F1789C1064B359ACD76BEE9EE7A1582CE272B97027A404A3D108F97
C1ECD6613FD7E9F1F93A0FFA0D168F0E3D3D5699A96B81E424A40D0A9CEE7B368
B79C4E2791BEA18DE3CDAFF35DC1ABB811A4313F8234790B1E92B200F80266B31
3963A1FCCDB0000000049454E44AE42608200";
end;
function WndClass();override;
begin
return Class(tedit);
end
function Create(AOwner);override;
begin
inherited;
end
function IsContainer();override;
begin
return false;
end
end
type TDmemo= class(TDComponent)
function HitTip();override;
begin
return inherited;
return "多行文本";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100027103000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA8640000030649444154
5847ED96DD4F52711CC6A1EEB21B2FEA3FD07FC0D98DAD1BB76EF2A23B6FEAA2B
A68D3CD2D6D6D66EAD6EB48D010255158CA459B93B9C4347039D37005A8883A82
5E6C1C5FC68B5BE69029439FCEF7B08327E4E086076BCECFF6BBE0EC1CCEE73CC
FF7F04386FF8C132162777717ABDFBF61F9AB0FF1789CFBCC73E4427473C6FB05
F6B379982E2F87C73583ADADADA498A850A3C12AFDD25B50ABE9852D3F1FE8EE4
654A5C2DB9212B8ED9F108D46B1B3B39359484AE8E983C1203A3B7530299AF05B
A100535A0A7761219ACF9FC3DA5A984BEA488448666565199393362C2EFEC0C88
8152F6EDE80A3A000E6BC33E8AAAB83DFEF472412C9BD10C9F8FD2E188D8F303E
FE81139A9E9E82C1A047CDA58B50D754C36EB7836198DC0BF1320B0B173036F60
C66730FBB06303838C80A1AA1D777C166FB08AFD78B70388BCA8A8A8A0E5C3C09
9959B8DDC570B95AD819512210B80C8DA606F50D0DE8E979C5C9783C1E6EB6723
AD4BCCCDC5C31666654EC0D9BD8A365181A3A85D1D1D3B856796F9F0CBDF684E4
42C29A9C4E257BC3E7ECD1320C0FCB593919B4DA0ADCAA6DDE2743D7119254C6F
3B78C8A9D8B443266B39C1D6419DADB2BB8642A1FEBD3CA10922524AC89662614
4A2443325353245399ACE96E4B6F5A19421221A10CCD4C20B0571325A3D5EEC95
032752FCD696588AC2BE3A12F6518773219A14C6A327C4D0D5DEFD2CA10874E68
7B7B1B86D6EB7863AA4FD63430202E43C9D09E26C6A184E82927462D887826F0B
EAF1DB1D815F4F7CBD98196A1ADAD2AAD0C5D93E9BBB3AE8C564747074C8656C4
995944662D303DBD0D8743CEFEF8256484E70A674632A154363737F1E46123829
FCDF8D9A740F79DAB68D33CE036D174C9F0E44CC86AB540A954E27E7515FA5E1B
B9CDD3E974C0E7F3B1F314127DB52513125640D066180A053981F9F9796E935C5
A62A056AB93E751ADA9E42CA1582C868D8D0DEECF55381CC2FAFA2FAE463A4E1B
A5183913CA16C9848495A52E9D4E97F11C21C73721A9904C28B506B19AD21D177
27C13928A13A183C85A28974B0C51A17FC5895066803FCD8B95CBA6C573F60000
000049454E44AE42608200";
end;
function WndClass();override;
begin
return Class(tmemo);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
DefaultEvent := array(
"event":"onchange",
"name":"change",
"param":array("o","e"),
"virtual":true,
"body":
"
{**
@explan(说明) 文本改变回调 %%
@param(e)(tuievent) 消息对象 %%
@param(o)(tmemo) 多行文本框对象 %%
**}
inherited;
"
);
end
end
type TDpassword= class(TDComponent)
function HitTip();override;
begin
return inherited;
return "密码框";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
10002F300000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA8640000008849444154
5847ED91010A80300845BD795DA48374BA859065C36644A163FFC18789321E4A2
51910F2809007843CF20A4DCB1A1AE12214C5D8424474C4AA99B00D69094DBF42
44F3FEBABE6B9ECF41C89B7B29C49FB622583D9D1A9C8CF945883F6D45B07A3A3
538193396D0D7A4106209895533611BBAA31FA1C808E7219300210F087940A84D
291BB496CCEA5B2547890000000049454E44AE42608200";
end;
function WndClass();override;
begin
return Class(tpassword);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
(**
type TDtrackbar= class(TDComponent)
function HitTip();override;
begin
return "跟踪条";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100026701000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000FC49444154
5847EDCE310AC2401085E1345676E2592CBC876061A3A59E40B0C8416CAC3C400
A1B0B0BCBA0206A2A53580882A0A0A006C9E8CAAE923871125835C2FCF020EC66
E133206531888A41540CA2224146694A4E67E9055996850E038487BD4B3A55006
4DBF6CB304078D8BB2463103506516310B54810360C101EF62EE9540F5054D9CA
1C45A8897B9D91A0EE708742D43A83ADFC534F2448546FAF504CE376AEBB5820E
FE243B1E5063085E6024E9E2FFFD0572C9068B9F1205F73EE985CD501777D9637
7A8B0D12F52707C89467D01BEFE589FE12814423F728BF3E130A324D537E3DFBC
69988412AEC4CF41FA05FC6202A065131E87D0057498A8BEBDBFB6A1400000000
49454E44AE42608200";
end;
function WndClass();override;
begin
return Class(ttrackbar);
end
function Create(AOwner);override;
begin
inherited;
end
function IsContainer();override;
begin
return false;
end
end
**)
type TDcomboBox= class(TDComponent)
function HitTip();override;
begin
return inherited;
return "下拉选择框";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100023501000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000CA49444154
5847ED92C109C42010452D45F094A385A4A65461135660375EEC220797C92ABBD
90C314AD4ECE0838F8387CF6318E61FC6104AB1139AE7B969300E427772D6D755
C839B7BD409CB3859665294E04FAD675F5D33479A5D41698E1AF9B1060ADF59CF
32D3003D94277F0DD07225106E82EF4CB65A196C1A8BAA13386508A2221C6D82D
D15A87C60F343654131A42D83D5C8D3126B4E0D0D8504D680861B791132965683
A42634335A12184DD45698410A1F50D8D0DD5E47F855A066327F40486508A2174
8EF72FB778FABEB46AB5F60000000049454E44AE42608200";
end;
function WndClass();override;
begin
return Class(tcomboBox);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
DefaultEvent := array(
"event":"onselchanged",
"name":"sel",
"virtual":true,
"param":array("o","e"),
"body":
"
{**
@explan(说明) item选择改变回调 %%
@param(e)(tuievent) 消息对象 %%
@param(o)(tcomboBox)combobox控件 %%
**}
MessageBoxA('选中了项id:'+tostn(o.itemIndex),'提示',0,o);
inherited;
"
);
end
end
type TDColorComboBox= class(TDComponent)
function HitTip();override;
begin
return "颜色下拉选择框";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100023001000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000C549444154
5847EDD1DF09C32010C77147F13513640AD7C81A9DC2453A45B7F0C52D7CB039F
1A0A1FEC9859C49E03EF02392807C6955BC1909EAD904196386AEE42FE84CADFB
E841EFD7F165789FF73E3D019EE941CBFAE9E832B82F8410A7698AD6DA3438C3B
BCB8280732E6AADD3E00CE841A5BF62EFB2DFFB200463003DE804ADFB76078D5C
09EB2FD4F2FC20B5F00C49506D881CC44D827AE8416AFDC4B14C82AACBE841CC2
4A8871C347F66962109AA0D9183B84950CF738346AE6413740712D416E317FE0C
479C51B569C20000000049454E44AE42608200";
end;
function WndClass();override;
begin
return Class(tcolorcombobox);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
type TDradiobtn = class(TDComponent)
function HitTip();override;
begin
return inherited;
return "单选框";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
10002AD02000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA8640000024249444154
5847ED96C96EE2401086E7F5B23C14121C13D63B08DE055022E0C076040408894
54A2EEC4835FE9CB2C621B6BB1D26520EFEA492ACEAEAF2EFEEEA6AFF915F4622
C84422C84422C8C44D8296CBA574BB5D69341AAEF1BC5AAD74F47BC416743E9FA
55EAF4BA15090542A15688C2190D8B8C412349D4E259BCDBA2FADD56AD26EB765
B3D9C8E974726DBD5EBB3EC688C9E572329BCD74B61DD682FAFDBEA4D36929954
A32994CD41B0E31C5625132998C0C0603F59AB112C4CA20A652A9C87EBF57AF19
62CBE5B22BCA76A58C82A803B689958923C663B7DBB92B95CFE7E572B9A8371CA
3200A987A188FC7EAF94CB3298EE00FE33908B68F1C14BA09A3204E0C457ACDDB
9BC8DD9D93C0C9E0B7FB7B91F7770DF251AD56DD95321129883EC397753A1DF5F
C23488C670F0F1AE4A3D56AB9B94C7DCA991E0E8D8E241C6D3F6C4D9010BFBDBC
68B0424B2057AFD7534F30CED470BCFA391E8FEAF9E0E9E9AB806B7B7ED660851
CE432D59133351C267F571045EEE77038DC2EE8D76D19054812AE836B384D4142
B0C7470DF2E11535C2A270A647C3510D3AF61C6D4E5390981F3BF6E015F668345
2CF67D81AEAC5B947E5F5559D57788DB119D6397D18057175706BD3FAB7DBAD7A
EDF9EF57072C160BF782E4A2E405B610EB5DAEF3F95CBDD15809027E2148CCD78
6DD6B7E88219639C3E150BD66AC0501BF102C3DF5409172723835F4298C677C8C
1143ACEDCA78C41204D401CD8DAFE7A541C618056C5333D7C416E48715A179F27
28C67539F317193A09F2011642211642211148DC85F768426F04BC530CE000000
0049454E44AE42608200";
end;
function WndClass();override;
begin
return Class(tradiobtn);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
type TDipaddr= class(TDComponent)
{**
@explan(说明)ip设计控件%%
**}
function HitTip();override;
begin
return inherited;
return "ip地址控件";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
10002B402000089504E470D0A1A0A0000000D4948445200000020000000200806
000000737A7AF4000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA8640000024949444154
5847B5963D8B14411086E7771819980882B870F88170222A2826228A81707881C
1B1818966C7456AA226FA238C4C04115610111185FB211E9C7A6A20D33353774F
431DDD3DDD3D33BBB3EFF232B3555D55EFCCF4471532005FEA6FB2593D966BE69
69C3697E4989958728F0D1F6386A053C00FD99167D54B395F5E9523E5F15E642C
31C476212B8024A7CC6AB4481F124B8E1C92026E98BBD1A4F3905C2944059C28C
F45132D4272C6D012C0848A251883E40EE109B85F3D88068E496AB83814C06489
052C83EEC4B402582EA9D97ED3AC2599F34FCA0BAD5C4A6AE912B502724F9F5A4
614C9F9C16EF353BE37DB72BDBA93CC6B059C292FB70628870A785EBFB2B6D7CD
1BF9DC7CB5B63DF923EBD5D4CB4B4D507CA83F798E90FA4A5DA80D7F28208C7F5
BBFB776AEA18FDAC5A36AABE508190A707D5D0234F66FF3AFE5A376C121123A42
2E228009A7D0B7A6A476D167E35944C056FDD4DAFF1FFC8E96273D1FB50B8E53D
718E33C0256CC456FD379D7CCBC3848EDD105C4F04B7ECB5973C58B8356C0D89F
20C4ACF9286BD58617A3B49F60CC49A87BC093FA854CAB8772DBDCF3C686B4939
0362AE674D95700F7AEAF8BD42EE8E1624E97CB12406DBB15E7FA3D92868D26FF
11A57EC51001D404A31E464304685CE771CC409E38A42B406D7D05B48E633044F
DA2D4A7078702C0989D708A6187EC0900CBE88895B1CEB82500F4D91D87929C31
440580313BE4B01376911400D85A53ABA30F8975275C0C590180E542925CDF189
2B1C4E852CBA153800B7A38DA280E11BE29C729E41E1B3EC6F487C83E6F6E81BB
6E01F9710000000049454E44AE42608200";
end;
function WndClass();override;
begin
return Class(tipaddr);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
type TDmessagebox = class(TDRootComponent)
function HitTip();override;
begin
return "提示框";
end
function bitmapinfo();override;
begin
return GetMessageBoxBitmapInfo();
end;
function classification();override;
begin
return "对话框";
end
function ComponentClass();virtual;
begin
{**
@explan(说明) 控件类 %%
**}
return class(tmessageboxadlg);
end
function WndClass();override;
begin
return Class(TDMessageboxWindow);
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
end
end
type TDMessageboxWindow = class(TDVirutalWindow)
{**
@explan(说明) 颜色选择控件窗口 %%
**}
public
function Create(AOwner);override;
begin
inherited;
BindComp := new TMessageboxADlg(self);;
end
function GetPublishEvents();override;
begin
return array();//array(1:nil);
end
function bitmapinfo();override;
begin
return GetMessageBoxBitmapInfo();
end;
end
//***********zh**DControl***********************
type TDListBox=class(TDComponent)
private
FLBItemEdit;
public
function isContainer();override;
begin
return 0;
end
function HitTip();override;
begin
return inherited;
return "列表框";
end
function WndClass();override;begin
return Class(tlistbox);
end
function Create(AOwner);override;begin
inherited;
fiscontainerdcmp := false;
DefaultEvent := array(
"event":"onselchanged",
"name":"sel",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) item选择改变回调 %%
@param(o)(listbox) 列表控件 %%
@param(e)(tuieventbase) 消息对象 %%
**}
echo '\\r\\n',tostn(o.ItemIndex);
inherited;");
ev := array(
"event":"ondrawlist",
"name":"draw",
"virtual":true,
"param":array("o","e"),
"body":
" {**
@explan(说明) 自绘制 %%
@param(o)(listbox) 列表控件 %%
@param(e)(tlistdrawevent) 消息对象 %%
**}
id := e.idx;
cvs := e.canvas;
rec := e.rec;
sel := e.sel;
cvs.drawtext( o.getItemText(id),rec);
inherited;");
SetDefalutEvent(ev,1);
end
function bitmapinfo();override;begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100025401000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000E949444154
5847ED96410EC2201045390ADB1E86E371122FE0A69C807D37BD451798C192D8F
643156841C24B5E6C884E5E9C6860A6327AD0199B2021C4AD220E413909CD2B1E
344D93D55134884238E756171515C418FB49A5D4FAC937346F5916330C8391525
AE999CEA2825271F3E679B6AF847B2E1A84880A426B41FA86D37948C4E5DFD0F8
7C40DB0842EB09897E6528868C0A4AA5FD20B496BD5AEBF5DD47B207A5D27E105
A11D2373C7B502AED07A1F584FC8B3FC69088CB837C4405A1B5207DC3DD795517
B42AAFB0D92EF9A97CCEA3101743140FDAF375D09D22364135D083CEE841618C7
90143F9BE01B37879820000000049454E44AE42608200";
end
end
type TDColorBox=class(TDComponent)
function HitTip();override;begin
return "颜色列表框";
end
function WndClass();override;begin
return Class(tcolorBox);
end
function Create(AOwner);override;begin
inherited;
fiscontainerdcmp := false;
end
function bitmapinfo();override;begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100025B01000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000F049444154
5847ED96B10D833010451985969A822958838D3C49164813295BD0B00585C3593
AC9266793B33E06059EF48485A5F32B5CB8B227E30EDA2208EAFBBEA8125F4148
52F30E0F1AC7D1C9E8838665CB37039E4721755D3B390A16D4B6EDA60CCD9BE7D
9364D638D314E5AD3BFC38288699ADC97E0352C4843EC50421F0480E6A594D83D
E8F57C88AA83AA2134872241D22566D75C3348033408C19F0755CB966F064582A
4CBBC96B96690066C10805306A594880675EF2E3087D8A1042C48BAC4BE3E3C0F
F2404305C19EB0B1200D3C0FF3C807E0CFA3108E210E0F5AF37350492582A0337
0076D7107A5B1F6034F9699CCB1141CEB0000000049454E44AE42608200";
end
end
type TDCalendar=class(TDComponent)
public
function HitTip();override;
begin
return inherited;
return "日历";
end
function WndClass();override;begin
return Class(tmonthcalendar);
end
function Create(AOwner);override;begin
inherited;
fiscontainerdcmp := false;
end
function GetPublishEvents();override;begin
r:=inherited;
if r then
reindex(r,array("ondrawitem":nil,"onpaint":nil));
return r;
end
function bitmapinfo();override;begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100029901000089504E470D0A1A0A0000000D4948445200000018000000180806
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA8640000012E49444154
484BED94B1AA82501CC6DD7C010D71745268953B2AEE3E40F80A2E977A1371095
C0D8256C1390209DC5C05373721084104BF8BA77335A2AB51D725FAC187E77F3E
F0770E884CC23098321FC168DE40F0F51D612ADA77BFB160B55A41D775489284F
D7E4F772F6CB75BB27F9DC3E140DB9E41C172B9C466B301C77108C390EE5EF03C
0F8661204DD32E6559D2B66750F08B288A7705A669D2E96F5E12F03C0F5996A16
91AD6EB359AA6A16DCFD382388E110401922481EFFB98CD66701C87B63D4F0B6E
715D17AAAAD2A9E7DF04EDC7A0280A9D7A0605A7D3094551401004EC763BB2AEE
B9A745114A1AA2AB2CEF39C9CDEB66D325F332898CFE760DA7FC9558EC723E92C
CB02CBB2E476ED73B1589003DD322818E37C3E23CBB2EE26F77849F0081FC1289
D60BA44F8013782F60023EBD3020000000049454E44AE42608200";
end
end
type TDProgressBar=class(TDComponent)
public
function HitTip();override;begin
return inherited;
return "进度条";
end
function WndClass();override;begin
return Class(tprogressbar);
end
function Create(AOwner);override;begin
inherited;
fiscontainerdcmp := false;
end
function bitmapinfo();override;begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100024C02000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000001E149444154
5847ED95476E633110447DAB39978FA395749C11A09C73CE3967A907D540CBF46
75BF46EB46003B57109CDA72A52FEA0371B0FE41A0FE41A0FE41A0FE41A0FE41A
068A4422140A85FEABC0F004C21FB6DB2D9D4EA7A78EC7231D0E07DAEFF7ACDD6
EC79FD96C36B45EAF9F5AAD56B45C2E69B158D07C3EA7D96CC69A4EA734994C68
3C1ED36834A2E1704883C180D5EFF7A9D7EB51B7DB65351A0D66F806743E9FE9F
178D0FD7E67DD6E37BA5EAF74B95CD8D34005D20435014D48133008D96AB56C20
1C04883F9F7F2D0984E60984E601E23749359B4D1B08DF1869688B250DCD93343
4CF841010B3AE4EA7C3AAD7EB3610224725DA62A944F3A412CD0B429820ED769B
AB423AD56AD50642EC48425B0CEF552DA844F38269088480E032239D52A964032
17A24A12D96CBA9795289E64925661A0201D56A354EA75028D840381017545B2C
AF44F3A412CD13081344202A950AAB5C2E532E97B381702052D216CB2BD13CA94
4F38210020208D4542C16399D4C26630321FA5797F3552DA844F3CC3404C204C9
E7F39C4E3299B48110FD4F3F5CAE57E2AA24082120D96C96D3492412361096BB5
E832BFA9F0E84D2E934A552294E0300F1789C158BC5281A8D7E077A877FAEE170
F80BE89DC603B9C603B9C603B9C603B9C603BD1EA27F2BABB3A7A95F430C00000
00049454E44AE42608200";
end
end
type TDCheckBtn=class(TDComponent)
public
function HitTip();override;begin
return inherited;
return "复选框";
end
function WndClass();override;begin
return Class(tcheckbtn);
end
function Create(AOwner);override;begin
inherited;
fiscontainerdcmp := false;
DefaultEvent := array(
"event":"onclick",
"name":"clk",
"param":array("o","e"),
"virtual":true,
"body":
" {**
@explan(说明) 点击回调 %%
@param(e)(tuievent) 消息对象 %%
@param(o)(tcheckbtn)选择按钮 %%
**}
MessageBoxA(((o.checked)?'选中':'没选中'),'提示',0,o);
inherited;
");
end
function bitmapinfo();override;begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100023A02000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000001CF49444154
5847EDD64B4EC2501406602638C10487C484810B70EC0274430E7527121640888
AACC0A9C1F22ECF02A52D85D296D70A7E295822A5F6564E8D0EFA2767D873BFDC
474E23F8670941AC84205642102B9EA09BFB775CDDBE055A564FAF7882AC06ABD
50ACBE5128BC502F3F91CB3D90CA669C2300CE8BA8EE9740A4DD330994C301E8F
A1AA2A46A3111445812CCB902409C3E110A2286230186C7A7A85090A12D3EFF7E
9A02031BD5E8F0E3A162308D2014610043AE818CCEBAB846452472A25EF61BADD
2E1D740C26913010899888460D3C3C58BBB5C5743A1D3AC80DA3AA6C8C5D27272
6D269718369B7DB74901393CF6BB8BC34C0712A1363553C6EE0E9A9BFC1B45A2D
3AC889393DDD2E747161A050507E8469369B74908D7979D1108BED2F68A13219C
5157376A6AFBFE9ED611A8D061D645FE07C7EB2DB1D56B9ED8C85E1799E0EFAFA
9A72399589F2C2D4EB753AC8F99A9E9F47EBA33B3C223F985AAD4607399FB6350
E1E1FE503941F4CB55AA5839C187B1C64B3D20EE51753A954E820378C3D0E3219
11E7E7BA6F4CB95CA683BEC3D8E380E7BBBE31A552890EF2C2D8E3C02FA6582CD
2414162388EA38382C49041BFF1937F7D57F8ECEE1E4FD05F2404B11282580941
DE013E00FF2B90FB3AF2B1880000000049454E44AE42608200";
end
end
type TDDateTimePicker=class(TDComponent)
private
public
function HitTip();override;begin
return inherited;
return "时间日期选择";
end
function WndClass();override;begin
return Class(tdatetimepicker);
end
function Create(AOwner);override;begin
inherited;
fiscontainerdcmp := false;
end
function bitmapinfo();override;begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100020E01000089504E470D0A1A0A0000000D4948445200000018000000180806
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000A349444154
484BD58FD10D83300C44D9285B650D6FD14DFACD10198221F2E1F62C8C5C29941
80C88279D8C2C398F1BF864AE13E49CC362F91178D19B5AAB046C0A88C6AE00DC
945238A524C177B8001091046C0A3CB46EFE0AA26239D4A04597E0F59EDC51BA0
57B260869C0C3F76CCEB29B0969208F9BB94B20478D3F5DDB2BAE06F28899BA5F
9B20A4412B8AAB81770257034F942EC111EE1544C5B208CEE2E902E60FE420D1B
CC541E3100000000049454E44AE42608200";
end
end
type TDTimePicker=class(TDComponent)
public
function HitTip();override;begin
return inherited;
return "时间选择";
end
function WndClass();override;begin
return Class(ttimepicker);
end
function Create(AOwner);override;begin
inherited;
fiscontainerdcmp := false;
end
function bitmapinfo();override;begin
r := gettimepickerbitmapinfo();
return r;
end
end
//**************TPanel**************************
type TDPanel = class(TDComponent)
function HitTip();override;
begin
return inherited;
return "容器控件";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
10002CA00000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA8640000005F49444154
5847EDD7B109C0300C05D1ECBF812AADA94EC1453A91AB4C1CB80F571ABDD6571
F36413441B41194991D115B5B37A68DA0F5A0AAB6B66E4C13F42488124409A204
5182284194204A1025881244FD1B74DC47F1CB09A2097A5FF70DF185865E9BB41
DE30000000049454E44AE42608200";
end
function WndClass();override;
begin
return Class(tpanel);
end
function ComponentCreater(node,pt);override;
begin
r := inherited;
return r;
if r then
begin
r.Cwnd.Color := rgb(240,240,240);
end
return r;
end
function Create(AOwner);override;
begin
inherited;
DefaultEvent := "no";
end
end
//**************groupbox**************************
type TDGroupBox = class(TDComponent)
{**
@explan(说明) groupbox控件
**}
function HitTip();override;
begin
return inherited;
return "分组框";
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100020B01000089504E470D0A1A0A0000000D4948445200000018000000180806
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000A049444154
484BCD91510A83301044BD92782B2F90DF9CA11F3D8FED358A7894C8424736B0A
43B89A11978B0129D67922975CE7F04EB732FC2E41284F0B8B04A35FA5D0B9D4C
8058A59A52A4E7BDBDBE4F86E0383ED548F138821863F6B107B740CAE5AC2199E
7E527940012CC5E28410DE3EC80BD035A0009662F94A0867176C0DE81400920C1
EC8512D4E012C8620B45C15D980289FE9356904CD0239D05299D037BBA604E978
76D0000000049454E44AE42608200";
end
function WndClass();override;
begin
return Class(tgroupbox);
end
function Create(AOwner);override;
begin
inherited;
end
end
//*****************Check GroupBox************************
type TDBtn = class(TDComponent)
function HitTip();override;
begin
return inherited;
return "按钮";
end
function bitmapinfo();override;
begin
return getbtnbitmapinfo();
end;
function WndClass();override;
begin
return Class(tbtn);
end
function menus();override;
begin
r := inherited;
return select * from r where ["caption"] <> "粘贴" end ;
end
function Create(AOwner);override;
begin
inherited;
fiscontainerdcmp := false;
DefaultEvent := array(
"event":"onclick",
"name":"clk",
"virtual":true,
"param":array("o","e"),
"body":
"
{**
@explan(说明) 点击回调 %%
@param(e)(tuievent) 消息对象 %%
@param(o)(tbtn)按钮对象 %%
**}
MessageBoxA(o.caption+':被点击','提示',0,o);
inherited;
"
);
end
end
//*****************TPairSplitter*******************************
type TDPairSplitterSide = class(TDComponent)
function HitTip();override;
begin
return inherited;
return "PairSplitterSide\r\n在splitter控件中右键添加";
end
function classification();override;
begin
return "隐藏" ;
end
function menus();override;
begin
r := inherited;
return select * from r where ["caption"] in array("删除","粘贴","剪切","打开tsf文件","打开tfm文件") end ;
end
function InToolBar();override;
begin
return false;
end
function bitmapinfo();override;
begin
return getsplitersiderbitmapinfo();
end
function WndClass();override;
begin
return Class(TPairSplitterSide);
end
function CheckParentWnd(Pwnd);override;
begin
{**
@explan(说明) 父节点判断 %%
**}
r := Pwnd is class(TPairSplitter);
if (not r) and (Pwnd is class(TWincontrol) ) then Pwnd._wapi.MessageBoxA(Pwnd.Handle,"需要 TPairSplitter 作为父窗口","失败",0);
return r;
end
function Create(AOwner);override;
begin
inherited;
end
end
type TDPairSplitter = class(TDComponent)
function HitTip();override;
begin
return inherited;
return "成对分配器";
end
function AddsplitterSide(o,e);override;
begin
cp := o.Component;
r := (GetDCompObject("tpairsplitterside")).ComponentCreater(cp.TreeNode,cp.Cwnd);
if not r then exit;
r.CreateName();
tr := r.TreeNode.owner.Designer;
tr.BindCwndMessage(r.Cwnd);
tr.VariableSelecter.additem(r);
end
function menus();override;
begin
r := inherited;
r[length(r)] := array("type":"menu","caption":"添加splitterside","onclick":thisfunction(AddsplitterSide));
return r;
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100023301000089504E470D0A1A0A0000000D4948445200000018000000180806
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000C849444154
484B63F84F63304C2C983973264E0C02870E1CC4C020804D3D0CC3005E1FC0148
20CBC7FFF361C97974F028B231B840B0C2E0B40060F0D1F3C7BFB1D4C136B014C
3D368061C18B77DFFF07371C07B3D12DC01544FEB5C7FE3F79FD0DCC46072816C
00CB7C8D907E613EB03907A5C96C02D40369C5C8CCD12B8059913CE61D5442A06
99830CE8E70310A0691CC0004D53110CD0341F2003622DC00748B2005710E1038
3CB07645B0052880B8300C80290A1C81804B0A9876118C0EB036A001A5BF0FF3F
008B200E0EE56C49BF0000000049454E44AE42608200";
end
function WndClass();override;
begin
return Class(TPairSplitter);
end
function CheckChild(dcmp);override;
begin
return dcmp is Class(TDPairSplitterSide);
end
function Create(AOwner);override;
begin
inherited;
end
function ComponentCreater(tnode,owner);override;
begin
{**
@explan(说明) 构建新节点窗口 %%
@param(tnode)(TComponentTreeNode) 父节点 %%
@param(owner)(TWincontrol) 窗口所有者 %%
@return(TDComponent|0)成功返回对象失返回0%%
**}
o := inherited;
//if o then o.Cwnd.color := rgb(200,200,200);
return o;
end
end
type TDTabSheet = class(TDComponent)
function CheckParent(p,pwnd);override;
begin
if not (p is class(TDPage)) then return 0;
return inherited;
end
function HitTip();override;
begin
return inherited;
return "pagesheet\r\n在page控件中右键添加";
end
function classification();override;
begin
return "隐藏";
end
function SelectedNode();override;
begin
if Cwnd is class(ttabsheet) then
begin
pc := Cwnd.Parent;
if pc is class(TPageControl) then
begin
pc.cursel := Cwnd;
end
end
inherited;
end
function bitmapinfo();override;
begin
return getsheetbitmapinfo();
end
function menus();override;
begin
r := inherited;
return r;
//return select * from r where ["caption"] in array("删除","粘贴","剪切") end ;
end
function InToolBar();override;
begin
return false;
end
function WndClass();override;
begin
return Class(TTabSheet);
end
function Create(AOwner);override;
begin
inherited;
end
end
type TDPage = class(TDComponent)
function HitTip();override;
begin
return inherited;
return "页面控件";
end
function addtabsheet(o,e);
begin
cp := o.Component;
r := (GetDCompObject("ttabsheet")).ComponentCreater(cp.TreeNode,cp.Cwnd);
if not r then exit;
r.CreateName();
cp.TreeNode.expand();
tr := r.TreeNode.owner.Designer;
tr.BindCwndMessage(r.Cwnd);
tr.VariableSelecter.additem(r);
end
function menus();override;
begin
r := inherited;
r[length(r)] := array("type":"menu","caption":"添加tabsheet","onclick":thisfunction(addtabsheet));
return r;
end
function bitmapinfo();override;
begin
return "0502000000060400000074797065000203000000696D670006040000006461746
100023001000089504E470D0A1A0A0000000D4948445200000024000000240806
000000E1009898000000017352474200AECE1CE90000000467414D410000B18F0
BFC6105000000097048597300000EC300000EC301C76FA864000000C549444154
5847ED97C10A84201400F76BA36E7EB5274F9A969AB9BC43B1CBEAB30EED53706
02E29398181BE6265F4A0123DA8C419C4188BC330A0C29CA7398360C112E338FE
441E4ED3947C0EDEF9905B413087739E14C6841049AFBCFBA0EEA07DDF51FF1E1
44240AD2E08DBB8D818F633809F9BFE2B68DB361261ED83BA83BCF72466839C73
24B61364AD25311BB4AE2B89ED042DCB426236C81843623B415A6B12DB099AE79
9C46C90528AC47682A49424B61174E5A2F894C9236C2DF4A0123D0827C637259C
FCE218FD50E80000000049454E44AE42608200";
end
function CheckChild(cd);override;
begin
return cd is class(TDTabSheet);
end
function WndClass();override;
begin
return Class(TPageControl);
end
function Create(AOwner);override;
begin
inherited;
end
end
function registercomponenttodesigner(cls);
begin
{**
@explan(说明) 注册控件到设计器 %%
@param(cls)(TDComponent) 设计控件 %%
**}
if ifarray(cls) then return class(TDComponent).RegestorClassItems(cls);
return class(TDComponent).RegestorClassItems(array(cls));
end
function staticinit();
begin
its := array(
class(TDForm),class(TDPanelForm),
class(TDPanel),class(TDGroupBox),
class(TDPairSplitter),class(TDPairSplitterSide),
class(TDPage),class(TDTabSheet),
class(TDTimer),
class(TDImageList),
class(TDClipBoard),
class(TDMainMenu),class(TDPopUpMenu),class(TDMenu),
class(TDOpenFileADlg),class(TDSaveFileADlg),
class(TDColorChoose),class(TDFontChoose),class(TDFolderChoose),
class(TDcoolBar),class(TDToolBar),class(TDStatusBar),class(TDToolButton),
class(TDTray),
class(TDActionList),class(TDAction),
//class(TDQuotations),class(TDtlogincontrol),
class(TDmessagebox),
class(TDBtn),
class(TDLabel),
class(tdsplitter),
class(TDEdit),
class(TDpassword),
class(TDmemo),
class(tdhighlighter),
class(TDradiobtn),
class(TDCheckBtn),
class(TDcomboBox),
class(TDListBox),
class(TDListView),
class(TDTreeView),
class(TDgridctl),
class(TDProgressBar),
class(TDDateTimePicker),
class(TDTimePicker),
class(TDCalendar),
class(TDSpinEdit),
class(TDipaddr),
class(TDColorComboBox),
class(TDColorBox),
);
o := class(TDComponent);
o.RegestorClassItems(its);
end
initialization
staticinit();
end.