亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美亚洲国产一区二区三区| 国产精品你懂的| 欧美精品久久99久久在免费线| 97国产精品videossex| 成人午夜免费视频| 成人性生交大片免费看在线播放| 国产成人免费视频精品含羞草妖精| 国产黄色精品网站| 成人综合婷婷国产精品久久蜜臀| 成人丝袜高跟foot| 99精品热视频| 91成人免费在线| 在线成人av影院| 日韩午夜av电影| 精品区一区二区| 国产婷婷一区二区| 国产欧美综合在线观看第十页 | 精品国产乱码久久久久久久| 欧美一区二区三区在线| 日韩欧美高清在线| 久久久www成人免费毛片麻豆 | 久久av资源网| 国产毛片精品视频| 成人网页在线观看| 欧美亚洲高清一区| 欧美不卡123| 欧美激情一区二区三区蜜桃视频| 国产精品久久99| 亚洲成人av一区二区三区| 免费成人在线视频观看| 国产激情一区二区三区四区| 91免费版在线看| 欧美日韩高清一区二区不卡| 26uuuu精品一区二区| 国产精品美日韩| 亚洲成va人在线观看| 黄色小说综合网站| 色婷婷国产精品综合在线观看| 制服丝袜中文字幕一区| 久久精品人人爽人人爽| 亚洲精品国产精品乱码不99| 久久99久久久欧美国产| 不卡的电视剧免费网站有什么| 欧美女孩性生活视频| 久久精品人人爽人人爽| 亚洲高清久久久| 高清免费成人av| 在线不卡欧美精品一区二区三区| 久久久蜜桃精品| 亚洲一区二区欧美激情| 国产精品自产自拍| 欧美日韩高清一区二区三区| 国产偷国产偷精品高清尤物 | 国产69精品久久99不卡| 欧洲一区二区三区在线| 久久久久国产免费免费| 偷拍日韩校园综合在线| 成人免费高清视频在线观看| 欧美伦理视频网站| 国产精品久久久久久户外露出| 免费观看一级特黄欧美大片| 色综合天天性综合| 国产亚洲欧洲997久久综合| 偷拍一区二区三区| 色天使色偷偷av一区二区| 国产婷婷一区二区| 久久精品99久久久| 欧美久久一二区| 亚洲欧美视频在线观看| 国产mv日韩mv欧美| 精品久久久久久久人人人人传媒 | 亚洲乱码日产精品bd| 狠狠色狠狠色综合系列| 欧美久久久久免费| 亚洲蜜臀av乱码久久精品 | 欧美久久久久免费| 亚洲精品久久久蜜桃| zzijzzij亚洲日本少妇熟睡| 精品卡一卡二卡三卡四在线| 视频精品一区二区| 欧美性做爰猛烈叫床潮| 1000部国产精品成人观看| 国产精品亚洲第一区在线暖暖韩国| 日韩一卡二卡三卡| 亚洲成av人片在线| 欧美午夜宅男影院| 一区二区三区四区五区视频在线观看| 粉嫩av亚洲一区二区图片| 26uuu色噜噜精品一区二区| 午夜精品免费在线| 欧美色网一区二区| 亚洲精品视频在线看| 99麻豆久久久国产精品免费| 亚洲国产精品二十页| 国产精品99久久久| 国产日韩欧美一区二区三区综合| 久久精品国产精品青草| 日韩精品在线一区| 国模无码大尺度一区二区三区| 欧美v亚洲v综合ⅴ国产v| 久久99久久99小草精品免视看| 日韩欧美一级片| 精彩视频一区二区三区| www亚洲一区| 国产在线不卡一区| 欧美激情中文字幕一区二区| 成人在线一区二区三区| 国产精品第13页| 日本高清成人免费播放| 亚洲国产裸拍裸体视频在线观看乱了| 91国偷自产一区二区开放时间 | 亚洲视频一区二区在线| 日本伦理一区二区| 亚洲成人av一区二区| 欧美精品xxxxbbbb| 蜜桃久久久久久| 久久久午夜精品理论片中文字幕| 国产成人av资源| 亚洲欧美日本在线| 欧美午夜不卡在线观看免费| 亚洲va欧美va人人爽午夜| 日韩美女天天操| 国产高清在线观看免费不卡| 亚洲欧洲99久久| 欧亚洲嫩模精品一区三区| 丝袜国产日韩另类美女| 精品理论电影在线| 9人人澡人人爽人人精品| 亚洲精选一二三| 欧美一区欧美二区| 国产在线不卡一区| 亚洲日本丝袜连裤袜办公室| 欧美日韩一区国产| 激情久久五月天| 亚洲日本丝袜连裤袜办公室| 欧美精品18+| 国产一区二区三区四区在线观看 | www.亚洲激情.com| 亚洲成人资源网| 久久久精品免费观看| 色视频成人在线观看免| 久久精品免费观看| 日韩美女久久久| 日韩欧美你懂的| av在线播放不卡| 日韩国产精品91| 国产精品美女久久久久aⅴ | 欧美国产精品中文字幕| 91久久奴性调教| 黄色日韩三级电影| 一区二区三区不卡视频在线观看| 制服.丝袜.亚洲.另类.中文| 国产精品88888| 午夜国产精品影院在线观看| 久久精品亚洲麻豆av一区二区| 欧美午夜片在线观看| 国产剧情一区在线| 亚洲地区一二三色| 国产精品短视频| 精品入口麻豆88视频| 欧美性猛交xxxx黑人交| 国产一区二区三区高清播放| 亚洲一区二区三区影院| 国产午夜精品久久| 欧美一区二区网站| 欧美在线观看禁18| 国产黑丝在线一区二区三区| 婷婷丁香久久五月婷婷| 中文字幕一区二区三中文字幕| 日韩三级视频在线观看| 色婷婷av一区| 成人高清视频免费观看| 久久精品国产久精国产| 亚洲国产日韩一区二区| 国产精品久久久久影院| 久久久午夜电影| 精品日韩成人av| 91精品国产综合久久福利软件| 91麻豆蜜桃一区二区三区| 国产精品一区在线观看乱码| 日本vs亚洲vs韩国一区三区二区| 一区二区三区四区在线免费观看| 国产日产精品1区| 精品国产区一区| 欧美电影一区二区| 欧洲精品一区二区| 91麻豆视频网站| www.av精品| 岛国精品在线播放| 狠狠色丁香久久婷婷综合_中| 天天色天天爱天天射综合| 亚洲欧美激情小说另类| 国产精品日韩成人| 日本一区二区成人| 久久久国产精华| 国产午夜一区二区三区| 欧美精品一区二区不卡 | 一区二区三区欧美日韩| 一色屋精品亚洲香蕉网站| 中文在线免费一区三区高中清不卡|