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

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

?? sbsetup.pas

?? RX Library contains a large number of components, objects and routines for Borland Delphi with full
?? PAS
字號:
{*******************************************************}
{                                                       }
{         Delphi VCL Extensions (RX)                    }
{                                                       }
{         Copyright (c) 1995, 1996 AO ROSNO             }
{         Copyright (c) 1997 Master-Bank                }
{                                                       }
{*******************************************************}

unit SbSetup;

interface

{$I RX.INC}

uses
{$IFDEF WIN32}
  Windows,
{$ELSE}
  WinTypes, WinProcs,
{$ENDIF WIN32}
  SysUtils, Messages, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, Grids, RxCtrls, SpeedBar, ExtCtrls, RxConst;

type
  TSpeedbarSetupWindow = class(TForm)
    ButtonsList: TDrawGrid;
    ButtonsLabel: TLabel;
    SectionList: TDrawGrid;
    CategoriesLabel: TLabel;
    Bevel1: TBevel;
    HintLabel: TLabel;
    CloseBtn: TButton;
    HelpBtn: TButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure SectionListSelectCell(Sender: TObject; Col, Row: Longint;
      var CanSelect: Boolean);
    procedure SectionListDrawCell(Sender: TObject; Col, Row: Longint;
      Rect: TRect; State: TGridDrawState);
    procedure ButtonsListMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure ButtonsListMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    procedure ButtonsListMouseUp(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure ButtonsListSelectCell(Sender: TObject; Col, Row: Longint;
      var CanSelect: Boolean);
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure ButtonsListDrawCell(Sender: TObject; Col, Row: Longint;
      Rect: TRect; State: TGridDrawState);
    procedure CloseBtnClick(Sender: TObject);
    procedure HelpBtnClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
    FButton: TBtnControl;
    FImage: TButtonImage;
    FBar: TSpeedBar;
    FDrag: Boolean;
    FDragItem: TSpeedItem;
    procedure UpdateHint(Section, Row: Integer);
    function CheckSpeedBar: Boolean;
    function CurrentSection: Integer;
    procedure SetSection(Section: Integer);
    procedure UpdateCurrentSection;
    procedure UpdateData(Section: Integer);
    procedure UpdateListHeight;
    procedure SetSpeedBar(Value: TSpeedBar);
    function ItemByRow(Row: Integer): TSpeedItem;
    procedure CMSpeedBarChanged(var Message: TMessage); message CM_SPEEDBARCHANGED;
  public
    { Public declarations }
    property SpeedBar: TSpeedBar read FBar write SetSpeedBar;
  end;

procedure ShowSpeedbarSetupWindow(Speedbar: TSpeedbar; HelpCtx: THelpContext);

implementation

uses VCLUtils, MaxMin, Consts, RXTConst;

{$R *.DFM}

function FindEditor(Speedbar: TSpeedbar): TSpeedbarSetupWindow;
var
  I: Integer;
begin
  Result := nil;
  for I := 0 to Screen.FormCount - 1 do begin
    if Screen.Forms[I] is TSpeedbarSetupWindow then begin
      if TSpeedbarSetupWindow(Screen.Forms[I]).SpeedBar = SpeedBar then
      begin
        Result := TSpeedbarSetupWindow(Screen.Forms[I]);
        Break;
      end;
    end;
  end;
end;

procedure ShowSpeedbarSetupWindow(Speedbar: TSpeedbar; HelpCtx: THelpContext);
var
  Editor: TSpeedbarSetupWindow;
begin
  if Speedbar = nil then Exit;
  Editor := FindEditor(Speedbar);
  if Editor = nil then begin
    Editor := TSpeedbarSetupWindow.Create(Application);
    Editor.Speedbar := Speedbar;
  end;
  try
    if HelpCtx > 0 then Editor.HelpContext := HelpCtx;
{$IFDEF WIN32}
    Editor.BorderIcons := [biSystemMenu];
{$ENDIF}
    Editor.HelpBtn.Visible := (HelpCtx > 0);
    Editor.Show;
    if Editor.WindowState = wsMinimized then Editor.WindowState := wsNormal;
  except
    Editor.Free;
    raise;
  end;
end;

{ TSpeedbarSetupWindow }

const
  MaxBtnListHeight = 186;

function TSpeedbarSetupWindow.CheckSpeedBar: Boolean;
begin
  Result := (FBar <> nil) and (FBar.Owner <> nil) and
    (FBar.Parent <> nil);
end;

function TSpeedbarSetupWindow.CurrentSection: Integer;
begin
  if CheckSpeedBar and (FBar.SectionCount > 0) then
    Result := SectionList.Row
  else Result := -1;
end;

procedure TSpeedbarSetupWindow.SetSection(Section: Integer);
var
  I: Integer;
begin
  if CheckSpeedBar then begin
    I := Section;
    if (I >= 0) and (FBar.SectionCount > 0) then
      ButtonsList.RowCount := FBar.ItemsCount(I)
    else ButtonsList.RowCount := 0;
    SectionList.DefaultColWidth := SectionList.ClientWidth;
    ButtonsList.DefaultColWidth := ButtonsList.ClientWidth;
    UpdateHint(I, ButtonsList.Row);
  end;
end;

procedure TSpeedbarSetupWindow.UpdateCurrentSection;
begin
  SetSection(CurrentSection);
end;

procedure TSpeedbarSetupWindow.UpdateData(Section: Integer);
begin
  if CheckSpeedBar then begin
    SectionList.RowCount := FBar.SectionCount;
    UpdateCurrentSection;
    if (Section >= 0) and (Section < SectionList.RowCount) then
      SectionList.Row := Section;
  end
  else begin
    SectionList.RowCount := 0;
    ButtonsList.RowCount := 0;
  end;
end;

procedure TSpeedbarSetupWindow.UpdateListHeight;
var
  Cnt: Integer;
  MaxHeight: Integer;
begin
  Canvas.Font := Font;
  MaxHeight := MulDiv(MaxBtnListHeight, Screen.PixelsPerInch, 96);
  ButtonsList.DefaultRowHeight := FBar.BtnHeight + 2;
  Cnt := Max(1, Max(ButtonsList.ClientHeight, MaxHeight) div
    (FBar.BtnHeight + 2));
  ButtonsList.ClientHeight := Min(MaxHeight,
    ButtonsList.DefaultRowHeight * Cnt);
  SectionList.ClientHeight := ButtonsList.ClientHeight;
  SectionList.DefaultRowHeight := Canvas.TextHeight('Wg') + 2;
end;

procedure TSpeedbarSetupWindow.SetSpeedBar(Value: TSpeedBar);
begin
  if FBar <> Value then begin
    if FBar <> nil then FBar.SetEditing(0);
    FBar := Value;
    if FBar <> nil then begin
      FBar.SetEditing(Handle);
      UpdateListHeight;
    end;
    UpdateData(-1);
  end;
end;

procedure TSpeedbarSetupWindow.CMSpeedBarChanged(var Message: TMessage);
begin
  if Pointer(Message.LParam) = FBar then begin
    case Message.WParam of
      SBR_CHANGED: UpdateData(CurrentSection);
      SBR_DESTROYED: Close;
      SBR_BTNSIZECHANGED: if FBar <> nil then UpdateListHeight;
    end;
  end;
end;

function TSpeedbarSetupWindow.ItemByRow(Row: Integer): TSpeedItem;
begin
  Result := FBar.Items(CurrentSection, Row);
end;

procedure TSpeedbarSetupWindow.UpdateHint(Section, Row: Integer);
var
  Item: TSpeedItem;
begin
  Item := FBar.Items(Section, Row);
  if Item <> nil then Hint := Item.Hint
  else Hint := '';
end;

procedure TSpeedbarSetupWindow.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
  FButton.Free;
  FButton := nil;
  if FBar <> nil then FBar.SetEditing(0);
  FBar := nil;
end;

procedure TSpeedbarSetupWindow.SectionListSelectCell(Sender: TObject; Col,
  Row: Longint; var CanSelect: Boolean);
begin
  CanSelect := False;
  SetSection(Row);
  CanSelect := True;
end;

procedure TSpeedbarSetupWindow.SectionListDrawCell(Sender: TObject; Col,
  Row: Longint; Rect: TRect; State: TGridDrawState);
begin
  if CheckSpeedBar then begin
    if Row < FBar.SectionCount then begin
      DrawCellText(Sender as TDrawGrid, Col, Row,
        FBar.Sections[Row].Caption, Rect, taLeftJustify, vaCenter
        {$IFDEF RX_D4}, TDrawGrid(Sender).IsRightToLeft {$ENDIF});
    end;
  end;
end;

procedure TSpeedbarSetupWindow.ButtonsListMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  Item: TSpeedItem;
begin
  Item := ItemByRow(ButtonsList.Row);
  if (Item <> nil) and (X < FBar.BtnWidth + 2) and (Button = mbLeft) then
  begin
    FDrag := True;
    if Item.Visible then FDragItem := nil
    else begin
      FDragItem := Item;
      if FButton = nil then begin
        FButton := TBtnControl.Create(Self);
        FButton.AssignSpeedItem(Item);
      end;
    end;
  end;
end;

procedure TSpeedbarSetupWindow.ButtonsListMouseMove(Sender: TObject;
  Shift: TShiftState; X, Y: Integer);
var
  P: TPoint;
begin
  if FDrag and (FButton <> nil) and (FDragItem <> nil) then begin
    P := (Sender as TControl).ClientToScreen(Point(X, Y));
    X := P.X - (FButton.Width {div 2});
    Y := P.Y - (FButton.Height {div 2});
    FButton.Activate(Bounds(X, Y, FBar.BtnWidth, FBar.BtnHeight));
  end
  else if FDrag then SetCursor(Screen.Cursors[crNoDrop]);
end;

procedure TSpeedbarSetupWindow.ButtonsListMouseUp(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  P: TPoint;
begin
  if FDrag and (Button = mbLeft) then
  try
    if (FDragItem <> nil) and (FButton <> nil) then begin
      Dec(X, FButton.Width {div 2});
      Dec(Y, FButton.Height {div 2});
      P := (Sender as TControl).ClientToScreen(Point(X, Y));
      FButton.Free;
      FButton := nil;
      if CheckSpeedBar and (FBar = FindSpeedBar(P)) then begin
        P := FBar.ScreenToClient(P);
        if FBar.AcceptDropItem(FDragItem, P.X, P.Y) then
          UpdateCurrentSection;
      end;
    end
    else SetCursor(Screen.Cursors[ButtonsList.Cursor]);
  finally
    FDrag := False;
    FDragItem := nil;
  end;
end;

procedure TSpeedbarSetupWindow.ButtonsListSelectCell(Sender: TObject; Col,
  Row: Longint; var CanSelect: Boolean);
begin
  CanSelect := not FDrag or (Row = ButtonsList.Row);
  if CanSelect then UpdateHint(CurrentSection, Row)
  else Hint := '';
end;

procedure TSpeedbarSetupWindow.FormCreate(Sender: TObject);
begin
  FImage := TButtonImage.Create;
  FButton := nil;
  FBar := nil;
  FDrag := False;
  CloseBtn.Default := False;
  if NewStyleControls then Font.Style := [];
  { Load string resources }
  CloseBtn.Caption := ResStr(SOKButton);
  HelpBtn.Caption := ResStr(SHelpButton);
  Caption := LoadStr(SCustomizeSpeedbar);
  CategoriesLabel.Caption := LoadStr(SSpeedbarCategories);
  ButtonsLabel.Caption := LoadStr(SAvailButtons);
  HintLabel.Caption := LoadStr(SSpeedbarEditHint);
end;

procedure TSpeedbarSetupWindow.FormDestroy(Sender: TObject);
begin
  FImage.Free;
end;

procedure TSpeedbarSetupWindow.ButtonsListDrawCell(Sender: TObject; Col,
  Row: Longint; Rect: TRect; State: TGridDrawState);
var
  I: Integer;
begin
  I := CurrentSection;
  if (I >= 0) and (Row < FBar.ItemsCount(I)) then
    DrawCellButton(Sender as TDrawGrid, Rect, ItemByRow(Row), FImage
      {$IFDEF RX_D4}, TDrawGrid(Sender).IsRightToLeft {$ENDIF});
end;

procedure TSpeedbarSetupWindow.CloseBtnClick(Sender: TObject);
begin
  Close;
end;

procedure TSpeedbarSetupWindow.HelpBtnClick(Sender: TObject);
begin
  Application.HelpContext(HelpContext);
end;

procedure TSpeedbarSetupWindow.FormShow(Sender: TObject);
begin
  if FBar <> nil then UpdateListHeight;
  SectionList.DefaultColWidth := SectionList.ClientWidth;
  ButtonsList.DefaultColWidth := ButtonsList.ClientWidth;
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产制服丝袜高跟| 国产精品色婷婷| 久久亚洲一区二区三区明星换脸| 久久夜色精品一区| 依依成人综合视频| 国产在线乱码一区二区三区| 97se亚洲国产综合在线| 日韩一二三区不卡| 一区二区三区四区视频精品免费 | 欧美视频一区二| 久久影院午夜片一区| 亚洲mv大片欧洲mv大片精品| 成人黄色大片在线观看| 91精品国产综合久久精品app| 综合精品久久久| 国产真实乱偷精品视频免| 在线免费av一区| 亚洲国产精品成人综合| 日韩影院在线观看| 色婷婷国产精品综合在线观看| 日韩精品一区国产麻豆| 亚洲丰满少妇videoshd| jlzzjlzz亚洲日本少妇| 26uuu成人网一区二区三区| 亚洲午夜精品在线| 91色九色蝌蚪| 中文字幕亚洲区| 粉嫩高潮美女一区二区三区| 欧美成人a∨高清免费观看| 怡红院av一区二区三区| 99视频一区二区| 亚洲国产激情av| 成人午夜碰碰视频| 久久精品一区二区三区四区| 国产剧情一区二区| 日韩一区二区三区观看| 丝袜美腿亚洲色图| 欧美日韩精品一区二区三区蜜桃| 一级女性全黄久久生活片免费| 91在线视频在线| 中文字幕av一区二区三区免费看| 国产成人精品亚洲午夜麻豆| 亚洲自拍偷拍麻豆| 成人在线一区二区三区| 国产精品久久久久久久久快鸭 | 免费观看在线综合| 91精品一区二区三区久久久久久| 偷拍日韩校园综合在线| 欧美精品日韩一区| 秋霞影院一区二区| 日韩欧美综合一区| 激情综合色播激情啊| 久久久夜色精品亚洲| 国内精品第一页| 中文在线资源观看网站视频免费不卡| 国产成人免费9x9x人网站视频| 国产婷婷精品av在线| 成人国产精品免费| 亚洲欧美激情小说另类| 欧美午夜一区二区三区| 偷拍与自拍一区| 久久久三级国产网站| 不卡的av中国片| 亚洲午夜免费视频| 日韩视频在线永久播放| 国产老女人精品毛片久久| 国产精品乱码一区二区三区软件| 一本色道综合亚洲| 视频一区二区三区在线| 久久蜜臀中文字幕| 99热国产精品| 免费看日韩a级影片| 久久综合成人精品亚洲另类欧美 | av激情亚洲男人天堂| 亚洲精品一二三四区| 欧美一区二区三级| 国产91精品一区二区麻豆亚洲| 一区二区在线观看免费| 欧美一区二区三区婷婷月色| 风间由美中文字幕在线看视频国产欧美 | 日韩午夜精品电影| 成人免费三级在线| 日韩精品高清不卡| 欧美国产精品劲爆| 欧美日韩国产一区二区三区地区| 久久机这里只有精品| 亚洲欧美激情小说另类| 亚洲精品在线免费播放| 色综合天天综合在线视频| 成人三级伦理片| 性做久久久久久免费观看 | 欧美性色黄大片手机版| 国产剧情av麻豆香蕉精品| 一区二区三区不卡在线观看 | 亚洲欧美综合另类在线卡通| 91精品国产色综合久久不卡蜜臀| 成人免费毛片片v| 蜜臀av在线播放一区二区三区| 日韩码欧中文字| 精品入口麻豆88视频| 欧美日韩一区成人| 成人高清在线视频| 狠狠色综合播放一区二区| 亚洲国产sm捆绑调教视频| 中文字幕不卡在线播放| 日韩精品一区国产麻豆| 欧美色图一区二区三区| 丁香天五香天堂综合| 狠狠色狠狠色综合| 亚洲成人免费电影| 亚洲精品久久久蜜桃| 国产精品人成在线观看免费 | 在线精品亚洲一区二区不卡| 成人深夜福利app| 国精产品一区一区三区mba桃花| 丝袜亚洲精品中文字幕一区| 亚洲午夜久久久久久久久电影院 | 在线精品视频小说1| 成人一区二区在线观看| 国产精品一区二区男女羞羞无遮挡| 肉肉av福利一精品导航| 亚洲五月六月丁香激情| 亚洲资源在线观看| 亚洲欧美区自拍先锋| 国产精品久久久久久久久免费相片 | 亚洲国产你懂的| 亚洲欧美日韩国产手机在线| 亚洲视频1区2区| 亚洲丝袜自拍清纯另类| 中文字幕一区二区三区四区 | 欧美乱妇20p| 3751色影院一区二区三区| 精品视频123区在线观看| 欧美伊人久久大香线蕉综合69| 欧美在线视频你懂得| 色猫猫国产区一区二在线视频| 91麻豆国产自产在线观看| 91在线视频观看| 在线观看欧美黄色| 欧美日韩一二三| 欧美一区二区三区婷婷月色| 欧美videossexotv100| 精品国产91亚洲一区二区三区婷婷| 精品日韩99亚洲| 久久精品日产第一区二区三区高清版| 国产欧美日韩精品一区| 中文字幕精品三区| 亚洲人成人一区二区在线观看| 亚洲激情图片qvod| 天天做天天摸天天爽国产一区| 久久国产尿小便嘘嘘尿| 国产馆精品极品| 91黄色免费观看| 日韩欧美国产一区二区在线播放| 精品福利在线导航| 日本一区二区电影| 亚洲综合久久久久| 美女视频黄免费的久久 | 一区二区三区毛片| 美女久久久精品| 成人免费av网站| 精品视频一区 二区 三区| 欧美变态tickling挠脚心| 亚洲欧洲在线观看av| 丝袜美腿成人在线| 国产成人aaa| 欧美日韩高清不卡| 欧美高清在线一区二区| 亚洲一区二区欧美| 国产一区二区三区四区在线观看| 91小视频免费观看| 日韩欧美的一区| 亚洲人成伊人成综合网小说| 蜜桃在线一区二区三区| av电影在线观看不卡| 日韩欧美在线123| 一区二区三区视频在线看| 蜜臀va亚洲va欧美va天堂| 91福利在线观看| 国产亚洲一区二区三区在线观看| 五月婷婷色综合| 成人精品视频一区二区三区尤物| 欧美日韩国产小视频在线观看| 亚洲国产精品传媒在线观看| 麻豆一区二区在线| 欧美在线不卡视频| 中文欧美字幕免费| 久久疯狂做爰流白浆xx| 欧美视频一区在线| 国产精品久久三| 国内精品久久久久影院色| 欧美日韩国产a| 一区二区成人在线观看| www.一区二区| 国产香蕉久久精品综合网| 蜜桃视频第一区免费观看| 欧美日韩一级二级| 夜夜爽夜夜爽精品视频| 99久久精品免费看国产免费软件| 久久精品欧美日韩精品|