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

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

?? scustomcomboedit.pas

?? AlphaControls是一個Delphi標準控件的集合
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
unit sCustomComboEdit;

{$I sDefs.inc}

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Mask, sUtils, buttons, menus, sCalcUnit, sConst,
  sGraphUtils, {sCustomButton, }sButtonControl, sStyleEdits,
  sGlyphUtils{$IFDEF DELPHI6}, Variants{$ENDIF};

type
  TCloseUpEvent = procedure (Sender: TObject; Accept: Boolean) of object;

  TsCustomComboEdit = class;

  TsEditButton = class(TsButtonControl)
  private
    FOwner : TsCustomComboEdit;
  protected
  public
    constructor Create(AOwner: TComponent); override;
    procedure DrawContents; override;
    procedure DrawGlyph; override;
  published
  end;

  TsCustomComboEdit = class(TCustomMaskEdit)
  private
    FButton: TsEditButton;
    FClickKey: TShortCut;
    FReadOnly: Boolean;
    FDirectInput: Boolean;
    FAlignment: TAlignment;
    FFocused: Boolean;
    FPopupWindowAlign: TPopupWindowAlign;
    FGlyphMode: TsGlyphMode;
    FPopupWidth: integer;
    procedure SetEditRect;
    procedure EditButtonClick(Sender: TObject);
    procedure EditButtonMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    procedure EditButtonMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    function GetMinHeight: Integer;
    function GetTextHeight: Integer;
    procedure SetShowCaret;
    function GetDroppedDown: Boolean;
    function GetDirectInput: Boolean;
    procedure SetDirectInput(Value: Boolean);
    procedure SetReadOnly(Value: Boolean);
    procedure SetAlignment(Value: TAlignment);
    procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED;
    procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED;
    procedure CMCancelMode(var Message: TCMCancelMode); message CM_CANCELMODE;
    procedure CMEnter(var Message: TMessage); message CM_ENTER;
    procedure CNCtlColor(var Message: TMessage); message CN_CTLCOLOREDIT;
    procedure WMSize(var Message: TWMSize); message WM_SIZE;
    procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS;
    procedure WMSetFocus(var Message: TMessage); message WM_SETFOCUS;
    procedure WMPaste(var Message: TWMPaste); message WM_PASTE;
    procedure WMCut(var Message: TWMCut); message WM_CUT;
    procedure WMNCCalcSize (var Message: TWMNCCalcSize); message WM_NCCALCSIZE;
    procedure WMNCPaint (var Message: TMessage); message WM_NCPAINT;
    procedure SetPopupWidth(const Value: integer);
  protected
    FOnButtonClick: TNotifyEvent;
    FsStyle : TsStyle;
    FPopupWindow: TWinControl;
    procedure WndProc (var Message: TMessage); override;
    procedure CreateWnd; override;
    procedure KeyPress(var Key: Char); override;

    procedure PopupWindowShow; virtual;
    procedure PopupWindowClose; virtual;
    procedure CreateParams(var Params: TCreateParams); override;

    procedure Change; override;
    procedure KeyDown(var Key: Word; Shift: TShiftState); override;
    procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
    procedure ButtonClick; dynamic;
    property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
    property PopupAlign: TPopupWindowAlign read FPopupWindowAlign write FPopupWindowAlign default pwaRight;
  public
    DontPopup : boolean;
    MousePressed : boolean;
    FDefBmpName : string;
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure Invalidate; override;
    procedure AfterConstruction; override;
    procedure Loaded; override;

    procedure DoClick;
    procedure SelectAll;
    procedure UpdateBtnBounds;
    property Button: TsEditButton read FButton;
    property DroppedDown: Boolean read GetDroppedDown;
    property CharCase;
    property ClickKey: TShortCut read FClickKey write FClickKey default scAlt + vk_Down;
    property PopupWidth : integer read FPopupWidth write SetPopupWidth default 197;
  published
    property GlyphMode : TsGlyphMode read FGlyphMode write FGlyphMode;
    property DirectInput: Boolean read GetDirectInput write SetDirectInput default True;
    property ReadOnly: Boolean read FReadOnly write SetReadOnly default False;
    property sStyle:TsStyle read FsStyle write FsStyle;
    property AutoSelect;
    property DragCursor;
    property DragMode;
    property EditMask;
    property Enabled;
    property Font;
    property HideSelection;
    property ImeMode;
    property ImeName;
    property ParentFont;
    property ParentShowHint;
    property PopupMenu;
    property ShowHint;
    property TabOrder;
    property TabStop;
    property Text;
    property Visible;
    property OnChange;
    property OnClick;
    property OnDblClick;
    property OnDragDrop;
    property OnDragOver;
    property OnEndDrag;
    property OnEnter;
    property OnExit;
    property OnKeyDown;
    property OnKeyPress;
    property OnKeyUp;
    property OnMouseDown;
    property OnMouseMove;
    property OnMouseUp;
    property OnStartDrag;
    property OnContextPopup;
    property OnButtonClick: TNotifyEvent read FOnButtonClick write FOnButtonClick;
  end;

