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

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

?? tntbuttons.pas

?? TNT Components Source
?? PAS
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):

{*****************************************************************************}
{                                                                             }
{    Tnt Delphi Unicode Controls                                              }
{      http://www.tntware.com/delphicontrols/unicode/                         }
{        Version: 2.3.0                                                       }
{                                                                             }
{    Copyright (c) 2002-2007, Troy Wolbrink (troy.wolbrink@tntware.com)       }
{                                                                             }
{*****************************************************************************}

unit TntButtons;

{$INCLUDE TntCompilers.inc}

interface

uses
  Windows, Messages, Classes, Controls, Graphics, StdCtrls,
  ExtCtrls, CommCtrl, Buttons,
  TntControls;

type
  ITntGlyphButton = interface
    ['{15D7E501-1E33-4293-8B45-716FB3B14504}']
    function GetButtonGlyph: Pointer;
    procedure UpdateInternalGlyphList;
  end;

{TNT-WARN TSpeedButton}
  TTntSpeedButton = class(TSpeedButton {TNT-ALLOW TSpeedButton}, ITntGlyphButton)
  private
    FPaintInherited: Boolean;
    function GetCaption: TWideCaption;
    procedure SetCaption(const Value: TWideCaption);
    function GetHint: WideString;
    procedure SetHint(const Value: WideString);
    function IsCaptionStored: Boolean;
    function IsHintStored: Boolean;
    procedure CMHintShow(var Message: TMessage); message CM_HINTSHOW;
    procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR;
  protected
    function GetButtonGlyph: Pointer;
    procedure UpdateInternalGlyphList; dynamic;
    procedure PaintButton; dynamic;
    procedure Paint; override;
    procedure DefineProperties(Filer: TFiler); override;
    function GetActionLinkClass: TControlActionLinkClass; override;
    procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
  published
    property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored;
    property Hint: WideString read GetHint write SetHint stored IsHintStored;
  end;

{TNT-WARN TBitBtn}
  TTntBitBtn = class(TBitBtn {TNT-ALLOW TBitBtn}, ITntGlyphButton)
  private
    FPaintInherited: Boolean;
    FMouseInControl: Boolean;
    function IsCaptionStored: Boolean;
    function GetCaption: TWideCaption;
    procedure SetCaption(const Value: TWideCaption);
    function IsHintStored: Boolean;
    function GetHint: WideString;
    procedure SetHint(const Value: WideString);
    procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR;
    procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;
    procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
    procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
  protected
    function GetButtonGlyph: Pointer;
    procedure UpdateInternalGlyphList; dynamic;
    procedure DrawItem(const DrawItemStruct: TDrawItemStruct); dynamic;
    procedure CreateWindowHandle(const Params: TCreateParams); override;
    procedure DefineProperties(Filer: TFiler); override;
    function GetActionLinkClass: TControlActionLinkClass; override;
    procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
  published
    property Caption: TWideCaption read GetCaption write SetCaption stored IsCaptionStored;
    property Hint: WideString read GetHint write SetHint stored IsHintStored;
  end;

procedure TButtonGlyph_CalcButtonLayout(Control: TControl; DC: HDC; const Client: TRect;
  const Offset: TPoint; const Caption: WideString; Layout: TButtonLayout;
    Margin, Spacing: Integer; var GlyphPos: TPoint; var TextBounds: TRect;
    BiDiFlags: Integer {$IFDEF COMPILER_7_UP}; WordWrap: Boolean {$ENDIF});

function TButtonGlyph_Draw(Control: TControl; Canvas: TCanvas; const Client: TRect;
  const Offset: TPoint; const Caption: WideString; Layout: TButtonLayout; Margin: Integer;
    Spacing: Integer; State: TButtonState; Transparent: Boolean;
    BiDiFlags: Longint {$IFDEF COMPILER_7_UP}; WordWrap: Boolean {$ENDIF}): TRect;

implementation

uses                                      
  SysUtils, ActnList, TntForms, TntStdCtrls, TypInfo, RTLConsts, TntWindows,
  {$IFDEF THEME_7_UP} Themes, {$ENDIF} TntClasses, TntActnList, TntSysUtils;

type
  EAbortPaint = class(EAbort);

// Many routines in this unit are nearly the same as those found in Buttons.pas.  They are
//   included here because the VCL implementation of TButtonGlyph is completetly inaccessible.

type
  THackButtonGlyph_D6_D7_D9 = class
  protected
    FOriginal: TBitmap;
    FGlyphList: TImageList;
    FIndexs: array[TButtonState] of Integer;
    FxxxxTransparentColor: TColor;
    FNumGlyphs: TNumGlyphs;
  end;

  THackBitBtn_D6_D7_D9 = class(TButton{TNT-ALLOW TButton})
  protected
    FCanvas: TCanvas;
    FGlyph: Pointer;
    FxxxxStyle: TButtonStyle;
    FxxxxKind: TBitBtnKind;
    FxxxxLayout: TButtonLayout;
    FxxxxSpacing: Integer;
    FxxxxMargin: Integer;
    IsFocused: Boolean;
  end;

  THackSpeedButton_D6_D7_D9 = class(TGraphicControl)
  protected
    FxxxxGroupIndex: Integer;
    FGlyph: Pointer;
    FxxxxDown: Boolean;
    FDragging: Boolean;
  end;

  {$IFDEF COMPILER_6} // verified against VCL source in Delphi 6 and BCB 6
  THackButtonGlyph = THackButtonGlyph_D6_D7_D9;
  THackBitBtn      = THackBitBtn_D6_D7_D9;
  THackSpeedButton = THackSpeedButton_D6_D7_D9;
  {$ENDIF}
  {$IFDEF DELPHI_7} // verified against VCL source in Delphi 7
  THackButtonGlyph = THackButtonGlyph_D6_D7_D9;
  THackBitBtn      = THackBitBtn_D6_D7_D9;
  THackSpeedButton = THackSpeedButton_D6_D7_D9;
  {$ENDIF}
  {$IFDEF DELPHI_9} // verified against VCL source in Delphi 9
  THackButtonGlyph = THackButtonGlyph_D6_D7_D9;
  THackBitBtn      = THackBitBtn_D6_D7_D9;
  THackSpeedButton = THackSpeedButton_D6_D7_D9;
  {$ENDIF}
  {$IFDEF DELPHI_10} // verified against VCL source in Delphi 10
  THackButtonGlyph = THackButtonGlyph_D6_D7_D9;
  THackBitBtn      = THackBitBtn_D6_D7_D9;
  THackSpeedButton = THackSpeedButton_D6_D7_D9;
  {$ENDIF}

function GetButtonGlyph(Control: TControl): THackButtonGlyph;
var
  GlyphButton: ITntGlyphButton;
begin
  if Control.GetInterface(ITntGlyphButton, GlyphButton) then
    Result := GlyphButton.GetButtonGlyph
  else
    raise ETntInternalError.Create('Internal Error: Control does not support ITntGlyphButton.');
end;

procedure UpdateInternalGlyphList(Control: TControl);
var
  GlyphButton: ITntGlyphButton;
begin
  if Control.GetInterface(ITntGlyphButton, GlyphButton) then
    GlyphButton.UpdateInternalGlyphList
  else
    raise ETntInternalError.Create('Internal Error: Control does not support ITntGlyphButton.');
end;

function TButtonGlyph_CreateButtonGlyph(Control: TControl; State: TButtonState): Integer;
var
  ButtonGlyph: THackButtonGlyph;
  NumGlyphs: Integer;
begin
  ButtonGlyph := GetButtonGlyph(Control);
  NumGlyphs := ButtonGlyph.FNumGlyphs;

  if (State = bsDown) and (NumGlyphs < 3) then State := bsUp;
  Result := ButtonGlyph.FIndexs[State];
  if (Result = -1) then begin
    UpdateInternalGlyphList(Control);
    Result := ButtonGlyph.FIndexs[State];
  end;
end;

procedure TButtonGlyph_DrawButtonGlyph(Control: TControl; Canvas: TCanvas; const GlyphPos: TPoint;
  State: TButtonState; Transparent: Boolean);
var
  ButtonGlyph: THackButtonGlyph;
  Glyph: TBitmap;
  GlyphList: TImageList;
  Index: Integer;
  {$IFDEF THEME_7_UP}
  Details: TThemedElementDetails;
  R: TRect;
  Button: TThemedButton;
  {$ENDIF}
begin
  ButtonGlyph := GetButtonGlyph(Control);
  Glyph := ButtonGlyph.FOriginal;
  GlyphList := ButtonGlyph.FGlyphList;
  if Glyph = nil then Exit;
  if (Glyph.Width = 0) or (Glyph.Height = 0) then Exit;
  Index := TButtonGlyph_CreateButtonGlyph(Control, State);
  with GlyphPos do
  {$IFDEF THEME_7_UP}
  if ThemeServices.ThemesEnabled then begin
    R.TopLeft := GlyphPos;
    R.Right := R.Left + Glyph.Width div ButtonGlyph.FNumGlyphs;
    R.Bottom := R.Top + Glyph.Height;
    case State of
      bsDisabled:
        Button := tbPushButtonDisabled;
      bsDown,
      bsExclusive:
        Button := tbPushButtonPressed;
    else
      // bsUp
      Button := tbPushButtonNormal;
    end;
    Details := ThemeServices.GetElementDetails(Button);
    ThemeServices.DrawIcon(Canvas.Handle, Details, R, GlyphList.Handle, Index);
  end else
  {$ENDIF}
    if Transparent or (State = bsExclusive) then
      ImageList_DrawEx(GlyphList.Handle, Index, Canvas.Handle, X, Y, 0, 0,
        clNone, clNone, ILD_Transparent)
    else
      ImageList_DrawEx(GlyphList.Handle, Index, Canvas.Handle, X, Y, 0, 0,
        ColorToRGB(clBtnFace), clNone, ILD_Normal);
end;

procedure TButtonGlyph_DrawButtonText(Canvas: TCanvas; const Caption: WideString;
  TextBounds: TRect; State: TButtonState;
    BiDiFlags: LongInt {$IFDEF COMPILER_7_UP}; WordWrap: Boolean {$ENDIF});
begin
  with Canvas do
  begin
    Brush.Style := bsClear;
    if State = bsDisabled then
    begin
      OffsetRect(TextBounds, 1, 1);
      Font.Color := clBtnHighlight;

      {$IFDEF COMPILER_7_UP}
      if WordWrap then
        Tnt_DrawTextW(Handle, PWideChar(Caption), Length(Caption), TextBounds,
          DT_CENTER or DT_VCENTER or BiDiFlags or DT_WORDBREAK) 
      else
      {$ENDIF}
        Tnt_DrawTextW(Handle, PWideChar(Caption), Length(Caption), TextBounds,
          DT_CENTER or DT_VCENTER or BiDiFlags);

      OffsetRect(TextBounds, -1, -1);
      Font.Color := clBtnShadow;

      {$IFDEF COMPILER_7_UP}
      if WordWrap then
        Tnt_DrawTextW(Handle, PWideChar(Caption), Length(Caption), TextBounds,
          DT_CENTER or DT_WORDBREAK or BiDiFlags) { TODO: Figure out why DT_VCENTER is not used }
      else
      {$ENDIF}
        Tnt_DrawTextW(Handle, PWideChar(Caption), Length(Caption), TextBounds,
          DT_CENTER or DT_VCENTER or BiDiFlags);

    end else
    begin
      {$IFDEF COMPILER_7_UP}
      if WordWrap then
        Tnt_DrawTextW(Handle, PWideChar(Caption), Length(Caption), TextBounds,
          DT_CENTER or DT_WORDBREAK or BiDiFlags) { TODO: Figure out why DT_VCENTER is not used }
      else
      {$ENDIF}
        Tnt_DrawTextW(Handle, PWideChar(Caption), Length(Caption), TextBounds,
          DT_CENTER or DT_VCENTER or BiDiFlags);
    end;
  end;
end;

procedure TButtonGlyph_CalcButtonLayout(Control: TControl; DC: HDC; const Client: TRect;
  const Offset: TPoint; const Caption: WideString; Layout: TButtonLayout;
    Margin, Spacing: Integer; var GlyphPos: TPoint; var TextBounds: TRect;
      BiDiFlags: Integer {$IFDEF COMPILER_7_UP}; WordWrap: Boolean {$ENDIF});
var
  TextPos: TPoint;
  ClientSize,
  GlyphSize,
  TextSize: TPoint;
  TotalSize: TPoint;
  Glyph: TBitmap;
  NumGlyphs: Integer;
  ButtonGlyph: THackButtonGlyph;
begin
  ButtonGlyph := GetButtonGlyph(Control);
  Glyph := ButtonGlyph.FOriginal;
  NumGlyphs := ButtonGlyph.FNumGlyphs;

  if (BiDiFlags and DT_RIGHT) = DT_RIGHT then
    if Layout = blGlyphLeft then
      Layout := blGlyphRight
    else
      if Layout = blGlyphRight then
        Layout := blGlyphLeft;

  // Calculate the item sizes.
  ClientSize := Point(Client.Right - Client.Left, Client.Bottom - Client.Top);

  if Assigned(Glyph) then
    GlyphSize := Point(Glyph.Width div NumGlyphs, Glyph.Height)
  else
    GlyphSize := Point(0, 0);

  if Length(Caption) > 0 then
  begin
    {$IFDEF COMPILER_7_UP}
    TextBounds := Rect(0, 0, Client.Right - Client.Left - GlyphSize.X - 3, 0); { TODO: Figure out why GlyphSize.X is in here. }
    {$ELSE}
    TextBounds := Rect(0, 0, Client.Right - Client.Left, 0);
    {$ENDIF}

    {$IFDEF COMPILER_7_UP}
    if WordWrap then

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97se亚洲国产综合自在线观| 成人高清视频在线| 色噜噜夜夜夜综合网| 日韩精品一区二区三区swag| 一区二区三国产精华液| 国产**成人网毛片九色 | 青青草97国产精品免费观看| bt欧美亚洲午夜电影天堂| 欧美大片在线观看一区| 亚洲成在人线在线播放| 欧美日韩精品欧美日韩精品一| 亚洲一级片在线观看| 99久久99久久精品免费看蜜桃| 亚洲天堂av一区| 色呦呦国产精品| 亚洲第一狼人社区| 555夜色666亚洲国产免| 日韩国产精品久久| 日韩一级成人av| 久久国产日韩欧美精品| 国产午夜精品在线观看| 成人午夜又粗又硬又大| 亚洲一级电影视频| 日韩视频中午一区| www.成人在线| 蜜桃av噜噜一区| 国产精品久久久久一区二区三区| 91网站在线观看视频| 亚洲精品ww久久久久久p站| 欧美日韩国产另类不卡| 国产99久久久精品| 婷婷综合在线观看| 国产精品久久久久久久久免费丝袜 | 国产精品三级av| 欧美日韩在线播| 高清国产一区二区| 婷婷久久综合九色综合绿巨人| 欧美xxxxx牲另类人与| 91免费精品国自产拍在线不卡| 美洲天堂一区二卡三卡四卡视频| 国产精品久久久久aaaa| www激情久久| 欧美肥胖老妇做爰| 成人开心网精品视频| 激情五月婷婷综合| 麻豆中文一区二区| 肉丝袜脚交视频一区二区| 亚洲精品国产品国语在线app| 久久综合99re88久久爱| 欧美精品123区| 欧美亚洲动漫另类| 在线精品视频一区二区三四 | 日本欧美久久久久免费播放网| 亚洲欧洲成人精品av97| 国产精品久久久久一区二区三区| 久久久久久久久99精品| 3d动漫精品啪啪一区二区竹菊 | 成人精品国产一区二区4080| 麻豆视频一区二区| 毛片av一区二区三区| 91蝌蚪porny| 欧美福利电影网| 欧美一级免费大片| 国产欧美一区二区精品秋霞影院| 国产欧美精品一区aⅴ影院| 久久精品欧美日韩精品| 日本一区二区成人| 亚洲少妇屁股交4| 亚洲精品老司机| 香蕉乱码成人久久天堂爱免费| 午夜日韩在线观看| 国产伦精品一区二区三区在线观看| 大白屁股一区二区视频| 欧美午夜精品一区二区三区| 日韩欧美一区二区三区在线| 欧美韩国日本不卡| 亚洲福利一区二区三区| 国产一区二区三区四区五区美女| 99国产精品久| 在线播放日韩导航| 国产视频一区二区在线观看| 一区二区三区精品视频在线| 国产一区二区三区免费看| 在线免费亚洲电影| 欧美国产激情一区二区三区蜜月| 日韩精品一区第一页| 色哟哟国产精品免费观看| 亚洲精品在线观看视频| 一区二区三区四区在线| 风间由美性色一区二区三区| 日韩一区二区中文字幕| 亚洲综合一区二区精品导航| 高清在线观看日韩| 久久久久久电影| 免费在线观看成人| 91久久久免费一区二区| 国产精品久线在线观看| 国产精品乡下勾搭老头1| 日韩精品在线看片z| 免费的国产精品| 久久久久久久久久久久久夜| 国产综合色精品一区二区三区| 欧美日韩二区三区| 免费成人你懂的| 亚洲精品一区二区三区影院| 精品一区中文字幕| 欧美成人a视频| 成人一区二区三区中文字幕| 国产精品毛片久久久久久| youjizz国产精品| 国产精品超碰97尤物18| 一道本成人在线| 无吗不卡中文字幕| 欧美va亚洲va在线观看蝴蝶网| 蜜臀国产一区二区三区在线播放| 欧美精品丝袜久久久中文字幕| 免费日韩伦理电影| 国产日韩欧美制服另类| 懂色一区二区三区免费观看| 亚洲色图制服诱惑 | 亚洲欧美激情在线| 欧美精品第1页| 成人av电影免费观看| 一区二区三区中文字幕精品精品| 制服丝袜日韩国产| 99久久久国产精品| 日韩激情一区二区| 国产日韩欧美在线一区| 欧美日韩亚洲不卡| 国产白丝精品91爽爽久久| 久久久五月婷婷| 欧美日韩一区二区三区免费看 | 欧美在线视频全部完| 免费欧美高清视频| 亚洲综合一区二区精品导航| 国产欧美一区二区精品秋霞影院| 欧美肥胖老妇做爰| 精品理论电影在线| 欧美人狂配大交3d怪物一区| 91网上在线视频| 91最新地址在线播放| kk眼镜猥琐国模调教系列一区二区| 日韩精品乱码av一区二区| 亚洲资源中文字幕| 亚洲色图另类专区| 最近中文字幕一区二区三区| 精品蜜桃在线看| 精品国内二区三区| wwwwxxxxx欧美| 国产午夜亚洲精品理论片色戒| 日韩三区在线观看| 日韩一区二区免费在线观看| 91精品在线免费| 精品国内二区三区| 国产亚洲精品aa午夜观看| 久久精品一区八戒影视| 亚洲国产精品成人综合| 亚洲欧美日韩国产另类专区| 亚洲三级小视频| 亚洲精品国产精华液| 五月天欧美精品| 国产盗摄视频一区二区三区| 99久久久久久99| 色综合天天综合网天天狠天天| 欧洲国产伦久久久久久久| 欧美精品黑人性xxxx| 国产欧美日韩精品a在线观看| 一区在线观看视频| 亚洲自拍偷拍图区| 风间由美一区二区av101| 欧美日韩激情一区二区三区| 久久久青草青青国产亚洲免观| 亚洲精品中文在线影院| 美女精品自拍一二三四| 成人午夜av在线| 欧美成人精品二区三区99精品| 中文字幕一区在线观看| 久久精品国产成人一区二区三区| 丁香激情综合国产| 精品成人在线观看| 天天射综合影视| 一本大道久久a久久综合| 久久久久久久一区| 激情文学综合丁香| 精品久久免费看| 日韩高清一区在线| 91久久精品一区二区三| 国产精品热久久久久夜色精品三区| 美国毛片一区二区三区| 日韩一级高清毛片| 日本不卡一二三区黄网| 在线不卡中文字幕播放| 亚洲狠狠爱一区二区三区| 欧美在线视频日韩| 亚洲成人高清在线| 欧美男人的天堂一二区| 首页国产丝袜综合| 4438亚洲最大| 国产美女精品人人做人人爽| 久久精品夜色噜噜亚洲a∨|