亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sstyleutil.pas

?? AlphaControls是一個Delphi標準控件的集合
?? PAS
?? 第 1 頁 / 共 3 頁
字號:
unit sStyleUtil;
{$I sDefs.inc}

interface

uses
  windows, Graphics, Classes, Controls,
  sUtils, SysUtils, StdCtrls, sStyleSimply,
  {$IFNDEF ALITE}
    sControlsManager,
  {$ENDIF}
  sStyleActive, sGradient, 
  Dialogs, Forms, Messages, sConst, extctrls, IniFiles;

type
  TsPaintStyle = class;
  TsPassiveBGStyle = class;

  TsPainting = class(TPersistent)
  private
    FParentColor : boolean;
    procedure SetColors (Index: Integer; Value: TColor);
    procedure SetParentColor (Value: Boolean);
    procedure SetTransparency(const Value: integer);
    procedure SetBevel(const Value: TsControlBevel);
    procedure SetBevelWidth(const Value: integer);
  public
    FColor : TColor;
    FBevelWidth : integer;
    FBevel : TsControlBevel;
    FOwner : TsGenStyle;
    FTransparency: integer;
    constructor Create(AOwner : TsPaintStyle);
    property BevelWidth : integer read FBevelWidth write SetBevelWidth;
  published
    property Bevel : TsControlBevel read FBevel write SetBevel default cbRaisedSoft;
    property Transparency: integer read FTransparency write SetTransparency default 0;
    property Color: TColor index 3 read FColor write SetColors default $00CAC2B7;
    property ParentColor: Boolean read FParentColor write SetParentColor default True;
  end;

  TsPaintStyle = class(TsGenStyle)
  private
    FGroupIndex: integer;
  protected
    FPainting : TsPainting;
  public
    FBorderWidth : integer;

{$IFNDEF ALITE}
    sC : TsControlsManager;
    procedure AssignByManager(sC : TComponent);
{$ENDIF}
    constructor Create(AOwner : TControl); override;
    destructor Destroy; override;
    procedure WndProc(var Message: TMessage); override;
    procedure sStyleMessage(var Message: TMessage); //override;
    procedure PaintBevel(Bmp: TBitmap; aRect: TRect; BevelWidth: integer; Bevel: TsControlBevel; Soft : boolean);
    procedure PaintShadow(aCanvas: TCanvas; X, Y : integer); override;
  published
    property Painting: TsPainting read FPainting write FPainting;
    property GroupIndex: integer read FGroupIndex write FGroupIndex;
  end;

  TsPassiveBGStyle=class(TsPaintStyle)
  private
  protected
    FBackground : TsBackground;
    FRegion : hrgn;
    function MouseAllow : boolean;
  public
{$IFNDEF ALITE}
    procedure AssignByManager(sC : TComponent);
{$ENDIF}
    constructor Create(AOwner : TControl); override;
    destructor Destroy; override;
    function ActiveColor : TColor; virtual;

    function ActualBevel : TsControlBevel; virtual;
    function ActualBevelWidth : integer; virtual;
    function ActualGradPercent : integer; virtual;
    function ActualGradArray : TsGradArray; virtual;
    function ActualImagePercent : integer; virtual;
    function ActualImage : TGraphic; virtual;

    procedure PaintBG(BGBmp : TBitmap); dynamic;
    procedure sStyleMessage(var Message: TMessage);
    procedure WndProc(var Message: TMessage); override;
  published
    property Background: TsBackground read FBackground write FBackground;
  end;

  TsActiveBGStyle = class(TsPassiveBGStyle)
  private
    FHotStyle: TsHotStyle;
    FBtnEffects: TsActiveEffects;
  protected
  public
    constructor Create(AOwner : TControl); override;
    procedure CreateRgn; override;
    destructor Destroy; override;
    procedure WndProc(var Message: TMessage); override;
    procedure PaintBG(BGBmp : TBitmap); override;
    procedure PaintActiveBG;
    procedure sStyleMessage(var Message: TMessage);
    function ActiveColor : TColor; override;

    function ActualBevel : TsControlBevel; override;
    function ActualBevelWidth : integer; override;
    function ActualGradPercent : integer; override;
    function ActualGradArray : TsGradArray; override;
    function ActualImagePercent : integer; override;
    function ActualImage : TGraphic; override;
    function ActualFadingEnabled : boolean;
    function ActualFadingIn : integer;
    function ActualFadingOut : integer;
    function ActualFadingIter : integer;
    function ActualHotfontcolor : TColor;

    procedure PaintBorder(DC : hWnd; aRect : TsRect);
  published
    property HotStyle : TsHotStyle read FHotStyle write FHotStyle;
    property BtnEffects : TsActiveEffects read FBtnEffects write FBtnEffects;
  end;