function EditorTextMargins(Editor: TsCustomComboEdit): TPoint;

implementation

uses sStyleSimply, sCurrencyEdit;

constructor TsEditButton.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  sStyle.Painting.Transparency := 100;
  sStyle.HotStyle.HotPainting.Transparency := 100;
  sStyle.BtnEffects.Fading.Enabled := False;
  sStyle.SkinSection := 'TsEditButton';
end;

procedure TsEditButton.DrawContents;
var
  b : TBitmap;
  r : TRect;
  c, cc : TsColor;
  tc : TColor;
  function CurrentMaskRect : TRect; begin
    if Down then begin
      Result := Rect(2 * FOwner.GlyphMode.Width, 0, 3 * FOwner.GlyphMode.Width - 1, FOwner.GlyphMode.Height - 1);
    end
    else if sStyle.ControlIsActive or FOwner.sStyle.ControlIsActive then begin
      Result := Rect(FOwner.GlyphMode.Width, 0, 2 * FOwner.GlyphMode.Width - 1, FOwner.GlyphMode.Height - 1);
    end
    else begin
      Result := Rect(0, 0, FOwner.GlyphMode.Width - 1, FOwner.GlyphMode.Height - 1);
    end;
  end;
begin
  if Assigned(FOwner) and FOwner.GlyphMode.AssignDefaultBitmap then begin
    DefBMP.PixelFormat := pf24Bit;
    b := TBitmap.Create;
    try
      b.PixelFormat := pf24Bit;
      b.Width := FOwner.GlyphMode.Width;
      b.Height := FOwner.GlyphMode.Height;

      c.C := TsCustomComboEdit(FOwner).sStyle.GetActiveColor;


      tc := FOwner.GlyphMode.Glyph.Canvas.Pixels[0, FOwner.GlyphMode.Height - 1];

      CopyByMask(
               Rect(0, 0, FOwner.GlyphMode.Width - 1, FOwner.GlyphMode.Height - 1),
               CurrentMaskRect,
               b,
               DefBMP, EmptyCI);

      sStyle.FCacheBmp.Canvas.Brush.Style := bsSolid;
      sStyle.FCacheBmp.Canvas.Brush.Color := c.C;
      sStyle.FCacheBmp.Canvas.FillRect(Rect(0, 0, Width, FOwner.Height)); // Borders hiding

      if FOwner.Enabled then begin
        if (GetsStyle(FOwner) <> nil) then begin
          if not TsCustomComboEdit(FOwner).sStyle.ControlIsActive then begin
            if TsCustomComboEdit(FOwner).GlyphMode.Grayed then begin
              tc := b.Canvas.Pixels[0, b.Height - 1];
              cc.C := tc;
              GrayScaleTrans(b, cc);
            end;
            if TsCustomComboEdit(FOwner).GlyphMode.Blend > 0 then begin
              cc.C := tc;
              BlendTransBitmap(b, TsCustomComboEdit(FOwner).GlyphMode.Blend / 100, c, cc);
            end;
          end;
        end;

      end
      else begin
        cc.C := tc;
//        GrayScale(b);
        BlendTransBitmap(b, 0.50, c, cc);
      end;

      // Copy to button canvas
      R.Left := (WidthOf(ClientRect) - FOwner.GlyphMode.Width) div 2;// + GetDown;
      R.Right := R.Left + FOwner.GlyphMode.Width;
      R.Top := (HeightOf(ClientRect) - b.Height) div 2;// + GetDown;
      R.Bottom := R.Top + b.Height;
      sStyle.FCacheBmp.Canvas.Draw(R.Left, R.Top, b);

    finally
      FreeAndNil(b);
    end;

  end;
  FOwner.SetEditRect;
end;

{ TsCustomComboEdit }

constructor TsCustomComboEdit.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);

  BorderStyle := bsNone;
  sStyle := TsStyle.Create(Self);
  sStyle.COC := COC_TsCustomComboEdit;

  FDefBmpName := '';
  FGlyphMode := TsGlyphMode.Create(Self);

  AutoSize := False;
  FDirectInput := True;
  FClickKey := scAlt + vk_Down;
  FPopupWindowAlign := pwaRight;

  FButton := TsEditButton.Create(Self);
  FButton.FOwner := Self;
  FButton.Parent := Self;
  FButton.Align := alRight;
  FButton.Width := 22;
  FButton.ControlStyle := FButton.ControlStyle + [csReplicatable{, csNoStdEvents, csClickEvents}] - [csCaptureMouse];
  FButton.Visible := True;
  FButton.FsStyle.Painting.Bevel := cbNone;
  FButton.OnClick := EditButtonClick;
  FButton.OnMouseDown := EditButtonMouseDown;
  FButton.OnMouseUp := EditButtonMouseUp;

  DoubleBuffered := True;
  Height := 21;
  FPopupWidth := 197;
end;

destructor TsCustomComboEdit.Destroy;
begin
  OnKeyDown := nil;
  if Assigned(FsStyle) then FreeAndNil(FsStyle);
  if Assigned(FGlyphMode) then FreeAndNil(FGlyphMode);
  FButton.OnClick := nil;
  inherited Destroy;
end;

procedure TsCustomComboEdit.CreateWnd;
begin
  inherited CreateWnd;
  SetEditRect;
end;

procedure TsCustomComboEdit.PopupWindowShow;
var
  P: TPoint;
  Y: Integer;
begin
  if (FPopupWindow <> nil) and not (ReadOnly or DroppedDown) then begin
    DontPopup := True;
    FPopupWindow.Width := FPopupWidth;
    P := Parent.ClientToScreen(Point(Left, Top));
    Y := P.Y + Height;

    if Y + FPopupWindow.Height > Screen.Height then Y := P.Y - FPopupWindow.Height;
    case FPopupWindowAlign of
      pwaRight: begin
        Dec(P.X, FPopupWindow.Width - Width);
        if P.X < 0 then Inc(P.X, FPopupWindow.Width - Width);
      end;
      pwaLeft: begin
        if P.X + FPopupWindow.Width > Screen.Width then
          Dec(P.X, FPopupWindow.Width - Width);
      end;
    end;
    if P.X < 0 then begin
      P.X := 0
    end
    else if P.X + FPopupWindow.Width > Screen.Width then begin
      P.X := Screen.Width - FPopupWindow.Width;
    end;

    SetWindowPos(FPopupWindow.Handle, HWND_TOP, P.X, Y, 0, 0, SWP_NOACTIVATE or SWP_SHOWWINDOW or SWP_NOSIZE);
    TCustomForm(FPopupWindow).Show;
    TCustomForm(FPopupWindow).BringToFront;
  end;
