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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lbspeedbutton.pas.~1~

?? 一個delphi的第三方控件 XP按鈕一個delphi的第三方控件 XP按鈕一個delphi的第三方控件 XP按鈕
?? ~1~
字號:
unit LbSpeedButton;

interface

uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, LbButtons;

type
   TLbSpeedButtonLayout = (blGlyphLeft, blGlyphRight, blGlyphTop, blGlyphBottom);
   TLbSpeedButtonStyle = (bsNormal, bsEncarta, bsModern);

   TLbSpeedButton = class(TGraphicControl)
   private
      FAlignment: TAlignment;
      FAllowAllUp: boolean;
      FCaption: TCaption;
      FColorWhenDown: TColor;
      FDown: boolean;
      FFlat: boolean;
      FGlyph: TBitmap;
      FGroupIndex: integer;
      FHotTrackColor: TColor;
      FLayout: TLbSpeedButtonLayout;
      FLightColor: TColor;
      FNumGlyphs: integer;
      FShadowColor: TColor;
      FStyle: TLbSpeedButtonStyle;
      FTransparent: boolean;
      FOnMouseEnter: TNotifyEvent;
      FOnMouseExit: TNotifyEvent;
      FDummyStyle: TLbColorStyle;

      bCursorOnButton: boolean;
   public
      constructor Create(aOwner: TComponent); override;
      destructor Destroy; override;
      procedure Click; override;
   protected
      procedure Paint; override;

      procedure SetAlignment(fNew: TAlignment);
      procedure SetFlat(fNew: boolean);
      procedure SetColorWhenDown(fNew: TColor);
      procedure SetColorStyle(fNew: TLbColorStyle);
      procedure SetDown(fNew: boolean);
      procedure SetCaption(const fNew: TCaption);
      procedure SetGlyph(fNew: TBitmap);
      procedure SetGroupIndex(fNew: integer);
      procedure SetLayout(fNew: TLbSpeedButtonLayout);
      procedure SetLightColor(fNew: TColor);
      procedure SetNumGlyphs(fNew: integer);
      procedure SetShadowColor(fNew: TColor);
      procedure SetStyle(fNew: TLbSpeedButtonStyle);
      procedure SetTransparent(fNew: boolean);

      procedure DoMouseEnter(var Msg: TMessage); message CM_MOUSEENTER;
      procedure DoMouseLeave(var Msg: TMessage); message CM_MOUSELEAVE;
      procedure DoDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR;

      procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
      procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
   published
      property Align;
      property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
      property AllowAllUp: boolean read FAllowAllUp write FAllowAllUp default false;
      property Caption: TCaption read FCaption write SetCaption;
      property Color;
      property ColorWhenDown: TColor read FColorWhenDown write SetColorWhenDown default clNone;
      property ColorStyle: TLbColorStyle read FDummyStyle write SetColorStyle default lcsCustom;
      property Down: boolean read FDown write SetDown default false;
      property Enabled;
      property Flat: boolean read FFlat write SetFlat default false;
      property Font;
      property Glyph: TBitmap read FGlyph write SetGlyph;
      property GroupIndex: integer read FGroupIndex write SetGroupIndex default 0;
      property HotTrackColor: TColor read FHotTrackColor write FHotTrackColor default clNone;
      property Hint;
      property Layout: TLbSpeedButtonLayout read FLayout write SetLayout default blGlyphLeft;
      property LightColor: TColor read FLightColor write SetLightColor default clWhite;
      property NumGlyphs: integer read FNumGlyphs write SetNumGlyphs default 0;
      property ParentColor;
      property ParentFont;
      property ParentShowHint;
      property PopupMenu;
      property ShadowColor: TColor read FShadowColor write SetShadowColor default clBlack;
      property ShowHint;
      property Style: TLbSpeedButtonStyle read FStyle write SetStyle default bsNormal;
      property Transparent: boolean read FTransparent write SetTransparent default false;
      property Visible;

      property OnClick;
      property OnDblClick;
      property OnMouseDown;
      property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
      property OnMouseExit: TNotifyEvent read FOnMouseExit write FOnMouseExit;
      property OnMouseMove;
      property OnMouseUp;
   end;

procedure Register;

implementation

{##############################################################################}

procedure Register;
begin
   RegisterComponents('UserControl', [TLbSpeedButton]);
end;

{##############################################################################}

constructor TLbSpeedButton.Create(aOwner: TComponent);
begin
   inherited;

   ControlStyle := ControlStyle + [csSetCaption];
   ControlStyle := ControlStyle - [csOpaque];

   Height := 23;
   Width := 100;

   bCursorOnButton := false;
   FLightColor := clWhite;
   FShadowColor := clBlack;
   FColorWhenDown := clNone;
   FHotTrackColor := clNone;
   FAlignment := taLeftJustify;
   FDummyStyle := lcsCustom;

   FGlyph := TBitmap.Create;
end;

{##############################################################################}

destructor TLbSpeedButton.Destroy;
begin
   FGlyph.Free;
   inherited;
end;

{##############################################################################}

procedure TLbSpeedButton.SetAlignment(fNew: TAlignment);
begin
   FAlignment := fNew;
   if FTransparent then invalidate else paint;  // Could have generally used invalidate, but why make it flicker if it is not transparent?
end;

{##############################################################################}

procedure TLbSpeedButton.SetCaption(const fNew: TCaption);
begin
   FCaption := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetColorWhenDown(fNew: TColor);
begin
   FColorWhenDown := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetColorStyle(fNew: TLbColorStyle);
var
   bModern: boolean;
   FColor: TColor;

begin
   if fNew = lcsCustom then exit;
   
   GetPreDefinedColors(fNew, FColor, FLightColor, FShadowColor, FColorWhenDown, FHotTrackColor, FFlat, bModern);
   Color := FColor;
   if bModern then FStyle := bsModern else FStyle := bsNormal;
   Paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetDown(fNew: boolean);
var
   i: integer;

begin
   if FDown = fNew then exit;

   // If grouped, set all siblings to down=false
   if GroupIndex <> 0 then
      for i := 0 to Parent.ControlCount-1 do
         if Parent.Controls[i] is TLbSpeedButton then
            if TLbSpeedButton(Parent.Controls[i]).GroupIndex = GroupIndex then
               if TLbSpeedButton(Parent.Controls[i]) <> self then
                  TLbSpeedButton(Parent.Controls[i]).Down := false;

   FDown := fNew;

   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetFlat(fNew: boolean);
begin
   FFlat := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetGlyph(fNew: TBitmap);
begin
   if fNew <> nil then
   begin
      FGlyph.Assign(fNew);
      if fNew.Height <> 0 then FNumGlyphs := fNew.Width div fNew.Height else FNumGlyphs := 0;
   end
   else
   begin
      FGlyph.Height := 0;
      FNumGlyphs := 0;
   end;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetGroupIndex(fNew: integer);
begin
   FGroupIndex := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetLayout(fNew: TLbSpeedButtonLayout);
begin
   FLayout := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetLightColor(fNew: TColor);
begin
   FLightColor := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetNumGlyphs(fNew: integer);
begin
   FNumGlyphs := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetShadowColor(fNew: TColor);
begin
   FShadowColor := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetStyle(fNew: TLbSpeedButtonStyle);
begin
   if GetDeviceCaps(Canvas.Handle, BITSPIXEL) <= 8 then if not (csDesigning in ComponentState) then fNew := bsNormal;
   FStyle := fNew;
   if fNew = bsModern then FAlignment := taCenter;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.SetTransparent(fNew: boolean);
begin
   FTransparent := fNew;
   if FTransparent then invalidate else paint;
end;

{##############################################################################}

procedure TLbSpeedButton.Paint;
var
   aStyle: TLbButtonStyle;
   aLayout: TLbButtonLayout;
   aBitmap: TBitmap;

begin
   if not (Visible or (csDesigning in ComponentState)) or (csLoading in ComponentState) then exit;

   aStyle := LbButtons.bsNormal;
   case FStyle of
      bsEncarta:  aStyle := LbButtons.bsEncarta;
      bsModern:   aStyle := LbButtons.bsModern;
   end;

   aLayout := LbButtons.blGlyphLeft;
   case FLayout of
      blGlyphTop:    aLayout := LbButtons.blGlyphTop;
      blGlyphRight:  aLayout := LbButtons.blGlyphRight;
      blGlyphBottom: aLayout := LbButtons.blGlyphBottom;
   end;

   if FTransparent or (FStyle = bsModern) then
   begin
      LbPaintButton(Canvas, Width, Height, FNumGlyphs, FGlyph, FDown, bCursorOnButton, FTransparent, Enabled, Flat, assigned(PopupMenu), aStyle, Color, FColorWhenDown, FHotTrackColor, FLightColor, FShadowColor, Font, aLayout, FCaption, FAlignment);
   end
   else
   begin
      // Draw on a Bitmap first, then just copy the Bitmap to the Canvas. Just to avoid flickering...
      aBitmap := TBitmap.Create;
      aBitmap.Height := Height;
      aBitmap.Width := Width;
      LbPaintButton(aBitmap.Canvas, Width, Height, FNumGlyphs, FGlyph, FDown, bCursorOnButton, false, Enabled, Flat, assigned(PopupMenu), aStyle, Color, FColorWhenDown, FHotTrackColor, FLightColor, FShadowColor, Font, aLayout, FCaption, FAlignment);
      Canvas.Draw(0, 0, aBitmap);
      aBitmap.Free;
   end;
end;

{##############################################################################}

procedure TLbSpeedButton.DoMouseEnter(var Msg: TMessage);
begin
   bCursorOnButton := true;
   if FTransparent then invalidate else paint;
   if assigned(FOnMouseEnter) then FOnMouseEnter(self);
end;

{##############################################################################}

procedure TLbSpeedButton.DoMouseLeave(var Msg: TMessage);
begin
   bCursorOnButton := false;
   if FTransparent then invalidate else paint;
   if assigned(FOnMouseExit) then FOnMouseExit(self);
end;

{##############################################################################}

procedure TLbSpeedButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
   inherited;
   if GroupIndex = 0 then Down := true
   else
   begin
      if Down then
      begin
         if FAllowAllUp then Down := false;
      end
      else
         Down := true;
   end;
end;

{##############################################################################}

procedure TLbSpeedButton.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
   inherited;
   if GroupIndex = 0 then Down := false;
end;

{##############################################################################}

procedure TLbSpeedButton.DoDialogChar(var Message: TCMDialogChar);
var
   bWasDown: boolean;

begin
   with Message do
   begin
      if IsAccel(CharCode, Caption) and Enabled and Visible and (Parent <> nil) and Parent.Showing then
      begin
         bWasDown := Down;
         Down := true;
         Paint;
         Click;
         Down := bWasDown;
         Paint;
         Result := 1;
      end
      else
         inherited;
   end;
end;

{##############################################################################}

procedure TLbSpeedButton.Click;
begin
   if assigned(PopupMenu) then PopupMenu.PopUp(ClientToScreen(Point(0, Height)).X, ClientToScreen(Point(0, Height)).Y);
   inherited;  // just to make it public :-)
end;

{##############################################################################}

end.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月天一区二区| 成人精品国产一区二区4080| 日韩和欧美一区二区| 国产福利91精品一区| 欧美性高清videossexo| 国产精品午夜春色av| 毛片av一区二区| 欧美午夜电影网| 国产亚洲精品aa| 亚洲成人黄色小说| 99re免费视频精品全部| 久久久久久夜精品精品免费| 亚洲永久精品大片| 成人性生交大片免费看在线播放| 在线成人av网站| 国产视频不卡一区| 裸体健美xxxx欧美裸体表演| 色婷婷久久一区二区三区麻豆| 欧美激情资源网| 久久97超碰色| 国产成人免费网站| 在线成人高清不卡| 偷拍日韩校园综合在线| 色8久久人人97超碰香蕉987| 国产精品久久久久久妇女6080 | 国产一区在线精品| 欧美一区三区二区| 日本欧美一区二区在线观看| 欧美三区免费完整视频在线观看| 国产精品不卡一区| 99麻豆久久久国产精品免费优播| 国产精品天美传媒| 国产98色在线|日韩| 中文字幕乱码日本亚洲一区二区| 国产在线播放一区三区四| 久久综合九色综合欧美98| 国产精品综合视频| 日本一区二区三区免费乱视频| 国产精品一区二区久久不卡| 久久久精品国产免费观看同学| 极品销魂美女一区二区三区| 国产欧美一区二区三区网站| 福利视频网站一区二区三区| 国产精品免费aⅴ片在线观看| 国产成人aaaa| 综合色中文字幕| 欧美在线一二三四区| 丝袜亚洲精品中文字幕一区| 日韩美女天天操| 国产精品一二三四区| 国产精品女同一区二区三区| 99re在线精品| 日日嗨av一区二区三区四区| 精品乱人伦小说| 成人开心网精品视频| 亚洲狠狠丁香婷婷综合久久久| 欧美午夜精品电影| 久久国产精品无码网站| 中文字幕第一区二区| 色8久久人人97超碰香蕉987| 蜜桃av一区二区在线观看| 国产日韩欧美麻豆| 91福利精品视频| 青青草成人在线观看| 国产精品久久久久久久午夜片| 91成人免费在线| 国内精品写真在线观看 | 日韩美女主播在线视频一区二区三区| 韩国视频一区二区| 亚洲色图一区二区三区| 日韩一卡二卡三卡国产欧美| 成人精品免费网站| 蜜臀久久99精品久久久久久9| 国产精品一二三| 色网站国产精品| 裸体健美xxxx欧美裸体表演| 18欧美亚洲精品| 日韩欧美专区在线| 色狠狠综合天天综合综合| 日本网站在线观看一区二区三区 | 丁香婷婷综合网| 一区二区三区四区精品在线视频| 日韩免费高清视频| 欧美在线视频全部完| 国产自产2019最新不卡| 亚洲一区二区三区四区不卡| 欧美videossexotv100| 在线免费不卡电影| 国产99久久久精品| 七七婷婷婷婷精品国产| 一区二区三区丝袜| 国产婷婷色一区二区三区| 99久久伊人久久99| 久久精工是国产品牌吗| 五月激情综合色| 一区二区三区日韩| 亚洲三级在线观看| 国产欧美一区二区三区网站| 91精品国产高清一区二区三区 | 韩国一区二区三区| 日本不卡在线视频| 日韩精品一二区| 一区二区三区电影在线播| 亚洲国产激情av| 欧美精品一区二区三区很污很色的| 欧美久久一二三四区| 精品视频在线视频| 欧美视频一区二区三区在线观看 | 国产在线精品不卡| 不卡av免费在线观看| 亚洲欧美中日韩| 欧美极品aⅴ影院| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 国产精品青草久久| 久久亚洲精华国产精华液| 精品国产凹凸成av人导航| 欧美va亚洲va| 精品日韩欧美在线| 久久久www成人免费毛片麻豆| 精品国产伦一区二区三区观看体验 | 国产精品久久久一本精品| 国产亚洲精品bt天堂精选| 国产日韩欧美一区二区三区乱码 | 91精品福利在线一区二区三区| 欧美精品日韩综合在线| 日韩欧美高清dvd碟片| 精品国产髙清在线看国产毛片| 欧美精品一区二区三区久久久| 国产亚洲女人久久久久毛片| 国产午夜精品一区二区三区四区| 国产欧美日韩综合| 亚洲视频小说图片| 亚洲国产成人精品视频| 日本不卡视频一二三区| 国产一区二区影院| 成人av电影免费观看| 色婷婷精品久久二区二区蜜臂av| 日本韩国精品一区二区在线观看| 欧美视频日韩视频| 日韩欧美一级在线播放| 国产午夜亚洲精品不卡| 亚洲精选一二三| 亚洲一区电影777| 免费不卡在线视频| 成人av电影在线| 69堂国产成人免费视频| 精品国产三级电影在线观看| 国产精品成人一区二区艾草| 亚洲二区在线观看| 国产麻豆视频一区二区| 色丁香久综合在线久综合在线观看| 国产精品免费免费| 久久一区二区三区国产精品| 亚洲欧洲日韩综合一区二区| 亚洲成在人线在线播放| 国产精品中文字幕一区二区三区| 95精品视频在线| 欧美v日韩v国产v| 一区二区三区在线免费| 精品影视av免费| 欧美在线观看18| 久久综合999| 午夜精彩视频在线观看不卡| 国产成人自拍在线| 91精品国产综合久久蜜臀| 中文字幕人成不卡一区| 久久99精品久久久久久久久久久久 | 欧美精品在线一区二区三区| 国产亚洲一本大道中文在线| 亚洲伊人色欲综合网| 国产91富婆露脸刺激对白| 欧美一区二区人人喊爽| 一区二区在线观看免费视频播放| 国内久久精品视频| 91麻豆精品国产91| 亚洲蜜臀av乱码久久精品蜜桃| 国产在线播放一区二区三区| 制服丝袜中文字幕一区| 综合久久久久久| 国产精品一区在线| 日韩午夜激情电影| 国产精品久久久久影院亚瑟| 国产一区二区剧情av在线| 欧美日韩成人一区| 国产欧美日韩在线视频| 狠狠色丁香久久婷婷综合丁香| 9191久久久久久久久久久| 日韩理论在线观看| av成人动漫在线观看| 久久免费看少妇高潮| 免费美女久久99| 日韩一级片网站| 日产国产欧美视频一区精品| 欧美日韩中文字幕一区| 亚洲国产精品久久久久秋霞影院 | 国产精品毛片久久久久久久| 国产成人一级电影| 欧美高清在线一区| 国产**成人网毛片九色| 久久精品亚洲一区二区三区浴池 |