📄 skinbuild.pas
字号:
AddBolProperty('leftstretch', LeftStretch, 'boolean');
AddBolProperty('topstretch', TopStretch, 'boolean');
AddBolProperty('rightstretch', RightStretch, 'boolean');
AddBolProperty('bottomstretch', BottomStretch, 'boolean');
AddBolProperty('stretcheffect', StretchEffect, 'boolean');
AddProperty('stretchtype', SetStretchType(StretchType), 'stretchtype');
//
AddProperty('fontname', FontName, 'string');
AddIntProperty('fontheight', FontHeight, 'int');
AddFSProperty('fontstyle', FontStyle, 'fontstyle');
AddIntProperty('fontcolor', FontColor, 'skincolor');
AddIntProperty('activefontcolor', ActiveFontColor, 'skincolor');
AddIntProperty('focusfontcolor', FocusFontColor, 'skincolor');
AddIntProperty('mouseinfontcolor', MouseInFontColor, 'skincolor');
AddProperty('updown', UpDown, 'string');
AddBolProperty('showfocus', ShowFocus, 'boolean');
AddIntProperty('focusoffsetx', FocusOffsetX, 'int');
AddIntProperty('focusoffsety', FocusOffsetY, 'int');
//
end;
PE.Cells[0, 0] := '< tab >';
end;
procedure TSBForm.LoadSliderControl;
var
P: TbsProperty;
begin
with PE, TbsDataSkinSlider(SkinData.CtrlList.Items[Index]) do
begin
P := GetProperty('maskpictureindex');
P.PropertyType := 'fixed';
P := GetProperty('skinrect');
P.PropertyType := 'fixed';
AddRectProperty('hrulerrect', HRulerRect, 'rectctrl1');
AddRectProperty('hthumbrect', HThumbRect, 'rectctrl1');
AddRectProperty('vrulerrect', VRulerRect, 'rectctrl1');
AddRectProperty('vthumbrect', VThumbRect, 'rectctrl1');
AddIntProperty('bgcolor', BGColor, 'skincolor');
AddIntProperty('edgesize', EdgeSize, 'int');
AddIntProperty('pointscolor', PointsColor, 'skincolor');
end;
PE.Cells[0, 0] := '< slider >';
end;
procedure TSBForm.SaveSliderControl;
begin
with PE, TbsDataSkinSlider(SkinData.CtrlList.Items[Index]) do
begin
HRulerRect := GetRectProperty('hrulerrect');
HThumbRect := GetRectProperty('hthumbrect');
VRulerRect := GetRectProperty('vrulerrect');
VThumbRect := GetRectProperty('vthumbrect');
BGColor := GetIntProperty('bgcolor');
EdgeSize := GetIntProperty('edgesize');
PointsColor := GetIntProperty('pointscolor');
end;
end;
procedure TSBForm.LoadGridControl;
var
P: TbsProperty;
begin
with PE, TbsDataSkinGridControl(SkinData.CtrlList.Items[Index]) do
begin
P := GetProperty('skinrect');
P.PropertyType := 'fixed';
P := GetProperty('maskpictureindex');
P.PropertyType := 'fixed';
AddRectProperty('fixedcellrect', FixedCellRect, 'rectctrl1');
AddRectProperty('selectcellrect', SelectCellRect, 'rectctrl1');
AddRectProperty('focuscellrect', FocusCellRect, 'rectctrl1');
//
AddIntProperty('fixedcellleftoffset', FixedCellLeftOffset, 'int');
AddIntProperty('fixedcellrightoffset', FixedCellRightOffset, 'int');
AddRectProperty('fixedcelltextrect', FixedCellTextRect, 'fcelltextrect');
//
AddIntProperty('cellleftoffset', CellLeftOffset, 'int');
AddIntProperty('cellrightoffset', CellRightOffset, 'int');
AddRectProperty('celltextrect', CellTextRect, 'celltextrect');
//
AddIntProperty('linescolor', LinesColor, 'skincolor');
AddIntProperty('bgcolor', BGColor, 'skincolor');
AddIntProperty('bgpictureindex', BGPictureIndex, 'pindex');
//
AddProperty('fontname', FontName, 'string');
AddIntProperty('fontheight', FontHeight, 'int');
AddFSProperty('fontstyle', FontStyle, 'fontstyle');
AddIntProperty('fontcolor', FontColor, 'skincolor');
AddIntProperty('selectfontcolor', SelectFontColor, 'skincolor');
AddIntProperty('focusfontcolor', FocusFontColor, 'skincolor');
//
AddProperty('fixedfontname', FixedFontName, 'string');
AddIntProperty('fixedfontheight', FixedFontHeight, 'int');
AddFSProperty('fixedfontstyle', FixedFontStyle, 'fontstyle');
AddIntProperty('fixedfontcolor', FixedFontColor, 'skincolor');
//
AddBolProperty('cellstretcheffect', CellStretchEffect, 'boolean');
AddBolProperty('fixedcellstretcheffect', FixedCellStretchEffect, 'boolean');
AddBolProperty('showfocus', ShowFocus, 'boolean');
end;
PE.Cells[0, 0] := '< grid >';
end;
procedure TSBForm.SaveUpDownControl;
begin
with PE, TbsDataSkinUpDownControl(SkinData.CtrlList.Items[Index]) do
begin
UpButtonRect := GetRectProperty('upbuttonrect');
ActiveUpButtonRect := GetRectProperty('activeupbuttonrect');
DownUpButtonRect := GetRectProperty('downupbuttonrect');
DownButtonRect := GetRectProperty('downbuttonrect');
ActiveDownButtonRect := GetRectProperty('activedownbuttonrect');
DownDownButtonRect := GetRectProperty('downdownbuttonrect');
end;
end;
procedure TSBForm.SaveComboBoxControl;
begin
DefSaveResizeControl(Index);
with PE, TbsDataSkinComboBox(SkinData.CtrlList.Items[Index]) do
begin
//
ActiveSkinRect := GetRectProperty('activeskinrect');
SItemRect := GetRectProperty('itemrect');
ActiveItemRect := GetRectProperty('activeitemrect');
FocusItemRect := GetRectProperty('focusitemrect');
ItemLeftOffset := GetIntProperty('itemleftoffset');
ItemRightOffset := GetIntProperty('itemrightoffset');
ItemTextRect := GetRectProperty('itemtextrect');
FontName := GetStrProperty('fontname');
FontHeight := GetIntProperty('fontheight');
FontStyle := GetFSProperty('fontstyle');
FontColor := GetIntProperty('fontcolor');
FocusFontColor := GetIntProperty('focusfontcolor');
ActiveFontColor := GetIntProperty('activefontcolor');
//
ButtonRect := GetRectProperty('buttonrect');
ActiveButtonRect := GetRectProperty('activebuttonrect');
DownButtonRect := GetRectProperty('downbuttonrect');
UnEnabledButtonRect := GetRectProperty('unenabledbuttonrect');
//
ItemStretchEffect := GetBolProperty('itemstretcheffect');
FocusItemStretchEffect := GetBolProperty('focusitemstretcheffect');
//
ListBoxName := GetStrProperty('listboxname');
ShowFocus := GetBolProperty('showfocus');
end;
end;
procedure TSBForm.SaveCheckListBoxControl;
begin
DefSaveResizeControl(Index);
with PE, TbsDataSkinCheckListBox(SkinData.CtrlList.Items[Index]) do
begin
SItemRect := GetRectProperty('itemrect');
ActiveItemRect := GetRectProperty('activeitemrect');
FocusItemRect := GetRectProperty('focusitemrect');
ItemLeftOffset := GetIntProperty('itemleftoffset');
ItemRightOffset := GetIntProperty('itemrightoffset');
ItemTextRect := GetRectProperty('itemtextrect');
ItemCheckRect := GetRectProperty('itemcheckrect');
CheckImageRect := GetRectProperty('checkimagerect');
UnCheckImageRect := GetRectProperty('uncheckimagerect');
FontName := GetStrProperty('fontname');
FontHeight := GetIntProperty('fontheight');
FontStyle := GetFSProperty('fontstyle');
FontColor := GetIntProperty('fontcolor');
ActiveFontColor := GetIntProperty('activefontcolor');
FocusFontColor := GetIntProperty('focusfontcolor');
//
CaptionRect := GetRectProperty('captionrect');
CaptionFontName := GetStrProperty('captionfontname');
CaptionFontHeight := GetIntProperty('captionfontheight');
CaptionFontStyle := GetFSProperty('captionfontstyle');
CaptionFontColor := GetIntProperty('captionfontcolor');
//
UpButtonRect := GetRectProperty('upbuttonrect');
ActiveUpButtonRect := GetRectProperty('activeupbuttonrect');
DownUpButtonRect := GetRectProperty('downupbuttonrect');
DownButtonRect := GetRectProperty('downbuttonrect');
ActiveDownButtonRect := GetRectProperty('activedownbuttonrect');
DownDownButtonRect := GetRectProperty('downdownbuttonrect');
CheckButtonRect := GetRectProperty('checkbuttonrect');
ActiveCheckButtonRect := GetRectProperty('activecheckbuttonrect');
DownCheckButtonRect := GetRectProperty('downcheckbuttonrect');
//
VScrollBarName := GetStrProperty('vscrollbarname');
HScrollBarName := GetStrProperty('hscrollbarname');
BothScrollBarName := GetStrProperty('bothhscrollbarname');
ShowFocus := GetBolProperty('showfocus');
end;
end;
procedure TSBForm.SaveScrollBoxControl;
begin
DefSaveResizeControl(Index);
with PE, TbsDataSkinScrollBoxControl(SkinData.CtrlList.Items[Index]) do
begin
BGPictureIndex := GetIntProperty('bgpictureindex');
end;
end;
procedure TSBForm.SaveListBoxControl;
begin
DefSaveResizeControl(Index);
with PE, TbsDataSkinListBox(SkinData.CtrlList.Items[Index]) do
begin
//
SItemRect := GetRectProperty('itemrect');
ActiveItemRect := GetRectProperty('activeitemrect');
FocusItemRect := GetRectProperty('focusitemrect');
ItemLeftOffset := GetIntProperty('itemleftoffset');
ItemRightOffset := GetIntProperty('itemrightoffset');
ItemTextRect := GetRectProperty('itemtextrect');
FontName := GetStrProperty('fontname');
FontHeight := GetIntProperty('fontheight');
FontStyle := GetFSProperty('fontstyle');
FontColor := GetIntProperty('fontcolor');
ActiveFontColor := GetIntProperty('activefontcolor');
FocusFontColor := GetIntProperty('focusfontcolor');
//
CaptionRect := GetRectProperty('captionrect');
CaptionFontName := GetStrProperty('captionfontname');
CaptionFontHeight := GetIntProperty('captionfontheight');
CaptionFontStyle := GetFSProperty('captionfontstyle');
CaptionFontColor := GetIntProperty('captionfontcolor');
//
UpButtonRect := GetRectProperty('upbuttonrect');
ActiveUpButtonRect := GetRectProperty('activeupbuttonrect');
DownUpButtonRect := GetRectProperty('downupbuttonrect');
DownButtonRect := GetRectProperty('downbuttonrect');
ActiveDownButtonRect := GetRectProperty('activedownbuttonrect');
DownDownButtonRect := GetRectProperty('downdownbuttonrect');
CheckButtonRect := GetRectProperty('checkbuttonrect');
ActiveCheckButtonRect := GetRectProperty('activecheckbuttonrect');
DownCheckButtonRect := GetRectProperty('downcheckbuttonrect');
//
VScrollBarName := GetStrProperty('vscrollbarname');
HScrollBarName := GetStrProperty('hscrollbarname');
BothScrollBarName := GetStrProperty('bothhscrollbarname');
ShowFocus := GetBolProperty('showfocus');
end;
end;
procedure TSBForm.SaveControlBar;
begin
DefSaveResizeControl(Index);
with PE, TbsDataSkinControlBar(SkinData.CtrlList.Items[Index]) do
begin
ItemRect := GetRectProperty('itemrect');
BGPictureIndex := GetIntProperty('bgpictureindex');
GripOffset1 := GetIntProperty('gripoffset1');
GripOffset2 := GetIntProperty('gripoffset2');
HGripRect := GetRectProperty('hgriprect');
VGripRect := GetRectProperty('vgriprect');
ItemStretchEffect := GetBolProperty('itemstretcheffect');
ItemOffset1 := GetIntProperty('itemoffset1');
ItemOffset2 := GetIntProperty('itemoffset2');
GripTransparent := GetBolProperty('griptransparent');
GripTransparentColor := GetIntProperty('griptransparentcolor');
ItemTransparent := GetBolProperty('itemtransparent');
ItemTransparentColor := GetIntProperty('itemtransparentcolor');
end;
end;
procedure TSBForm.SaveMainMenuBar(Index: Integer);
begin
with PE, TbsDataSkinMainMenuBar(SkinData.CtrlList.Items[Index]) do
begin
ItemsRect := GetRectProperty('itemsrect');
MenuBarItem := GetStrProperty('menubaritem');
CloseButton := GetStrProperty('closebutton');
MaxButton := GetStrProperty('maxbutton');
MinButton := GetStrProperty('minbutton');
SysMenuButton := GetStrProperty('sysmenubutton');
TrackMarkColor := GetIntProperty('trackmarkcolor');
TrackMarkActiveColor := GetIntProperty('trackmarkactivecolor');
StretchEffect := GetBolProperty('stretcheffect');
ItemTransparent := GetBolProperty('itemtransparent');
end;
end;
procedure TSBForm.SaveBevelControl(Index: Integer);
begin
with PE, TbsDataSkinBevel(SkinData.CtrlList.Items[Index]) do
begin
LightColor := GetIntProperty('lightcolor');
DarkColor := GetIntProperty('darkcolor');
end;
end;
procedure TSBForm.SaveTreeViewControl;
begin
with PE, TbsDataSkinTreeView(SkinData.CtrlList.Items[Index]) do
begin
FontName := GetStrProperty('fontname');
FontHeight := GetIntProperty('fontheight');
FontStyle := GetFSProperty('fontstyle');
FontColor := GetIntProperty('fontcolor');
BGColor := GetIntProperty('bgcolor');
end;
end;
procedure TSBForm.SaveListViewControl;
begin
with PE, TbsDataSkinListView(SkinData.CtrlList.Items[Index]) do
begin
FontName := GetStrProperty('fontname');
FontHeight := GetIntProperty('fontheight');
FontStyle := GetFSProperty('fontstyle');
FontColor := GetIntProperty('fontcolor');
BGColor := GetIntProperty('bgcolor');
end;
end;
procedure TSBForm.SaveRichEditControl;
begin
with PE, TbsDataSkinRichEdit(SkinData.CtrlList.Items[Index]) do
begin
FontName := GetStrProperty('fontname');
FontHeight := GetIntProperty('fontheight');
FontStyle := GetFSProperty('fontstyle');
FontColor := GetIntProperty('fontcolor');
BGColor := GetIntProp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -