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

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

?? tflatgroupboxunit.pas

?? 貨代程序
?? PAS
字號:
unit TFlatGroupBoxUnit;

interface

{$I DFS.inc}

uses
  Windows, Messages, SysUtils, Forms, Classes, Graphics, Controls, ExtCtrls, FlatUtilitys;

type
  TFlatGroupBox = class(TCustomControl)
  private
    FTransparent: Boolean;
    FUseAdvColors: Boolean;
    FAdvColorBorder: TAdvColors;
    FBorderColor: TColor;
    FBorder: TGroupBoxBorder;
    procedure SetAdvColors (Index: Integer; Value: TAdvColors);
    procedure SetUseAdvColors (Value: Boolean);
    procedure CMEnabledChanged (var Message: TMessage); message CM_ENABLEDCHANGED;
    procedure CMTextChanged (var Message: TWmNoParams); message CM_TEXTCHANGED;
    procedure SetColors(const Index: Integer; const Value: TColor);
    procedure SetBorder(const Value: TGroupBoxBorder);
    procedure CMSysColorChange (var Message: TMessage); message CM_SYSCOLORCHANGE;
    procedure CMParentColorChanged (var Message: TWMNoParams); message CM_PARENTCOLORCHANGED;
    procedure CMDialogChar (var Message: TCMDialogChar); message CM_DIALOGCHAR;
    procedure WMSize (var Message: TWMSize); message WM_SIZE;
    procedure WMMove (var Message: TWMMove); message WM_MOVE;
    procedure SetTransparent (const Value: Boolean);
  protected
    procedure CalcAdvColors;
    procedure Paint; override;
   {$IFDEF DFS_COMPILER_4_UP}
    procedure SetBiDiMode(Value: TBiDiMode); override;
   {$ENDIF}
  public
    constructor Create (AOwner: TComponent); override;
  published
    property Transparent: Boolean read FTransparent write SetTransparent default false;
    property Align;
    property Cursor;
    property Caption;
    property Font;
    property ParentFont;
    property Color;
    property ParentColor;
    property PopupMenu;
    property ShowHint;
    property ParentShowHint;
    property Enabled;
    property Visible;
    property TabOrder;
    property TabStop;
    property Hint;
    property HelpContext;
    property ColorBorder: TColor index 0 read FBorderColor write SetColors default $008396A0;
    property Border: TGroupBoxBorder read FBorder write SetBorder default brFull;
    property AdvColorBorder: TAdvColors index 0 read FAdvColorBorder write SetAdvColors default 50;
    property UseAdvColors: Boolean read FUseAdvColors write SetUseAdvColors default false;
   {$IFDEF DFS_COMPILER_4_UP}
    property Anchors;
    property BiDiMode write SetBidiMode;
    property Constraints;
    property DragKind;
    property DragMode;
    property DragCursor;
    property ParentBiDiMode;
    property DockSite;
    property OnEndDock;
    property OnStartDock;
    property OnDockDrop;
    property OnDockOver;
    property OnGetSiteInfo;
    property OnUnDock;
   {$ENDIF}
   {$IFDEF DFS_DELPHI_5_UP}
    property OnContextPopup;
   {$ENDIF}
    property OnClick;
    property OnDblClick;
    property OnDragDrop;
    property OnDragOver;
    property OnEndDrag;
    property OnEnter;
    property OnExit;
    property OnMouseDown;
    property OnMouseMove;
    property OnMouseUp;
    property OnStartDrag;
  end;

implementation

{ TFlatGroupBox }

constructor TFlatGroupBox.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  ControlStyle := ControlStyle + [csAcceptsControls, csOpaque];
  FBorderColor := $008396A0;
  FAdvColorBorder := 50;
  SetBounds(0, 0, 185, 105);
end;

procedure TFlatGroupBox.Paint;
var
  memoryBitmap: TBitmap;
  borderRect, textBounds: TRect;
  textHeight, textWidth: integer;
  Format: UINT;
begin
  borderRect := ClientRect;
  {$IFDEF DFS_COMPILER_4_UP}
  if BidiMode = bdRightToLeft then
    Format := DT_TOP or DT_RIGHT or DT_SINGLELINE
  else
    Format := DT_TOP or DT_LEFT or DT_SINGLELINE;
  {$ELSE}
  Format := DT_TOP or DT_LEFT or DT_SINGLELINE;
  {$ENDIF}

  memoryBitmap := TBitmap.Create; // create memory-bitmap to draw flicker-free
  try
    memoryBitmap.Height := ClientRect.Bottom;
    memoryBitmap.Width := ClientRect.Right;
    memoryBitmap.Canvas.Font := Self.Font;

    textHeight := memoryBitmap.canvas.TextHeight(caption);
    textWidth := memoryBitmap.Canvas.TextWidth(caption);

    {$IFDEF DFS_COMPILER_4_UP}
    if BidiMode = bdRightToLeft then
      textBounds := Rect(ClientRect.Right - 10 - textWidth, ClientRect.Top,
        ClientRect.Right - 10 , ClientRect.Top + textHeight)
    else
      textBounds := Rect(ClientRect.Left + 10, ClientRect.Top,
        ClientRect.Left + 10 + textWidth,
        ClientRect.Top + textHeight);
    {$ELSE}
    textBounds := Rect(ClientRect.Left + 10, ClientRect.Top,
      ClientRect.Left + 10 + textWidth,
      ClientRect.Top + textHeight);
    {$ENDIF}
    textBounds := Rect(ClientRect.Left + 10, ClientRect.Top,
      ClientRect.Right - 10,
      ClientRect.Top + textHeight);

    // Draw Background
    if FTransparent then
      DrawParentImage(Self, memoryBitmap.Canvas)
    else
    begin
      memoryBitmap.Canvas.Brush.Color := Self.Color;
      memoryBitmap.Canvas.FillRect(ClientRect);
    end;

    // Draw Border
    memoryBitmap.Canvas.Pen.Color := FBorderColor;
    case FBorder of
      brFull:
        {$IFDEF DFS_COMPILER_4_UP}
        if BidiMode = bdRightToLeft then
          memoryBitmap.Canvas.Polyline([Point(ClientRect.Right - 15 - textWidth, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left, ClientRect.bottom-1), Point(ClientRect.right-1, ClientRect.bottom-1),
            Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.Right - 7 , ClientRect.top + (textHeight div 2))])
        else
          memoryBitmap.Canvas.Polyline([Point(ClientRect.left + 5, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left, ClientRect.bottom-1), Point(ClientRect.right-1, ClientRect.bottom-1),
            Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)),
            Point(ClientRect.left + 12 + textWidth, ClientRect.top + (textHeight div 2))]);
        {$ELSE}
        memoryBitmap.Canvas.Polyline([Point(ClientRect.left + 5, ClientRect.top + (textHeight div 2)),
          Point(ClientRect.left, ClientRect.top + (textHeight div 2)),
          Point(ClientRect.left, ClientRect.bottom-1), Point(ClientRect.right-1, ClientRect.bottom-1),
          Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)),
          Point(ClientRect.left + 12 + textWidth, ClientRect.top + (textHeight div 2))]);
        {$ENDIF}
      brOnlyTopLine:
        {$IFDEF DFS_COMPILER_4_UP}
        if BidiMode = bdRightToLeft then
        begin
          memoryBitmap.Canvas.Polyline([Point(ClientRect.right - 5, ClientRect.top + (textHeight div 2)), Point(ClientRect.right, ClientRect.top + (textHeight div 2))]);
          memoryBitmap.Canvas.Polyline([Point(ClientRect.left+1, ClientRect.top + (textHeight div 2)), Point(ClientRect.right - 12 - textWidth, ClientRect.top + (textHeight div 2))]);
        end
        else
        begin
          memoryBitmap.Canvas.Polyline([Point(ClientRect.left + 5, ClientRect.top + (textHeight div 2)), Point(ClientRect.left, ClientRect.top + (textHeight div 2))]);
          memoryBitmap.Canvas.Polyline([Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)), Point(ClientRect.left + 12 + textWidth, ClientRect.top + (textHeight div 2))]);
        end;
        {$ELSE}
        begin
          memoryBitmap.Canvas.Polyline([Point(ClientRect.left + 5, ClientRect.top + (textHeight div 2)), Point(ClientRect.left, ClientRect.top + (Canvas.textHeight(caption) div 2))]);
          memoryBitmap.Canvas.Polyline([Point(ClientRect.right-1, ClientRect.top + (textHeight div 2)), Point(ClientRect.left + 12 + textWidth, ClientRect.top + (textHeight div 2))]);
        end;
        {$ENDIF}
    end;

    // Draw Text
    memoryBitmap.Canvas.Brush.Style := bsClear;
    if not Enabled then
    begin
      OffsetRect(textBounds, 1, 1);
      memoryBitmap.Canvas.Font.Color := clBtnHighlight;
      DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format);
      OffsetRect(textBounds, -1, -1);
      memoryBitmap.Canvas.Font.Color := clBtnShadow;
      DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format);
    end
    else
      DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), textBounds, Format);

    // Copy memoryBitmap to screen
    canvas.CopyRect(ClientRect, memoryBitmap.canvas, ClientRect);
  finally
    memoryBitmap.free; // delete the bitmap
  end;
end;

procedure TFlatGroupBox.CMTextChanged (var Message: TWmNoParams);
begin
  inherited;
  Invalidate;
end;

procedure TFlatGroupBox.SetColors(const Index: Integer;
  const Value: TColor);
begin
  case Index of
    0: FBorderColor := Value;
  end;
  Invalidate;
end;

procedure TFlatGroupBox.SetBorder(const Value: TGroupBoxBorder);
begin
  FBorder := Value;
  Invalidate;
end;

procedure TFlatGroupBox.SetAdvColors(Index: Integer; Value: TAdvColors);
begin
  case Index of
    0: FAdvColorBorder := Value;
  end;
  CalcAdvColors;
  Invalidate;
end;

procedure TFlatGroupBox.SetUseAdvColors(Value: Boolean);
begin
  if Value <> FUseAdvColors then
  begin
    FUseAdvColors := Value;
    ParentColor := Value;
    CalcAdvColors;
    Invalidate;
  end;
end;

procedure TFlatGroupBox.CalcAdvColors;
begin
  if FUseAdvColors then
  begin
    FBorderColor := CalcAdvancedColor(Color, FBorderColor, FAdvColorBorder, darken);
  end;
end;

procedure TFlatGroupBox.CMParentColorChanged(var Message: TWMNoParams);
begin
  inherited;
  if FUseAdvColors then
  begin
    ParentColor := True;
    CalcAdvColors;
  end;
  Invalidate;
end;

procedure TFlatGroupBox.CMSysColorChange(var Message: TMessage);
begin
  if FUseAdvColors then
  begin
    ParentColor := True;
    CalcAdvColors;
  end;
  Invalidate;
end;

procedure TFlatGroupBox.CMDialogChar(var Message: TCMDialogChar);
begin
  with Message do
    if IsAccel(Message.CharCode, Caption) and CanFocus then
    begin
      SetFocus; 
      Result := 1;
    end;
end;

procedure TFlatGroupBox.CMEnabledChanged(var Message: TMessage);
begin
  inherited;
  Invalidate;
end;

procedure TFlatGroupBox.SetTransparent(const Value: Boolean);
begin
  FTransparent := Value;
  Invalidate;
end;

procedure TFlatGroupBox.WMMove(var Message: TWMMove);
begin
  inherited;
  if FTransparent then
    Invalidate;
end;

procedure TFlatGroupBox.WMSize(var Message: TWMSize);
begin
  inherited;
  if FTransparent then
    Invalidate;
end;

{$IFDEF DFS_COMPILER_4_UP}
procedure TFlatGroupBox.SetBiDiMode(Value: TBiDiMode);
begin
  inherited;
  Invalidate;
end;
{$ENDIF}

end.


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人亚洲综合色影视| 高清在线成人网| 舔着乳尖日韩一区| 亚洲天天做日日做天天谢日日欢| 欧美大黄免费观看| 5566中文字幕一区二区电影| 在线亚洲精品福利网址导航| 成人午夜伦理影院| 国产在线视频一区二区| 久久国产尿小便嘘嘘尿| 免播放器亚洲一区| 奇米一区二区三区| 精品亚洲porn| 国产尤物一区二区在线| 国产激情精品久久久第一区二区 | 日韩av网站免费在线| 亚洲成av人片在线观看| 婷婷综合久久一区二区三区| 亚洲成人av电影| 看电影不卡的网站| 久久不见久久见免费视频1| 国产美女在线观看一区| 成人福利视频网站| 欧美精品三级在线观看| 精品久久国产老人久久综合| 中文一区二区在线观看| 亚洲欧洲av一区二区三区久久| 一二三四区精品视频| 日本aⅴ免费视频一区二区三区| 亚洲色图欧洲色图| 国产亚洲成aⅴ人片在线观看 | 欧美mv日韩mv亚洲| 国产精品乱人伦中文| 一区二区三区在线视频免费| 视频一区欧美日韩| a在线欧美一区| 精品理论电影在线| 一区二区三区国产精华| 国产老女人精品毛片久久| 国产精品无人区| 亚欧色一区w666天堂| 99久精品国产| 国产午夜精品福利| 三级在线观看一区二区| 99在线视频精品| 国产喂奶挤奶一区二区三区| 日韩精品1区2区3区| 色偷偷一区二区三区| 日本一区二区三区在线不卡| 图片区小说区区亚洲影院| proumb性欧美在线观看| 久久久久99精品一区| 美美哒免费高清在线观看视频一区二区 | 欧美老肥妇做.爰bbww视频| 国产精品免费看片| 国产剧情一区在线| 欧美mv日韩mv亚洲| 毛片av一区二区| 欧美一区二区黄| 男人的天堂亚洲一区| 欧美一级二级三级蜜桃| 日日夜夜免费精品视频| 欧美日韩一区 二区 三区 久久精品| 中文字幕一区二区三中文字幕| 国产成人免费在线观看| 国产精品乱码妇女bbbb| 波多野结衣精品在线| 国产精品久久国产精麻豆99网站| 成人精品一区二区三区中文字幕| 中文字幕中文字幕在线一区 | 亚洲三级在线播放| 在线免费观看成人短视频| 天天综合网天天综合色| 日韩精品中文字幕一区二区三区 | 成人性生交大片免费看视频在线 | 美日韩一级片在线观看| 国产亚洲一本大道中文在线| 成人黄色大片在线观看| 日韩在线一区二区三区| 久久久久久久精| 色琪琪一区二区三区亚洲区| 日韩av午夜在线观看| 亚洲国产精品成人综合色在线婷婷| 色老综合老女人久久久| 国产精品一区二区在线看| 一区二区三区精品在线观看| 欧美成人国产一区二区| 在线观看免费成人| 国产精品亚洲一区二区三区妖精 | 国产精品免费久久| 欧美美女黄视频| 99re亚洲国产精品| 国产精品一区久久久久| 首页国产丝袜综合| 亚洲欧美激情视频在线观看一区二区三区 | 国产精品亚洲专一区二区三区 | 国产成人免费在线| 麻豆精品国产传媒mv男同| 一区二区三区在线高清| 国产日韩精品一区二区浪潮av | 久久99最新地址| 图片区小说区区亚洲影院| 亚洲人成在线观看一区二区| 国产香蕉久久精品综合网| 69久久99精品久久久久婷婷| 97se狠狠狠综合亚洲狠狠| 国产在线精品不卡| 久久成人免费网| 日本vs亚洲vs韩国一区三区二区 | 国产最新精品精品你懂的| 亚洲成人av电影在线| 亚洲综合色视频| 久久99精品久久久久久| 亚洲第一综合色| 日日摸夜夜添夜夜添精品视频| 亚洲超碰精品一区二区| 亚洲午夜三级在线| 亚洲一区二区四区蜜桃| 亚洲va欧美va人人爽午夜| 午夜精品久久久久久久99水蜜桃| 午夜欧美在线一二页| 美女高潮久久久| 久88久久88久久久| 成人aaaa免费全部观看| 日韩av在线发布| 免费在线观看一区| 免费视频最近日韩| 蜜臀av一区二区在线免费观看| 免费av网站大全久久| 国产自产2019最新不卡| 国产电影精品久久禁18| 久久成人精品无人区| 国产精品一区二区久久精品爱涩 | 91视频在线观看免费| 欧美性受极品xxxx喷水| 欧美精品久久天天躁| 日韩精品一区二区三区三区免费| 日韩欧美高清一区| 亚洲天堂免费在线观看视频| 婷婷国产v国产偷v亚洲高清| 久久久久久夜精品精品免费| 欧美三片在线视频观看| 国产日韩欧美高清在线| 午夜精品爽啪视频| 欧美亚洲综合网| 久久久久久久久久久99999| 国产精品女同互慰在线看 | 欧美日韩中文国产| 日韩欧美国产小视频| 国产精品久久久久精k8| 国产精品区一区二区三区| 日本女优在线视频一区二区| 成人av电影在线| 成人av手机在线观看| 91麻豆精品91久久久久同性| 国产精品毛片大码女人| 亚洲资源在线观看| 成人视屏免费看| 亚洲国产精品国自产拍av| 国产美女一区二区| 国产欧美精品区一区二区三区| 奇米精品一区二区三区在线观看一| 色综合久久88色综合天天6| 中文一区在线播放| 久久精品国产免费| 日韩免费高清av| 精一区二区三区| 精品国产免费人成在线观看| 一区二区三区在线播放| 色综合久久88色综合天天免费| 国产精品蜜臀av| 91蝌蚪porny成人天涯| 亚洲综合在线视频| 欧美日韩精品是欧美日韩精品| 18成人在线视频| 亚洲综合成人在线视频| 99视频精品在线| 日韩精品1区2区3区| 中文字幕精品在线不卡| 成人av在线一区二区| 亚洲h动漫在线| 制服丝袜亚洲色图| 处破女av一区二区| 又紧又大又爽精品一区二区| 69久久夜色精品国产69蝌蚪网| 亚洲成av人综合在线观看| 日韩欧美综合在线| 不卡视频一二三| 图片区日韩欧美亚洲| 久久众筹精品私拍模特| 91啪亚洲精品| 国产综合色产在线精品| 亚洲老司机在线| 2019国产精品| 欧美三级电影一区| eeuss国产一区二区三区| 蜜桃一区二区三区在线| 欧美色成人综合| 91蝌蚪porny九色| 久久99国产精品久久|