SkinData.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:137k
- {*******************************************************************}
- { }
- { Almediadev Visual Component Library }
- { DynamicSkinForm }
- { Version 4.98 }
- { }
- { Copyright (c) 2000-2002 Almediadev }
- { ALL RIGHTS RESERVED }
- { }
- { Home: http://www.almdev.com }
- { Support: support@almdev.com }
- { }
- {*******************************************************************}
- unit SkinData;
- {$P+,S-,W-,R-}
- {$WARNINGS OFF}
- {$HINTS OFF}
- interface
- uses Windows, Messages, SysUtils, Classes, Graphics, Controls, SPUtils, Forms,
- IniFiles, Dialogs, spZLib;
- type
- TStdCommand = (cmClose, cmMaximize, cmMinimize, cmSysMenu, cmDefault, cmRollUp);
- TMorphKind = (mkDefault, mkGradient, mkLeftGradient, mkRightGradient,
- mkLeftSlide, mkRightSlide, mkPush);
- TFramesPlacement = (fpHorizontal, fpVertical);
- TRegulatorKind = (rkRound, rkHorizontal, rkVertical);
- TspInActiveEffect = (ieBrightness, ieDarkness, ieGrayScale,
- ieNoise, ieSplitBlur, ieInvert);
- TspDataSkinControl = class(TObject)
- public
- IDName: String;
- PictureIndex: Integer;
- MaskPictureIndex: Integer;
- SkinRect: TRect;
- CursorIndex: Integer;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); virtual;
- procedure SaveToFile(IniFile: TCustomIniFile); virtual;
- end;
- TspDataSkinBevel = class(TspDataSkinControl)
- public
- LightColor: TColor;
- DarkColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinSlider = class(TspDataSkinControl)
- public
- HRulerRect: TRect;
- HThumbRect: TRect;
- VRulerRect: TRect;
- VThumbRect: TRect;
- EdgeSize: Integer;
- BGColor: TColor;
- PointsColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinTreeView = class(TspDataSkinControl)
- public
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor: TColor;
- BGColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinRichEdit = class(TspDataSkinControl)
- public
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor: TColor;
- BGColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinListView = class(TspDataSkinControl)
- public
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor: TColor;
- BGColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinMainMenuBar = class(TspDataSkinControl)
- public
- ItemsRect: TRect;
- MenuBarItem: String;
- CloseButton: String;
- MaxButton: String;
- MinButton: String;
- SysMenuButton: String;
- TrackMarkColor, TrackMarkActiveColor: Integer;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
-
- TspDataSkinTabControl = class(TspDataSkinControl)
- public
- TabRect, ActiveTabRect, FocusTabRect, MouseInTabRect: TRect;
- ClRect: TRect;
- TabsBGRect: TRect;
- LTPoint, RTPoint, LBPoint, RBPoint: TPoint;
- TabLeftOffset, TabRightOffset: Integer;
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor, ActiveFontColor, FocusFontColor, MouseInFontColor: TColor;
- UpDown: String;
- BGPictureIndex: Integer;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinGridControl = class(TspDataSkinControl)
- public
- FixedCellRect, SelectCellRect, FocusCellRect: TRect;
- //
- FixedCellLeftOffset, FixedCellRightOffset: Integer;
- FixedCellTextRect: TRect;
- //
- CellLeftOffset, CellRightOffset: Integer;
- CellTextRect: TRect;
- //
- LinesColor, BGColor: TColor;
- BGPictureIndex: Integer;
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor, SelectFontColor, FocusFontColor: TColor;
- FixedFontName: String;
- FixedFontStyle: TFontStyles;
- FixedFontHeight: Integer;
- FixedFontColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinFrameControl = class(TspDataSkinControl)
- public
- FramesCount: Integer;
- FramesPlacement: TFramesPlacement;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinAnimateControl = class(TspDataSkinFrameControl);
- TspDataSkinSwitchControl = class(TspDataSkinFrameControl);
- TspDataSkinFrameGauge = class(TspDataSkinFrameControl);
- TspDataSkinFrameRegulator = class(TspDataSkinFrameControl)
- public
- Kind: TRegulatorKind;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinCustomControl = class(TspDataSkinControl)
- public
- LTPoint, RTPoint, LBPoint, RBPoint: TPoint;
- ClRect: TRect;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinControlBar = class(TspDataSkinCustomControl)
- public
- ItemRect: TRect;
- BGPictureIndex: Integer;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinUpDownControl = class(TspDataSkinCustomControl)
- public
- UpButtonRect, ActiveUpButtonRect, DownUpButtonRect: TRect;
- DownButtonRect, ActiveDownButtonRect, DownDownButtonRect: TRect;
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
-
- TspDataSkinComboBox = class(TspDataSkinCustomControl)
- public
- //
- SItemRect, FocusItemRect: TRect;
- ItemLeftOffset, ItemRightOffset: Integer;
- ItemTextRect: TRect;
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor, FocusFontColor: TColor;
- ButtonRect,
- ActiveButtonRect,
- DownButtonRect: TRect;
- UnEnabledButtonRect: TRect;
- //
- ListBoxName: String;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinListBox = class(TspDataSkinCustomControl)
- public
- //
- SItemRect, ActiveItemRect, FocusItemRect: TRect;
- ItemLeftOffset, ItemRightOffset: Integer;
- ItemTextRect: TRect;
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor, ActiveFontColor, FocusFontColor: TColor;
- //
- CaptionRect: TRect;
- CaptionFontName: String;
- CaptionFontStyle: TFontStyles;
- CaptionFontHeight: Integer;
- CaptionFontColor: TColor;
- //
- UpButtonRect, ActiveUpButtonRect, DownUpButtonRect: TRect;
- DownButtonRect, ActiveDownButtonRect, DownDownButtonRect: TRect;
- CheckButtonRect, ActiveCheckButtonRect, DownCheckButtonRect: TRect;
- //
- HScrollBarName: String;
- VScrollBarName: String;
- BothScrollBarName: String;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinCheckListBox = class(TspDataSkinListBox)
- public
- UnCheckImageRect, CheckImageRect: TRect;
- ItemCheckRect: TRect;
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinScrollBarControl = class(TspDataSkinCustomControl)
- public
- TrackArea: TRect;
- UpButtonRect, ActiveUpButtonRect, DownUpButtonRect: TRect;
- DownButtonRect, ActiveDownButtonRect, DownDownButtonRect: TRect;
- ThumbRect, ActiveThumbRect, DownThumbRect: TRect;
- ThumbOffset1, ThumbOffset2: Integer;
- GlyphRect, ActiveGlyphRect, DownGlyphRect: TRect;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinSpinEditControl = class(TspDataSkinCustomControl)
- public
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor: TColor;
- UpButtonRect, ActiveUpButtonRect, DownUpButtonRect: TRect;
- DownButtonRect, ActiveDownButtonRect, DownDownButtonRect: TRect;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinEditControl = class(TspDataSkinCustomControl)
- public
- ActiveSkinRect: TRect;
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor, DisabledFontColor: TColor;
- ActiveFontColor: TColor;
- ButtonRect: TRect;
- ActiveButtonRect: TRect;
- DownButtonRect: TRect;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinMemoControl = class(TspDataSkinEditControl)
- public
- BGColor: TColor;
- ActiveBGColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinStdLabelControl = class(TspDataSkinControl)
- public
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor: TColor;
- ActiveFontColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinLabelControl = class(TspDataSkinCustomControl)
- public
- FontName: String;
- FontStyle: TFontStyles;
- FontHeight: Integer;
- FontColor: TColor;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinBitLabelControl = class(TspDataSkinCustomControl)
- public
- SkinTextRect: TRect;
- SymbolWidth: Integer;
- SymbolHeight: Integer;
- Symbols: TStrings;
- constructor Create(AIDName: String);
- destructor Destroy; override;
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinTrackBarControl = class(TspDataSkinCustomControl)
- public
- TrackArea, ButtonRect, ActiveButtonRect: TRect;
- Vertical: Boolean;
- constructor Create(AIDName: String);
- procedure LoadFromFile(IniFile: TCustomIniFile); override;
- procedure SaveToFile(IniFile: TCustomIniFile); override;
- end;
- TspDataSkinSplitterControl = class(TspDataSkinCustomControl);
-
- TspDataSkinGaugeControl = class(TspDataSkinCustomControl)
- public
- ProgressArea, ProgressRect: TRect;
- Vertical: Boolean;
- BeginOffset, EndOffset: Integer;
- FontName: String;
- FontStyle: TFontStyles;
- 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;
- RollUpMarkerRect: TRect;
- RestoreMarkerRect: 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;
- 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;
- 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;
- 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;
- TspCompressedStoredSkin = class(TComponent)
- private
- FFileName: String;
- FCompressedStream: TMemoryStream;
- procedure SetFileName(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);
- property Empty: Boolean read GetEmpty;
- published
- property FileName: String read FFileName write SetFileName;
- end;
- TspStoredSkin = class(TComponent)
- protected
- FFileName: String;
- FIniStrings: TStrings;
- procedure ClearBitMaps;
- public
- FPicture, FMask: TBitMap;
- FRollUpPicture, FRollUpMask: 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;
- TspSkinData = class(TComponent)
- protected
- FStoredSkin: TspStoredSkin;
- FCompressedStoredSkin: TspCompressedStoredSkin;
- Names: TStrings;
- procedure SetCompressedStoredSkin(Value: TspCompressedStoredSkin);
- procedure Notification(AComponent: TComponent;
- Operation: TOperation); override;
- procedure SetStoredSkin(Value: TspStoredSkin);
- procedure LoadNames;
- procedure EraseSections(F: TCustomIniFile);
- 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;
- InActiveEffect: TspInActiveEffect;
- StartCursorIndex: Integer;
- CursorIndex: Integer;
- BuildMode: Boolean;
- PopupWindow: TspDataSkinPopupWindow;
- HintWindow: TspDataSkinHintWindow;
- Empty: Boolean;
- FPicture, FMask: TBitMap;
- FRollUpPicture, FRollUpMask: TBitMap;
- FActivePictures: TList;
- FPictureName, FMaskName: String;
- FRollUpPictureName, FRollUpMaskName: String;
- FActivePicturesNames: TStrings;
- FCursorsNames: TStrings;
- ObjectList: TList;
- AreaList: TList;
- CtrlList: TList;
- LTPoint, RTPoint, LBPoint, RBPoint: TPoint;
- BGPictureIndex: Integer;
- MainMenuRect: TRect;
- IconRect: TRect;
- MainMenuPopupUp: Boolean;
- MaskRectArea: TRect;
- HitTestLTPoint,
- HitTestRTPoint,
- HitTestLBPoint,
- HitTestRBPoint: TPoint;
- ClRect: TRect;
- BorderW: Integer;
- RollUpLeftPoint, RollUpRightPoint: TPoint;
- SkinName: String;
- SkinAuthor: String;
- AuthorURL: String;
- AuthorEmail: String;
- SkinComments: String;
- procedure LoadCompressedStoredSkin(AStoredSkin: TspCompressedStoredSkin);
- procedure AddBitMap(FileName: String);
- procedure DeleteBitMap(Index: Integer);
- procedure AddSkinArea(AName: String; ARect: TRect);
- procedure SendSkinDataMessage(M: LongInt);
- function GetIndex(AIDName: String): Integer;
- function GetControlIndex(AIDName: String): Integer;
- function GetAreaIndex(AIDName: String): Integer;
- procedure ClearObjects;
- procedure ClearAll;
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure LoadFromFile(FileName: String);
- procedure SaveToFile(FileName: String);
- procedure LoadStoredSkin(AStoredSkin: TspStoredSkin);
- procedure ClearSkin;
- published
- property StoredSkin: TspStoredSkin read FStoredSkin write SetStoredSkin;
- property CompressedStoredSkin: TspCompressedStoredSkin
- read FCompressedStoredSkin write SetCompressedStoredSkin;
- end;
- function ReadInActiveEffect(IniFile: TCustomIniFile;
- Section: String; Ident: String): TspInActiveEffect;
- procedure WriteInActiveEffect(IniFile: TCustomIniFile;
- Section: String; Ident: String;
- IE: TspInActiveEffect);
- function ReadMorphKind(IniFile: TCustomIniFile;
- Section: String; Ident: String): TMorphKind;
- procedure WriteMorphKind(IniFile: TCustomIniFile;
- Section: String; Ident: String; MK: TMorphKind);
- // Internal messages
- const
- WM_BEFORECHANGESKINDATA = WM_USER + 201;
- WM_CHANGESKINDATA = WM_USER + 202;
- WM_AFTERCHANGESKINDATA = WM_USER + 203;
-
- implementation
- function CheckSkinFile(F: TCustomIniFile): Boolean;
- begin
- Result := F.SectionExists('VERSION') and F.SectionExists('PICTURES') and
- F.SectionExists('FORMINFO') and F.SectionExists('SKINOBJECTS') and
- F.SectionExists('SKINCONTROLS');
- end;
- function ReadMorphKind;
- var
- S: String;
- begin
- S := IniFile.ReadString(Section, Ident, 'mkdefault');
- if S = 'mkdefault'
- then Result := mkDefault
- else
- if S = 'mkgradient'
- then Result := mkGradient
- else
- if S = 'mkleftgradient'
- then Result := mkLeftGradient
- else
- if S = 'mkrightgradient'
- then Result := mkRightGradient
- else
- if S = 'mkleftslide'
- then Result := mkLeftSlide
- else
- if S = 'mkrightslide'
- then Result := mkRightSlide
- else
- if S = 'mkpush'
- then Result := mkPush;
- end;
- procedure WriteMorphKind;
- var
- S: String;
- begin
- case MK of
- mkDefault: S := 'mkdefault';
- mkGradient: S := 'mkgradient';
- mkLeftGradient: S := 'mkleftgradient';
- mkRightGradient: S := 'mkrightgradient';
- mkLeftSlide: S := 'mkleftslide';
- mkRightSlide: S := 'mkrightslide';
- mkPush: S := 'mkpush';
- end;
- IniFile.WriteString(Section, Ident, S);
- end;
- procedure WriteInActiveEffect;
- var
- S: String;
- begin
- case IE of
- ieBrightness: S := 'iebrightness';
- ieDarkness: S := 'iedarkness';
- ieGrayScale: S := 'iegrayscale';
- ieNoise: S := 'ienoise';
- ieSplitBlur: S := 'iesplitblur';
- ieInvert: S := 'ieinvert';
- end;
- IniFile.WriteString(Section, Ident, S);
- end;
- function ReadInActiveEffect;
- var
- S: String;
- begin
- S := IniFile.ReadString(Section, Ident, 'iebrightness');
- if S = 'iebrightness'
- then Result := ieBrightness
- else
- if S = 'iedarkness'
- then Result := ieDarkness
- else
- if S = 'iegrayscale'
- then Result := ieGrayScale
- else
- if S = 'ienoise'
- then Result := ieNoise
- else
- if S = 'iesplitblur'
- then Result := ieSplitBlur
- else
- if S = 'ieinvert'
- then Result := ieInvert;
- end;
- constructor TspDataSkinControl.Create;
- begin
- IDName := AIDName;
- PictureIndex := -1;
- MaskPictureIndex := -1;
- SkinRect := Rect(0, 0, 0, 0);
- CursorIndex := -1;
- end;
- procedure TspDataSkinControl.LoadFromFile;
- begin
- PictureIndex := IniFile.ReadInteger(IDName, 'pictureindex', -1);
- MaskPictureIndex := IniFile.ReadInteger(IDName, 'maskpictureindex', -1);
- CursorIndex := IniFile.ReadInteger(IDName, 'cursorindex', -1);
- SkinRect := ReadRect(IniFile, IDName, 'skinrect');
- end;
- procedure TspDataSkinControl.SaveToFile;
- begin
- IniFile.EraseSection(IDName);
- IniFile.WriteInteger(IDName, 'pictureindex', PictureIndex);
- IniFile.WriteInteger(IDName, 'maskpictureindex', MaskPictureIndex);
- IniFile.WriteInteger(IDName, 'cursorindex', CursorIndex);
- WriteRect(IniFile, IDName, 'skinrect', SkinRect);
- end;
- constructor TspDataSkinMainMenuBar.Create;
- begin
- inherited;
- TrackMarkColor := 0;
- TrackMarkActiveColor := 0;
- end;
- procedure TspDataSkinMainMenuBar.LoadFromFile;
- begin
- inherited;
- ItemsRect := ReadRect(IniFile, IDName, 'itemsrect');
- MenuBarItem := IniFile.ReadString(IDName, 'menubaritem', '');
- CloseButton := IniFile.ReadString(IDName, 'closebutton', '');
- MinButton := IniFile.ReadString(IDName, 'minbutton', '');
- MaxButton := IniFile.ReadString(IDName, 'maxbutton', '');
- SysMenuButton := IniFile.ReadString(IDName, 'sysmenubutton', '');
- TrackMarkColor := IniFile.ReadInteger(IDName, 'trackmarkcolor', 0);
- TrackMarkActiveColor := IniFile.ReadInteger(IDName, 'trackmarkactivecolor', 0);
- end;
- procedure TspDataSkinMainMenuBar.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'itemsrect', ItemsRect);
- IniFile.WriteString(IDName, 'menubaritem', MenuBarItem);
- IniFile.WriteString(IDName, 'closebutton', CloseButton);
- IniFile.WriteString(IDName, 'minbutton', MinButton);
- IniFile.WriteString(IDName, 'maxbutton', MaxButton);
- IniFile.WriteString(IDName, 'sysmenubutton', SysMenuButton);
- IniFile.WriteInteger(IDName, 'trackmarkcolor', TrackMarkColor);
- IniFile.WriteInteger(IDName, 'trackmarkactivecolor', TrackMarkActiveColor);
- end;
- procedure TspDataSkinUpDownControl.LoadFromFile(IniFile: TCustomIniFile);
- begin
- inherited;
- UpButtonRect := ReadRect(IniFile, IDName, 'upbuttonrect');
- ActiveUpButtonRect := ReadRect(IniFile, IDName, 'activeupbuttonrect');
- DownUpButtonRect := ReadRect(IniFile, IDName, 'downupbuttonrect');
- DownButtonRect := ReadRect(IniFile, IDName, 'downbuttonrect');
- ActiveDownButtonRect := ReadRect(IniFile, IDName, 'activedownbuttonrect');
- DownDownButtonRect := ReadRect(IniFile, IDName, 'downdownbuttonrect');
- LTPoint := Point(0, 0);
- RTPoint := Point(0, 0);
- LBPoint := Point(0, 0);
- RBPoint := Point(0, 0);
- ClRect := NullRect;
- end;
- procedure TspDataSkinUpDownControl.SaveToFile(IniFile: TCustomIniFile);
- begin
- LTPoint := Point(0, 0);
- RTPoint := Point(0, 0);
- LBPoint := Point(0, 0);
- RBPoint := Point(0, 0);
- ClRect := NullRect;
- inherited;
- WriteRect(IniFile, IDName, 'upbuttonrect', UpButtonRect);
- WriteRect(IniFile, IDName, 'activeupbuttonrect', ActiveUpButtonRect);
- WriteRect(IniFile, IDName, 'downupbuttonrect', DownUpButtonRect);
- WriteRect(IniFile, IDName, 'downbuttonrect', DownButtonRect);
- WriteRect(IniFile, IDName, 'activedownbuttonrect', ActiveDownButtonRect);
- WriteRect(IniFile, IDName, 'downdownbuttonrect', DownDownButtonRect);
- end;
- constructor TspDataSkinListBox.Create(AIDName: String);
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 14;
- FontColor := 0;
- CaptionFontName := 'Arial';
- CaptionFontStyle := [];
- CaptionFontHeight := 14;
- CaptionFontColor := 0;
- HScrollBarName := '';
- VScrollBarName := '';
- BothScrollBarName := '';
- end;
- procedure TspDataSkinListBox.LoadFromFile;
- begin
- inherited;
- //
- SItemRect := ReadRect(IniFile, IDName, 'itemrect');
- ActiveItemRect := ReadRect(IniFile, IDName, 'activeitemrect');
- FocusItemRect := ReadRect(IniFile, IDName, 'focusitemrect');
- ItemLeftOffset := IniFile.ReadInteger(IDName, 'itemleftoffset', 0);
- ItemRightOffset := IniFile.ReadInteger(IDName, 'itemrightoffset', 0);
- ItemTextRect := ReadRect(IniFile, IDName, 'itemtextrect');
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- ActiveFontColor := IniFile.ReadInteger(IDName, 'activefontcolor', 0);
- FocusFontColor := IniFile.ReadInteger(IDName, 'focusfontcolor', 0);
- //
- CaptionRect := ReadRect(IniFile, IDName, 'captionrect');
- CaptionFontName := IniFile.ReadString(IDName, 'captionfontname', 'Arial');
- CaptionFontHeight := IniFile.ReadInteger(IDName, 'captionfontheight', 14);
- CaptionFontStyle := ReadFontStyles(IniFile, IDName, 'captionfontstyle');
- CaptionFontColor := IniFile.ReadInteger(IDName, 'captionfontcolor', 0);
- //
- UpButtonRect := ReadRect(IniFile, IDName, 'upbuttonrect');
- ActiveUpButtonRect := ReadRect(IniFile, IDName, 'activeupbuttonrect');
- DownUpButtonRect := ReadRect(IniFile, IDName, 'downupbuttonrect');
- DownButtonRect := ReadRect(IniFile, IDName, 'downbuttonrect');
- ActiveDownButtonRect := ReadRect(IniFile, IDName, 'activedownbuttonrect');
- DownDownButtonRect := ReadRect(IniFile, IDName, 'downdownbuttonrect');
- CheckButtonRect := ReadRect(IniFile, IDName, 'checkbuttonrect');
- ActiveCheckButtonRect := ReadRect(IniFile, IDName, 'activecheckbuttonrect');
- DownCheckButtonRect := ReadRect(IniFile, IDName, 'downcheckbuttonrect');
- //
- VScrollBarName := IniFile.ReadString(IDName, 'vscrollbarname', 'vscrollbar');
- HScrollBarName := IniFile.ReadString(IDName, 'hscrollbarname', 'hscrollbar');
- BothScrollBarName := IniFile.ReadString(IDName, 'bothhscrollbarname', 'bothhscrollbar');
- end;
- procedure TspDataSkinListBox.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'itemrect', SItemRect);
- WriteRect(IniFile, IDName, 'activeitemrect', ActiveItemRect);
- WriteRect(IniFile, IDName, 'focusitemrect', FocusItemRect);
- IniFile.WriteInteger(IDName, 'itemleftoffset', ItemLeftOffset);
- IniFile.WriteInteger(IDName, 'itemrightoffset', ItemRightOffset);
- WriteRect(IniFile, IDName, 'itemtextrect', ItemTextRect);
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'activefontcolor', ActiveFontColor);
- IniFile.WriteInteger(IDName, 'focusfontcolor', FocusFontColor);
- //
- WriteRect(IniFile, IDName, 'captionrect', CaptionRect);
- IniFile.WriteString(IDName, 'captionfontname', CaptionFontName);
- IniFile.WriteInteger(IDName, 'captionfontheight', CaptionFontHeight);
- WriteFontStyles(IniFile, IDName, 'captionfontstyle', CaptionFontStyle);
- IniFile.WriteInteger(IDName, 'captionfontcolor', CaptionFontColor);
- //
- WriteRect(IniFile, IDName, 'upbuttonrect', UpButtonRect);
- WriteRect(IniFile, IDName, 'activeupbuttonrect', ActiveUpButtonRect);
- WriteRect(IniFile, IDName, 'downupbuttonrect', DownUpButtonRect);
- WriteRect(IniFile, IDName, 'downbuttonrect', DownButtonRect);
- WriteRect(IniFile, IDName, 'activedownbuttonrect', ActiveDownButtonRect);
- WriteRect(IniFile, IDName, 'downdownbuttonrect', DownDownButtonRect);
- WriteRect(IniFile, IDName, 'checkbuttonrect', CheckButtonRect);
- WriteRect(IniFile, IDName, 'activecheckbuttonrect', ActiveCheckButtonRect);
- WriteRect(IniFile, IDName, 'downcheckbuttonrect', DownCheckButtonRect);
- //
- IniFile.WriteString(IDName, 'vscrollbarname', VScrollBarName);
- IniFile.WriteString(IDName, 'hscrollbarname', HScrollBarName);
- IniFile.WriteString(IDName, 'bothhscrollbarname', BothScrollBarName);
- end;
- procedure TspDataSkinCheckListBox.LoadFromFile;
- begin
- inherited;
- CheckImageRect := ReadRect(IniFile, IDName, 'checkimagerect');
- ItemCheckRect := ReadRect(IniFile, IDName, 'itemcheckrect');
- UnCheckImageRect := ReadRect(IniFile, IDName, 'uncheckimagerect');
- end;
- procedure TspDataSkinCheckListBox.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'itemcheckrect', ItemCheckRect);
- WriteRect(IniFile, IDName, 'uncheckimagerect', UnCheckImageRect);
- WriteRect(IniFile, IDName, 'checkimagerect', CheckImageRect);
- end;
- constructor TspDataSkinComboBox.Create(AIDName: String);
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 14;
- FontColor := 0;
- FocusFontColor := 0;
- ListBoxName := '';
- end;
- procedure TspDataSkinComboBox.LoadFromFile;
- begin
- inherited;
- //
- SItemRect := ReadRect(IniFile, IDName, 'itemrect');
- FocusItemRect := ReadRect(IniFile, IDName, 'focusitemrect');
- ItemLeftOffset := IniFile.ReadInteger(IDName, 'itemleftoffset', 0);
- ItemRightOffset := IniFile.ReadInteger(IDName, 'itemrightoffset', 0);
- ItemTextRect := ReadRect(IniFile, IDName, 'itemtextrect');
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- FocusFontColor := IniFile.ReadInteger(IDName, 'focusfontcolor', 0);
- //
- ListBoxName := IniFile.ReadString(IDName, 'listboxname', '');
- //
- ButtonRect := ReadRect(IniFile, IDName, 'buttonrect');
- ActiveButtonRect := ReadRect(IniFile, IDName, 'activebuttonrect');
- DownButtonRect := ReadRect(IniFile, IDName, 'downbuttonrect');
- UnEnabledButtonRect := ReadRect(IniFile, IDName, 'unenabledbuttonrect');
- //
- end;
- procedure TspDataSkinComboBox.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'itemrect', SItemRect);
- WriteRect(IniFile, IDName, 'focusitemrect', FocusItemRect);
- IniFile.WriteInteger(IDName, 'itemleftoffset', ItemLeftOffset);
- IniFile.WriteInteger(IDName, 'itemrightoffset', ItemRightOffset);
- WriteRect(IniFile, IDName, 'itemtextrect', ItemTextRect);
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'focusfontcolor', FocusFontColor);
- //
- WriteRect(IniFile, IDName, 'buttonrect', ButtonRect);
- WriteRect(IniFile, IDName, 'activebuttonrect', ActiveButtonRect);
- WriteRect(IniFile, IDName, 'downbuttonrect', DownButtonRect);
- WriteRect(IniFile, IDName, 'unenabledbuttonrect', UnEnabledButtonRect);
- //
- IniFile.WriteString(IDName, 'listboxname', ListBoxName);
- end;
- constructor TspDataSkinControlBar.Create(AIDName: String);
- begin
- inherited;
- BGPictureIndex := -1;
- end;
- procedure TspDataSkinControlBar.LoadFromFile;
- begin
- inherited;
- ItemRect := ReadRect(IniFile, IDName, 'itemrect');
- BGPictureIndex := IniFile.ReadInteger(IDName, 'bgpictureindex', -1);
- end;
- procedure TspDataSkinControlBar.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'itemrect', ItemRect);
- IniFile.WriteInteger(IDName, 'bgpictureindex', BGPictureIndex);
- end;
- constructor TspDataSkinTreeView.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 14;
- FontColor := 0;
- BGColor := clWhite;
- end;
- procedure TspDataSkinTreeView.LoadFromFile;
- begin
- inherited;
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- BGColor := IniFile.ReadInteger(IDName, 'bgcolor', 0);
- end;
- procedure TspDataSkinTreeView.SaveToFile;
- begin
- inherited;
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'bgcolor', BGColor);
- end;
- constructor TspDataSkinListView.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 14;
- FontColor := 0;
- BGColor := clWhite;
- end;
- procedure TspDataSkinListView.LoadFromFile;
- begin
- inherited;
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- BGColor := IniFile.ReadInteger(IDName, 'bgcolor', 0);
- end;
- procedure TspDataSkinListView.SaveToFile;
- begin
- inherited;
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'bgcolor', BGColor);
- end;
- constructor TspDataSkinRichEdit.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 14;
- FontColor := 0;
- BGColor := clWhite;
- end;
- procedure TspDataSkinRichEdit.LoadFromFile;
- begin
- inherited;
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- BGColor := IniFile.ReadInteger(IDName, 'bgcolor', 0);
- end;
- procedure TspDataSkinRichEdit.SaveToFile;
- begin
- inherited;
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'bgcolor', BGColor);
- end;
- constructor TspDataSkinSlider.Create;
- begin
- inherited;
- BGColor := 0;
- end;
- procedure TspDataSkinSlider.LoadFromFile;
- begin
- inherited;
- BGColor := IniFile.ReadInteger(IDName, 'bgcolor', 0);
- HRulerRect := ReadRect(IniFile, IDName, 'hrulerrect');
- HThumbRect := ReadRect(IniFile, IDName, 'hthumbrect');
- VRulerRect := ReadRect(IniFile, IDName, 'vrulerrect');
- VThumbRect := ReadRect(IniFile, IDName, 'vthumbrect');
- EdgeSize := IniFile.ReadInteger(IDName, 'edgesize', 0);
- PointsColor := IniFile.ReadInteger(IDName, 'pointscolor', 0);
- end;
- procedure TspDataSkinSlider.SaveToFile;
- begin
- inherited;
- IniFile.WriteInteger(IDName, 'bgcolor', BGColor);
- WriteRect(IniFile, IDName, 'hrulerrect', HRulerRect);
- WriteRect(IniFile, IDName, 'hthumbrect', HThumbRect);
- WriteRect(IniFile, IDName, 'vrulerrect', VRulerRect);
- WriteRect(IniFile, IDName, 'vthumbrect', VThumbRect);
- IniFile.WriteInteger(IDName, 'edgesize', EdgeSize);
- IniFile.WriteInteger(IDName, 'pointscolor', PointsColor);
- end;
- constructor TspDataSkinBevel.Create;
- begin
- inherited;
- LightColor := 0;
- DarkColor := 0;
- end;
- procedure TspDataSkinBevel.LoadFromFile;
- begin
- inherited;
- LightColor := IniFile.ReadInteger(IDName, 'lightcolor', 0);
- DarkColor := IniFile.ReadInteger(IDName, 'darkcolor', 0);
- end;
- procedure TspDataSkinBevel.SaveToFile;
- begin
- inherited;
- IniFile.WriteInteger(IDName, 'lightcolor', LightColor);
- IniFile.WriteInteger(IDName, 'darkcolor', DarkColor);
- end;
- constructor TspDataSkinTabControl.Create(AIDName: String);
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 14;
- FontColor := 0;
- ActiveFontColor := 0;
- FocusFontColor := 0;
- UpDown := '';
- BGPictureIndex := -1;
- end;
- procedure TspDataSkinTabControl.LoadFromFile;
- begin
- inherited;
- TabRect := ReadRect(IniFile, IDName, 'tabrect');
- ActiveTabRect := ReadRect(IniFile, IDName, 'activetabrect');
- FocusTabRect := ReadRect(IniFile, IDName, 'focustabrect');
- MouseInTabRect := ReadRect(IniFile, IDName, 'mouseintabrect');
-
- ClRect := ReadRect(IniFile, IDName, 'clientrect');
- BGPictureIndex := IniFile.ReadInteger(IDName, 'bgpictureindex', -1);
- LTPoint := ReadPoint(IniFile, IDName, 'lefttoppoint');
- RTPoint := Readpoint(IniFile, IDName, 'righttoppoint');
- LBPoint := ReadPoint(IniFile, IDName, 'leftbottompoint');
- RBPoint := ReadPoint(IniFile, IDName, 'rightbottompoint');
- TabLeftOffset := IniFile.ReadInteger(IDName, 'tableftoffset', 0);
- TabRightOffset := IniFile.ReadInteger(IDName, 'tabrightoffset', 0);
- TabsBGRect := ReadRect(IniFile, IDName, 'tabsbgrect');
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- ActiveFontColor := IniFile.ReadInteger(IDName, 'activefontcolor', 0);
- FocusFontColor := IniFile.ReadInteger(IDName, 'focusfontcolor', 0);
- MouseInFontColor := IniFile.ReadInteger(IDName, 'mouseinfontcolor', 0);
- UpDown := IniFile.ReadString(IDName, 'updown', '');
- end;
- procedure TspDataSkinTabControl.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'tabrect', TabRect);
- WriteRect(IniFile, IDName, 'activetabrect', ActiveTabRect);
- WriteRect(IniFile, IDName, 'focustabrect', FocusTabRect);
- WriteRect(IniFile, IDName, 'mouseintabrect', MouseInTabRect);
- WriteRect(IniFile, IDName, 'clientrect', ClRect);
- IniFile.WriteInteger(IDName, 'bgpictureindex', BGPictureIndex);
- WritePoint(IniFile, IDName, 'lefttoppoint', LTPoint);
- writePoint(IniFile, IDName, 'righttoppoint', RTPoint);
- WritePoint(IniFile, IDName, 'leftbottompoint', LBPoint);
- WritePoint(IniFile, IDName, 'rightbottompoint', RBPoint);
- IniFile.WriteInteger(IDName, 'tableftoffset', TabLeftOffset);
- IniFile.WriteInteger(IDName, 'tabrightoffset', TabRightOffset);
- WriteRect(IniFile, IDName, 'tabsbgrect', TabsBGRect);
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'activefontcolor', ActiveFontColor);
- IniFile.WriteInteger(IDName, 'focusfontcolor', FocusFontColor);
- IniFile.WriteInteger(IDName, 'mouseinfontcolor', MouseInFontColor);
- IniFile.WriteString(IDName, 'updown', UpDown);
- end;
- constructor TspDataSkinGridControl.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 14;
- FontColor := 0;
- FixedFontName := 'Arial';
- FixedFontStyle := [];
- FixedFontHeight := 14;
- FixedFontColor := 0;
- BGPictureIndex := -1;
- end;
- procedure TspDataSkinGridControl.LoadFromFile(IniFile: TCustomIniFile);
- begin
- inherited;
- FixedCellRect := ReadRect(IniFile, IDName, 'fixedcellrect');
- SelectCellRect := ReadRect(IniFile, IDName, 'selectcellrect');
- FocusCellRect := ReadRect(IniFile, IDName, 'focuscellrect');
- //
- FixedCellLeftOffset := IniFile.ReadInteger(IDName, 'fixedcellleftoffset', 0);
- FixedCellRightOffset := IniFile.ReadInteger(IDName, 'fixedcellrightoffset', 0);
- FixedCellTextRect := ReadRect(IniFile, IDName, 'fixedcelltextrect');
- //
- CellLeftOffset := IniFile.ReadInteger(IDName, 'cellleftoffset', 0);
- CellRightOffset := IniFile.ReadInteger(IDName, 'cellrightoffset', 0);
- CellTextRect := ReadRect(IniFile, IDName, 'celltextrect');
- //
- LinesColor := IniFile.ReadInteger(IDName, 'linescolor', 0);
- BGColor := IniFile.ReadInteger(IDName, 'bgcolor', 0);
- BGPictureIndex := IniFile.ReadInteger(IDName, 'bgpictureindex', -1);
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- SelectFontColor := IniFile.ReadInteger(IDName, 'selectfontcolor', 0);
- FocusFontColor := IniFile.ReadInteger(IDName, 'focusfontcolor', 0);
- //
- FixedFontName := IniFile.ReadString(IDName, 'fixedfontname', 'Arial');
- FixedFontHeight := IniFile.ReadInteger(IDName, 'fixedfontheight', 14);
- FixedFontStyle := ReadFontStyles(IniFile, IDName, 'fixedfontstyle');
- FixedFontColor := IniFile.ReadInteger(IDName, 'fixedfontcolor', 0);
- end;
- procedure TspDataSkinGridControl.SaveToFile(IniFile: TCustomIniFile);
- begin
- inherited;
- WriteRect(IniFile, IDName, 'fixedcellrect', FixedCellRect);
- WriteRect(IniFile, IDName, 'selectcellrect', SelectCellRect);
- WriteRect(IniFile, IDName, 'focuscellrect', FocusCellRect);
- //
- IniFile.WriteInteger(IDName, 'fixedcellleftoffset', FixedCellLeftOffset);
- IniFile.WriteInteger(IDName, 'fixedcellrightoffset', FixedCellRightOffset);
- WriteRect(IniFile, IDName, 'fixedcelltextrect', FixedCellTextRect);
- //
- IniFile.WriteInteger(IDName, 'cellleftoffset', CellLeftOffset);
- IniFile.WriteInteger(IDName, 'cellrightoffset', CellRightOffset);
- WriteRect(IniFile, IDName, 'celltextrect', CellTextRect);
- //
- IniFile.WriteInteger(IDName, 'linescolor', LinesColor);
- IniFile.WriteInteger(IDName, 'bgcolor', BGColor);
- IniFile.WriteInteger(IDName, 'bgpictureindex', BGPictureIndex);
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'selectfontcolor', SelectFontColor);
- IniFile.WriteInteger(IDName, 'focusfontcolor', FocusFontColor);
- //
- IniFile.WriteString(IDName, 'fixedfontname', FixedFontName);
- IniFile.WriteInteger(IDName, 'fixedfontheight', FixedFontHeight);
- WriteFontStyles(IniFile, IDName, 'fixedfontstyle', FixedFontStyle);
- IniFile.WriteInteger(IDName, 'fixedfontcolor', FixedFontColor);
- end;
- constructor TspDataSkinFrameControl.Create;
- begin
- inherited;
- FramesCount := 1;
- FramesPlacement := fpHorizontal;
- end;
- procedure TspDataSkinFrameControl.LoadFromFile;
- var
- S: String;
- begin
- inherited;
- FramesCount := IniFile.ReadInteger(IDName, 'framescount', 1);
- if FramesCount < 1 then FramesCount := 1;
- S := IniFile.ReadString(IDName, 'framesplacement', 'fphorizontal');
- if S = 'fphorizontal'
- then FramesPlacement := fpHorizontal
- else FramesPlacement := fpVertical;
- end;
- procedure TspDataSkinFrameControl.SaveToFile;
- var
- S: String;
- begin
- inherited;
- IniFile.WriteInteger(IDName, 'framescount', FramesCount);
- if FramesPlacement = fpHorizontal
- then S := 'fphorizontal'
- else S := 'fpvertical';
- IniFile.WriteString(IDName, 'framesplacement', S);
- end;
- constructor TspDataSkinFrameRegulator.Create;
- begin
- inherited;
- Kind := rkRound;
- end;
- procedure TspDataSkinFrameRegulator.LoadFromFile;
- var
- S: String;
- begin
- inherited;
- Kind := rkRound;
- S := IniFile.ReadString(IDName, 'kind', 'rkround');
- if S = 'rkround'
- then Kind := rkRound
- else
- if S = 'rkhorizontal'
- then Kind := rkHorizontal
- else Kind := rkVertical;
- end;
- procedure TspDataSkinFrameRegulator.SaveToFile;
- var
- S: String;
- begin
- inherited;
- if Kind = rkRound
- then S := 'rkround'
- else
- if Kind = rkHorizontal
- then S := 'rkhorizontal'
- else S := 'rkvertical';
- IniFile.WriteString(IDName, 'kind', S);
- end;
- constructor TspDataSkinCustomControl.Create;
- begin
- inherited;
- LTPoint := Point(0, 0);
- RBPoint := Point(0, 0);
- LBPoint := Point(0, 0);
- RTPoint := Point(0, 0);
- ClRect := Rect(0, 0, 0, 0);
- MaskPictureIndex := -1;
- end;
- procedure TspDataSkinCustomControl.LoadFromFile;
- begin
- inherited;
- LTPoint := ReadPoint(IniFile, IDName, 'lefttoppoint');
- RTPoint := ReadPoint(IniFile, IDName, 'righttoppoint');
- LBPoint := ReadPoint(IniFile, IDName, 'leftbottompoint');
- RBPoint := ReadPoint(IniFile, IDName, 'rightbottompoint');
- ClRect := ReadRect(IniFile, IDName, 'clientrect');
- end;
- procedure TspDataSkinCustomControl.SaveToFile;
- begin
- inherited;
- WritePoint(IniFile, IDName, 'lefttoppoint', LTPoint);
- WritePoint(IniFile, IDName, 'righttoppoint', RTPoint);
- WritePoint(IniFile, IDName, 'leftbottompoint', LBPoint);
- WritePoint(IniFile, IDName, 'rightbottompoint', RBPoint);
- WriteRect(IniFile, IDName, 'clientrect', ClRect);
- end;
- constructor TspDataSkinSpinEditControl.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 12;
- FontColor := 0;
- end;
- procedure TspDataSkinSpinEditControl.LoadFromFile;
- begin
- inherited;
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- UpButtonRect := ReadRect(IniFile, IDName, 'upbuttonrect');
- ActiveUpButtonRect := ReadRect(IniFile, IDName, 'activeupbuttonrect');
- DownUpButtonRect := ReadRect(IniFile, IDName, 'downupbuttonrect');
- DownButtonRect := ReadRect(IniFile, IDName, 'downbuttonrect');
- ActiveDownButtonRect := ReadRect(IniFile, IDName, 'activedownbuttonrect');
- DownDownButtonRect := ReadRect(IniFile, IDName, 'downdownbuttonrect');
- end;
- procedure TspDataSkinSpinEditControl.SaveToFile;
- begin
- inherited;
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- WriteRect(IniFile, IDName, 'upbuttonrect', UpButtonRect);
- WriteRect(IniFile, IDName, 'activeupbuttonrect', ActiveUpButtonRect);
- WriteRect(IniFile, IDName, 'downupbuttonrect', DownUpButtonRect);
- WriteRect(IniFile, IDName, 'downbuttonrect', DownButtonRect);
- WriteRect(IniFile, IDName, 'activedownbuttonrect', ActiveDownButtonRect);
- WriteRect(IniFile, IDName, 'downdownbuttonrect', DownDownButtonRect);
- end;
- constructor TspDataSkinEditControl.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 12;
- FontColor := 0;
- ActiveFontColor := 0;
- end;
- procedure TspDataSkinEditControl.LoadFromFile;
- begin
- inherited;
- ActiveSkinRect := ReadRect(IniFile, IDName, 'activeskinrect');
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- DisabledFontColor := IniFile.ReadInteger(IDName, 'disabledfontcolor', 0);
- ActiveFontColor := IniFile.ReadInteger(IDName, 'activefontcolor', 0);
- ButtonRect := ReadRect(IniFile, IDName, 'buttonrect');
- ActiveButtonRect := ReadRect(IniFile, IDName, 'activebuttonrect');
- DownButtonRect := ReadRect(IniFile, IDName, 'downbuttonrect');
- end;
- procedure TspDataSkinEditControl.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'activeskinrect', ActiveSkinRect);
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'activefontcolor', ActiveFontColor);
- IniFile.WriteInteger(IDName, 'disabledfontcolor', DisabledFontColor);
- WriteRect(IniFile, IDName, 'buttonrect', ButtonRect);
- WriteRect(IniFile, IDName, 'activebuttonrect', ActiveButtonRect);
- WriteRect(IniFile, IDName, 'downbuttonrect', DownButtonRect);
- end;
- constructor TspDataSkinMemoControl.Create(AIDName: String);
- begin
- inherited;
- end;
- procedure TspDataSkinMemoControl.LoadFromFile;
- begin
- inherited;
- BGColor := IniFile.ReadInteger(IDName, 'bgcolor', 0);
- ActiveBGColor := IniFile.ReadInteger(IDName, 'activebgcolor', 0);
- end;
- procedure TspDataSkinMemoControl.SaveToFile;
- begin
- inherited;
- IniFile.WriteInteger(IDName, 'bgcolor', BGColor);
- IniFile.WriteInteger(IDName, 'activebgcolor', ActiveBGColor);
- end;
- constructor TspDataSkinStdLabelControl.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 12;
- FontColor := 0;
- ActiveFontColor := clBlue;
- end;
- procedure TspDataSkinStdLabelControl.LoadFromFile;
- begin
- inherited;
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- ActiveFontColor := IniFile.ReadInteger(IDName, 'activefontcolor', clBlue);
- end;
- procedure TspDataSkinStdLabelControl.SaveToFile;
- begin
- inherited;
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- IniFile.WriteInteger(IDName, 'activefontcolor', ActiveFontColor);
- end;
- constructor TspDataSkinBitLabelControl.Create;
- begin
- inherited;
- Symbols := TStringList.Create;
- SymbolWidth := 0;
- SymbolHeight := 0;
- end;
- destructor TspDataSkinBitLabelControl.Destroy;
- begin
- Symbols.Clear;
- Symbols.Free;
- inherited;
- end;
- procedure TspDataSkinBitLabelControl.LoadFromFile;
- begin
- inherited;
- SkinTextRect := ReadRect(IniFile, IDName, 'skintextrect');
- SymbolWidth := IniFile.ReadInteger(IDName, 'symbolwidth', 0);
- SymbolHeight := IniFile.ReadInteger(IDName, 'symbolheight', 0);
- ReadStrings(IniFile, IDName, 'symbols', Symbols);
- end;
- procedure TspDataSkinBitLabelControl.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'skintextrect', SkinTextRect);
- IniFile.WriteInteger(IDName, 'symbolwidth', SymbolWidth);
- IniFile.WriteInteger(IDName, 'symbolheight', SymbolHeight);
- WriteStrings(IniFile, IDName, 'symbols', Symbols);
- end;
- constructor TspDataSkinLabelControl.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 12;
- FontColor := 0;
- end;
- procedure TspDataSkinLabelControl.LoadFromFile;
- begin
- inherited;
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- end;
- procedure TspDataSkinLabelControl.SaveToFile;
- begin
- inherited;
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- end;
- constructor TspDataSkinScrollBarControl.Create;
- begin
- inherited;
- ThumbOffset1 := 0;
- ThumbOffset2 := 0;
- end;
- procedure TspDataSkinScrollBarControl.LoadFromFile;
- begin
- inherited;
- TrackArea := ReadRect(IniFile, IDName, 'trackarea');
- UpButtonRect := ReadRect(IniFile, IDName, 'upbuttonrect');
- ActiveUpButtonRect := ReadRect(IniFile, IDName, 'activeupbuttonrect');
- DownUpButtonRect := ReadRect(IniFile, IDName, 'downupbuttonrect');
- DownButtonRect := ReadRect(IniFile, IDName, 'downbuttonrect');
- ActiveDownButtonRect := ReadRect(IniFile, IDName, 'activedownbuttonrect');
- DownDownButtonRect := ReadRect(IniFile, IDName, 'downdownbuttonrect');
- ThumbRect := ReadRect(IniFile, IDName, 'thumbrect');
- ActiveThumbRect := ReadRect(IniFile, IDName, 'activethumbrect');
- DownThumbRect := ReadRect(IniFile, IDName, 'downthumbrect');
- ThumbOffset1 := IniFile.ReadInteger(IDName, 'thumboffset1', 0);
- ThumbOffset2 := IniFile.ReadInteger(IDName, 'thumboffset2', 0);
- GlyphRect := ReadRect(IniFile, IDName, 'glyphrect');
- ActiveGlyphRect := ReadRect(IniFile, IDName, 'activeglyphrect');
- DownGlyphRect := ReadRect(IniFile, IDName, 'downglyphrect');
- end;
- procedure TspDataSkinScrollBarControl.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'trackarea', TrackArea);
- WriteRect(IniFile, IDName, 'upbuttonrect', UpButtonRect);
- WriteRect(IniFile, IDName, 'activeupbuttonrect', ActiveUpButtonRect);
- WriteRect(IniFile, IDName, 'downupbuttonrect', DownUpButtonRect);
- WriteRect(IniFile, IDName, 'downbuttonrect', DownButtonRect);
- WriteRect(IniFile, IDName, 'activedownbuttonrect', ActiveDownButtonRect);
- WriteRect(IniFile, IDName, 'downdownbuttonrect', DownDownButtonRect);
- WriteRect(IniFile, IDName, 'thumbrect', ThumbRect);
- WriteRect(IniFile, IDName, 'activethumbrect', ActiveThumbRect);
- WriteRect(IniFile, IDName, 'downthumbrect', DownThumbRect);
- IniFile.WriteInteger(IDName, 'thumboffset1', ThumbOffset1);
- IniFile.WriteInteger(IDName, 'thumboffset2', ThumbOffset2);
- WriteRect(IniFile, IDName, 'glyphrect', GlyphRect);
- WriteRect(IniFile, IDName, 'activeglyphrect', ActiveGlyphRect);
- WriteRect(IniFile, IDName, 'downglyphrect', DownGlyphRect);
- end;
- constructor TspDataSkinTrackBarControl.Create;
- begin
- inherited;
- TrackArea := NullRect;
- ButtonRect := NullRect;
- ActiveButtonRect := NullRect;
- Vertical := False;
- end;
- procedure TspDataSkinTrackBarControl.LoadFromFile;
- begin
- inherited;
- TrackArea := ReadRect(IniFile, IDName, 'trackarea');
- ButtonRect := ReadRect(IniFile, IDName, 'buttonrect');
- ActiveButtonRect := ReadRect(IniFile, IDName, 'activebuttonrect');
- Vertical := ReadBoolean(IniFile, IDName, 'vertical');
- end;
- procedure TspDataSkinTrackBarControl.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'trackarea', TrackArea);
- WriteRect(IniFile, IDName, 'buttonrect', ButtonRect);
- WriteRect(IniFile, IDName, 'activebuttonrect', ActiveButtonRect);
- WriteBoolean(IniFile, IDName, 'vertical', Vertical);
- end;
- constructor TspDataSkinGaugeControl.Create;
- begin
- inherited;
- ProgressArea := NullRect;
- ProgressRect := NullRect;
- Vertical := False;
- BeginOffset := 0;
- EndOffset := 0;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 14;
- FontColor := 0;
- end;
- procedure TspDataSkinGaugeControl.LoadFromFile;
- begin
- inherited;
- ProgressArea := ReadRect(IniFile, IDName, 'progressarea');
- ProgressRect := ReadRect(IniFile, IDName, 'progressrect');
- BeginOffset := IniFile.ReadInteger(IDName, 'beginoffset', 0);
- EndOffset := IniFile.ReadInteger(IDName, 'endoffset', 0);
- Vertical := ReadBoolean(IniFile, IDName, 'vertical');
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- end;
- procedure TspDataSkinGaugeControl.SaveToFile;
- begin
- inherited;
- WriteRect(IniFile, IDName, 'progressarea', ProgressArea);
- WriteRect(IniFile, IDName, 'progressrect', ProgressRect);
- IniFile.WriteInteger(IDName, 'beginoffset', BeginOffset);
- IniFile.WriteInteger(IDName, 'endoffset', EndOffset);
- WriteBoolean(IniFile, IDName, 'vertical', Vertical);
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- end;
- constructor TspDataSkinScrollBoxControl.Create(AIDName: String);
- begin
- inherited;
- BGPictureIndex := -1;
- end;
- procedure TspDataSkinScrollBoxControl.LoadFromFile(IniFile: TCustomIniFile);
- begin
- inherited;
- BGPictureIndex := IniFile.ReadInteger(IDName, 'bgpictureindex', -1);
- end;
- procedure TspDataSkinScrollBoxControl.SaveToFile(IniFile: TCustomIniFile);
- begin
- inherited;
- IniFile.WriteInteger(IDName, 'bgpictureindex', BGPictureIndex);
- end;
- constructor TspDataSkinPanelControl.Create;
- begin
- inherited;
- CaptionRect := NullRect;
- RollUpMarkerRect := NullRect;
- RestoreMarkerRect := NullRect;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 12;
- FontColor := 0;
- Alignment := taCenter;
- BGPictureIndex := -1;
- end;
- procedure TspDataSkinPanelControl.LoadFromFile;
- begin
- inherited;
- BGPictureIndex := IniFile.ReadInteger(IDName, 'bgpictureindex', -1);
- CaptionRect := ReadRect(IniFile, IDName, 'captionrect');
- RollUpMarkerRect := ReadRect(IniFile, IDName, 'rollupmarkerrect');
- RestoreMarkerRect := ReadRect(IniFile, IDName, 'restoremarkerrect');
- Alignment := ReadAlignment(IniFile, IDName, 'alignment');
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- CheckImageRect := ReadRect(IniFile, IDName, 'checkimagerect');
- UnCheckImageRect := ReadRect(IniFile, IDName, 'uncheckimagerect');
- end;
- procedure TspDataSkinPanelControl.SaveToFile;
- begin
- inherited;
- IniFile.WriteInteger(IDName, 'bgpictureindex', BGPictureIndex);
- WriteRect(IniFile, IDName, 'captionrect', CaptionRect);
- WriteRect(IniFile, IDName, 'rollupmarkerrect', RollUpMarkerRect);
- WriteRect(IniFile, IDName, 'restoremarkerrect', RestoreMarkerRect);
- WriteAlignment(IniFile, IDName, 'alignment', Alignment);
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- WriteRect(IniFile, IDName, 'checkimagerect', CheckImageRect);
- WriteRect(IniFile, IDName, 'uncheckimagerect', UnCheckImageRect);
- end;
- constructor TspDataSkinExPanelControl.Create(AIDName: String);
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 12;
- FontColor := 0;
- end;
- procedure TspDataSkinExPanelControl.LoadFromFile(IniFile: TCustomIniFile);
- begin
- inherited;
- RollHSkinRect := ReadRect(IniFile, IDName, 'rollhskinrect');
- RollVSkinRect := ReadRect(IniFile, IDName, 'rollvskinrect');
- RollLeftOffset := IniFile.ReadInteger(IDName, 'rollleftoffset', 0);
- RollRightOffset := IniFile.ReadInteger(IDName, 'rollrightoffset', 0);
- RollTopOffset := IniFile.ReadInteger(IDName, 'rolltopoffset', 0);
- RollBottomOffset := IniFile.ReadInteger(IDName, 'rollbottomoffset', 0);
- RollVCaptionRect := ReadRect(IniFile, IDName, 'rollvcaptionrect');
- RollHCaptionRect := ReadRect(IniFile, IDName, 'rollhcaptionrect');
- //
- CloseButtonRect := ReadRect(IniFile, IDName, 'closebuttonrect');
- CloseButtonActiveRect := ReadRect(IniFile, IDName, 'closebuttonactiverect');
- CloseButtonDownRect := ReadRect(IniFile, IDName, 'closebuttondownrect');
- HRollButtonRect := ReadRect(IniFile, IDName, 'hrollbuttonrect');
- HRollButtonActiveRect := ReadRect(IniFile, IDName, 'hrollbuttonactiverect');
- HRollButtonDownRect := ReadRect(IniFile, IDName, 'hrollbuttondownrect');
- HRestoreButtonRect := ReadRect(IniFile, IDName, 'hrestorebuttonrect');
- HRestoreButtonActiveRect := ReadRect(IniFile, IDName, 'hrestorebuttonactiverect');
- HRestoreButtonDownRect := ReadRect(IniFile, IDName, 'hrestorebuttondownrect');
- VRollButtonRect := ReadRect(IniFile, IDName, 'vrollbuttonrect');
- VRollButtonActiveRect := ReadRect(IniFile, IDName, 'vrollbuttonactiverect');
- VRollButtonDownRect := ReadRect(IniFile, IDName, 'vrollbuttondownrect');
- VRestoreButtonRect := ReadRect(IniFile, IDName, 'vrestorebuttonrect');
- VRestoreButtonActiveRect := ReadRect(IniFile, IDName, 'vrestorebuttonactiverect');
- VRestoreButtonDownRect := ReadRect(IniFile, IDName, 'vrestorebuttondownrect');
- //
- CaptionRect := ReadRect(IniFile, IDName, 'captionrect');
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- end;
- procedure TspDataSkinExPanelControl.SaveToFile(IniFile: TCustomIniFile);
- begin
- inherited;
- WriteRect(IniFile, IDName, 'rollhskinrect', RollHSkinRect);
- WriteRect(IniFile, IDName, 'rollvskinrect', RollVSkinRect);
- IniFile.WriteInteger(IDName, 'rollleftoffset', RollLeftOffset);
- IniFile.WriteInteger(IDName, 'rollrightoffset', RollRightOffset);
- IniFile.WriteInteger(IDName, 'rolltopoffset', RollTopOffset);
- IniFile.WriteInteger(IDName, 'rollbottomoffset', RollBottomOffset);
- WriteRect(IniFile, IDName, 'rollvcaptionrect', RollVCaptionRect);
- WriteRect(IniFile, IDName, 'rollhcaptionrect', RollHCaptionRect);
- //
- WriteRect(IniFile, IDName, 'closebuttonrect', CloseButtonRect);
- WriteRect(IniFile, IDName, 'closebuttonactiverect', CloseButtonActiveRect);
- WriteRect(IniFile, IDName, 'closebuttondownrect', CloseButtonDownRect);
- WriteRect(IniFile, IDName, 'hrollbuttonrect', HRollButtonRect);
- WriteRect(IniFile, IDName, 'hrollbuttonactiverect', HRollButtonActiveRect);
- WriteRect(IniFile, IDName, 'hrollbuttondownrect', HRollButtonDownRect);
- WriteRect(IniFile, IDName, 'hrestorebuttonrect', HRestoreButtonRect);
- WriteRect(IniFile, IDName, 'hrestorebuttonactiverect', HRestoreButtonActiveRect);
- WriteRect(IniFile, IDName, 'hrestorebuttondownrect', HRestoreButtonDownRect);
- WriteRect(IniFile, IDName, 'vrollbuttonrect', VRollButtonRect);
- WriteRect(IniFile, IDName, 'vrollbuttonactiverect', VRollButtonActiveRect);
- WriteRect(IniFile, IDName, 'vrollbuttondownrect', VRollButtonDownRect);
- WriteRect(IniFile, IDName, 'vrestorebuttonrect', VRestoreButtonRect);
- WriteRect(IniFile, IDName, 'vrestorebuttonactiverect', VRestoreButtonActiveRect);
- WriteRect(IniFile, IDName, 'vrestorebuttondownrect', VRestoreButtonDownRect);
- //
- WriteRect(IniFile, IDName, 'captionrect', CaptionRect);
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);
- IniFile.WriteInteger(IDName, 'fontcolor', FontColor);
- end;
- constructor TspDataSkinCheckRadioControl.Create;
- begin
- inherited;
- FontName := 'Arial';
- FontStyle := [];
- FontHeight := 12;
- FontColor := 0;
- ActiveFontColor := 0;
- FontColor := 0;
- CheckImageArea := NullRect;
- TextArea := NullRect;
- ActiveSkinRect := NullRect;
- CheckImageRect := NullRect;
- UnCheckImageRect := NullRect;
- MorphKind := mkDefault;
- end;
- procedure TspDataSkinCheckRadioControl.LoadFromFile;
- begin
- inherited;
- FontName := IniFile.ReadString(IDName, 'fontname', 'Arial');
- FontHeight := IniFile.ReadInteger(IDName, 'fontheight', 14);
- FontStyle := ReadFontStyles(IniFile, IDName, 'fontstyle');
- FontColor := IniFile.ReadInteger(IDName, 'fontcolor', 0);
- ActiveFontColor := IniFile.ReadInteger(IDName, 'activefontcolor', 0);
- UnEnabledFontColor := IniFile.ReadInteger(IDName, 'unenabledfontcolor', 0);
- FrameFontColor := IniFile.ReadInteger(IDName, 'framefontcolor', 0);
- Morphing := ReadBoolean(IniFile, IDName, 'morphing');
- MorphKind := ReadMorphKind(IniFile, IDName, 'morphkind');
- ActiveSkinRect := ReadRect(IniFile, IDName, 'activeskinrect');
- CheckImageArea := ReadRect(IniFile, IDName, 'checkimagearea');
- TextArea := ReadRect(IniFile, IDName, 'textarea');
- CheckImageRect := ReadRect(IniFile, IDName, 'checkimagerect');
- UnCheckImageRect := ReadRect(IniFile, IDName, 'uncheckimagerect');
- ActiveCheckImageRect := ReadRect(IniFile, IDName, 'activecheckimagerect');
- ActiveUnCheckImageRect := ReadRect(IniFile, IDName, 'activeuncheckimagerect');
- UnEnabledCheckImageRect := ReadRect(IniFile, IDName, 'unenabledcheckimagerect');
- UnEnabledUnCheckImageRect := ReadRect(IniFile, IDName, 'unenableduncheckimagerect');
- end;
- procedure TspDataSkinCheckRadioControl.SaveToFile;
- begin
- inherited;
- IniFile.WriteString(IDName, 'fontname', FontName);
- IniFile.WriteInteger(IDName, 'fontheight', FontHeight);
- WriteFontStyles(IniFile, IDName, 'fontstyle', FontStyle);