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

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

?? lbspeedbutton.pas.~2~

?? 一個delphi的第三方控件 XP按鈕一個delphi的第三方控件 XP按鈕一個delphi的第三方控件 XP按鈕
?? ~2~
字號:
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('Myntrol', [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.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜臀精品一区二区三区在线观看| 日韩av在线免费观看不卡| 欧美亚洲高清一区| 国产黄色91视频| 日av在线不卡| 洋洋av久久久久久久一区| 国产清纯美女被跳蛋高潮一区二区久久w | 欧美久久久久久久久| 丰满少妇久久久久久久| 蜜桃av一区二区| 午夜在线电影亚洲一区| 亚洲丝袜美腿综合| 久久这里只有精品视频网| 欧美女孩性生活视频| 91浏览器入口在线观看| 成人毛片老司机大片| 国产精品系列在线播放| 美腿丝袜一区二区三区| 日韩在线播放一区二区| 亚洲综合精品久久| **性色生活片久久毛片| 国产精品人成在线观看免费| 亚洲精品一区二区三区精华液| 欧美久久久久久久久中文字幕| 欧美影院精品一区| 色欧美乱欧美15图片| 国产不卡高清在线观看视频| 国产一区不卡视频| 奇米一区二区三区| 免费观看久久久4p| 美女被吸乳得到大胸91| 美女一区二区三区在线观看| 日韩精品一二三区| 免费高清不卡av| 男女男精品视频| 偷拍一区二区三区四区| 国产精品2024| 久久精品国产亚洲a| 青青青伊人色综合久久| 奇米亚洲午夜久久精品| 久久精品久久综合| 久久成人免费网站| 国产精品一区二区久久精品爱涩| 国产精品一区二区在线看| 国产一区福利在线| 国产精品99久| 成人av影院在线| 91女人视频在线观看| 91丨九色丨国产丨porny| 色88888久久久久久影院野外 | 91麻豆精品国产91久久久久久久久| 欧美久久婷婷综合色| 日韩一区二区影院| 欧美精品一区二区三区高清aⅴ | 久久黄色级2电影| 国产一区二区免费视频| 成人动漫在线一区| 在线观看亚洲一区| 91精品国产综合久久精品麻豆| 日韩一区二区视频| 国产日韩欧美精品综合| 亚洲黄色性网站| 免费高清在线视频一区·| 国产不卡免费视频| 欧美色综合影院| 精品少妇一区二区三区在线播放| 国产免费观看久久| 亚洲国产一区二区三区 | 色婷婷激情久久| 日韩欧美国产三级| 国产精品久久久久久久久晋中| 一区二区三区91| 精品在线你懂的| 91免费视频网址| 日韩免费高清电影| 亚洲色图色小说| 久久av资源网| 一本到不卡免费一区二区| 欧美一级xxx| 国产精品国产三级国产普通话三级| 一区二区三区欧美日韩| 国内一区二区视频| 欧美亚州韩日在线看免费版国语版| 日韩午夜三级在线| 亚洲女爱视频在线| 激情欧美一区二区| 色乱码一区二区三区88| 精品久久久三级丝袜| 一区二区三区成人在线视频| 国内外成人在线| 欧美色综合网站| 国产精品久久久久久久久果冻传媒 | 日韩欧美电影一二三| 亚洲欧美偷拍另类a∨色屁股| 青青草国产精品亚洲专区无| 97精品国产97久久久久久久久久久久| 日韩一区二区影院| 亚洲综合色丁香婷婷六月图片| 国产高清亚洲一区| 日韩午夜在线观看视频| 亚洲一区av在线| 成人av电影在线观看| 精品入口麻豆88视频| 亚洲午夜日本在线观看| 成年人网站91| 久久久久久久久久久黄色| 日韩国产在线观看一区| 91黄色免费观看| 国产精品久久99| 国产成人一区在线| 精品日产卡一卡二卡麻豆| 日韩高清不卡一区二区| 色婷婷久久99综合精品jk白丝| 欧美精品一区二区三区蜜臀| 奇米影视一区二区三区| 欧美日韩久久久一区| 一区二区三区久久| 91免费看片在线观看| 中文字幕不卡的av| 国产成人av影院| 久久久久久久久久看片| 久久99精品久久久久婷婷| 日韩视频123| 蜜臀精品一区二区三区在线观看| 欧美精品丝袜久久久中文字幕| 一区二区三区在线高清| 91久久精品一区二区| 成人免费在线播放视频| 91免费看片在线观看| 亚洲色图19p| 91激情五月电影| 亚洲国产精品人人做人人爽| 色综合久久久网| 一区二区在线观看免费视频播放| 91麻豆国产在线观看| 伊人色综合久久天天| 欧美三级日韩在线| 久久99精品久久久久久久久久久久| 日韩女优毛片在线| 国产乱淫av一区二区三区 | 亚洲最快最全在线视频| 欧美亚洲动漫精品| 日韩精品亚洲一区| 91精品国产欧美一区二区成人| 日本不卡1234视频| 精品国产亚洲在线| 国产91精品欧美| 亚洲视频 欧洲视频| 色狠狠综合天天综合综合| 亚洲精品国产一区二区精华液 | 欧美电影在哪看比较好| 男人操女人的视频在线观看欧美| 精品理论电影在线观看| 国产suv一区二区三区88区| 亚洲女与黑人做爰| 欧美理论在线播放| 国产一区二区三区香蕉| 中文字幕一区二区三区不卡在线| 在线精品视频免费观看| 男女男精品网站| 国产欧美日产一区| 欧日韩精品视频| 久久精品国产在热久久| 亚洲国产电影在线观看| 91国产成人在线| 激情综合网最新| 亚洲精品中文在线观看| 欧美一区二区高清| 成人一区二区三区在线观看| 亚洲国产中文字幕在线视频综合| 欧美一区二区三区思思人| 成人免费不卡视频| 五月天丁香久久| 国产精品欧美久久久久一区二区| 欧美日韩高清影院| 国产成人午夜精品影院观看视频 | 欧美一区二区三区爱爱| 国产一区二区在线影院| 亚洲一区二区三区四区在线免费观看 | 久久久三级国产网站| 在线日韩一区二区| 国产中文字幕一区| 日韩激情一二三区| 国产精品毛片大码女人| 欧美高清hd18日本| 波多野结衣精品在线| 日韩电影在线看| 亚洲欧美激情小说另类| 久久久久国产免费免费| 欧美在线播放高清精品| 国产成人免费网站| 天天综合网 天天综合色| 国产精品久久久久9999吃药| 日韩欧美国产精品一区| 99精品视频在线观看| 韩国欧美国产一区| 日韩中文字幕1| 一区二区三区在线免费观看| 中文一区在线播放| 久久综合色8888|