implementation

uses
  {$IFNDEF ALITE}
    sRadioButton, sPageControl, sStoreUtils, sShowMessages, sBevel,
    sHintManager, sGroupBox, sStatusBar, sCustomMenuManager,
    sToolEdit, sCustomLabel,
  {$ENDIF}
  sCheckBox, sPanel, sCheckedControl, sGraphUtils, sVclUtils, sMessages,
  comctrls, sButtonControl, sCustomButton, sMaskData, sSkinProps, math, sAlphaGraph;

{ TsPaintStyle }

constructor TsPaintStyle.Create(AOwner : TControl);
begin
  inherited Create(AOwner);

  Painting := TsPainting.Create(Self);

  FBorderWidth := 2;
{$IFNDEF ALITE}
  if (sC = nil) and (csDesigning in FOwner.ComponentState) then sC := GetsControlsManager(GetOwnerForm(AOwner), GroupIndex);
  if not Assigned(sC) then begin
    FGroupIndex := 0;
  end
  else begin
    AssignByManager(sC);
  end;
{$ENDIF}
end;

destructor TsPaintStyle.Destroy;
begin
  FreeAndNil(FPainting);
  {$IFNDEF ALITE}
  sC := nil;
  {$ENDIF}
  inherited Destroy;
end;

procedure TsPaintStyle.WndProc(var Message: TMessage);
begin
  case Message.Msg of
    SM_OFFSET..SM_SHARED, EM_CHANGEALL + 1..SM_LAST : begin
//        alert;
      if Message.Msg = SM_GETSTYLEINFO then begin
        TSMGetStyleInfo(Message).WParam := tos_SPAINTSTYLE;
        TSMGetStyleInfo(Message).LParam := Longint(Self);
      end
      else sStyleMessage(Message);
    end;
    CM_SYSCOLORCHANGE, CM_PARENTCOLORCHANGED: begin
      if Painting.ParentColor and Assigned(FOwner.Parent) then begin
        Painting.FColor := TsHackedControl(FOwner.Parent).Color;
        Invalidate;
      end;
    end
  end;
  inherited;
end;

procedure TsPaintStyle.sStyleMessage(var Message: TMessage);
{$IFNDEF ALITE}
var
  sSC : TsControlsManager;
{$ENDIF}  
begin
  if Assigned(Self) and (Message.WParam = GroupIndex) then begin
    case Message.Msg of
      CM_SETCOLOR:  begin
        Painting.Color := TSMSetColor(Message).Value;
      end;

    {$IFNDEF ALITE}
      CM_CHANGEALL : begin
        sSC := TCMChangeAll(Message).sStyleControl;
        if not (COC in sNoShadow)
           and FOwner.Visible
           and not Effects.Shadow.DontUse then begin
          Effects.Shadow.FEnabled := sSC.Shadow.Enabled;
        end
        else begin
          Effects.Shadow.FEnabled := False;
        end;
      end;
    {$ENDIF}
    end;
  end;
end;

procedure TsPaintStyle.PaintShadow(aCanvas: TCanvas; X, Y : integer);
var
  aRect: TRect;
  ss: TsShadowingShape;
  tr: integer;
begin
  ss := ssRectangle;
  if SkinIndex > -1 then begin
    if gd[SkinIndex].ShadowEnabled then begin
      {$IFNDEF ALITE}
      case COC of
        COC_TsPageControl : begin
          aRect.Top := FOwner.Top + gd[SkinIndex].ShadowOffset + TsPageControl(FOwner).TabHeight;
          aRect.Bottom := aRect.Top + FOwner.Height - TsPageControl(FOwner).TabHeight;
          aRect.Left := FOwner.Left + gd[SkinIndex].ShadowOffset;
          aRect.Right := aRect.Left + FOwner.Width;
        end
        else
      {$ENDIF}
        begin
          if (gd[SkinIndex].PaintingTransparency > 100) {and (ActualBevel = cbNone)} then exit;

          aRect.Top := FOwner.Top + gd[SkinIndex].ShadowOffset;
          aRect.Bottom := aRect.Top + FOwner.Height;
          aRect.Left := FOwner.Left + gd[SkinIndex].ShadowOffset;
          aRect.Right := aRect.Left + FOwner.Width;
        end;
      {$IFNDEF ALITE}
      end;
      {$ENDIF}
      if FOwner.Parent is TsTabSheet then begin
        if aRect.Right > FOwner.Parent.Width + FOwner.Parent.Left - X then
            aRect.Right := FOwner.Parent.Width + FOwner.Parent.Left - X;
        if aRect.Bottom > FOwner.Parent.Height + FOwner.Parent.Top - Y then
            aRect.Bottom := FOwner.Parent.Height + FOwner.Parent.Top - Y;
        if aRect.Bottom < aRect.Top then Exit;
        if aRect.Right < aRect.Left then Exit;
      end;

      tr := gd[SkinIndex].PaintingTransparency * integer((COC in sHaveBG) and (gd[SkinIndex].PaintingTransparency > 0));
      tr := SumTrans(tr, gd[SkinIndex].ShadowTransparency);

      OffsetRect(aRect, X, Y);
      FadeRect(aCanvas, aRect, aCanvas.Handle,
           Point(aRect.Left, aRect.Top),
           tr,
           ColorToRGB(gd[SkinIndex].ShadowColor),
           gd[SkinIndex].ShadowBlur, ss, 6 * integer(SoftControl));
    end;
  end
  else begin
    {$IFNDEF ALITE}
    case COC of
      COC_TsPageControl : begin
        aRect.Top := FOwner.Top + Effects.Shadow.Offset + TsPageControl(FOwner).TabHeight;
        aRect.Bottom := aRect.Top + FOwner.Height - TsPageControl(FOwner).TabHeight;
        aRect.Left := FOwner.Left + Effects.Shadow.Offset;
        aRect.Right := aRect.Left + FOwner.Width;
      end
      else
    {$ENDIF}
      begin
        if (Painting.Transparency > 100) {and (ActualBevel = cbNone)} then exit;

        aRect.Top := FOwner.Top + Effects.Shadow.Offset;
        aRect.Bottom := aRect.Top + FOwner.Height;
        aRect.Left := FOwner.Left + Effects.Shadow.Offset;
        aRect.Right := aRect.Left + FOwner.Width;
      end;
    {$IFNDEF ALITE}
    end;
    {$ENDIF}

    tr := Painting.Transparency * integer((COC in sHaveBG) and (Painting.Transparency > 0));
    tr := SumTrans(tr, Effects.Shadow.Transparency);

    OffsetRect(aRect, X, Y);
    FadeRect(aCanvas, aRect, aCanvas.Handle,
         Point(aRect.Left, aRect.Top),
         tr,
         ColorToRGB(Effects.Shadow.Color),
         Effects.Shadow.Blur, ss, 6 * integer(SoftControl));
  end;
end;

procedure TsPaintStyle.PaintBevel(Bmp: TBitmap; aRect: TRect; BevelWidth: integer; Bevel: TsControlBevel; Soft: boolean);
begin
  sGraphUtils.PaintBevel(Bmp, aRect, BevelWidth, Bevel, Soft);
end;

{$IFNDEF ALITE}
procedure TsPaintStyle.AssignByManager(sC: TComponent);
begin
  inherited;
  Painting.ParentColor := False;

  Effects.Shadow.FEnabled := not Effects.Shadow.FDontUse and TsControlsManager(sC).Shadow.Enabled;
  Effects.Shadow.FColor := TsControlsManager(sC).Shadow.Color;
  Effects.Shadow.FBlur := TsControlsManager(sC).Shadow.Blur;
  Effects.Shadow.FOffset := TsControlsManager(sC).Shadow.Offset;
  Effects.Shadow.Transparency := TsControlsManager(sC).Shadow.Transparency;
end;
{$ENDIF}

{ TsPainting }

constructor TsPainting.Create(AOwner: TsPaintStyle);
begin
  FColor := $00CAC2B7;
  FParentColor := True;
  FTransparency := 0;
  FOwner := AOwner;
  FBevel := cbRaisedSoft;
end;

procedure TsPainting.SetBevel(const Value: TsControlBevel);
begin
  if FBevel <> Value then begin
    FBevel := Value;
    if (FOwner.FOwner is TsCustomPanel) and (TsCustomPanel(FOwner.FOwner).BevelOuter <> Value) then
      TsCustomPanel(FOwner.FOwner).BevelOuter := Value;
    FOwner.Invalidate;
  end;
end;

procedure TsPainting.SetBevelWidth(const Value: integer);
begin
  if FBevelWidth <> Value then begin
    FBevelWidth := Value;
    FOwner.Invalidate;
  end;
end;

procedure TsPainting.SetColors(Index: Integer; Value: TColor);
begin
  case Index of
    3: begin
      if FColor <> Value then begin
        FColor := Value;
        FParentColor := False;
        TsHackedControl(FOwner.FOwner).Color := Value;
        FOwner.Invalidate;
      end;
    end;
  end;
end;

procedure TsPainting.SetParentColor(Value: Boolean);
begin
  if Value <> FParentColor then begin
    FParentColor := Value;
    TsHackedControl(FOwner.FOwner).ParentColor := Value;
    if FParentColor then begin
      if Assigned(FOwner.FOwner.Parent) and (FColor <> TsHackedControl(FOwner.FOwner.Parent).Color) then begin
        FColor := TsHackedControl(FOwner.FOwner.Parent).Color;
        FOwner.Invalidate;
      end;
    end;
  end;
end;

procedure TsPainting.SetTransparency(const Value: integer);
begin
  if FTransparency <> Value then begin
    FTransparency := Value;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91福利区一区二区三区| 色综合天天狠狠| 国产精品视频麻豆| 色妞www精品视频| 美国一区二区三区在线播放| 国产精品国产精品国产专区不蜜| 欧美日韩高清在线| 国产激情视频一区二区在线观看| 伊人开心综合网| 精品久久久久久无| 91美女片黄在线| 国产一区高清在线| 亚洲第一福利一区| 26uuu精品一区二区三区四区在线| 91片在线免费观看| 韩国欧美国产1区| 亚洲电影第三页| 中文字幕中文字幕在线一区| 精品欧美一区二区久久| 欧美色图天堂网| 国产91精品入口| 久久精品国产久精国产| 国产精品美女久久久久aⅴ| 91精品国产91久久综合桃花| 色综合久久综合网97色综合| 国产精品一区二区视频| 偷拍一区二区三区四区| 亚洲美女淫视频| 日本一区二区动态图| 日韩欧美国产精品一区| 欧美午夜精品电影| 91丨porny丨首页| 日本道免费精品一区二区三区| 国产精品亚洲视频| 精品在线免费视频| 日韩极品在线观看| 亚洲一区二区中文在线| 日韩美女视频19| 国产精品久久毛片a| 国产日韩欧美精品在线| 精品欧美一区二区久久| 日韩一二在线观看| 91精品久久久久久久91蜜桃| 欧美色欧美亚洲另类二区| 色哟哟欧美精品| 色视频一区二区| 91免费版在线看| 91在线观看一区二区| 99re这里都是精品| 91视频91自| 91蜜桃传媒精品久久久一区二区| 不卡一二三区首页| 成人黄页毛片网站| k8久久久一区二区三区| 成人黄色小视频| 国产99精品视频| 成人免费视频视频在线观看免费| 国产综合色产在线精品| 国产麻豆成人传媒免费观看| 国产一区二区不卡老阿姨| 国产成人亚洲综合a∨猫咪| 国产成人综合网| 国产成人精品一区二| www.欧美精品一二区| 99久久精品国产一区二区三区| 99久久99久久精品免费看蜜桃| 一本久久a久久免费精品不卡| 色94色欧美sute亚洲线路二| 欧洲精品中文字幕| 欧美日韩高清在线播放| 日韩免费观看高清完整版| 亚洲精品在线一区二区| 国产精品入口麻豆九色| 一区二区三区中文免费| 五月天亚洲婷婷| 狠狠狠色丁香婷婷综合久久五月| 国产精品一区二区在线播放 | 国产精品无人区| 亚洲激情一二三区| 午夜精品一区二区三区免费视频| 日韩福利电影在线| 国产精品一区二区久久不卡| 99在线精品视频| 欧美日韩1区2区| 久久久精品黄色| 一区二区高清免费观看影视大全| 日韩精品免费专区| 欧美精品久久天天躁| 精品国产精品网麻豆系列| 国产精品美女视频| 日本不卡一二三区黄网| 成人sese在线| 欧美一区二区大片| 国产精品视频一二三区| 性做久久久久久免费观看| 国产精品一区2区| 在线观看日产精品| 久久综合九色综合欧美98| 成人欧美一区二区三区在线播放| 日韩国产高清在线| 成人免费黄色在线| 9191成人精品久久| 中文字幕一区日韩精品欧美| 奇米影视在线99精品| 91在线你懂得| 久久久亚洲精品石原莉奈| 一区二区三区免费| 粉嫩av一区二区三区| 欧美日韩大陆一区二区| 国产精品水嫩水嫩| 精品综合久久久久久8888| 色综合久久中文字幕| 精品国产乱码久久| 天天亚洲美女在线视频| av电影天堂一区二区在线观看| 欧美一区二区三区男人的天堂| 亚洲欧美在线视频观看| 国产真实乱对白精彩久久| 欧美精品18+| 亚洲欧美日韩一区| 夫妻av一区二区| ww久久中文字幕| 日本午夜一本久久久综合| 在线观看一区二区视频| 国产精品电影一区二区| 粉嫩绯色av一区二区在线观看| 日韩精品一区二区三区在线| 午夜电影久久久| 在线看国产一区| 亚洲精品久久久蜜桃| www.99精品| 亚洲国产精品t66y| 国产在线精品视频| 欧美tickling挠脚心丨vk| 青娱乐精品在线视频| 欧美肥胖老妇做爰| 午夜在线电影亚洲一区| 一本一道波多野结衣一区二区| 欧美国产日韩精品免费观看| 国产精品影视天天线| 久久女同精品一区二区| 国产一区二区三区四区五区美女| 欧美一级理论性理论a| 天堂久久久久va久久久久| 欧美日韩在线免费视频| 亚洲福中文字幕伊人影院| 91福利区一区二区三区| 亚洲综合成人网| 91黄视频在线| 亚洲国产精品欧美一二99| 欧美视频在线播放| 亚洲一区二区在线免费看| 欧美性极品少妇| 亚洲线精品一区二区三区| 欧美性色欧美a在线播放| 亚洲国产一区二区三区| 欧美日韩久久一区二区| 日韩国产精品大片| 欧美电影免费观看高清完整版| 日本va欧美va精品发布| 日韩免费高清视频| 国内精品久久久久影院一蜜桃| 亚洲精品一区二区三区精华液| 国内外成人在线| 国产欧美1区2区3区| 99视频一区二区三区| 一区二区三区免费观看| 3d成人h动漫网站入口| 狠狠色综合播放一区二区| 中文字幕精品一区| 在线看国产一区二区| 日韩不卡手机在线v区| 精品日韩一区二区三区| 成人不卡免费av| 亚洲一区在线观看免费观看电影高清| 在线免费精品视频| 精品一区二区三区蜜桃| 国产清纯美女被跳蛋高潮一区二区久久w| 丰满白嫩尤物一区二区| 亚洲精品一二三| 69堂成人精品免费视频| 国产麻豆精品在线| 亚洲欧美日韩一区二区| 欧美一区二区视频免费观看| 国产一区日韩二区欧美三区| 国产精品天天摸av网| 欧美三级在线看| 国产精品一线二线三线精华| 亚洲欧美韩国综合色| 日韩欧美一区二区在线视频| 成人三级在线视频| 视频一区国产视频| 欧美国产日产图区| 69久久99精品久久久久婷婷| 成人午夜碰碰视频| 婷婷中文字幕一区三区| 国产精品三级在线观看| 欧美裸体bbwbbwbbw| 白白色亚洲国产精品| 日本欧洲一区二区|