?? bsskinctrls.pas
字號:
ProgressAnimationCountFrames: Integer;
ProgressAnimationTimerInterval: Integer;
//
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function CalcProgressRect(R: TRect; AV: Boolean; AValue: Integer): TRect;
procedure Paint; override;
procedure StartProgressAnimation;
procedure StopProgressAnimation;
procedure SetProgressAnimationPause(Value: Integer);
procedure StartInternalAnimation;
procedure StopInternalAnimation;
procedure ChangeSkinData; override;
procedure BeforeChangeSkinData; override;
published
property UseSkinSize: Boolean read FUseSkinSize write FUseSkinSize;
property ProgressText: String read FProgressText write SetProgressText;
property ShowProgressText: Boolean read FShowProgressText write SetShowProgressText;
property ShowPercent: Boolean read FShowPercent write SetShowPercent;
property MinValue: Integer read FMinValue write SetMinValue;
property MaxValue: Integer read FMaxValue write SetMaxValue;
property Value: Integer read FValue write SetValue;
property Vertical: Boolean read FVertical write SetVertical;
property ProgressAnimationPause: Integer
read FProgressAnimationPause write SetProgressAnimationPause;
property Align;
property Enabled;
property OnGaugePaint: TbsGaugePaintEvent
read FOnGaugePaint write FOnGaugePaint;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property PopupMenu;
property ShowHint;
end;
TbsSkinTextLabel = class(TGraphicControl)
private
FIndex: Integer;
FSD: TbsSkinData;
FSkinDataName: String;
FDefaultFont: TFont;
FUseSkinFont: Boolean;
FUseSkinColor: Boolean;
//
FLines: TStrings;
FAlignment: TAlignment;
FAutoSize: Boolean;
FLayout: TTextLayout;
FWordWrap: Boolean;
procedure SetSkinData(Value: TbsSkinData);
procedure SetDefaultFont(Value: TFont);
procedure SetLines(Value: TStrings);
procedure SetAlignment(Value: TAlignment);
procedure SetLayout(Value: TTextLayout);
procedure SetWordWrap(Value: Boolean);
procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED;
procedure OnTextChange(Sender: TObject);
protected
function GetLabelText: string; virtual;
procedure Loaded; override;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetAutoSize(Value: Boolean); virtual;
procedure DoDrawText(var Rect: TRect; Flags: Longint);
public
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor: TColor;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property Canvas;
procedure AdjustBounds; dynamic;
procedure ChangeSkinData;
procedure GetSkinData;
procedure Paint; override;
published
property UseSkinFont: Boolean read FUseSkinFont write FUseSkinFont;
property UseSkinColor: Boolean read FUseSkinColor write FUseSkinColor;
property Lines: TStrings read FLines write SetLines;
property DefaultFont: TFont read FDefaultFont write SetDefaultFont;
property SkinData: TbsSkinData read FSD write SetSkinData;
property SkinDataName: String read FSkinDataName write FSkinDataName;
property Font;
property Align;
property Alignment: TAlignment read FAlignment write SetAlignment
default taLeftJustify;
property AutoSize: Boolean read FAutoSize write SetAutoSize default True;
property Layout: TTextLayout read FLayout write SetLayout default tlTop;
property WordWrap: Boolean read FWordWrap write SetWordWrap default False;
property Anchors;
property BiDiMode;
property Constraints;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property ParentBiDiMode;
property ParentColor;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property Visible;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
end;
TbsSkinButtonLabel = class(TGraphicControl)
protected
FWebStyle: Boolean;
FMouseIn, FDown: Boolean;
FIndex: Integer;
FSD: TbsSkinData;
FSkinDataName: String;
FDefaultFont: TFont;
FUseSkinFont: Boolean;
FDefaultActiveFontColor: TColor;
FGlyph: TBitMap;
FNumGlyphs: TbsNumGlyphs;
FMargin: Integer;
FSpacing: Integer;
FLayout: TbsButtonLayout;
FImageList: TCustomImageList;
FImageIndex: Integer;
procedure SetImageIndex(Value: Integer);
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetSkinData(Value: TbsSkinData);
procedure SetDefaultFont(Value: TFont);
procedure SetLayout(Value : TbsButtonLayout);
procedure SetMargin(Value: Integer);
procedure SetSpacing(Value: Integer);
procedure SetNumGlyphs(Value: TbsNumGlyphs);
procedure SetGlyph(Value: TBitMap);
procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure SetWebStyle(Value: Boolean);
public
FontColor: TColor;
ActiveFontColor: TColor;
FontName: String;
FontHeight: Integer;
FontStyle: TFontStyles;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure ChangeSkinData;
procedure Paint; override;
published
property ImageList: TCustomImageList read FImageList write FImageList;
property ImageIndex: Integer read FImageIndex write SetImageIndex;
property WebStyle: Boolean read FWebStyle write SetWebStyle;
property Glyph: TBitMap read FGlyph write SetGlyph;
property NumGlyphs: TbsNumGlyphs read FNumGlyphs write SetNumGlyphs;
property Margin: Integer read FMargin write SetMargin default -1;
property Spacing: Integer read FSpacing write SetSpacing default 4;
property Layout: TbsButtonLayout read FLayout write SetLayout default blGlyphLeft;
property UseSkinFont: Boolean read FUseSkinFont write FUseSkinFont;
property DefaultActiveFontColor: TColor
read FDefaultActiveFontColor write FDefaultActiveFontColor;
property DefaultFont: TFont read FDefaultFont write SetDefaultFont;
property SkinData: TbsSkinData read FSD write SetSkinData;
property SkinDataName: String read FSkinDataName write FSkinDataName;
property Align;
property Anchors;
property AutoSize;
property BiDiMode;
property Caption;
property Constraints;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property ParentBiDiMode;
property ParentColor;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property Visible;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
end;
TbsEllipsType = (bsetNone, bsetEndEllips, bsetPathEllips);
TbsSkinStdLabel = class(TCustomLabel)
protected
FEllipsType: TbsEllipsType;
FIndex: Integer;
FSD: TbsSkinData;
FSkinDataName: String;
FDefaultFont: TFont;
FUseSkinFont: Boolean;
FUseSkinColor: Boolean;
procedure SetEllipsType(const Value: TbsEllipsType);
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetSkinData(Value: TbsSkinData);
procedure SetDefaultFont(Value: TFont);
property Transparent;
procedure DoDrawText(var Rect: TRect; Flags: Longint); override;
procedure DoDrawText2(C: TCanvas; var Rect: TRect; Flags: Longint; AText: String);
public
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor: TColor;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure GetSkinData;
procedure ChangeSkinData;
procedure PaintSkinTo(C: TCanvas; X, Y: Integer; AText: String);
published
property EllipsType: TbsEllipsType read FEllipsType write SetEllipsType;
property UseSkinFont: Boolean read FUseSkinFont write FUseSkinFont;
property UseSkinColor: Boolean read FUseSkinColor write FUseSkinColor;
property DefaultFont: TFont read FDefaultFont write SetDefaultFont;
property SkinData: TbsSkinData read FSD write SetSkinData;
property SkinDataName: String read FSkinDataName write FSkinDataName;
property Font;
property Align;
property Alignment;
property Anchors;
property AutoSize;
property BiDiMode;
property Caption;
property Color;
property Constraints;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property FocusControl;
property ParentBiDiMode;
property ParentColor;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowAccelChar;
property ShowHint;
property Layout;
property Visible;
property WordWrap;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
end;
TbsEllipsType2 = (bsetNoneEllips, bsetEllips);
TbsSkinLabel = class(TbsSkinCustomControl)
protected
FEllipsType: TbsEllipsType2;
FUseSkinSize: Boolean;
FAlignment: TAlignment;
FAutoSize: Boolean;
FBorderStyle: TbsSkinBorderStyle;
FUseSkinFontColor: Boolean;
procedure SetEllipsType(Value: TbsEllipsType2);
procedure SetBorderStyle(Value: TbsSkinBorderStyle);
procedure DrawLabelText(Cnvs: TCanvas; R: TRect);
function CalcWidthOffset: Integer; virtual;
procedure AdjustBounds;
procedure PaintLabel(B: TBitMap);
procedure SetAutoSizeX(Value: Boolean);
procedure SetAlignment(Value: TAlignment);
procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED;
procedure CalcSize(var W, H: Integer); override;
procedure GetSkinData; override;
procedure CreateControlDefaultImage(B: TBitMap); override;
procedure CreateControlSkinImage(B: TBitMap); override;
procedure SetControlRegion; override;
procedure WMEraseBkgnd(var Msg: TWMEraseBkgnd); message WM_ERASEBKGND;
public
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
FontColor: TColor;
constructor Create(AOwner: TComponent); override;
published
property EllipsType: TbsEllipsType2 read FEllipsType write SetEllipsType;
property UseSkinSize: Boolean read FUseSkinSize write FUseSkinSize;
property UseSkinFontColor: Boolean
read FUseSkinFontColor write FUseSkinFontColor;
property BorderStyle: TbsSkinBorderStyle
read FBorderStyle write SetBorderStyle;
property Alignment: TAlignment read FAlignment write SetAlignment
default taLeftJustify;
property Align;
property Caption;
property DragCursor;
property BiDiMode;
property DragKind;
property DragMode;
property Enabled;
property PopupMenu;
property ShowHint;
property Visible;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -