parent
34bf83ae86
commit
33d710b201
|
|
@ -593,6 +593,10 @@ type TVclDesigner = class(tvcform)
|
|||
r := o.top;
|
||||
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 o.WsPopUp then return ;
|
||||
p := o.parent;
|
||||
if p then
|
||||
p.Invalidaterect(nil,0);
|
||||
end
|
||||
function ComponentSize(o,e);//大小改变
|
||||
begin
|
||||
|
|
@ -603,7 +607,10 @@ type TVclDesigner = class(tvcform)
|
|||
h := o.height;
|
||||
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 o.WsPopUp then return ;
|
||||
p := o.parent;
|
||||
if p then
|
||||
p.Invalidaterect(nil,0);
|
||||
//setcomponentfocus(o,false);
|
||||
end
|
||||
function DesignerClose(o,e) //控件窗口关闭
|
||||
|
|
@ -650,7 +657,7 @@ type TVclDesigner = class(tvcform)
|
|||
if FComponentCreater and FCurrentNode and FCurrentClikPos then
|
||||
begin
|
||||
par := FCurrentNode.Component.Cwnd;
|
||||
r := FComponentCreater.ComponentCreater(FCurrentNode,FCurrentNode.Component.Cwnd);
|
||||
r := FComponentCreater.ComponentCreater(FCurrentNode,par);
|
||||
if not r then exit;
|
||||
//////////////////////////////////////////
|
||||
//npar := par;
|
||||
|
|
@ -814,11 +821,32 @@ type TVclDesigner = class(tvcform)
|
|||
if e then e.skip := true;
|
||||
end
|
||||
private //节点点击
|
||||
factivatedonging;
|
||||
function windowactive(o,e);
|
||||
begin
|
||||
|
||||
if e.wparam then
|
||||
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);
|
||||
factivatedonging := false;
|
||||
end
|
||||
end
|
||||
function ClickComponent(o,e); //点击组件选择
|
||||
|
|
@ -836,12 +864,13 @@ type TVclDesigner = class(tvcform)
|
|||
end
|
||||
if FCurrentNode<> nd then
|
||||
begin
|
||||
wd := o;//nd.Component.Cwnd;
|
||||
//wd := o;//nd.Component.Cwnd;
|
||||
//if wd is class(TWincontrol) then _wapi.BringWindowToTop(wd.Handle);
|
||||
tr.SetSel(nd);
|
||||
TreeNodeSelected(nd);
|
||||
end;
|
||||
setcomponentfocus(o,true);
|
||||
if factivatedonging then return ;
|
||||
if FComponentCreater and FCurrentNode then
|
||||
begin
|
||||
//SetSysParam("cpos_screan",array(e.lolparam,e.hilparam));
|
||||
|
|
@ -849,9 +878,10 @@ type TVclDesigner = class(tvcform)
|
|||
begin
|
||||
FCurrentNode := (tr.RootItem.items)[0];
|
||||
if not FCurrentNode then return FComponentCreater := nil;
|
||||
O1 := FCurrentNode.Component.Cwnd;
|
||||
if not o1 then return FComponentCreater := nil;
|
||||
end else o1 := o;
|
||||
//O1 := FCurrentNode.Component.Cwnd;
|
||||
//if not o1 then return FComponentCreater := nil;
|
||||
end
|
||||
//else o1 := o;
|
||||
xy := array(0,0);
|
||||
_wapi.GetCursorPos(xy);
|
||||
FCurrentClikPos := o.ScreenToClient(xy[0],xy[1]);
|
||||
|
|
|
|||
|
|
@ -2515,7 +2515,7 @@ type TEditer=class(TCustomcontrol) //
|
|||
rd := FPageEditerMenus["²é¿´"];
|
||||
if rd then
|
||||
begin
|
||||
mtic;
|
||||
//mtic;
|
||||
it := GetCurrentEditer();
|
||||
s := it.CanJump();
|
||||
if s then
|
||||
|
|
@ -2604,6 +2604,8 @@ type TEditer=class(TCustomcontrol) //
|
|||
it.FEditer.TabChar := FTabChar;
|
||||
it.FEditer.PageItem := it;
|
||||
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.OnTextSetFocus := function(o,e)
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -1280,10 +1280,16 @@ type TTslDebuga=class(TCustomControl)
|
|||
end
|
||||
"dbgeval": //执行
|
||||
begin
|
||||
if FConnectchannel and p and ifstring(p)then
|
||||
if FConnectchannel then
|
||||
begin
|
||||
getvalewnd("ans");
|
||||
dbgeval(FConnectchannel,p);
|
||||
if p and ifstring(p) then
|
||||
begin
|
||||
getvalewnd("ans");
|
||||
dbgeval(FConnectchannel,p);
|
||||
end
|
||||
end else
|
||||
begin
|
||||
FShowText.Text +="·Çµ÷ÊÔ״̬!";
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1917,6 +1917,59 @@ type TWinControl = class(tcontrol)
|
|||
cv.SetPixel(array(x,y),c);
|
||||
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
|
||||
function ControlCreateWnd();
|
||||
|
|
|
|||
Loading…
Reference in New Issue