end;

procedure TsCustomComboEdit.Change;
begin
  if not DroppedDown then inherited Change;
end;

procedure TsCustomComboEdit.KeyDown(var Key: Word; Shift: TShiftState);
begin
  sStyle.onKeyDown(Self, Key, Shift);
  inherited KeyDown(Key, Shift);
  if (FClickKey = ShortCut(Key, Shift)) and (GlyphMode.Width > 0) then begin
    EditButtonClick(Self);
    Key := 0;
  end;
end;

procedure TsCustomComboEdit.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  DontPopup := False;
  if not RestrictDrawing then sStyle.BGChanged := True;
  inherited MouseDown(Button, Shift, X, Y);
  if DroppedDown then begin
    PopupWindowClose;
  end;
end;

procedure TsCustomComboEdit.SetEditRect;
var
  R: TRect;
begin
  if Self is TsCurrencyEdit then begin
    R := Rect(0, 0, ClientWidth - 2, ClientHeight + 1);
  end
  else begin
    R := Rect(0, 0, ClientWidth - FButton.Width, ClientHeight + 1);
  end;
  SendMessage(Handle, EM_SETRECT, 0, LongInt(@R));
end;

procedure TsCustomComboEdit.UpdateBtnBounds;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品福利视频网站| 日本sm残虐另类| 亚洲成人福利片| 日本一区二区三区电影| 久久久综合视频| 久久夜色精品国产欧美乱极品| 日韩精品一区二区三区在线| 日韩一级免费观看| 精品久久久久av影院| 久久综合九色综合欧美98| 久久久不卡网国产精品二区| 国产午夜久久久久| 亚洲图片激情小说| 午夜精品久久一牛影视| 免费成人在线观看| 国产呦萝稀缺另类资源| 国产不卡在线一区| 色综合色综合色综合| 欧美日韩情趣电影| 日韩精品专区在线影院重磅| 国产亚洲欧美中文| 国产精品毛片a∨一区二区三区| 亚洲欧美另类小说| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产一区二区三区高清播放| 97久久人人超碰| 欧美一区二区免费观在线| 久久一夜天堂av一区二区三区| 国产精品国产成人国产三级| 亚洲成人一二三| 国产剧情一区二区三区| 欧洲人成人精品| 欧美成人一区二区| 日韩美女啊v在线免费观看| 日韩成人一级片| 成人一区二区视频| 欧美一卡二卡在线| 亚洲人成电影网站色mp4| 麻豆精品新av中文字幕| 91美女精品福利| 精品国产乱码91久久久久久网站| 中文字幕亚洲欧美在线不卡| 久久精品国产99国产| 91精品办公室少妇高潮对白| 欧美变态tickle挠乳网站| 一区二区三区四区乱视频| 精品中文av资源站在线观看| 欧美综合亚洲图片综合区| 精品福利一区二区三区免费视频| 亚洲精品欧美在线| 粉嫩在线一区二区三区视频| 日韩午夜在线观看视频| 亚洲精品日韩专区silk| 成人小视频免费观看| 日韩欧美国产精品一区| 亚洲一区二区在线视频| 暴力调教一区二区三区| 久久久久久久性| 麻豆国产精品视频| 欧美精品久久99久久在免费线| 亚洲九九爱视频| 成人污视频在线观看| 久久久久久亚洲综合| 久久精品久久精品| 这里只有精品免费| 午夜精品福利视频网站| 欧美最猛性xxxxx直播| 亚洲精品成人少妇| 一本一本久久a久久精品综合麻豆| 国产亚洲成年网址在线观看| 精品一区二区三区在线观看| 欧美成人一区二区| 精品制服美女丁香| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 国产超碰在线一区| 欧美精品一区二区久久婷婷| 精品在线观看视频| 国产欧美中文在线| 成人免费视频播放| 亚洲天堂精品在线观看| 在线观看一区不卡| 亚洲高清在线视频| 91麻豆精品国产综合久久久久久| 午夜精品福利一区二区三区av| 欧美日韩一区二区欧美激情 | 国产日韩欧美综合在线| 韩国一区二区在线观看| 久久人人爽人人爽| 国产不卡视频一区二区三区| 中文字幕中文字幕一区二区 | 国产精品91一区二区| 久久九九久久九九| 91丨九色丨黑人外教| 亚洲一级二级三级在线免费观看| 91麻豆精品国产综合久久久久久| 久久精品久久综合| 国产精品久久久久影院亚瑟| 欧美午夜理伦三级在线观看| 免费人成精品欧美精品| 国产欧美精品日韩区二区麻豆天美| 懂色av一区二区三区蜜臀| 亚洲欧洲一区二区三区| 欧美体内she精视频| 秋霞电影一区二区| 国产精品免费视频一区| 欧美亚洲国产bt| 免费精品视频最新在线| 欧美国产激情二区三区| 欧美日韩国产首页| 成人福利视频网站| 亚洲成人久久影院| 国产人久久人人人人爽| 欧美天堂亚洲电影院在线播放| 国内国产精品久久| 有码一区二区三区| 久久精品视频免费| 欧美精品高清视频| 成人手机在线视频| 日本亚洲电影天堂| 亚洲欧洲av在线| 精品日韩欧美在线| 欧美日韩激情一区| gogo大胆日本视频一区| 免费成人小视频| 亚洲成人自拍一区| ...中文天堂在线一区| 欧美一区二区三区男人的天堂| 色综合天天做天天爱| 国产精品资源站在线| 舔着乳尖日韩一区| 一区二区三区中文字幕精品精品 | 粉嫩久久99精品久久久久久夜| 午夜在线成人av| 一区二区三区自拍| 亚洲少妇30p| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 欧美亚洲综合在线| 成人精品国产一区二区4080 | 亚洲精品视频一区二区| 日日噜噜夜夜狠狠视频欧美人| 亚洲国产精品av| 成人丝袜18视频在线观看| 日日夜夜一区二区| 亚洲一区二区四区蜜桃| 一区二区三区四区视频精品免费| 精品日韩一区二区三区| 久久精品国产999大香线蕉| 国产成a人亚洲| 欧美日韩亚洲国产综合| 久久久亚洲精品一区二区三区| 亚洲视频一区在线观看| 视频一区欧美精品| 成人看片黄a免费看在线| 欧美色图一区二区三区| 久久久久久亚洲综合影院红桃| 亚洲制服丝袜一区| 中文字幕乱码一区二区免费| 欧美精品一区二| 亚洲综合在线第一页| 日韩—二三区免费观看av| 成人自拍视频在线观看| 91.com在线观看| 日韩伦理av电影| 国产在线精品一区二区不卡了| 99久久99久久精品免费观看| 日韩视频一区二区| 一区二区三区久久| 懂色av一区二区三区蜜臀| 日韩一区二区免费在线电影| 亚洲欧美在线高清| 国产在线一区二区综合免费视频| 欧美在线制服丝袜| 中文字幕精品一区| 韩国毛片一区二区三区| 精品视频在线免费| 亚洲色图在线播放| 国产成人一级电影| 精品久久久久久无| 日本中文字幕一区二区视频| 色视频成人在线观看免| 国产精品美女久久久久aⅴ国产馆| 九九精品一区二区| 日韩欧美你懂的| 日韩电影在线观看电影| 在线观看www91| 一区二区三区中文字幕电影| www.性欧美| 国产精品免费免费| 成人午夜电影网站| 亚洲国产高清在线| 国产a久久麻豆| 国产欧美综合在线| 国产99精品视频| 国产欧美一区二区精品婷婷| 国产自产高清不卡| 久久先锋影音av| 精东粉嫩av免费一区二区三区| 欧美一级欧美三级| 老司机免费视频一区二区| 日韩欧美成人激情|