📄 bsskindata.pas
字号:
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinCheckRadioControl = class(TbsDataSkinCustomControl)
public
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor, ActiveFontColor, UnEnabledFontColor: TColor;
ActiveSkinRect: TRect;
CheckImageArea, TextArea,
CheckImageRect, UnCheckImageRect: TRect;
ActiveCheckImageRect, ActiveUnCheckImageRect: TRect;
UnEnabledCheckImageRect, UnEnabledUnCheckImageRect: TRect;
Morphing: Boolean;
MorphKind: TbsMorphKind;
FrameFontColor: TColor;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinScrollBoxControl = class(TbsDataSkinCustomControl)
public
BGPictureIndex: Integer;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinPanelControl = class(TbsDataSkinCustomControl)
public
CaptionRect: TRect;
Alignment: TAlignment;
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor: TColor;
BGPictureIndex: Integer;
CheckImageRect, UnCheckImageRect: TRect;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinExPanelControl = class(TbsDataSkinCustomControl)
public
//
RollHSkinRect, RollVSkinRect: TRect;
RollLeftOffset, RollRightOffset,
RollTopOffset, RollBottomOffset: Integer;
RollVCaptionRect, RollHCaptionRect: TRect;
//
CloseButtonRect, CloseButtonActiveRect, CloseButtonDownRect: TRect;
HRollButtonRect, HRollButtonActiveRect, HRollButtonDownRect: TRect;
HRestoreButtonRect, HRestoreButtonActiveRect, HRestoreButtonDownRect: TRect;
VRollButtonRect, VRollButtonActiveRect, VRollButtonDownRect: TRect;
VRestoreButtonRect, VRestoreButtonActiveRect, VRestoreButtonDownRect: TRect;
//
CaptionRect: TRect;
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor: TColor;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinObject = class(TObject)
public
IDName: String;
Hint: String;
SkinRectInAPicture: Boolean;
SkinRect: TRect;
ActiveSkinRect: TRect;
ActivePictureIndex: Integer;
Morphing: Boolean;
MorphKind: TbsMorphKind;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); virtual;
procedure SaveToFile(IniFile: TCustomIniFile); virtual;
end;
TbsDataUserObject = class(TbsDataSkinObject)
public
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinButton = class(TbsDataSkinObject)
public
DownRect: TRect;
DisableSkinRect: TRect;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinStdButton = class(TbsDataSkinButton)
public
Command: TbsStdCommand;
RestoreRect: TRect;
RestoreActiveRect: TRect;
RestoreDownRect: TRect;
RestoreInActiveRect: TRect;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinAnimate = class(TbsDataSkinObject)
public
CountFrames: Integer;
Cycle: Boolean;
ButtonStyle: Boolean;
TimerInterval: Integer;
Command: TbsStdCommand;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinMainMenuBarButton = class(TbsDataSkinStdButton);
TbsDataSkinPopupWindow = class(TObject)
public
WindowPictureIndex: Integer;
MaskPictureIndex: Integer;
LTPoint, RTPoint, LBPoint, RBPoint: TPoint;
ItemsRect: TRect;
ScrollMarkerColor, ScrollMarkerActiveColor: Integer;
TopStretch, LeftStretch,
RightStretch, BottomStretch: Boolean;
constructor Create;
procedure LoadFromFile(IniFile: TCustomIniFile);
procedure SaveToFile(IniFile: TCustomIniFile);
end;
TbsDataSkinHintWindow = class(TObject)
public
WindowPictureIndex: Integer;
MaskPictureIndex: Integer;
LTPoint, RTPoint, LBPoint, RBPoint: TPoint;
ClRect: TRect;
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor: TColor;
TopStretch, LeftStretch,
RightStretch, BottomStretch: Boolean;
constructor Create;
procedure LoadFromFile(IniFile: TCustomIniFile);
procedure SaveToFile(IniFile: TCustomIniFile);
end;
TbsDataSkinMenuItem = class(TbsDataSkinObject)
public
DividerRect: TRect;
DividerLO, DividerRO: Integer;
ItemLO, ItemRO: Integer;
FontName: String;
FontHeight: Integer;
FontStyle: TFontStyles;
UnEnabledFontColor, FontColor, ActiveFontColor: TColor;
TextRct: TRect;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinMainMenuItem = class(TbsDataSkinObject)
public
DownRect: TRect;
FontName: String;
FontHeight: Integer;
FontStyle: TFontStyles;
FontColor, ActiveFontColor, DownFontColor, UnEnabledFontColor: TColor;
TextRct: TRect;
ItemLO, ItemRO: Integer;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsDataSkinMainMenuBarItem = class(TbsDataSkinMainMenuItem);
TbsDataSkinCaption = class(TbsDataSkinObject)
public
FontName: String;
FontHeight: Integer;
FontStyle: TFontStyles;
FontColor, ActiveFontColor: TColor;
ShadowColor, ActiveShadowColor: TColor;
Shadow: Boolean;
Alignment: TAlignment;
TextRct: TRect;
FrameRect, ActiveFrameRect: TRect;
FrameLeftOffset, FrameRightOffset: Integer;
FrameTextRect: TRect;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TbsStoredSkin = class(TComponent)
protected
FFileName: String;
FIniStrings: TStrings;
procedure ClearBitMaps;
public
FPicture, FInActivePicture, FMask: TBitMap;
FActivePictures: TList;
procedure SetFileName(Value: String);
procedure SetIniStrings(Value: TStrings);
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure LoadFromFile(AFileName: String);
procedure ReadData(Reader: TStream);
procedure WriteData(Writer: TStream);
procedure DefineProperties(Filer: TFiler); override;
published
property FileName: String read FFileName write SetFileName;
property IniStrings: TStrings read FIniStrings write SetIniStrings;
end;
TbsSkinData = class;
TbsCompressedStoredSkin = class(TComponent)
private
FFileName: String;
FCompressedFileName: String;
FCompressedStream: TMemoryStream;
FDescription: String;
procedure SetFileName(Value: String);
procedure SetCompressedFileName(Value: String);
function GetEmpty: Boolean;
protected
procedure ReadData(Reader: TStream);
procedure WriteData(Writer: TStream);
procedure DefineProperties(Filer: TFiler); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure LoadFromIniFile(AFileName: String);
procedure LoadFromSkinData(ASkinData: TbsSkinData);
procedure LoadFromCompressFile(AFileName: String);
procedure SaveToCompressFile(AFileName: String);
procedure DeCompressToStream(var S: TMemoryStream);
property Empty: Boolean read GetEmpty;
published
property Description: String read FDescription write FDescription;
property FileName: String read FFileName write SetFileName;
property CompressedFileName: String read FCompressedFileName write SetCompressedFileName;
end;
TbsSkinData = class(TComponent)
protected
FStoredSkin: TbsStoredSkin;
FCompressedStoredSkin: TbsCompressedStoredSkin;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetStoredSkin(Value: TbsStoredSkin);
procedure SetCompressedStoredSkin(Value: TbsCompressedStoredSkin);
procedure WriteFormInfo(F: TCustomIniFile);
procedure ReadFormInfo(F: TCustomIniFile);
procedure WriteObjects(F: TCustomIniFile);
procedure ReadObjects(F: TCustomIniFile);
procedure WriteCtrls(F: TCustomIniFile);
procedure ReadCtrls(F: TCustomIniFile);
procedure WriteActivePictures(F: TCustomIniFile);
procedure ReadActivePictures(F: TCustomIniFile; Path: String);
procedure GetObjectTypeName(S: String; var AName, AType: String);
procedure SaveToCustomIniFile(F: TCustomIniFile);
public
//
ButtonsRect, CaptionRect: TRect;
ButtonsOffset: Integer;
CapButtonsInLeft: Boolean;
//
AutoRenderingInActiveImage: Boolean;
InActiveEffect: TbsInActiveEffect;
PopupWindow: TbsDataSkinPopupWindow;
HintWindow: TbsDataSkinHintWindow;
Empty: Boolean;
FPicture, FInActivePicture, FMask: TBitMap;
FActivePictures: TList;
FPictureName, FInActivePictureName, FMaskName: String;
FActivePicturesNames: TStrings;
ObjectList: TList;
CtrlList: TList;
LTPoint, RTPoint, LBPoint, RBPoint: TPoint;
BGPictureIndex: Integer;
MDIBGPictureIndex: Integer;
MainMenuPopupUp: Boolean;
MaskRectArea: TRect;
HitTestLTPoint,
HitTestRTPoint,
HitTestLBPoint,
HitTestRBPoint: TPoint;
ClRect: TRect;
BorderW: Integer;
TopStretch, LeftStretch,
RightStretch, BottomStretch: Boolean;
SkinName: String;
SkinAuthor: String;
AuthorURL: String;
AuthorEmail: String;
SkinComments: String;
procedure AddBitMap(FileName: String);
procedure DeleteBitMap(Index: Integer);
procedure SendSkinDataMessage(M: LongInt);
function GetIndex(AIDName: String): Integer;
function GetControlIndex(AIDName: String): Integer;
procedure ClearObjects;
procedure ClearAll;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure LoadFromFile(FileName: String);
procedure SaveToFile(FileName: String);
procedure LoadFromCompressedFile(FileName: String);
procedure SaveToCompressedFile(FileName: String);
procedure StoreToDisk(AFileName: String);
procedure LoadStoredSkin(AStoredSkin: TbsStoredSkin);
procedure LoadCompressedStoredSkin(AStoredSkin: TbsCompressedStoredSkin);
procedure ClearSkin;
published
property StoredSkin: TbsStoredSkin read FStoredSkin write SetStoredSkin;
property CompressedStoredSkin: TbsCompressedStoredSkin
read FCompressedStoredSkin write SetCompressedStoredSkin;
end;
function ReadInActiveEffect(IniFile: TCustomIniFile;
Section: String; Ident: String): TbsInActiveEffect;
procedure WriteInActiveEffect(IniFile: TCustomIniFile;
Section: String; Ident: String;
IE: TbsInActiveEffect);
procedure WriteMorphKind(IniFile: TCustomIniFile;
Section: String; Ident: String; MK: TbsMorphKind);
function ReadMorphKind(IniFile: TCustomIniFile;
Section: String; Ident: String): TbsMorphKind;
// Internal messages
const
WM_BEFORECHANGESKINDATA = WM_USER + 201;
WM_CHANGESKINDATA = WM_USER + 202;
WM_AFTERCHANGESKINDATA = WM_USER + 203;
implementation
Uses bsZLibCompress;
function CheckSkinFile(F: TCustomIniFile): Boolean;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -