📄 skindata.pas
字号:
FontHeight: Integer;
FontColor: TColor;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinButtonControl = class(TspDataSkinCustomControl)
public
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor, ActiveFontColor, DownFontColor, DisabledFontColor: TColor;
Morphing: Boolean;
MorphKind: TMorphKind;
ActiveSkinRect, DownSkinRect, DisabledSkinRect: TRect;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinMenuButtonControl = class(TspDataSkinButtonControl)
public
TrackButtonRect: TRect;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinCheckRadioControl = class(TspDataSkinCustomControl)
public
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor, ActiveFontColor, UnEnabledFontColor: TColor;
Morphing: Boolean;
MorphKind: TMorphKind;
ActiveSkinRect: TRect;
CheckImageArea, TextArea,
CheckImageRect, UnCheckImageRect: TRect;
ActiveCheckImageRect, ActiveUnCheckImageRect: TRect;
UnEnabledCheckImageRect, UnEnabledUnCheckImageRect: TRect;
FrameFontColor: TColor;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinScrollBoxControl = class(TspDataSkinCustomControl)
public
BGPictureIndex: Integer;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinPanelControl = class(TspDataSkinCustomControl)
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;
TspDataSkinExPanelControl = class(TspDataSkinCustomControl)
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;
TspDataSkinArea = class(TObject)
public
IDName: String;
AreaRect: TRect;
constructor Create(AIDName: String; ARect: TRect);
end;
TspDataSkinObject = class(TObject)
public
IDName: String;
Hint: String;
SkinRectInAPicture: Boolean;
SkinRect: TRect;
ActiveSkinRect: TRect;
InActiveSkinRect: TRect;
Morphing: Boolean;
MorphKind: TMorphKind;
ActivePictureIndex: Integer;
CursorIndex: Integer;
RollUp: Boolean;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); virtual;
procedure SaveToFile(IniFile: TCustomIniFile); virtual;
end;
TspDataUserObject = class(TspDataSkinObject)
public
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinBitLabel = class(TspDataSkinObject)
public
Symbols: TStrings;
TextValue: String;
SymbolWidth, SymbolHeight: Integer;
constructor Create(AIDName: String);
destructor Destroy; override;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinAnimate = class(TspDataSkinObject)
public
CountFrames: Integer;
Cycle: Boolean;
ButtonStyle: Boolean;
TimerInterval: Integer;
Command: TStdCommand;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinLabel = class(TspDataSkinObject)
public
FontName: String;
FontHeight: Integer;
FontStyle: TFontStyles;
FontColor, ActiveFontColor: TColor;
Alignment: TAlignment;
TextValue: String;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinSwitch = class(TspDataSkinObject);
TGaugeKind = (gkHorizontal, gkVertical);
TspDataSkinGauge = class(TspDataSkinObject)
public
MinValue, MaxValue: Integer;
Kind: TGaugeKind;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinFrameRegulatorObject = class(TspDataSkinObject)
public
MinValue, MaxValue: Integer;
CountFrames: Integer;
FramesPlacement: TFramesPlacement;
Kind: TRegulatorKind;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinFrameGaugeObject = class(TspDataSkinObject)
public
MinValue, MaxValue: Integer;
CountFrames: Integer;
FramesPlacement: TFramesPlacement;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TTrackKind = (tkHorizontal, tkVertical);
TspDataSkinTrackBar = class(TspDataSkinObject)
public
ButtonRect, ActiveButtonRect: TRect;
BeginPoint, EndPoint: TPoint;
MinValue, MaxValue: Integer;
MouseDownChangeValue: Boolean;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinButton = class(TspDataSkinObject)
public
GroupIndex: Integer;
DownRect: TRect;
DisableSkinRect: TRect;
constructor Create(AIDName: String);
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinStdButton = class(TspDataSkinButton)
public
Command: TStdCommand;
RestoreRect: TRect;
RestoreActiveRect: TRect;
RestoreDownRect: TRect;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspDataSkinMainMenuBarButton = class(TspDataSkinStdButton);
TspDataSkinPopupWindow = class(TObject)
public
WindowPictureIndex: Integer;
MaskPictureIndex: Integer;
LTPoint, RTPoint, LBPoint, RBPoint: TPoint;
ItemsRect: TRect;
ScrollMarkerColor, ScrollMarkerActiveColor: Integer;
CursorIndex: Integer;
TopStretch, LeftStretch,
RightStretch, BottomStretch: Boolean;
constructor Create;
procedure LoadFromFile(IniFile: TCustomIniFile);
procedure SaveToFile(IniFile: TCustomIniFile);
end;
TspDataSkinHintWindow = 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;
TspDataSkinMenuItem = class(TspDataSkinObject)
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;
TspDataSkinMainMenuItem = class(TspDataSkinObject)
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;
TspDataSkinMainMenuBarItem = class(TspDataSkinMainMenuItem);
TspDataSkinCaption = class(TspDataSkinObject)
public
FontName: String;
FontHeight: Integer;
FontStyle: TFontStyles;
FontColor, ActiveFontColor: TColor;
ShadowColor, ActiveShadowColor: TColor;
Shadow: Boolean;
Alignment: TAlignment;
TextRct: TRect;
DefaultCaption: Boolean;
FrameRect, ActiveFrameRect: TRect;
FrameLeftOffset, FrameRightOffset: Integer;
FrameTextRect: TRect;
procedure LoadFromFile(IniFile: TCustomIniFile); override;
procedure SaveToFile(IniFile: TCustomIniFile); override;
end;
TspSkinData = class;
TspCompressedStoredSkin = 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 LoadFromCompressFile(AFileName: String);
procedure SaveToCompressFile(AFileName: String);
procedure DeCompressToStream(var S: TMemoryStream);
procedure LoadFromSkinData(ASkinData: TspSkinData);
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;
TspResourceStrData = class(TComponent)
private
FResStrs: TStrings;
FCharSet: TFontCharSet;
procedure SetResStrs(Value: TStrings);
procedure Init;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function GetResStr(const ResName: String): String;
published
property ResStrings: TStrings read FResStrs write SetResStrs;
property CharSet: TFontCharSet read FCharSet write FCharSet;
end;
TspSkinData = class(TComponent)
protected
FCompressedStoredSkin: TspCompressedStoredSkin;
FResourceStrData: TspResourceStrData;
procedure SetCompressedStoredSkin(Value: TspCompressedStoredSkin);
procedure SetResourceStrData(Value: TspResourceStrData);
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure WriteFormInfo(F: TCustomIniFile);
procedure ReadFormInfo(F: TCustomIniFile);
procedure WriteAreas(F: TCustomIniFile);
procedure ReadAreas(F: TCustomIniFile);
procedure WriteObjects(F: TCustomIniFile);
procedure ReadObjects(F: TCustomIniFile);
procedure WriteCtrls(F: TCustomIniFile);
procedure ReadCtrls(F: TCustomIniFile);
procedure WriteActivePictures(F: TCustomIniFile);
procedure WriteCursors(F: TCustomIniFile);
procedure ReadActivePictures(F: TCustomIniFile; Path: String);
procedure ReadCursors(F: TCustomIniFile; Path: String);
procedure GetObjectTypeName(S: String; var AName, AType: String);
procedure GetAreaNameRect(S: String; var AName: String; var ARect: TRect);
public
//
ButtonsRect, CaptionRect: TRect;
ButtonsOffset: Integer;
CapButtonsInLeft: Boolean;
//
AutoRenderingInActiveImage: Boolean;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -