parent
34bf83ae86
commit
33d710b201
|
|
@ -592,7 +592,11 @@ type TVclDesigner = class(tvcform)
|
||||||
l := O.left;
|
l := O.left;
|
||||||
r := o.top;
|
r := o.top;
|
||||||
if not FPropGrid.SetGridValue("left",l,O) then o.setpublish("left",l);
|
if not FPropGrid.SetGridValue("left",l,O) then o.setpublish("left",l);
|
||||||
if not FPropGrid.SetGridValue("top",r,O) then o.setpublish("top",r);
|
if not FPropGrid.SetGridValue("top",r,O) then o.setpublish("top",r);
|
||||||
|
if o.WsPopUp then return ;
|
||||||
|
p := o.parent;
|
||||||
|
if p then
|
||||||
|
p.Invalidaterect(nil,0);
|
||||||
end
|
end
|
||||||
function ComponentSize(o,e);//大小改变
|
function ComponentSize(o,e);//大小改变
|
||||||
begin
|
begin
|
||||||
|
|
@ -603,7 +607,10 @@ type TVclDesigner = class(tvcform)
|
||||||
h := o.height;
|
h := o.height;
|
||||||
if not FPropGrid.SetGridValue("width",w,O) then o.setpublish("width",w);
|
if not FPropGrid.SetGridValue("width",w,O) then o.setpublish("width",w);
|
||||||
if not FPropGrid.SetGridValue("height",h,O) then o.setpublish("height",h);
|
if not FPropGrid.SetGridValue("height",h,O) then o.setpublish("height",h);
|
||||||
|
if o.WsPopUp then return ;
|
||||||
|
p := o.parent;
|
||||||
|
if p then
|
||||||
|
p.Invalidaterect(nil,0);
|
||||||
//setcomponentfocus(o,false);
|
//setcomponentfocus(o,false);
|
||||||
end
|
end
|
||||||
function DesignerClose(o,e) //控件窗口关闭
|
function DesignerClose(o,e) //控件窗口关闭
|
||||||
|
|
@ -650,7 +657,7 @@ type TVclDesigner = class(tvcform)
|
||||||
if FComponentCreater and FCurrentNode and FCurrentClikPos then
|
if FComponentCreater and FCurrentNode and FCurrentClikPos then
|
||||||
begin
|
begin
|
||||||
par := FCurrentNode.Component.Cwnd;
|
par := FCurrentNode.Component.Cwnd;
|
||||||
r := FComponentCreater.ComponentCreater(FCurrentNode,FCurrentNode.Component.Cwnd);
|
r := FComponentCreater.ComponentCreater(FCurrentNode,par);
|
||||||
if not r then exit;
|
if not r then exit;
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
//npar := par;
|
//npar := par;
|
||||||
|
|
@ -814,11 +821,32 @@ type TVclDesigner = class(tvcform)
|
||||||
if e then e.skip := true;
|
if e then e.skip := true;
|
||||||
end
|
end
|
||||||
private //节点点击
|
private //节点点击
|
||||||
|
factivatedonging;
|
||||||
function windowactive(o,e);
|
function windowactive(o,e);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
if e.wparam then
|
if e.wparam then
|
||||||
begin
|
begin
|
||||||
|
o1 := o;
|
||||||
|
if FCurrentNode then
|
||||||
|
begin
|
||||||
|
wd := FCurrentNode.Component.Cwnd;
|
||||||
|
wd1 := wd;
|
||||||
|
while wd1 do
|
||||||
|
begin
|
||||||
|
if wd1 = o then
|
||||||
|
begin
|
||||||
|
factivatedonging := true;
|
||||||
|
ClickComponent(wd,e);
|
||||||
|
factivatedonging := false;
|
||||||
|
return ;
|
||||||
|
end
|
||||||
|
wd1 := wd1.parent;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
factivatedonging := true;
|
||||||
ClickComponent(o,e);
|
ClickComponent(o,e);
|
||||||
|
factivatedonging := false;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function ClickComponent(o,e); //点击组件选择
|
function ClickComponent(o,e); //点击组件选择
|
||||||
|
|
@ -836,12 +864,13 @@ type TVclDesigner = class(tvcform)
|
||||||
end
|
end
|
||||||
if FCurrentNode<> nd then
|
if FCurrentNode<> nd then
|
||||||
begin
|
begin
|
||||||
wd := o;//nd.Component.Cwnd;
|
//wd := o;//nd.Component.Cwnd;
|
||||||
//if wd is class(TWincontrol) then _wapi.BringWindowToTop(wd.Handle);
|
//if wd is class(TWincontrol) then _wapi.BringWindowToTop(wd.Handle);
|
||||||
tr.SetSel(nd);
|
tr.SetSel(nd);
|
||||||
TreeNodeSelected(nd);
|
TreeNodeSelected(nd);
|
||||||
end;
|
end;
|
||||||
setcomponentfocus(o,true);
|
setcomponentfocus(o,true);
|
||||||
|
if factivatedonging then return ;
|
||||||
if FComponentCreater and FCurrentNode then
|
if FComponentCreater and FCurrentNode then
|
||||||
begin
|
begin
|
||||||
//SetSysParam("cpos_screan",array(e.lolparam,e.hilparam));
|
//SetSysParam("cpos_screan",array(e.lolparam,e.hilparam));
|
||||||
|
|
@ -849,9 +878,10 @@ type TVclDesigner = class(tvcform)
|
||||||
begin
|
begin
|
||||||
FCurrentNode := (tr.RootItem.items)[0];
|
FCurrentNode := (tr.RootItem.items)[0];
|
||||||
if not FCurrentNode then return FComponentCreater := nil;
|
if not FCurrentNode then return FComponentCreater := nil;
|
||||||
O1 := FCurrentNode.Component.Cwnd;
|
//O1 := FCurrentNode.Component.Cwnd;
|
||||||
if not o1 then return FComponentCreater := nil;
|
//if not o1 then return FComponentCreater := nil;
|
||||||
end else o1 := o;
|
end
|
||||||
|
//else o1 := o;
|
||||||
xy := array(0,0);
|
xy := array(0,0);
|
||||||
_wapi.GetCursorPos(xy);
|
_wapi.GetCursorPos(xy);
|
||||||
FCurrentClikPos := o.ScreenToClient(xy[0],xy[1]);
|
FCurrentClikPos := o.ScreenToClient(xy[0],xy[1]);
|
||||||
|
|
|
||||||
|
|
@ -2515,7 +2515,7 @@ type TEditer=class(TCustomcontrol) //
|
||||||
rd := FPageEditerMenus["²é¿´"];
|
rd := FPageEditerMenus["²é¿´"];
|
||||||
if rd then
|
if rd then
|
||||||
begin
|
begin
|
||||||
mtic;
|
//mtic;
|
||||||
it := GetCurrentEditer();
|
it := GetCurrentEditer();
|
||||||
s := it.CanJump();
|
s := it.CanJump();
|
||||||
if s then
|
if s then
|
||||||
|
|
@ -2604,6 +2604,8 @@ type TEditer=class(TCustomcontrol) //
|
||||||
it.FEditer.TabChar := FTabChar;
|
it.FEditer.TabChar := FTabChar;
|
||||||
it.FEditer.PageItem := it;
|
it.FEditer.PageItem := it;
|
||||||
it.FEditer.hgcolor := Fhightercolor;
|
it.FEditer.hgcolor := Fhightercolor;
|
||||||
|
tf := FTslCacheDir+"newfile"+ioFileseparator()+"new";
|
||||||
|
if pos(tf,n)=1 then it.fisnewfile := true;
|
||||||
it.FEditer.QuckKeys := Thisfunction(EditerQuckKeys);
|
it.FEditer.QuckKeys := Thisfunction(EditerQuckKeys);
|
||||||
it.FEditer.OnTextSetFocus := function(o,e)
|
it.FEditer.OnTextSetFocus := function(o,e)
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -1280,11 +1280,17 @@ type TTslDebuga=class(TCustomControl)
|
||||||
end
|
end
|
||||||
"dbgeval": //执行
|
"dbgeval": //执行
|
||||||
begin
|
begin
|
||||||
if FConnectchannel and p and ifstring(p)then
|
if FConnectchannel then
|
||||||
begin
|
begin
|
||||||
getvalewnd("ans");
|
if p and ifstring(p) then
|
||||||
dbgeval(FConnectchannel,p);
|
begin
|
||||||
end
|
getvalewnd("ans");
|
||||||
|
dbgeval(FConnectchannel,p);
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FShowText.Text +="·Çµ÷ÊÔ״̬!";
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1916,7 +1916,60 @@ type TWinControl = class(tcontrol)
|
||||||
x+=dx;
|
x+=dx;
|
||||||
cv.SetPixel(array(x,y),c);
|
cv.SetPixel(array(x,y),c);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
ctls := controls;
|
||||||
|
rcs := array();
|
||||||
|
sel := -1;
|
||||||
|
selr := 0;
|
||||||
|
len := ctls.count-1 ;
|
||||||
|
for i:= 0 to len do
|
||||||
|
begin
|
||||||
|
vi := ctls[i];
|
||||||
|
if vi is class(TWinControl) then
|
||||||
|
begin
|
||||||
|
if vi.Visible then rcs[i] := vi.BoundsRect;
|
||||||
|
if vi.DesigningSelect() then
|
||||||
|
begin
|
||||||
|
sel := i;
|
||||||
|
selr := rcs[i];
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if sel >=0 then
|
||||||
|
begin
|
||||||
|
pc := cv.pen.color;
|
||||||
|
pct := cv.pen.style;
|
||||||
|
cv.pen.Style := PS_DOT;
|
||||||
|
cv.pen.color := 0x3f3f3f;
|
||||||
|
for i := 0 to len do
|
||||||
|
begin
|
||||||
|
if i=sel then continue;
|
||||||
|
rc := rcs[i];
|
||||||
|
if not rc then continue;
|
||||||
|
if rc[0] = selr[0] then
|
||||||
|
begin
|
||||||
|
cv.moveto(array(rc[0],min(rc[1],selr[1])));
|
||||||
|
cv.LineTo(array(rc[0],max(rc[1],selr[1])));
|
||||||
|
end
|
||||||
|
if rc[1]=selr[1] then
|
||||||
|
begin
|
||||||
|
cv.moveto(array(min(rc[0],selr[0]),rc[1]));
|
||||||
|
cv.LineTo(array(max(rc[0],selr[0]),rc[1]));
|
||||||
|
end
|
||||||
|
if rc[2] = selr[2] then
|
||||||
|
begin
|
||||||
|
cv.moveto(array(rc[2],min(rc[1],selr[1])));
|
||||||
|
cv.LineTo(array(rc[2],max(rc[1],selr[1])));
|
||||||
|
end
|
||||||
|
if rc[3] = selr[3] then
|
||||||
|
begin
|
||||||
|
cv.moveto(array(min(rc[0],selr[0]),rc[3]));
|
||||||
|
cv.LineTo(array(max(rc[0],selr[0]),rc[3]));
|
||||||
|
end
|
||||||
|
end
|
||||||
|
cv.pen.color := pc;
|
||||||
|
cv.pen.style := pct;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function ControlCreateWnd();
|
function ControlCreateWnd();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue