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

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

?? sstylepassive.pas

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

interface

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

type
  TsPassivePaintStyle = class;

  TsPassivePainting = class(TPersistent)
  private
    FBevel : TsControlBevel;
    FColor : TColor;
    FColorBorderTop : TColor;
    FColorBorderBottom : TColor;
    FTransparency: integer;
    FOwner : TsPassivePaintStyle;
    procedure SetColors (Index: Integer; Value: Graphics.TColor);
    procedure SetTransparency(const Value: integer);
    procedure SetBevel(const Value: TsControlBevel);
  public
    constructor Create(AOwner : TPersistent);
  published
    property Bevel : TsControlBevel read FBevel write SetBevel default cbRaisedSoft;
    property Transparency: integer read FTransparency write SetTransparency default 50;
    property ColorBorderTop: Graphics.TColor index 0 read FColorBorderTop write SetColors default clWhite;
    property ColorBorderBottom: Graphics.TColor index 1 read FColorBorderBottom write SetColors default clBlack;
    property Color: Graphics.TColor index 3 read FColor write SetColors default clMenu;
  end;

  TsPassiveShadow = class(TPersistent)
  private
    FEnabled : boolean;
    FOffset : integer;
    FColor : TColor;
    FOwner : TsPassivePaintStyle;
    FTransparency : TPercent;
    FBlur : integer;

    procedure SetColor(const Value: TColor);
    procedure SetEnabled(const Value: boolean);
    procedure SetOffset(const Value: integer);
    procedure SetTransparency(const Value: TPercent);
    procedure SetBlur(const Value: integer);
  public
    constructor Create(AOwner : TPersistent);
  published
    property Transparency: TPercent read FTransparency write SetTransparency default 50;
    property Enabled : boolean read FEnabled write SetEnabled default True;
    property Color : TColor read FColor write SetColor default clBlack;
    property Offset : integer read FOffset write SetOffset default 10;
    property Blur : integer read FBlur write SetBlur default 6;
  end;

  TsPassivePaintStyle = class(TPersistent)
  private
    FSkinSection: string;
    procedure SetSkinSection(const Value: string);
  protected
    FGroupIndex : integer;
  public
    BorderIndex : integer;
    SkinIndex : integer;
    FOwner : TPersistent;
    FShadow : TsPassiveShadow;
    FPainting : TsPassivePainting;
    FBackground : TsBackground;
    FDrawingStop : boolean;
    FCacheBmp : Graphics.TBitmap;
    COC : integer;
    sC : TPersistent;
    function ActualGradPercent : integer;
    constructor Create(AOwner : TPersistent); dynamic;
    destructor Destroy; override;
    procedure OwnerInvalidate;
    function GetMaskIndex(mask : string) : integer; overload;
    function GetMaskIndex(skinsection, mask : string) : integer; overload;
    function GetSkinIndex : integer; overload;
    function GetSkinIndex(SkinSection : string) : integer; overload;
    procedure WndProc(var Message: TMessage); dynamic;
    procedure PaintBG(BGBmp : TBitmap; R : TRect); dynamic;
    procedure Update;
  published
    property Background : TsBackground read FBackground write FBackground;
    property Shadow: TsPassiveShadow read FShadow write FShadow;
    property Painting: TsPassivePainting read FPainting write FPainting;
    property GroupIndex: integer read FGroupIndex write FGroupIndex default 0;
    property SkinSection : string read FSkinSection write SetSkinSection;
  end;

  TsHotPaintStyle = class(TsPassivePaintStyle)
  private
    FHotStyle: TsHotStyle;
  protected
  public
    constructor Create(AOwner : TPersistent); override;
    destructor Destroy; override;
    procedure WndProc(var Message: TMessage); override;
    procedure PaintActiveBG(BGBmp : TBitmap; R : TRect; ci : TCacheInfo);
    procedure sStyleMessage(var Message: TMessage);
//    procedure PaintBorder(DC : longint; aRect : TsRect);
  published
    property HotStyle : TsHotStyle read FHotStyle write FHotStyle;
  end;

implementation

uses sMessages, sGraphUtils, sGradient,
{$IFNDEF ALITE}
  sHintManager,
{$ENDIF}
  sMaskData, sSkinProps,
  sSkinProvider, sSkinMenus, sAlphaGraph;

{ TsPassivePaintStyle }

function TsPassivePaintStyle.ActualGradPercent: integer;
begin
  Result := Background.Gradient.Percent;
end;

constructor TsPassivePaintStyle.Create(AOwner: TPersistent);
begin
  inherited Create;
  SkinIndex := -1;
  BorderIndex := -1;
  FOwner := AOwner;
  FCacheBmp := Graphics.TBitmap.Create;
  FCacheBmp.PixelFormat := pf24bit;

  FShadow := TsPassiveShadow.Create(Self);
  FPainting := TsPassivePainting.Create(Self);
  FBackground := TsBackground.Create(Self);

{IFNDEF ALITE
  sC := GetsControlsManager(GetParentForm(TControl(AOwner)), GroupIndex);
  if not Assigned(sC) then begin}
  FGroupIndex := 0;
{//  end;
$ELSE
  FGroupIndex := 0;
$ENDIF}
{$IFDEF RUNIDEONLY}
  if not IsIDERunning and not (csDesigning in TComponent(FOwner).ComponentState) and not sTerminated then begin
    sTerminated := True;
    ShowWarning(sIsRUNIDEONLYMessage);
  end;
{$ENDIF}
end;

destructor TsPassivePaintStyle.Destroy;
begin
  FreeAndNil(FPainting);
  FreeAndNil(FShadow);
  FreeAndNil(FBackground);
  FreeAndNil(FCacheBmp);
  inherited Destroy;
end;

function TsPassivePaintStyle.GetMaskIndex(mask: string): integer;
var
  i, l : integer;
//  s : string;
begin
  Result := -1;
  if not sSkinData.Active then Exit;
  if skinSection = '' then Exit;
  l := Length(ma);
  if l > 0 then begin
    for i := 0 to l - 1 do begin
      if (UpperCase(ma[i].PropertyName) = mask) and
         (UpperCase(ma[i].ClassName) = UpperCase(SkinSection))  then begin
        Result := i;
        Exit;
      end;
    end;

    if (SkinIndex < Length(gd)) and (SkinIndex >= 0) then begin
      for i := 0 to l - 1 do begin
        if (UpperCase(ma[i].PropertyName) = mask) and
           (UpperCase(ma[i].ClassName) = UpperCase(gd[SkinIndex].ParentClassName)) then begin
          Result := i;
          Exit;
        end;
      end
    end
    else begin
//        ShowWarning('Undefined skin section - <' + SkinSection + '>');
    end;

  end;
end;

function TsPassivePaintStyle.GetMaskIndex(skinsection, mask: string): integer;
var
  i, l : integer;
//  s : string;
begin
  Result := -1;
  if not sSkinData.Active then Exit;
  if skinSection = '' then Exit;
  l := Length(ma);
  if l > 0 then begin
    for i := 0 to l - 1 do begin
      if (UpperCase(ma[i].PropertyName) = mask) and
         (UpperCase(ma[i].ClassName) = UpperCase(SkinSection))  then begin
        Result := i;
        Exit;
      end;
    end;

    if (SkinIndex < Length(gd)) and (SkinIndex >= 0) then begin
      for i := 0 to l - 1 do begin
        if (UpperCase(ma[i].PropertyName) = mask) and
           (UpperCase(ma[i].ClassName) = UpperCase(gd[SkinIndex].ParentClassName)) then begin
          Result := i;
          Exit;
        end;
      end
    end
    else begin
//        ShowWarning('Undefined skin section - <' + SkinSection + '>');
    end;
  end;
end;

