界面库

添加coolbar
This commit is contained in:
JianjunLiu
2022-08-26 17:54:14 +08:00
parent 1042970ffe
commit 5fb0e102d9
8 changed files with 839 additions and 59 deletions
+32 -31
View File
@@ -1817,7 +1817,7 @@ type TVclDesigner = class(tvcform)
pedits := new TPageControl(self);
pedits.align := alclient;
FProp := new TTabSheet(self);
FProp.caption := "propertys";
FProp.caption := "properties";
FEvent := new TTabSheet(self);
FEvent.caption := "events";
FPropGrid := new TPropEditGrid(self);
@@ -4542,7 +4542,7 @@ type TGridCellNaturalEdit = class(TGridPropertyRender,TPropertyNatural)
@explan(说明) 绘制格子 %%
**}
if FGrid is class(TDrawGrid) then
e.canvas.drawtext(numbertotext(d["value"]),e.subItemRect,DT_CENTER);
e.canvas.drawtext(numbertotext(d["value"]),e.subItemRect,DT_CENTER .| DT_VCENTER .| DT_SINGLELINE);
end
function CellLeave(grid);virtual;
begin
@@ -4771,7 +4771,7 @@ type TGridCellDirectoryEdit = class(TGridCellEditWithButton,TPropertyDirectory)
**}
if ifarray(d) then
begin
dc.drawtext(d["value"],rect);
dc.drawtext(d["value"],rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function CellLeave();override;
@@ -4812,7 +4812,7 @@ type TGridCellFileNameEdit = class(TGridCellEditWithButton,TPropertyFileName)
**}
if ifarray(d) then
begin
dc.drawtext(d["value"],rect);
dc.drawtext(d["value"],rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function CellLeave();override;
@@ -4856,7 +4856,7 @@ type TGridCellFontEdit = class(TGridCellEditWithButton,TPropertyFont)
dc.SaveDC();
dc.font := d["value"];
dc.drawtext("tfont",rect);
dc.drawtext("tfont",rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
dc.RestoreDC();
end
function CellLeave();override;
@@ -4924,7 +4924,7 @@ type TGridCellhotkeyEdit = class(TGridPropertyRender,TPropertyHotkey)
**}
if FGrid is class(TDrawGrid) then
if ifarray(d) then
e.canvas.drawtext(class(thotkey).hotkeytostr(d["value"]),e.subItemRect,DT_CENTER);
e.canvas.drawtext(class(thotkey).hotkeytostr(d["value"]),e.subItemRect,DT_CENTER .| DT_VCENTER .| DT_SINGLELINE);
end
function CellLeave(grid);override;
begin
@@ -4987,7 +4987,7 @@ type TGridCellBoolEdit = class(TGridPropertyRender,TPropertyBool)
begin
src1 := src;
src1[2]-=FRbuttonWidth;
dc.drawtext(dv?"TRUE":"FALSE",src1,DT_CENTER);
dc.drawtext(dv?"TRUE":"FALSE",src1,DT_CENTER .| DT_VCENTER .| DT_SINGLELINE);
end
DrawButton(dc,src,dv);
end
@@ -5023,7 +5023,7 @@ type TGridCellEditList = class(TGridCellEditWithButton)
function CellDrawLabel(dc,rect,d);override;
begin
v := d["value"];
dc.DrawText(v,rect,DT_LEFT);
dc.DrawText(v,rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
function nameFilter();virtual;
begin
@@ -5090,7 +5090,7 @@ type TGridCellSysCursorEidt=class(TOneSelectCell,TPropertyTypeSysCursor)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -5151,7 +5151,7 @@ type TGridCellVariableTactionEdit = class(TGridCellVariableEdit)
v := d["value"];
if v is class(tcomponent) then
begin
dc.DrawText(v.name,rect,DT_LEFT);
dc.DrawText(v.name,rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end else inherited;
end
function create(owner);override;
@@ -5216,7 +5216,7 @@ type TGridCellVariabletimagelistEdit = class(TGridCellVariableTactionEdit)
v := d["value"];
if v is class(tcomponent) then
begin
dc.DrawText(v.name,rect,DT_LEFT);
dc.DrawText(v.name,rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
@@ -5251,7 +5251,7 @@ type TBtnCellDrawVTtype = class(TGridCellEditWithButton)
**}
if ifarray(d) then
begin
dc.drawtext(self(true).EditType(),rect);
dc.drawtext(self(true).EditType(),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
end
@@ -5279,7 +5279,7 @@ type TGridCellImagesEdit = class(TBtnCellDrawVTtype,TPropertyImagesData)
begin
its := dv["items"];
if ifarray(its) then
dc.DrawText("imgs:"+inttostr(length(its)),rect);
dc.DrawText("imgs:"+inttostr(length(its)),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -5420,7 +5420,7 @@ type TGridCellStatusItemsEdit = class(TBtnCellDrawVTtype,TPropertyStatusItems)
begin
if ifarray(d) and ifarray(d["value"]) then
begin
dc.DrawText("item:"+inttostr(length(d["value"])),rect);
dc.DrawText("item:"+inttostr(length(d["value"])),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
@@ -5478,7 +5478,7 @@ type TGridCellFileFilterEdit = class(TGridCellEditWithButton,TPropertyFileFilter
begin
if ifarray(d) and ifarray(d["value"]) then
begin
dc.DrawText("item:"+inttostr(length(d["value"])),rect);
dc.DrawText("item:"+inttostr(length(d["value"])),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function OnApplay(o,e);virtual;
@@ -5607,7 +5607,7 @@ type tGridCellAlignPos3BoxEdit=class(TOneSelectCell ,TPropertyAlign3)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -5626,7 +5626,7 @@ type tGridCellDayOfWeekBoxEdit=class(TOneSelectCell,TPropertyDayOfWeek)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -5791,7 +5791,7 @@ public
**}
if FGrid is class(TDrawGrid) then begin
str:=inttostr(d["value"][0])+":"+inttostr(d["value"][1]);
e.canvas.drawtext(str,e.subItemRect,DT_CENTER);
e.canvas.drawtext(str,e.subItemRect,DT_CENTER.|DT_VCENTER);
end
end
function CellLeave(grid);override;begin
@@ -5806,7 +5806,7 @@ type TGridCellPairSpliterTypeEdit=class(TOneSelectCell,TPropertySpliterType)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -6170,11 +6170,12 @@ private
FeditWindow.updateEditorData(d["value"],ifnil(FnodeNum)?0:FnodeNum);
FeditWindow.show();
end
function CellDrawLabel(dc,rect,d);override;begin
function CellDrawLabel(dc,rect,d);override;
begin
// FnodeNum:=getnodenum(d["value"]["items"]);
// str:="itemstats:"+(ifnil(d["value"])?"0":inttostr(FnodeNum));
str:="itemstrings";
dc.drawtext(str,rect,DT_LEFT);
dc.drawtext(str,rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
@@ -6183,7 +6184,7 @@ type tGridCellAlignPosBoxEdit = class(TOneSelectCell,TPropertyAlign9)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -6414,7 +6415,7 @@ type TGridCellAnchorsEdit = class(TMultiSelectCell,TPropertyAnchors)
if ifarray(d) then
begin
FListSel := d["value"];
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -6437,7 +6438,7 @@ type TGridCellAlignEdit = class(TOneSelectCell,TPropertyAlign)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -6460,7 +6461,7 @@ type TGridCellTabAlignEdit = class(TOneSelectCell,TPropertyTabAlign)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -6644,7 +6645,7 @@ type TGridCellTextEdit = class(TGridCellEditWithButton,TPropertyText)
{**
@explan(说明) 绘制格子 %%
**}
dc.drawtext(cellName(),rect);
dc.drawtext(cellName(),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
@@ -6759,7 +6760,7 @@ type TGridCellEsAlignEdit = class(TOneSelectCell,TPropertyEsAlign)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -6780,7 +6781,7 @@ type TGridCellColorBoxEdit = class(TOneSelectCell,TPropertyColorList)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -6799,7 +6800,7 @@ type tGridCellMbbtnstyleEdit=class(TOneSelectCell,TPropertymbbtnstyle)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -6818,7 +6819,7 @@ type tGridCellMbiconstyleEdit=class(TOneSelectCell,TPropertymbicostyle)
begin
if ifarray(d) then
begin
dc.drawtext(FormatTMF(d["value"]),rect);
dc.drawtext(FormatTMF(d["value"]),rect,DT_VCENTER.|DT_LEFT .|DT_SINGLELINE);
end
end
function create(AOwner);override;
@@ -9412,7 +9413,7 @@ begin
o := class(TVclDesigner);
o.RegestorClassItems(its);
its := array();
for i,v in ini.ReadSectionValues("propertys") do //属性
for i,v in ini.ReadSectionValues("properties") do //属性
begin
if v then
begin