function TsPassivePaintStyle.GetSkinIndex: integer;
var
  i, l : integer;
//  s : string;
begin
  Result := -1;
  if not sSkinData.Active then Exit;
  l := Length(gd);
  if l > 0 then begin
    for i := 0 to l - 1 do begin
      if (UpperCase(gd[i].ClassName) = UpperCase(SkinSection)) then begin
        Result := i;
        Exit;
      end;
    end;
  end;
end;

function TsPassivePaintStyle.GetSkinIndex(SkinSection: string): integer;
var
  i, l : integer;
//  s : string;
begin
  Result := -1;
  if not sSkinData.Active then Exit;
  l := Length(gd);
  if l > 0 then begin
    for i := 0 to l - 1 do begin
      if (UpperCase(gd[i].ClassName) = UpperCase(SkinSection)) then begin
        Result := i;
        Exit;
      end;
    end;
  end;
end;

procedure TsPassivePaintStyle.OwnerInvalidate;
begin
{$IFNDEF ALITE}
  Case COC of
{$IFDEF TSHINTS}
    COC_TsHintManager : begin
      TsHintManager(FOwner).Invalidate;
    end;
{$ENDIF}
    COC_TsMDIForm : begin
//      TsMDIManager(FOwner).Invalidate;
    end;
{$IFDEF TSMENUS}
    COC_TsCustomMenuManager, COC_TsMenuManager : begin
//      TsCustomMenuManager(FOwner).Invalidate;
    end;
{$ENDIF}
  end;
{$ENDIF}
end;

procedure TsPassivePaintStyle.PaintBG(BGBmp: TBitmap; R : TRect);
var
  aRect: TRect;
  i : integer;
  wc: TWinControl;
  sc: TsGenStyle;
  bmp : TBitmap;
  TransColor : TsColor;
  iDrawed : boolean;
  procedure FillCanvas(bmp : TBitmap); begin
    BMP.Canvas.Pen.Style := psClear;
    BMP.Canvas.Brush.Style := bsSolid;
    BMP.Canvas.Brush.Color := ColorToRGB(Painting.Color);
    BMP.Canvas.Rectangle(aRect.Left, aRect.Top, aRect.Right + 1, aRect.Bottom + 1);
  end;
  procedure PaintAddons; begin
    iDrawed := False;
    // BGImage painting
    if (Background.Image.Percent > 0) then begin
      if Assigned(Background.Image.Image)
           and (Background.Image.Image.Width <> 0)
           and (Background.Image.Image.Height <> 0) then begin
        TileBitmap(BGBmp.Canvas, aRect, Background.Image.Image.Graphic);
        iDrawed := True;
      end
      else begin
        FillCanvas(BGBmp);
      end;
    end;
    // BGGradient painting
    if (Background.Gradient.Percent > 0) then begin
      if iDrawed then begin
        if Length(Background.Gradient.FGradArray) > 0 then begin
          PaintGrad(Bmp, aRect, Background.Gradient.FGradArray);
        end
        else begin
          FillCanvas(Bmp);
        end;

        TransColor.A := 0;
        TransColor.R := Background.Image.Percent * 256 div 100;
        TransColor.G := TransColor.R;
        TransColor.B := TransColor.R;

        SumBitmaps(BGBmp, Bmp, TransColor);
      end
      else begin
        if Length(Background.Gradient.FGradArray) > 0 then begin
          PaintGrad(BGBmp, aRect, Background.Gradient.FGradArray);
        end
        else begin
          FillCanvas(BGBmp);
        end;
      end;
    end;
    if Background.Gradient.Percent + Background.Image.Percent in [1..100] then begin
      BlendColorRect(BGBMP,
                                 Rect(0,
                                      0,
                                      BGBMP.Width - 1,
                                      BGBMP.Height - 1),
                         (Background.Gradient.Percent + Background.Image.Percent),
                 ColorToRGB(Painting.Color));
{      FadeRect(BGBMP.Canvas, Rect(0,
                                      0,
                                      BGBMP.Width,
                                      BGBMP.Height),
                         BGBMP.Canvas.Handle, Point(0, 0),
                         (Background.Gradient.Percent + Background.Image.Percent),
                         ColorToRGB(Painting.Color), 0, ssRectangle);
}                         
    end
    else begin
      BGBMP.Canvas.Pen.Style := psClear;
      BGBMP.Canvas.Brush.Style := bsSolid;
      BGBMP.Canvas.Brush.Color := ColorToRGB(Painting.Color);
      BGBMP.Canvas.Rectangle(R);
    end;
  end;
begin
  aRect := R;
  bmp := TBitmap.Create;
  bmp.PixelFormat := pf24bit;
  bmp.Width := BGBMP.Width;
  bmp.Height := BGBMP.Height;
  try

  PaintAddons;

  finally
    FreeAndNil(Bmp);
  end;

  if COC in sCanBeParent then begin
    wc := TWinControl(FOwner);
    for i := 0 to wc.ControlCount - 1 do begin
      sc := GetsStyle(wc.Controls[i]);
      if Assigned(sc) and (sc.COC > 0) and sc.Effects.Shadow.Enabled and wc.Controls[i].Visible then begin
        sc.PaintShadow(BGBmp.Canvas, 0, 0);
      end;
    end;
  end;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美乱熟臀69xxxxxx| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲人精品一区| 中文字幕的久久| 中文字幕一区二区三区乱码在线 | 麻豆91免费观看| 成人一区在线看| 国产精品18久久久| 国产成人免费视频一区| 国产ts人妖一区二区| 成人av在线资源网站| av在线这里只有精品| 色婷婷综合久久久久中文一区二区| 在线视频亚洲一区| 欧美一区二区福利视频| 日韩欧美成人激情| 国产精品家庭影院| 五月激情综合色| 国产一区二区三区在线看麻豆| 国产精品资源在线| 色哟哟精品一区| 正在播放亚洲一区| 国产婷婷色一区二区三区 | 91精品国产免费| 在线观看国产91| 555夜色666亚洲国产免| 日韩一级片网站| 国产欧美精品一区二区色综合| 国产精品免费久久久久| 香蕉av福利精品导航| 国内一区二区在线| 色综合天天性综合| 欧美一级夜夜爽| 亚洲图片另类小说| 精品系列免费在线观看| 色悠悠久久综合| 欧美日韩国产小视频在线观看| 久久综合九色综合欧美亚洲| 国产精品久久久久久久久动漫 | 中文字幕欧美区| 亚洲欧美福利一区二区| 五月天国产精品| www.性欧美| 欧美一区二区免费| 亚洲蜜臀av乱码久久精品| 国产精品一区免费在线观看| 在线视频一区二区免费| 中文字幕第一页久久| 蜜桃久久久久久久| 欧美网站一区二区| 国产精品网站导航| 久久草av在线| 欧美精品日韩综合在线| 亚洲视频网在线直播| 国产suv精品一区二区三区| 欧美一区二区不卡视频| 亚洲福利一区二区三区| 91在线国产观看| 国产欧美精品在线观看| 狠狠色综合色综合网络| 日韩一区二区中文字幕| 亚洲国产裸拍裸体视频在线观看乱了| 国产成人激情av| 精品成人私密视频| 久久99精品久久只有精品| 91精品国产一区二区人妖| 亚洲国产成人av| 欧美无砖砖区免费| 亚洲成人黄色小说| 欧美日韩国产小视频在线观看| 亚洲一区二区精品视频| 欧美三级中文字幕| 亚洲va天堂va国产va久| 欧美色精品天天在线观看视频| 一区二区三区四区视频精品免费| 成人免费毛片app| 中文字幕二三区不卡| 粉嫩欧美一区二区三区高清影视 | 亚洲欧洲日产国产综合网| 成人免费看黄yyy456| 国产精品色婷婷久久58| 成人禁用看黄a在线| 亚洲欧洲美洲综合色网| 在线中文字幕一区二区| 午夜国产精品一区| 日韩精品一区二区三区四区视频| 蜜桃视频在线观看一区| 国产丝袜欧美中文另类| 91在线免费播放| 成人激情av网| 色噜噜偷拍精品综合在线| 亚洲欧美在线aaa| 色综合天天综合| 午夜精品在线看| 亚洲精品一区二区三区精华液| 国产精品77777| 亚洲欧美日韩电影| 欧美欧美午夜aⅴ在线观看| 麻豆91在线观看| 亚洲婷婷国产精品电影人久久| 欧美日韩亚洲高清一区二区| 免费的国产精品| 一区精品在线播放| 欧美精品色一区二区三区| 国产盗摄女厕一区二区三区| 一区二区在线观看免费视频播放| 91超碰这里只有精品国产| 国产宾馆实践打屁股91| 亚洲国产欧美日韩另类综合| 日韩精品中午字幕| 99久久精品情趣| 狠狠色狠狠色综合系列| 亚洲免费在线播放| 91精品国产高清一区二区三区蜜臀| 国产精品影音先锋| 偷拍与自拍一区| 一区视频在线播放| 国产欧美一区视频| 欧美日韩日日骚| 成人精品电影在线观看| 奇米影视7777精品一区二区| 亚洲精品老司机| 亚洲国产精品激情在线观看| 日韩一本二本av| 欧美亚洲日本国产| 成人av在线看| 国产精品综合一区二区| 日韩精品一二三区| 亚洲视频免费在线观看| 国产欧美日韩综合精品一区二区| 欧美另类高清zo欧美| 在线观看日韩av先锋影音电影院| 国产九色精品成人porny| 爽好多水快深点欧美视频| 亚洲男人天堂av网| 国产精品久久二区二区| 久久精品视频一区| 久久久亚洲精品一区二区三区 | 亚洲最大成人综合| 亚洲欧洲在线观看av| 亚洲国产精华液网站w| 精品毛片乱码1区2区3区| 欧美丰满一区二区免费视频| 色素色在线综合| 91官网在线免费观看| 色综合色综合色综合色综合色综合| 成人免费毛片片v| 成人精品免费看| 成人综合日日夜夜| 暴力调教一区二区三区| 国产精品一区二区91| 国产高清精品久久久久| 国产乱码精品一区二区三| 国产精品自在欧美一区| 成人一级片网址| 成人免费va视频| 99re66热这里只有精品3直播 | 午夜电影网一区| 天堂成人免费av电影一区| 视频一区免费在线观看| 日韩在线观看一区二区| 奇米888四色在线精品| 久久99精品网久久| 国产91综合一区在线观看| 成人毛片在线观看| 在线看日韩精品电影| 欧美一区二区女人| 久久精品一区二区三区不卡| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 久久狠狠亚洲综合| 国产精品 日产精品 欧美精品| 国产美女主播视频一区| 成人av小说网| 色av成人天堂桃色av| 欧美一区二区三区视频在线观看| 欧美一区二区三区的| 国产欧美日本一区二区三区| 亚洲欧美区自拍先锋| 亚洲成av人片| 国产成人精品一区二区三区四区 | 欧美日本精品一区二区三区| 日韩一区二区在线观看| 日韩免费在线观看| 国产精品国产三级国产aⅴ入口 | 日韩三级.com| 亚洲国产成人午夜在线一区| 亚洲h精品动漫在线观看| 国产资源精品在线观看| 在线影视一区二区三区| 久久久国际精品| 亚洲成年人影院| 成人一区二区在线观看| 777奇米成人网| 亚洲欧美激情在线| 国产精品一区专区| 在线国产亚洲欧美| 国产午夜精品久久| 免费成人av在线| 在线观看91精品国产入口| 国产免费观看久久|